@dbos-inc/dbos-sdk 0.10.3-preview → 0.10.5-preview.g32e0b301f4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/dist/packages/dbos-cloud/applications/delete-app.d.ts.map +1 -1
  2. package/dist/packages/dbos-cloud/applications/delete-app.js +6 -5
  3. package/dist/packages/dbos-cloud/applications/delete-app.js.map +1 -1
  4. package/dist/packages/dbos-cloud/applications/deploy-app-code.d.ts.map +1 -1
  5. package/dist/packages/dbos-cloud/applications/deploy-app-code.js +7 -8
  6. package/dist/packages/dbos-cloud/applications/deploy-app-code.js.map +1 -1
  7. package/dist/packages/dbos-cloud/applications/get-app-info.d.ts.map +1 -1
  8. package/dist/packages/dbos-cloud/applications/get-app-info.js +5 -5
  9. package/dist/packages/dbos-cloud/applications/get-app-info.js.map +1 -1
  10. package/dist/packages/dbos-cloud/applications/get-app-logs.d.ts.map +1 -1
  11. package/dist/packages/dbos-cloud/applications/get-app-logs.js +5 -5
  12. package/dist/packages/dbos-cloud/applications/get-app-logs.js.map +1 -1
  13. package/dist/packages/dbos-cloud/applications/list-apps.js +2 -2
  14. package/dist/packages/dbos-cloud/applications/list-apps.js.map +1 -1
  15. package/dist/packages/dbos-cloud/applications/register-app.d.ts.map +1 -1
  16. package/dist/packages/dbos-cloud/applications/register-app.js +6 -5
  17. package/dist/packages/dbos-cloud/applications/register-app.js.map +1 -1
  18. package/dist/packages/dbos-cloud/applications/update-app.d.ts.map +1 -1
  19. package/dist/packages/dbos-cloud/applications/update-app.js +6 -5
  20. package/dist/packages/dbos-cloud/applications/update-app.js.map +1 -1
  21. package/dist/packages/dbos-cloud/cli.js +28 -45
  22. package/dist/packages/dbos-cloud/cli.js.map +1 -1
  23. package/dist/packages/dbos-cloud/cloudutils.d.ts +0 -2
  24. package/dist/packages/dbos-cloud/cloudutils.d.ts.map +1 -1
  25. package/dist/packages/dbos-cloud/cloudutils.js +1 -18
  26. package/dist/packages/dbos-cloud/cloudutils.js.map +1 -1
  27. package/dist/packages/dbos-cloud/register.d.ts.map +1 -1
  28. package/dist/packages/dbos-cloud/register.js +2 -8
  29. package/dist/packages/dbos-cloud/register.js.map +1 -1
  30. package/dist/packages/dbos-cloud/userdb.js +4 -4
  31. package/dist/packages/dbos-cloud/userdb.js.map +1 -1
  32. package/dist/tsconfig.build.tsbuildinfo +1 -1
  33. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"delete-app.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/delete-app.ts"],"names":[],"mappings":"AAGA,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA+B7D"}
1
+ {"version":3,"file":"delete-app.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/delete-app.ts"],"names":[],"mappings":"AAIA,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA+B7D"}
@@ -6,17 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.deleteApp = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
8
  const cloudutils_1 = require("../cloudutils");
9
+ const node_path_1 = __importDefault(require("node:path"));
9
10
  async function deleteApp(host) {
10
11
  const logger = (0, cloudutils_1.getLogger)();
11
12
  const userCredentials = (0, cloudutils_1.getCloudCredentials)();
12
13
  const bearerToken = "Bearer " + userCredentials.token;
13
- const appName = (0, cloudutils_1.retrieveApplicationName)(logger);
14
- if (appName === null) {
15
- return 1;
16
- }
14
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
15
+ const packageJson = require(node_path_1.default.join(process.cwd(), 'package.json'));
16
+ const appName = packageJson.name;
17
+ logger.info(`Loaded application name from package.json: ${appName}`);
17
18
  logger.info(`Deleting application: ${appName}`);
18
19
  try {
19
- await axios_1.default.delete(`https://${host}/${userCredentials.userName}/application/${appName}`, {
20
+ await axios_1.default.delete(`https://${host}/v1alpha1/${userCredentials.userName}/applications/${appName}`, {
20
21
  headers: {
21
22
  "Content-Type": "application/json",
22
23
  Authorization: bearerToken,
@@ -1 +1 @@
1
- {"version":3,"file":"delete-app.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/delete-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,8CAAkI;AAE3H,KAAK,UAAU,SAAS,CAAC,IAAY;IAC1C,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAA;IAC1B,MAAM,eAAe,GAAG,IAAA,gCAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,MAAM,OAAO,GAAG,IAAA,oCAAuB,EAAC,MAAM,CAAC,CAAC;IAChD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,CAAC,IAAI,CAAC,yBAAyB,OAAO,EAAE,CAAC,CAAA;IAE/C,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,MAAM,UAAU,GAAG,gCAAgC,OAAO,EAAE,CAAC;QAC7D,MAAM,UAAU,GAAG,CAAe,CAAC;QACnC,IAAI,IAAA,oCAAuB,EAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC;YACvD,IAAA,4BAAe,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,GAAG,UAAU,KAAM,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Q,EAAE,IAAI,CAAC,EAAE,CAAC;YACvD,IAAA,4BAAe,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,GAAG,UAAU,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QACzD,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC;AA/BD,8BA+BC"}
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-app-code.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/deploy-app-code.ts"],"names":[],"mappings":"AAcA,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAsGlF"}
1
+ {"version":3,"file":"deploy-app-code.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/deploy-app-code.ts"],"names":[],"mappings":"AAcA,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAqGlF"}
@@ -14,10 +14,9 @@ async function deployAppCode(host, docker) {
14
14
  const logger = (0, cloudutils_1.getLogger)();
15
15
  const userCredentials = (0, cloudutils_1.getCloudCredentials)();
16
16
  const bearerToken = "Bearer " + userCredentials.token;
17
- const appName = (0, cloudutils_1.retrieveApplicationName)(logger);
18
- if (appName === null) {
19
- return 1;
20
- }
17
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
18
+ const packageJson = require(path_1.default.join(process.cwd(), 'package.json'));
19
+ const appName = packageJson.name;
21
20
  logger.info(`Loaded application name from package.json: ${appName}`);
22
21
  (0, cloudutils_1.createDirectory)(deployDirectoryName);
23
22
  // Verify that package-lock.json exists
@@ -44,7 +43,7 @@ async function deployAppCode(host, docker) {
44
43
  const zipData = (0, cloudutils_1.readFileSync)(`${deployDirectoryName}/${appName}.zip`, "base64");
45
44
  // Submit the deploy request
46
45
  logger.info(`Submitting deploy request for ${appName}`);
47
- const response = await axios_1.default.post(`https://${host}/${userCredentials.userName}/application/${appName}`, {
46
+ const response = await axios_1.default.post(`https://${host}/v1alpha1/${userCredentials.userName}/applications/${appName}`, {
48
47
  application_archive: zipData,
49
48
  }, {
50
49
  headers: {
@@ -70,7 +69,7 @@ async function deployAppCode(host, docker) {
70
69
  return 1;
71
70
  }
72
71
  // Retrieve the application status, check if it is "AVAILABLE"
73
- const list = await axios_1.default.get(`https://${host}/${userCredentials.userName}/application`, {
72
+ const list = await axios_1.default.get(`https://${host}/v1alpha1/${userCredentials.userName}/applications`, {
74
73
  headers: {
75
74
  Authorization: bearerToken,
76
75
  },
@@ -85,7 +84,7 @@ async function deployAppCode(host, docker) {
85
84
  }
86
85
  await (0, cloudutils_1.sleep)(5000); // Leave time for route cache updates
87
86
  logger.info(`Application ${appName} successfuly deployed`);
88
- logger.info(`Access your application at https://${host}/${userCredentials.userName}/application/${appName}`);
87
+ logger.info(`Access your application at https://${host}/apps/${userCredentials.userName}/${appName}`);
89
88
  return 0;
90
89
  }
91
90
  catch (e) {
@@ -127,7 +126,7 @@ RUN apt update
127
126
  RUN apt install -y zip
128
127
  WORKDIR /app
129
128
  COPY . .
130
- RUN npm clean-install
129
+ RUN npm install
131
130
  RUN npm run build
132
131
  RUN npm prune --omit=dev
133
132
  RUN zip -ry ${appName}.zip ./* -x "${appName}.zip" -x "${deployDirectoryName}/*" > /dev/null
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-app-code.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/deploy-app-code.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,iDAAyC;AACzC,2BAA+C;AAC/C,8CAAwM;AACxM,gDAAwB;AAGxB,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAOnC,KAAK,UAAU,aAAa,CAAC,IAAY,EAAE,MAAe;IAC/D,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAA;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,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CA0C7E"}
1
+ {"version":3,"file":"get-app-info.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/get-app-info.ts"],"names":[],"mappings":"AAKA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAyC7E"}
@@ -6,19 +6,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getAppInfo = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
8
  const cloudutils_1 = require("../cloudutils");
9
+ const node_path_1 = __importDefault(require("node:path"));
9
10
  async function getAppInfo(host, json) {
10
11
  const logger = (0, cloudutils_1.getLogger)();
11
12
  const userCredentials = (0, cloudutils_1.getCloudCredentials)();
12
13
  const bearerToken = "Bearer " + userCredentials.token;
13
- const appName = (0, cloudutils_1.retrieveApplicationName)(logger);
14
- if (appName === null) {
15
- return 1;
16
- }
14
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
15
+ const packageJson = require(node_path_1.default.join(process.cwd(), 'package.json'));
16
+ const appName = packageJson.name;
17
17
  if (!json) {
18
18
  logger.info(`Retrieving info for application: ${appName}`);
19
19
  }
20
20
  try {
21
- const res = await axios_1.default.get(`https://${host}/${userCredentials.userName}/application/${appName}`, {
21
+ const res = await axios_1.default.get(`https://${host}/v1alpha1/${userCredentials.userName}/applications/${appName}`, {
22
22
  headers: {
23
23
  "Content-Type": "application/json",
24
24
  Authorization: bearerToken,
@@ -1 +1 @@
1
- {"version":3,"file":"get-app-info.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/get-app-info.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA2C;AAC3C,8CAAkI;AAG3H,KAAK,UAAU,UAAU,CAAC,IAAY,EAAE,IAAa;IAC1D,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAC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
- {"version":3,"file":"get-app-logs.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/get-app-logs.ts"],"names":[],"mappings":"AAGA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAyC5E"}
1
+ {"version":3,"file":"get-app-logs.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/get-app-logs.ts"],"names":[],"mappings":"AAIA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAwC5E"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getAppLogs = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
8
  const cloudutils_1 = require("../cloudutils");
9
+ const node_path_1 = __importDefault(require("node:path"));
9
10
  async function getAppLogs(host, last) {
10
11
  if (last != undefined && (isNaN(last) || last <= 0)) {
11
12
  throw new Error('The --last parmameter must be an integer greater than 0');
@@ -16,13 +17,12 @@ async function getAppLogs(host, last) {
16
17
  const logger = (0, cloudutils_1.getLogger)();
17
18
  const userCredentials = (0, cloudutils_1.getCloudCredentials)();
18
19
  const bearerToken = "Bearer " + userCredentials.token;
19
- const appName = (0, cloudutils_1.retrieveApplicationName)(logger);
20
- if (appName === null) {
21
- return 1;
22
- }
20
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
21
+ const packageJson = require(node_path_1.default.join(process.cwd(), 'package.json'));
22
+ const appName = packageJson.name;
23
23
  logger.info(`Retrieving logs for application: ${appName}`);
24
24
  try {
25
- const res = await axios_1.default.get(`https://${host}/${userCredentials.userName}/logs/application/${appName}?last=${last}`, {
25
+ const res = await axios_1.default.get(`https://${host}/v1alpha1/${userCredentials.userName}/logs/applications/${appName}?last=${last}`, {
26
26
  headers: {
27
27
  "Content-Type": "application/json",
28
28
  Authorization: bearerToken,
@@ -1 +1 @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redentials)();
12
12
  const bearerToken = "Bearer " + userCredentials.token;
13
13
  try {
14
- const list = await axios_1.default.get(`https://${host}/${userCredentials.userName}/application`, {
14
+ const list = await axios_1.default.get(`https://${host}/v1alpha1/${userCredentials.userName}/applications`, {
15
15
  headers: {
16
16
  Authorization: bearerToken,
17
17
  },
@@ -29,7 +29,7 @@ async function listApps(host, json) {
29
29
  applications.forEach(app => {
30
30
  console.log(`Application Name: ${app.Name}`);
31
31
  console.log(`ID: ${app.ID}`);
32
- console.log(`Postgres Instance Name: ${app.PostgresInstanceName}`);
32
+ console.log(`Postgres Instance Name: ${app.ApplicationDatabaseName}`);
33
33
  console.log(`Application Database Name: ${app.ApplicationDatabaseName}`);
34
34
  console.log(`Status: ${app.Status}`);
35
35
  console.log(`Version: ${app.Version}`);
@@ -1 +1 @@
1
- {"version":3,"file":"list-apps.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/list-apps.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,8CAAyG;AAGlG,KAAK,UAAU,QAAQ,CAAC,IAAY,EAAE,IAAa;IACxD,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAC;IAC3B,MAAM,eAAe,GAAG,IAAA,gCAAmB,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,YAAY,GAAkB,IAAI,CAAC,IAAqB,CAAC;QAC/D,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;YACrC,OAAO,CAAC,CAAC;QACX,CAAC;QACD,IAAI,I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CAAC,8BAA8B,GAAG,CAAC,uBAAuB,EAAE,CAAC,CAAC;gBACzE,OAAO,CAAC,GAAG,CAAC,WAAW,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;gBACrC,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;gBACvC,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,UAAU,GAAG,6BAA6B,CAAC;QACjD,MAAM,UAAU,GAAG,CAAe,CAAC;QACnC,IAAI,IAAA,oCAAuB,EAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC;YACvD,IAAA,4BAAe,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,GAAG,UAAU,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QACzD,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC;AA5CD,4BA4CC"}
@@ -1 +1 @@
1
- {"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/register-app.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAuC/E"}
1
+ {"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/register-app.ts"],"names":[],"mappings":"AAIA,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAuC/E"}
@@ -6,17 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.registerApp = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
8
  const cloudutils_1 = require("../cloudutils");
9
+ const node_path_1 = __importDefault(require("node:path"));
9
10
  async function registerApp(dbname, host) {
10
11
  const logger = (0, cloudutils_1.getLogger)();
11
12
  const userCredentials = (0, cloudutils_1.getCloudCredentials)();
12
13
  const bearerToken = "Bearer " + userCredentials.token;
13
- const appName = (0, cloudutils_1.retrieveApplicationName)(logger);
14
- if (appName === null) {
15
- return 1;
16
- }
14
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
15
+ const packageJson = require(node_path_1.default.join(process.cwd(), 'package.json'));
16
+ const appName = packageJson.name;
17
+ logger.info(`Loaded application name from package.json: ${appName}`);
17
18
  logger.info(`Registering application: ${appName}`);
18
19
  try {
19
- const register = await axios_1.default.put(`https://${host}/${userCredentials.userName}/application`, {
20
+ const register = await axios_1.default.put(`https://${host}/v1alpha1/${userCredentials.userName}/applications`, {
20
21
  name: appName,
21
22
  database: dbname,
22
23
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"register-app.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/register-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,8CAAkI;AAE3H,KAAK,UAAU,WAAW,CAAC,MAAc,EAAE,IAAY;IAC5D,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAC;IAC3B,MAAM,eAAe,GAAG,IAAA,gCAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,MAAM,OAAO,GAAG,IAAA,oCAAuB,EAAC,MAAM,CAAC,CAAC;IAChD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,CAAC,IAAI,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAA;IAElD,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;SACjB,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,MAAM,UAAU,GAAG,kCAAkC,OAAO,EAAE,CAAC;QAC/D,MAAM,UAAU,GAAG,CAAe,CAAC;QACnC,IAAI,IAAA,oCAAuB,EAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC;YACvD,IAAA,4BAAe,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,GAAG,UAAU,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QACzD,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC;AAvCD,kCAuCC"}
1
+ {"version":3,"file":"register-app.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/register-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,8CAAyG;AACzG,0DAA6B;AAEtB,KAAK,UAAU,WAAW,CAAC,MAAc,EAAE,IAAY;IAC5D,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAC;IAC3B,MAAM,eAAe,GAAG,IAAA,gCAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,8DAA8D;IAC9D,MAAM,WAAW,GAAG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.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/update-app.ts"],"names":[],"mappings":"AAIA,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsC7D"}
1
+ {"version":3,"file":"update-app.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/update-app.ts"],"names":[],"mappings":"AAKA,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsC7D"}
@@ -6,18 +6,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.updateApp = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
8
  const cloudutils_1 = require("../cloudutils");
9
+ const node_path_1 = __importDefault(require("node:path"));
9
10
  async function updateApp(host) {
10
11
  const logger = (0, cloudutils_1.getLogger)();
11
12
  const userCredentials = (0, cloudutils_1.getCloudCredentials)();
12
13
  const bearerToken = "Bearer " + userCredentials.token;
13
- const appName = (0, cloudutils_1.retrieveApplicationName)(logger);
14
- if (appName === null) {
15
- return 1;
16
- }
14
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
15
+ const packageJson = require(node_path_1.default.join(process.cwd(), 'package.json'));
16
+ const appName = packageJson.name;
17
+ logger.info(`Loaded application name from package.json: ${appName}`);
17
18
  logger.info(`Updating application: ${appName}`);
18
19
  try {
19
20
  logger.info(`Updating application ${appName}`);
20
- const update = await axios_1.default.patch(`https://${host}/${userCredentials.userName}/application/${appName}`, {
21
+ const update = await axios_1.default.patch(`https://${host}/v1alpha1/${userCredentials.userName}/applications/${appName}`, {
21
22
  name: appName,
22
23
  }, {
23
24
  headers: {
@@ -1 +1 @@
1
- {"version":3,"file":"update-app.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/update-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,8CAAkI;AAG3H,KAAK,UAAU,SAAS,CAAC,IAAY;IAC1C,MAAM,MAAM,GAA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AU,GAAG,CAAe,CAAC;QACnC,IAAI,IAAA,oCAAuB,EAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC;YACvD,IAAA,4BAAe,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,GAAG,UAAU,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QACzD,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC;AAtCD,8BAsCC"}
@@ -26,48 +26,36 @@ program
26
26
  });
27
27
  program
28
28
  .command('register')
29
- .description('Register a user with DBOS cloud')
29
+ .description('Register a user and log in to DBOS cloud')
30
30
  .requiredOption('-u, --username <string>', 'Username')
31
31
  .action(async (options) => {
32
32
  const exitCode = await (0, register_1.registerUser)(options.username, cloudutils_1.DBOSCloudHost);
33
33
  process.exit(exitCode);
34
34
  });
35
- program
36
- .command('logout')
37
- .description('Log out of DBOS cloud')
38
- .action(() => {
39
- if ((0, cloudutils_1.credentialsExist)()) {
40
- (0, cloudutils_1.deleteCredentials)();
41
- }
42
- process.exit(0);
43
- });
44
35
  /////////////////////////////
45
36
  /* APPLICATIONS MANAGEMENT */
46
37
  /////////////////////////////
47
38
  const applicationCommands = program
48
- .command('application')
49
- .alias('applications')
50
- .alias('app')
51
- .alias('apps')
39
+ .command('applications')
52
40
  .description('Manage your DBOS applications');
53
41
  applicationCommands
54
42
  .command('register')
55
- .description('Register this application')
56
- .requiredOption('-d, --database <string>', 'Specify a Postgres database instance for this application')
43
+ .description('Register a new application')
44
+ .requiredOption('-d, --database <string>', 'Specify the app database name')
57
45
  .action(async (options) => {
58
46
  const exitCode = await (0, applications_1.registerApp)(options.database, cloudutils_1.DBOSCloudHost);
59
47
  process.exit(exitCode);
60
48
  });
61
49
  applicationCommands
62
50
  .command('update')
63
- .description('Update this application')
51
+ .description('Update an application')
64
52
  .action(async () => {
65
53
  const exitCode = await (0, applications_1.updateApp)(cloudutils_1.DBOSCloudHost);
66
54
  process.exit(exitCode);
67
55
  });
68
56
  applicationCommands
69
57
  .command('deploy')
70
- .description('Deploy this application to the cloud')
58
+ .description('Deploy an application code to the cloud')
71
59
  .option('--no-docker', 'Build the code locally without using Docker')
72
60
  .action(async (options) => {
73
61
  const exitCode = await (0, applications_1.deployAppCode)(cloudutils_1.DBOSCloudHost, options.docker);
@@ -75,22 +63,22 @@ applicationCommands
75
63
  });
76
64
  applicationCommands
77
65
  .command('delete')
78
- .description('Delete this application')
66
+ .description('Delete a previously deployed application')
79
67
  .action(async () => {
80
68
  const exitCode = await (0, applications_1.deleteApp)(cloudutils_1.DBOSCloudHost);
81
69
  process.exit(exitCode);
82
70
  });
83
71
  applicationCommands
84
72
  .command('list')
85
- .description('List all applications')
73
+ .description('List all deployed applications')
86
74
  .option('--json', 'Emit JSON output')
87
75
  .action(async (options) => {
88
76
  const exitCode = await (0, applications_1.listApps)(cloudutils_1.DBOSCloudHost, options.json);
89
77
  process.exit(exitCode);
90
78
  });
91
79
  applicationCommands
92
- .command('status')
93
- .description("Retrieve this application's status")
80
+ .command('get')
81
+ .description('Get application info')
94
82
  .option('--json', 'Emit JSON output')
95
83
  .action(async (options) => {
96
84
  const exitCode = await (0, get_app_info_1.getAppInfo)(cloudutils_1.DBOSCloudHost, options.json);
@@ -98,51 +86,46 @@ applicationCommands
98
86
  });
99
87
  applicationCommands
100
88
  .command('logs')
101
- .description("Print this application's logs")
89
+ .description('Print the microVM logs of a deployed application')
102
90
  .option('-l, --last <integer>', 'How far back to query, in seconds from current time. By default, we retrieve all data', parseInt)
103
91
  .action(async (options) => {
104
92
  const exitCode = await (0, applications_1.getAppLogs)(cloudutils_1.DBOSCloudHost, options.last);
105
93
  process.exit(exitCode);
106
94
  });
107
- //////////////////////////////////
108
- /* DATABASE INSTANCE MANAGEMENT */
109
- //////////////////////////////////
110
- const databaseCommands = program
111
- .command('database')
112
- .alias('databases')
113
- .alias('db')
114
- .description('Manage Postgres database instances');
115
- databaseCommands
116
- .command('provision')
117
- .description("Provision a Postgres database instance")
118
- .argument('<string>', 'database instance name')
95
+ //////////////////////////////
96
+ /* USER DATABASE MANAGEMENT */
97
+ //////////////////////////////
98
+ const userdbCommands = program
99
+ .command('userdb')
100
+ .description('Manage your databases');
101
+ userdbCommands
102
+ .command('create')
103
+ .argument('<string>', 'database name')
119
104
  .requiredOption('-a, --admin <string>', 'Specify the admin user')
120
105
  .requiredOption('-W, --password <string>', 'Specify the admin password')
106
+ .option('-s, --sync', 'make synchronous call', true)
121
107
  .action((async (dbname, options) => {
122
- const exitCode = await (0, userdb_1.createUserDb)(cloudutils_1.DBOSCloudHost, dbname, options.admin, options.password, true);
108
+ const exitCode = await (0, userdb_1.createUserDb)(cloudutils_1.DBOSCloudHost, dbname, options.admin, options.password, options.sync);
123
109
  process.exit(exitCode);
124
110
  }));
125
- databaseCommands
111
+ userdbCommands
126
112
  .command('status')
127
- .description("Retrieve the status of a Postgres database instance")
128
- .argument('<string>', 'database instance name')
113
+ .argument('<string>', 'database name')
129
114
  .option('--json', 'Emit JSON output')
130
115
  .action((async (dbname, options) => {
131
116
  const exitCode = await (0, userdb_1.getUserDb)(cloudutils_1.DBOSCloudHost, dbname, options.json);
132
117
  process.exit(exitCode);
133
118
  }));
134
- databaseCommands
119
+ userdbCommands
135
120
  .command('list')
136
- .description("List all your Postgres database instances")
137
121
  .option('--json', 'Emit JSON output')
138
122
  .action((async (options) => {
139
123
  const exitCode = await (0, userdb_1.listUserDB)(cloudutils_1.DBOSCloudHost, options.json);
140
124
  process.exit(exitCode);
141
125
  }));
142
- databaseCommands
143
- .command('destroy')
144
- .description("Destroy a Postgres database instance")
145
- .argument('<string>', 'database instance name')
126
+ userdbCommands
127
+ .command('delete')
128
+ .argument('<string>', 'database name')
146
129
  .action((async (dbname) => {
147
130
  const exitCode = await (0, userdb_1.deleteUserDb)(cloudutils_1.DBOSCloudHost, dbname);
148
131
  process.exit(exitCode);
@@ -1 +1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DAAoD;AACpD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
@@ -8,11 +8,9 @@ export interface DBOSCloudCredentials {
8
8
  export declare const dbosConfigFilePath = "dbos-config.yaml";
9
9
  export declare const DBOSCloudHost: string;
10
10
  export declare const dbosEnvPath = ".dbos";
11
- export declare function retrieveApplicationName(logger: Logger): string | null;
12
11
  export declare function getLogger(): Logger;
13
12
  export declare function getCloudCredentials(): DBOSCloudCredentials;
14
13
  export declare function credentialsExist(): boolean;
15
- export declare function deleteCredentials(): void;
16
14
  export declare function runCommand(command: string, args?: string[]): Promise<number>;
17
15
  export declare function readFileSync(path: string, encoding?: BufferEncoding): string | Buffer;
18
16
  export declare const sleep: (ms: number) => Promise<unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"cloudutils.d.ts","sourceRoot":"","sources":["../../../packages/dbos-cloud/cloudutils.ts"],"names":[],"mappings":";AAEA,OAAO,EAAoC,MAAM,EAAE,MAAM,SAAS,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AACrD,eAAO,MAAM,aAAa,QAA8C,CAAC;AACzE,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUrE;AAGD,wBAAgB,SAAS,IAAI,MAAM,CASlC;AA+BD,wBAAgB,mBAAmB,IAAI,oBAAoB,CAgB1D;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED,wBAAgB,iBAAiB,SAEhC;AAGD,wBAAgB,UAAU,CAAC,OAAO,EAAE,M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,GAAE,MAAM,EAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBhF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,cAAuB,GAAG,MAAM,GAAG,MAAM,CAa7F;AAED,eAAO,MAAM,KAAK,OAAQ,MAAM,qBAA0C,CAAC;AAE3E,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAGrC,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEhE;AAED,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,qBAAqB,CAKlF;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,QAI3D"}
@@ -3,27 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.handleAPIErrors = exports.isCloudAPIErrorResponse = exports.createDirectory = exports.sleep = exports.readFileSync = exports.runCommand = exports.deleteCredentials = exports.credentialsExist = exports.getCloudCredentials = exports.getLogger = exports.retrieveApplicationName = exports.dbosEnvPath = exports.DBOSCloudHost = exports.dbosConfigFilePath = void 0;
6
+ exports.handleAPIErrors = exports.isCloudAPIErrorResponse = exports.createDirectory = exports.sleep = exports.readFileSync = exports.runCommand = exports.credentialsExist = exports.getCloudCredentials = exports.getLogger = exports.dbosEnvPath = exports.DBOSCloudHost = exports.dbosConfigFilePath = void 0;
7
7
  const child_process_1 = require("child_process");
8
8
  const winston_1 = require("winston");
9
9
  const fs_1 = __importDefault(require("fs"));
10
10
  const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
11
- const node_path_1 = __importDefault(require("node:path"));
12
11
  exports.dbosConfigFilePath = "dbos-config.yaml";
13
12
  exports.DBOSCloudHost = process.env.DBOS_DOMAIN || "cloud.dbos.dev";
14
13
  exports.dbosEnvPath = ".dbos";
15
- function retrieveApplicationName(logger) {
16
- // eslint-disable-next-line @typescript-eslint/no-var-requires
17
- const packageJson = require(node_path_1.default.join(process.cwd(), 'package.json'));
18
- const appName = packageJson.name;
19
- if (appName === undefined) {
20
- logger.error("Error: cannot find a valid package.json file. Please run this command in an application root directory.");
21
- return null;
22
- }
23
- logger.info(`Loaded application name from package.json: ${appName}`);
24
- return appName;
25
- }
26
- exports.retrieveApplicationName = retrieveApplicationName;
27
14
  // FIXME: we should have a global instance of the logger created in cli.ts
28
15
  function getLogger() {
29
16
  const winstonTransports = [];
@@ -78,10 +65,6 @@ function credentialsExist() {
78
65
  return fs_1.default.existsSync(`./${exports.dbosEnvPath}/credentials`);
79
66
  }
80
67
  exports.credentialsExist = credentialsExist;
81
- function deleteCredentials() {
82
- fs_1.default.unlinkSync(`./${exports.dbosEnvPath}/credentials`);
83
- }
84
- exports.deleteCredentials = deleteCredentials;
85
68
  // Run a command, streaming its output to stdout
86
69
  function runCommand(command, args = []) {
87
70
  return new Promise((resolve, reject) => {
@@ -1 +1 @@
1
- {"version":3,"file":"cloudutils.js","sourceRoot":"","sources":["../../../packages/dbos-cloud/cloudutils.ts"],"names":[],"mappings":";;;;;;AACA,iDAAoD;AACpD,qCAAmE;AACnE,4CAAoB;AAEpB,gEAA+B;AAC/B,0DAA6B;AAOhB,QAAA,kBAAkB,GAAG,kBAAkB,CAAC;AACxC,QAAA,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,gBAAgB,CAAC;AAC5D,QAAA,WAAW,GAAG,OAAO,CAAC;AAEnC,SAAgB,uBAAuB,CAAC,MAAc;IAClD,8DAA8D;IAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,mB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AAO,GAAG,CAAC,WAAW,CAAC,KAAK,QAAQ,CAAC;AAC/D,CAAC;AALD,0DAKC;AAED,SAAgB,eAAe,CAAC,KAAa,EAAE,CAAa;IAC1D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,IAAI,GAA0B,CAAC,CAAC,QAAQ,EAAE,IAA6B,CAAC;IAC9E,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,KAAK,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;AACjE,CAAC;AAJD,0CAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../packages/dbos-cloud/register.ts"],"names":[],"mappings":"AAUA,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA2DlF"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../packages/dbos-cloud/register.ts"],"names":[],"mappings":"AAUA,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsDlF"}