@dbos-inc/dbos-sdk 0.8.18-preview → 0.8.20-preview
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/cloud-cli/applications/delete-app.d.ts +1 -1
- package/dist/src/cloud-cli/applications/delete-app.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/delete-app.js +2 -2
- package/dist/src/cloud-cli/applications/delete-app.js.map +1 -1
- package/dist/src/cloud-cli/applications/deploy-app-code.d.ts +1 -1
- package/dist/src/cloud-cli/applications/deploy-app-code.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/deploy-app-code.js +2 -2
- package/dist/src/cloud-cli/applications/deploy-app-code.js.map +1 -1
- package/dist/src/cloud-cli/applications/get-app-logs.d.ts +1 -1
- package/dist/src/cloud-cli/applications/get-app-logs.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/get-app-logs.js +2 -2
- package/dist/src/cloud-cli/applications/get-app-logs.js.map +1 -1
- package/dist/src/cloud-cli/applications/list-apps.d.ts +1 -1
- package/dist/src/cloud-cli/applications/list-apps.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/list-apps.js +2 -2
- package/dist/src/cloud-cli/applications/list-apps.js.map +1 -1
- package/dist/src/cloud-cli/applications/register-app.d.ts +1 -1
- package/dist/src/cloud-cli/applications/register-app.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/register-app.js +2 -2
- package/dist/src/cloud-cli/applications/register-app.js.map +1 -1
- package/dist/src/cloud-cli/applications/update-app.d.ts +1 -1
- package/dist/src/cloud-cli/applications/update-app.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/update-app.js +2 -2
- package/dist/src/cloud-cli/applications/update-app.js.map +1 -1
- package/dist/src/cloud-cli/cli.js +22 -26
- package/dist/src/cloud-cli/cli.js.map +1 -1
- package/dist/src/cloud-cli/register.d.ts +1 -1
- package/dist/src/cloud-cli/register.d.ts.map +1 -1
- package/dist/src/cloud-cli/register.js +2 -2
- package/dist/src/cloud-cli/register.js.map +1 -1
- package/dist/src/cloud-cli/userdb.d.ts +4 -4
- package/dist/src/cloud-cli/userdb.d.ts.map +1 -1
- package/dist/src/cloud-cli/userdb.js +9 -9
- package/dist/src/cloud-cli/userdb.js.map +1 -1
- package/dist/src/staticAnalysis/TypeParser.d.ts +0 -1
- package/dist/src/staticAnalysis/TypeParser.d.ts.map +1 -1
- package/dist/src/staticAnalysis/TypeParser.js +43 -22
- package/dist/src/staticAnalysis/TypeParser.js.map +1 -1
- package/package.json +1 -1
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function deleteApp(appName: string, host: string
|
1
|
+
export declare function deleteApp(appName: string, host: string): Promise<number>;
|
2
2
|
//# sourceMappingURL=delete-app.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"delete-app.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/delete-app.ts"],"names":[],"mappings":"AAIA,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"delete-app.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/delete-app.ts"],"names":[],"mappings":"AAIA,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAwB9E"}
|
@@ -7,12 +7,12 @@ exports.deleteApp = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
8
|
const logs_1 = require("../../telemetry/logs");
|
9
9
|
const utils_1 = require("../utils");
|
10
|
-
async function deleteApp(appName, host
|
10
|
+
async function deleteApp(appName, host) {
|
11
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 {
|
15
|
-
await axios_1.default.delete(`
|
15
|
+
await axios_1.default.delete(`https://${host}/${userCredentials.userName}/application/${appName}`, {
|
16
16
|
headers: {
|
17
17
|
"Content-Type": "application/json",
|
18
18
|
Authorization: bearerToken,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"delete-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/delete-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAoD;AACpD,oCAA+C;AAExC,KAAK,UAAU,SAAS,CAAC,OAAe,EAAE,IAAY
|
1
|
+
{"version":3,"file":"delete-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/delete-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAoD;AACpD,oCAA+C;AAExC,KAAK,UAAU,SAAS,CAAC,OAAe,EAAE,IAAY;IAC3D,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,CAAC;QACH,MAAM,eAAK,CAAC,MAAM,CAAC,WAAW,IAAI,IAAI,eAAe,CAAC,QAAQ,gBAAgB,OAAO,EAAE,EAAE;YACvF,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;IACX,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,OAAO,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;AACH,CAAC;AAxBD,8BAwBC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function deployAppCode(appName: string, host: string
|
1
|
+
export declare function deployAppCode(appName: string, host: string): Promise<number>;
|
2
2
|
//# sourceMappingURL=deploy-app-code.d.ts.map
|
@@ -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,
|
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,GAAG,OAAO,CAAC,MAAM,CAAC,CA+DlF"}
|
@@ -13,7 +13,7 @@ const utils_1 = require("../utils");
|
|
13
13
|
const utils_2 = require("../../utils");
|
14
14
|
const config_1 = require("../../dbos-runtime/config");
|
15
15
|
const deployDirectoryName = "dbos_deploy";
|
16
|
-
async function deployAppCode(appName, host
|
16
|
+
async function deployAppCode(appName, host) {
|
17
17
|
const logger = new logs_1.GlobalLogger();
|
18
18
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
19
19
|
const bearerToken = "Bearer " + userCredentials.token;
|
@@ -46,7 +46,7 @@ async function deployAppCode(appName, host, port) {
|
|
46
46
|
(0, child_process_1.execSync)(`zip -ry ${deployDirectoryName}/${appName}.zip ./* -x ${deployDirectoryName}/* ${config_1.dbosConfigFilePath} > /dev/null`);
|
47
47
|
(0, child_process_1.execSync)(`zip -j ${deployDirectoryName}/${appName}.zip ${deployDirectoryName}/${config_1.dbosConfigFilePath} > /dev/null`);
|
48
48
|
const zipData = (0, utils_2.readFileSync)(`${deployDirectoryName}/${appName}.zip`, "base64");
|
49
|
-
await axios_1.default.post(`
|
49
|
+
await axios_1.default.post(`https://${host}/${userCredentials.userName}/application/${appName}`, {
|
50
50
|
application_version: version,
|
51
51
|
application_archive: zipData,
|
52
52
|
}, {
|
@@ -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,+CAAoD;AACpD,oCAA+C;AAC/C,uCAA4D;AAC5D,sDAA2F;AAE3F,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAEnC,KAAK,UAAU,aAAa,CAAC,OAAe,EAAE,IAAY
|
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;IAC/D,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,CAAC;QACH,IAAA,uBAAe,EAAC,mBAAmB,CAAC,CAAC;QAErC,MAAM,UAAU,GAA2B,IAAA,uBAAc,EAAC,2BAAkB,CAAC,CAAC;QAC9E,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,CAAC,KAAK,CAAC,mBAAmB,2BAAkB,EAAE,CAAC,CAAC;YACtD,OAAO,CAAC,CAAC;QACX,CAAC;QAED,gEAAgE;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aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,yBAAyB,OAAO,iBAAiB,OAAO,EAAE,CAAC,CAAC;QACxE,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,OAAO,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;AACH,CAAC;AA/DD,sCA+DC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function getAppLogs(appName: string, host: string
|
1
|
+
export declare function getAppLogs(appName: string, host: string): Promise<number>;
|
2
2
|
//# sourceMappingURL=get-app-logs.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-app-logs.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/get-app-logs.ts"],"names":[],"mappings":"AAIA,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"get-app-logs.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/get-app-logs.ts"],"names":[],"mappings":"AAIA,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAyB/E"}
|
@@ -7,12 +7,12 @@ exports.getAppLogs = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
8
|
const logs_1 = require("../../telemetry/logs");
|
9
9
|
const utils_1 = require("../utils");
|
10
|
-
async function getAppLogs(appName, host
|
10
|
+
async function getAppLogs(appName, host) {
|
11
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 {
|
15
|
-
const res = await axios_1.default.get(`
|
15
|
+
const res = await axios_1.default.get(`https://${host}/${userCredentials.userName}/logs/application/${appName}`, {
|
16
16
|
headers: {
|
17
17
|
"Content-Type": "application/json",
|
18
18
|
Authorization: bearerToken,
|
@@ -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,+CAAoD;AACpD,oCAA+C;AAExC,KAAK,UAAU,UAAU,CAAC,OAAe,EAAE,IAAY
|
1
|
+
{"version":3,"file":"get-app-logs.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/get-app-logs.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAoD;AACpD,oCAA+C;AAExC,KAAK,UAAU,UAAU,CAAC,OAAe,EAAE,IAAY;IAC5D,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,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,eAAe,CAAC,QAAQ,qBAAqB,OAAO,EAAE,EAAE;YACrG,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;IACX,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,0CAA0C,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YACvF,OAAO,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,0CAA0C,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3F,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;AACH,CAAC;AAzBD,gCAyBC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function listApps(host: string
|
1
|
+
export declare function listApps(host: string): Promise<number>;
|
2
2
|
//# sourceMappingURL=list-apps.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list-apps.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/list-apps.ts"],"names":[],"mappings":"AAKA,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"list-apps.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/list-apps.ts"],"names":[],"mappings":"AAKA,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkC5D"}
|
@@ -7,12 +7,12 @@ exports.listApps = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
8
|
const logs_1 = require("../../telemetry/logs");
|
9
9
|
const utils_1 = require("../utils");
|
10
|
-
async function listApps(host
|
10
|
+
async function listApps(host) {
|
11
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 {
|
15
|
-
const list = await axios_1.default.get(`
|
15
|
+
const list = await axios_1.default.get(`https://${host}/${userCredentials.userName}/application`, {
|
16
16
|
headers: {
|
17
17
|
Authorization: bearerToken,
|
18
18
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list-apps.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/list-apps.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAoD;AACpD,oCAA+C;AAGxC,KAAK,UAAU,QAAQ,CAAC,IAAY
|
1
|
+
{"version":3,"file":"list-apps.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/list-apps.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAoD;AACpD,oCAA+C;AAGxC,KAAK,UAAU,QAAQ,CAAC,IAAY;IACzC,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,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,eAAK,CAAC,GAAG,CAC1B,WAAW,IAAI,IAAI,eAAe,CAAC,QAAQ,cAAc,EACzD;YACE,OAAO,EAAE;gBACP,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,IAAI,GAAkB,IAAI,CAAC,IAAqB,CAAC;QACvD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;YACpC,OAAO,CAAC,CAAC;QACX,CAAC;QACD,MAAM,aAAa,GAAkB,EAAE,CAAA;QACvC,KAAK,MAAM,WAAW,IAAI,IAAI,EAAE,CAAC;YAC/B,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,SAAS,EAAE,WAAW,CAAC,OAAO,EAAE,cAAc,EAAE,WAAW,CAAC,YAAY,EAAE,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;QACjL,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;QAC3C,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YACjE,OAAO,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,gCAAiC,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACrE,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;AACH,CAAC;AAlCD,4BAkCC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function registerApp(appName: string, dbname: string, host: string,
|
1
|
+
export declare function registerApp(appName: string, dbname: string, host: string, machines: number): Promise<number>;
|
2
2
|
//# sourceMappingURL=register-app.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/register-app.ts"],"names":[],"mappings":"AAIA,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/register-app.ts"],"names":[],"mappings":"AAIA,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiClH"}
|
@@ -7,12 +7,12 @@ exports.registerApp = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
8
|
const logs_1 = require("../../telemetry/logs");
|
9
9
|
const utils_1 = require("../utils");
|
10
|
-
async function registerApp(appName, dbname, host,
|
10
|
+
async function registerApp(appName, dbname, host, machines) {
|
11
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 {
|
15
|
-
const register = await axios_1.default.put(`
|
15
|
+
const register = await axios_1.default.put(`https://${host}/${userCredentials.userName}/application`, {
|
16
16
|
name: appName,
|
17
17
|
database: dbname,
|
18
18
|
max_vms: machines,
|
@@ -1 +1 @@
|
|
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,MAAc,EAAE,IAAY,
|
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,MAAc,EAAE,IAAY,EAAE,QAAgB;IAC/F,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,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAC9B,WAAW,IAAI,IAAI,eAAe,CAAC,QAAQ,cAAc,EACzD;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,MAAM;YAChB,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;IACX,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,kCAAkC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC/E,OAAO,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,kCAAkC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACnF,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;AACH,CAAC;AAjCD,kCAiCC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function updateApp(appName: string, host: string,
|
1
|
+
export declare function updateApp(appName: string, host: string, machines: number): Promise<number>;
|
2
2
|
//# sourceMappingURL=update-app.d.ts.map
|
@@ -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,
|
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,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkChG"}
|
@@ -7,13 +7,13 @@ exports.updateApp = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
8
|
const logs_1 = require("../../telemetry/logs");
|
9
9
|
const utils_1 = require("../utils");
|
10
|
-
async function updateApp(appName, host,
|
10
|
+
async function updateApp(appName, host, machines) {
|
11
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 {
|
15
15
|
logger.info(`Updating application ${appName} to ${machines} machines`);
|
16
|
-
const update = await axios_1.default.patch(`
|
16
|
+
const update = await axios_1.default.patch(`https://${host}/${userCredentials.userName}/application/${appName}`, {
|
17
17
|
name: appName,
|
18
18
|
max_vms: machines
|
19
19
|
}, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"update-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/update-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAoD;AACpD,oCAA+C;AAGxC,KAAK,UAAU,SAAS,CAAC,OAAe,EAAE,IAAY,EAAE,
|
1
|
+
{"version":3,"file":"update-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/update-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAoD;AACpD,oCAA+C;AAGxC,KAAK,UAAU,SAAS,CAAC,OAAe,EAAE,IAAY,EAAE,QAAgB;IAC7E,MAAM,MAAM,GAAI,IAAI,mBAAY,EAAE,CAAC;IACnC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,IAAI,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,wBAAw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
|
const utils_1 = require("./utils");
|
10
10
|
const program = new commander_1.Command();
|
11
|
-
const DEFAULT_HOST = "
|
12
|
-
const DEFAULT_PORT = "8080";
|
11
|
+
const DEFAULT_HOST = process.env.DBOS_DOMAIN; // TODO: Once we have a "production" cluster, hardcode its domain name here
|
13
12
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
14
13
|
const packageJson = require('../../../package.json');
|
15
14
|
program.
|
@@ -30,7 +29,6 @@ program
|
|
30
29
|
.description('Register a user and log in to DBOS cloud')
|
31
30
|
.requiredOption('-u, --username <string>', 'Username')
|
32
31
|
.option('-h, --host <string>', 'Specify the host', DEFAULT_HOST)
|
33
|
-
.option('-p, --port <string>', 'Specify the port', DEFAULT_PORT)
|
34
32
|
.action(async (options) => {
|
35
33
|
if (!(0, utils_1.credentialsExist)()) {
|
36
34
|
const exitCode = await (0, login_1.login)(options.username);
|
@@ -38,7 +36,7 @@ program
|
|
38
36
|
process.exit(exitCode);
|
39
37
|
}
|
40
38
|
}
|
41
|
-
const exitCode = await (0, register_1.registerUser)(options.username, options.host
|
39
|
+
const exitCode = await (0, register_1.registerUser)(options.username, options.host);
|
42
40
|
process.exit(exitCode);
|
43
41
|
});
|
44
42
|
/////////////////////////////
|
@@ -47,8 +45,7 @@ program
|
|
47
45
|
const applicationCommands = program
|
48
46
|
.command('applications')
|
49
47
|
.description('Manage your DBOS applications')
|
50
|
-
.option('-h, --host <string>', 'Specify the host', DEFAULT_HOST)
|
51
|
-
.option('-p, --port <string>', 'Specify the port', DEFAULT_PORT);
|
48
|
+
.option('-h, --host <string>', 'Specify the host', DEFAULT_HOST);
|
52
49
|
applicationCommands
|
53
50
|
.command('register')
|
54
51
|
.description('Register a new application')
|
@@ -56,8 +53,8 @@ applicationCommands
|
|
56
53
|
.requiredOption('-d, --database <string>', 'Specify the app database name')
|
57
54
|
.option('-m, --machines <string>', 'Number of VMs to deploy', '1')
|
58
55
|
.action(async (options) => {
|
59
|
-
const { host
|
60
|
-
const exitCode = await (0, applications_1.registerApp)(options.name, options.database, host,
|
56
|
+
const { host } = applicationCommands.opts();
|
57
|
+
const exitCode = await (0, applications_1.registerApp)(options.name, options.database, host, parseInt(options.machines));
|
61
58
|
process.exit(exitCode);
|
62
59
|
});
|
63
60
|
applicationCommands
|
@@ -66,8 +63,8 @@ applicationCommands
|
|
66
63
|
.requiredOption('-n, --name <string>', 'Specify the app name')
|
67
64
|
.requiredOption('-m, --machines <string>', 'Number of VMs to deploy')
|
68
65
|
.action(async (options) => {
|
69
|
-
const { host
|
70
|
-
const exitCode = await (0, applications_1.updateApp)(options.name, host,
|
66
|
+
const { host } = applicationCommands.opts();
|
67
|
+
const exitCode = await (0, applications_1.updateApp)(options.name, host, parseInt(options.machines));
|
71
68
|
process.exit(exitCode);
|
72
69
|
});
|
73
70
|
applicationCommands
|
@@ -75,8 +72,8 @@ applicationCommands
|
|
75
72
|
.description('Deploy an application code to the cloud')
|
76
73
|
.requiredOption('-n, --name <string>', 'Specify the app name')
|
77
74
|
.action(async (options) => {
|
78
|
-
const { host
|
79
|
-
const exitCode = await (0, applications_1.deployAppCode)(options.name, host
|
75
|
+
const { host } = applicationCommands.opts();
|
76
|
+
const exitCode = await (0, applications_1.deployAppCode)(options.name, host);
|
80
77
|
process.exit(exitCode);
|
81
78
|
});
|
82
79
|
applicationCommands
|
@@ -84,16 +81,16 @@ applicationCommands
|
|
84
81
|
.description('Delete a previously deployed application')
|
85
82
|
.requiredOption('-n, --name <string>', 'Specify the app name')
|
86
83
|
.action(async (options) => {
|
87
|
-
const { host
|
88
|
-
const exitCode = await (0, applications_1.deleteApp)(options.name, host
|
84
|
+
const { host } = applicationCommands.opts();
|
85
|
+
const exitCode = await (0, applications_1.deleteApp)(options.name, host);
|
89
86
|
process.exit(exitCode);
|
90
87
|
});
|
91
88
|
applicationCommands
|
92
89
|
.command('list')
|
93
90
|
.description('List all deployed applications')
|
94
91
|
.action(async () => {
|
95
|
-
const { host
|
96
|
-
const exitCode = await (0, applications_1.listApps)(host
|
92
|
+
const { host } = applicationCommands.opts();
|
93
|
+
const exitCode = await (0, applications_1.listApps)(host);
|
97
94
|
process.exit(exitCode);
|
98
95
|
});
|
99
96
|
applicationCommands
|
@@ -101,8 +98,8 @@ applicationCommands
|
|
101
98
|
.description('Print the microVM logs of a deployed application')
|
102
99
|
.requiredOption('-n, --name <string>', 'Specify the app name')
|
103
100
|
.action(async (options) => {
|
104
|
-
const { host
|
105
|
-
const exitCode = await (0, applications_1.getAppLogs)(options.name, host
|
101
|
+
const { host } = applicationCommands.opts();
|
102
|
+
const exitCode = await (0, applications_1.getAppLogs)(options.name, host);
|
106
103
|
process.exit(exitCode);
|
107
104
|
});
|
108
105
|
//////////////////////////////
|
@@ -111,8 +108,7 @@ applicationCommands
|
|
111
108
|
const userdbCommands = program
|
112
109
|
.command('userdb')
|
113
110
|
.description('Manage your databases')
|
114
|
-
.option('-h, --host <string>', 'Specify the host', DEFAULT_HOST)
|
115
|
-
.option('-p, --port <string>', 'Specify the port', DEFAULT_PORT);
|
111
|
+
.option('-h, --host <string>', 'Specify the host', DEFAULT_HOST);
|
116
112
|
userdbCommands
|
117
113
|
.command('create')
|
118
114
|
.argument('<string>', 'database name')
|
@@ -120,22 +116,22 @@ userdbCommands
|
|
120
116
|
.requiredOption('-W, --password <string>', 'Specify the admin password')
|
121
117
|
.option('-s, --sync', 'make synchronous call', true)
|
122
118
|
.action((async (dbname, options) => {
|
123
|
-
const { host
|
124
|
-
await (0, userdb_1.createUserDb)(host,
|
119
|
+
const { host } = userdbCommands.opts();
|
120
|
+
await (0, userdb_1.createUserDb)(host, dbname, options.admin, options.password, options.sync);
|
125
121
|
}));
|
126
122
|
userdbCommands
|
127
123
|
.command('status')
|
128
124
|
.argument('<string>', 'database name')
|
129
125
|
.action((async (dbname) => {
|
130
|
-
const { host
|
131
|
-
await (0, userdb_1.getUserDb)(host,
|
126
|
+
const { host } = userdbCommands.opts();
|
127
|
+
await (0, userdb_1.getUserDb)(host, dbname);
|
132
128
|
}));
|
133
129
|
userdbCommands
|
134
130
|
.command('delete')
|
135
131
|
.argument('<string>', 'database name')
|
136
132
|
.action((async (dbname) => {
|
137
|
-
const { host
|
138
|
-
await (0, userdb_1.deleteUserDb)(host,
|
133
|
+
const { host } = userdbCommands.opts();
|
134
|
+
await (0, userdb_1.deleteUserDb)(host, dbname);
|
139
135
|
}));
|
140
136
|
userdbCommands
|
141
137
|
.command('migrate')
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/cloud-cli/cli.ts"],"names":[],"mappings":";;;AAEA,kDAOyB;AACzB,yCAAoC;AACpC,mCAAgC;AAChC,yCAA0C;AAC1C,qCAA6F;AAC7F,mCAA2C;AAE3C,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,MAAM,YAAY,GAAG,
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/cloud-cli/cli.ts"],"names":[],"mappings":";;;AAEA,kDAOyB;AACzB,yCAAoC;AACpC,mCAAgC;AAChC,yCAA0C;AAC1C,qCAA6F;AAC7F,mCAA2C;AAE3C,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,2EAA2E;AAEzH,8DAA8D;AAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAwB,CAAC;AAC5E,OAAO;IACL,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAE/B,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AAErB,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,sBAAsB,CAAC;KACnC,cAAc,CAAC,yBAAyB,EAAE,UAAU,CAAC;KACrD,MAAM,CAAC,KAAK,EAAE,OAA6B,EAAE,EAAE;IAC9C,MAAM,QAAQ,GAAG,MAAM,IAAA,aAAK,EAAC,O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M,CAAC,CAAA;AAClC,CAAC,CAAC,CAAC,CAAA;AAEL,cAAc;KACX,OAAO,CAAC,SAAS,CAAC;KAClB,MAAM,CAAC,CAAC,GAAG,EAAE;IACZ,MAAM,QAAQ,GAAG,IAAA,gBAAO,GAAE,CAAC;IAC3B,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC,CAAA;AAEL,cAAc;KACX,OAAO,CAAC,mBAAmB,CAAC;KAC5B,MAAM,CAAC,CAAC,GAAG,EAAE;IACZ,MAAM,QAAQ,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,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function registerUser(username: string, host: string
|
1
|
+
export declare function registerUser(username: string, host: string): Promise<number>;
|
2
2
|
//# sourceMappingURL=register.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/register.ts"],"names":[],"mappings":"AAIA,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/register.ts"],"names":[],"mappings":"AAIA,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA8BlF"}
|
@@ -7,14 +7,14 @@ exports.registerUser = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
8
|
const logs_1 = require("../telemetry/logs");
|
9
9
|
const utils_1 = require("./utils");
|
10
|
-
async function registerUser(username, host
|
10
|
+
async function registerUser(username, host) {
|
11
11
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
12
12
|
const bearerToken = "Bearer " + userCredentials.token;
|
13
13
|
const userName = userCredentials.userName;
|
14
14
|
const logger = new logs_1.GlobalLogger();
|
15
15
|
try {
|
16
16
|
// First, register the user.
|
17
|
-
const register = await axios_1.default.put(`
|
17
|
+
const register = await axios_1.default.put(`https://${host}/user`, {
|
18
18
|
name: userName,
|
19
19
|
}, {
|
20
20
|
headers: {
|
@@ -1 +1 @@
|
|
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
|
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;IAC/D,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,CAAC;QACH,4BAA4B;QAC5B,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAC9B,WAAW,IAAI,OAAO,EACtB;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;IAChE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,2BAA2B,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QAC1E,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,2BAA2B,QAAQ,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/E,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AA9BD,oCA8BC"}
|
@@ -4,10 +4,10 @@ export interface UserDBInstance {
|
|
4
4
|
readonly HostName: string;
|
5
5
|
readonly Port: number;
|
6
6
|
}
|
7
|
-
export declare function createUserDb(host: string,
|
8
|
-
export declare function deleteUserDb(host: string,
|
9
|
-
export declare function getUserDb(host: string,
|
7
|
+
export declare function createUserDb(host: string, dbName: string, adminName: string, adminPassword: string, sync: boolean): Promise<void>;
|
8
|
+
export declare function deleteUserDb(host: string, dbName: string): Promise<void>;
|
9
|
+
export declare function getUserDb(host: string, dbName: string): Promise<void>;
|
10
10
|
export declare function migrate(): number;
|
11
11
|
export declare function rollbackMigration(): number;
|
12
|
-
export declare function getUserDBInfo(host: string,
|
12
|
+
export declare function getUserDBInfo(host: string, dbName: string): Promise<UserDBInstance>;
|
13
13
|
//# sourceMappingURL=userdb.d.ts.map
|
@@ -1 +1 @@
|
|
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,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,
|
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,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,iBAmCvH;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAoB9D;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAa3D;AAED,wBAAgB,OAAO,IAAI,MAAM,CA6DhC;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CA4B1C;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAYzF"}
|
@@ -11,12 +11,12 @@ const utils_2 = require("../utils");
|
|
11
11
|
const config_1 = require("../dbos-runtime/config");
|
12
12
|
const child_process_1 = require("child_process");
|
13
13
|
const user_database_1 = require("../user_database");
|
14
|
-
async function createUserDb(host,
|
14
|
+
async function createUserDb(host, dbName, adminName, adminPassword, sync) {
|
15
15
|
const logger = new logs_1.GlobalLogger();
|
16
16
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
17
17
|
const bearerToken = "Bearer " + userCredentials.token;
|
18
18
|
try {
|
19
|
-
await axios_1.default.post(`
|
19
|
+
await axios_1.default.post(`https://${host}/${userCredentials.userName}/databases/userdb`, { Name: dbName, AdminName: adminName, AdminPassword: adminPassword }, {
|
20
20
|
headers: {
|
21
21
|
"Content-Type": "application/json",
|
22
22
|
Authorization: bearerToken,
|
@@ -27,7 +27,7 @@ async function createUserDb(host, port, dbName, adminName, adminPassword, sync)
|
|
27
27
|
let status = "";
|
28
28
|
while (status != "available") {
|
29
29
|
await (0, utils_2.sleep)(30000);
|
30
|
-
const userDBInfo = await getUserDBInfo(host,
|
30
|
+
const userDBInfo = await getUserDBInfo(host, dbName);
|
31
31
|
logger.info(userDBInfo);
|
32
32
|
status = userDBInfo.Status;
|
33
33
|
}
|
@@ -43,12 +43,12 @@ async function createUserDb(host, port, dbName, adminName, adminPassword, sync)
|
|
43
43
|
}
|
44
44
|
}
|
45
45
|
exports.createUserDb = createUserDb;
|
46
|
-
async function deleteUserDb(host,
|
46
|
+
async function deleteUserDb(host, dbName) {
|
47
47
|
const logger = new logs_1.GlobalLogger();
|
48
48
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
49
49
|
const bearerToken = "Bearer " + userCredentials.token;
|
50
50
|
try {
|
51
|
-
await axios_1.default.delete(`
|
51
|
+
await axios_1.default.delete(`https://${host}/${userCredentials.userName}/databases/userdb/${dbName}`, {
|
52
52
|
headers: {
|
53
53
|
"Content-Type": "application/json",
|
54
54
|
Authorization: bearerToken,
|
@@ -66,10 +66,10 @@ async function deleteUserDb(host, port, dbName) {
|
|
66
66
|
}
|
67
67
|
}
|
68
68
|
exports.deleteUserDb = deleteUserDb;
|
69
|
-
async function getUserDb(host,
|
69
|
+
async function getUserDb(host, dbName) {
|
70
70
|
const logger = new logs_1.GlobalLogger();
|
71
71
|
try {
|
72
|
-
const userDBInfo = await getUserDBInfo(host,
|
72
|
+
const userDBInfo = await getUserDBInfo(host, dbName);
|
73
73
|
logger.info(userDBInfo);
|
74
74
|
}
|
75
75
|
catch (e) {
|
@@ -170,10 +170,10 @@ function rollbackMigration() {
|
|
170
170
|
return 0;
|
171
171
|
}
|
172
172
|
exports.rollbackMigration = rollbackMigration;
|
173
|
-
async function getUserDBInfo(host,
|
173
|
+
async function getUserDBInfo(host, dbName) {
|
174
174
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
175
175
|
const bearerToken = "Bearer " + userCredentials.token;
|
176
|
-
const res = await axios_1.default.get(`
|
176
|
+
const res = await axios_1.default.get(`https://${host}/${userCredentials.userName}/databases/userdb/info/${dbName}`, {
|
177
177
|
headers: {
|
178
178
|
"Content-Type": "application/json",
|
179
179
|
Authorization: bearerToken,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"userdb.js","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAiD;AACjD,mCAA8C;AAC9C,oCAAiC;AACjC,mDAAwF;AACxF,iDAAyC;AACzC,oDAAoD;AAS7C,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,
|
1
|
+
{"version":3,"file":"userdb.js","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAiD;AACjD,mCAA8C;AAC9C,oCAAiC;AACjC,mDAAwF;AACxF,iDAAyC;AACzC,oDAAoD;AAS7C,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,MAAc,EAAE,SAAiB,EAAE,aAAqB,EAAE,IAAa;IACtH,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,CAAC;QACH,MAAM,eAAK,CAAC,IAAI,CACd,WAAW,IAAI,I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7B,OAAO,EAAE,EAAE,CAAC,OAAO;IAK/B,KAAK,IAAI,SAAS,SAAS,EAAE,GAAG,SAAS;CAkH1C;AAED,wBAAsB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CA4BvG"}
|
@@ -60,46 +60,67 @@ class TypeParser {
|
|
60
60
|
const required = !node.questionToken && !node.initializer;
|
61
61
|
return { node, name, decorators, required };
|
62
62
|
}
|
63
|
+
#getImportSpecifierFromPAE(pae, checker) {
|
64
|
+
const node = pae.expression;
|
65
|
+
const symbol = checker.getSymbolAtLocation(node);
|
66
|
+
const decls = symbol?.getDeclarations() ?? [];
|
67
|
+
for (const decl of decls) {
|
68
|
+
if (typescript_1.default.isNamespaceImport(decl)) {
|
69
|
+
const name = pae.name;
|
70
|
+
const module = decl.parent.parent.moduleSpecifier;
|
71
|
+
return { name: name.getText(), module: module.text };
|
72
|
+
}
|
73
|
+
}
|
74
|
+
return undefined;
|
75
|
+
}
|
63
76
|
#getDecoratorIdentifier(node) {
|
64
77
|
if (typescript_1.default.isCallExpression(node.expression)) {
|
78
|
+
if (typescript_1.default.isPropertyAccessExpression(node.expression.expression)) {
|
79
|
+
const pae = node.expression.expression;
|
80
|
+
// Let's imagine a module is the expression
|
81
|
+
const { name, module } = this.#getImportSpecifierFromPAE(pae, this.#checker) ?? {};
|
82
|
+
//console.log("PROPERTY ACCESS: "+printAst(pae) + " ---- "+`${mod?.module}.${mod?.name}`);
|
83
|
+
return { name, module, args: node.expression.arguments };
|
84
|
+
}
|
65
85
|
if (typescript_1.default.isIdentifier(node.expression.expression)) {
|
66
|
-
|
86
|
+
const { name, module } = this.#getImportSpecifier(node.expression.expression, this.#checker) ?? {};
|
87
|
+
return { name, module, args: node.expression.arguments };
|
67
88
|
}
|
68
89
|
this.#diags.raise(`Unexpected decorator CallExpression.expression type: ${typescript_1.default.SyntaxKind[node.expression.expression.kind]}`, node);
|
69
90
|
}
|
70
91
|
if (typescript_1.default.isIdentifier(node.expression)) {
|
71
|
-
|
92
|
+
const { name, module } = this.#getImportSpecifier(node.expression, this.#checker) ?? {};
|
93
|
+
return { name, module, args: [] };
|
72
94
|
}
|
73
95
|
this.#diags.raise(`Unexpected decorator expression type: ${typescript_1.default.SyntaxKind[node.expression.kind]}`, node);
|
74
96
|
}
|
97
|
+
#getImportSpecifier(node, checker) {
|
98
|
+
const symbol = checker.getSymbolAtLocation(node);
|
99
|
+
const decls = symbol?.getDeclarations() ?? [];
|
100
|
+
for (const decl of decls) {
|
101
|
+
if (typescript_1.default.isImportSpecifier(decl)) {
|
102
|
+
// decl.name is the name for this type used in the local module.
|
103
|
+
// If the type name was overridden in the local module, the original type name is stored in decl.propertyName.
|
104
|
+
// Otherwise, decl.propertyName is undefined.
|
105
|
+
const name = (decl.propertyName ?? decl.name).getText();
|
106
|
+
// comment in TS AST declaration indicates moduleSpecifier *must* be a string literal
|
107
|
+
// "If [ImportDeclaration.moduleSpecifier] is not a StringLiteral it will be a grammar error."
|
108
|
+
const module = decl.parent.parent.parent.moduleSpecifier;
|
109
|
+
return { name, module: module.text };
|
110
|
+
}
|
111
|
+
}
|
112
|
+
return undefined;
|
113
|
+
}
|
75
114
|
#getDecorators(node) {
|
76
115
|
return (typescript_1.default.getDecorators(node) ?? [])
|
77
116
|
.map(node => {
|
78
117
|
const decoratorIdentifier = this.#getDecoratorIdentifier(node);
|
79
118
|
if (!decoratorIdentifier)
|
80
119
|
return undefined;
|
81
|
-
const {
|
82
|
-
|
83
|
-
return { node, identifier, name, module, args };
|
120
|
+
const { name, module, args } = decoratorIdentifier;
|
121
|
+
return { node, name, module, args };
|
84
122
|
})
|
85
123
|
.filter((d) => !!d);
|
86
|
-
function getImportSpecifier(node, checker) {
|
87
|
-
const symbol = checker.getSymbolAtLocation(node);
|
88
|
-
const decls = symbol?.getDeclarations() ?? [];
|
89
|
-
for (const decl of decls) {
|
90
|
-
if (typescript_1.default.isImportSpecifier(decl)) {
|
91
|
-
// decl.name is the name for this type used in the local module.
|
92
|
-
// If the type name was overridden in the local module, the original type name is stored in decl.propertyName.
|
93
|
-
// Otherwise, decl.propertyName is undefined.
|
94
|
-
const name = (decl.propertyName ?? decl.name).getText();
|
95
|
-
// comment in TS AST declaration indicates moduleSpecifier *must* be a string literal
|
96
|
-
// "If [ImportDeclaration.moduleSpecifier] is not a StringLiteral it will be a grammar error."
|
97
|
-
const module = decl.parent.parent.parent.moduleSpecifier;
|
98
|
-
return { name, module: module.text };
|
99
|
-
}
|
100
|
-
}
|
101
|
-
return undefined;
|
102
|
-
}
|
103
124
|
}
|
104
125
|
}
|
105
126
|
exports.TypeParser = TypeParser;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TypeParser.js","sourceRoot":"","sources":["../../../src/staticAnalysis/TypeParser.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,6CAAgE;AAChE,0DAA6B;AAC7B,gEAAkC;
|
1
|
+
{"version":3,"file":"TypeParser.js","sourceRoot":"","sources":["../../../src/staticAnalysis/TypeParser.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,6CAAgE;AAChE,0DAA6B;AAC7B,gEAAkC;AA8BlC,SAAS,cAAc,CAAC,IAA0B;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC;IAClC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,oBAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAChE,CAAC;AAED,MAAa,UAAU;IACZ,QAAQ,CAAa;IACrB,QAAQ,CAAiB;IACzB,MAAM,GAAG,IAAI,iCAAoB,EAAE,CAAC;IAC7C,IAAI,KAAK,KAAK,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAEzC,YAAY,OAAmB;QA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