@dbos-inc/dbos-sdk 0.8.28-preview → 0.8.32-preview

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/dist/src/cloud-cli/applications/configure.d.ts +2 -0
  2. package/dist/src/cloud-cli/applications/configure.d.ts.map +1 -0
  3. package/dist/src/cloud-cli/applications/configure.js +64 -0
  4. package/dist/src/cloud-cli/applications/configure.js.map +1 -0
  5. package/dist/src/cloud-cli/applications/deploy-app-code.d.ts.map +1 -1
  6. package/dist/src/cloud-cli/applications/deploy-app-code.js +63 -6
  7. package/dist/src/cloud-cli/applications/deploy-app-code.js.map +1 -1
  8. package/dist/src/cloud-cli/cli.js +0 -0
  9. package/dist/src/cloud-cli/userdb.d.ts.map +1 -1
  10. package/dist/src/cloud-cli/userdb.js +3 -2
  11. package/dist/src/cloud-cli/userdb.js.map +1 -1
  12. package/dist/src/cloud-cli/utils.d.ts +1 -0
  13. package/dist/src/cloud-cli/utils.d.ts.map +1 -1
  14. package/dist/src/cloud-cli/utils.js +21 -1
  15. package/dist/src/cloud-cli/utils.js.map +1 -1
  16. package/dist/src/dbos-executor.d.ts +4 -3
  17. package/dist/src/dbos-executor.d.ts.map +1 -1
  18. package/dist/src/dbos-executor.js +57 -33
  19. package/dist/src/dbos-executor.js.map +1 -1
  20. package/dist/src/dbos-runtime/TypeParser.d.ts +33 -0
  21. package/dist/src/dbos-runtime/TypeParser.d.ts.map +1 -0
  22. package/dist/src/dbos-runtime/TypeParser.js +104 -0
  23. package/dist/src/dbos-runtime/TypeParser.js.map +1 -0
  24. package/dist/src/dbos-runtime/openApi.d.ts +35 -0
  25. package/dist/src/dbos-runtime/openApi.d.ts.map +1 -0
  26. package/dist/src/dbos-runtime/openApi.js +595 -0
  27. package/dist/src/dbos-runtime/openApi.js.map +1 -0
  28. package/dist/src/dbos-runtime/tsDiagUtil.d.ts +16 -0
  29. package/dist/src/dbos-runtime/tsDiagUtil.d.ts.map +1 -0
  30. package/dist/src/dbos-runtime/tsDiagUtil.js +72 -0
  31. package/dist/src/dbos-runtime/tsDiagUtil.js.map +1 -0
  32. package/dist/src/httpServer/server.js +1 -1
  33. package/dist/src/httpServer/server.js.map +1 -1
  34. package/dist/src/provenance/provenance_daemon.d.ts +34 -0
  35. package/dist/src/provenance/provenance_daemon.d.ts.map +1 -0
  36. package/dist/src/provenance/provenance_daemon.js +86 -0
  37. package/dist/src/provenance/provenance_daemon.js.map +1 -0
  38. package/dist/src/system_database.d.ts +8 -4
  39. package/dist/src/system_database.d.ts.map +1 -1
  40. package/dist/src/system_database.js +71 -10
  41. package/dist/src/system_database.js.map +1 -1
  42. package/dist/src/telemetry/signals.d.ts +20 -0
  43. package/dist/src/telemetry/signals.d.ts.map +1 -0
  44. package/dist/src/telemetry/signals.js +11 -0
  45. package/dist/src/telemetry/signals.js.map +1 -0
  46. package/dist/src/workflow.d.ts +1 -1
  47. package/dist/src/workflow.d.ts.map +1 -1
  48. package/examples/hello/.eslintignore +4 -0
  49. package/examples/hello/.eslintrc +19 -0
  50. package/examples/hello/knexfile.ts +1 -1
  51. package/examples/hello/package.json +5 -2
  52. package/examples/hello/src/operations.ts +2 -2
  53. package/examples/hello/tsconfig.json +2 -2
  54. package/package.json +2 -2
@@ -0,0 +1,19 @@
1
+ {
2
+ "root": true,
3
+ "extends": [
4
+ "plugin:@dbos-inc/dbosRecommendedConfig"
5
+ ],
6
+ "plugins": [
7
+ "@dbos-inc"
8
+ ],
9
+ "env": {
10
+ "node": true,
11
+ "es6": true
12
+ },
13
+ "rules": {
14
+ },
15
+ "parser": "@typescript-eslint/parser",
16
+ "parserOptions": {
17
+ "project": "./tsconfig.json"
18
+ }
19
+ }
@@ -1,7 +1,7 @@
1
1
  // knexfile.ts
2
2
 
3
3
  import { Knex } from 'knex';
4
- import { parseConfigFile } from '@dbos-inc/dbos-sdk/dist/src/dbos-runtime/config'
4
+ import { parseConfigFile } from '@dbos-inc/dbos-sdk/dist/src/dbos-runtime/config';
5
5
  import { DBOSConfig } from '@dbos-inc/dbos-sdk/dist/src/dbos-executor';
6
6
 
7
7
  const [dbosConfig, ]: [DBOSConfig, unknown] = parseConfigFile();
@@ -3,12 +3,15 @@
3
3
  "version": "0.0.1",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
- "test": "npx knex migrate:rollback && npx knex migrate:up && jest"
6
+ "test": "npx knex migrate:rollback && npx knex migrate:up && jest",
7
+ "lint": "eslint src",
8
+ "lint-fix": "eslint --fix src"
7
9
  },
8
10
  "devDependencies": {
11
+ "@dbos-inc/eslint-plugin": "^0.0.4",
9
12
  "@types/jest": "^29.5.5",
10
13
  "@types/supertest": "^2.0.14",
11
- "@typescript-eslint/eslint-plugin": "^6.0.0",
14
+ "eslint": "^8.56.0",
12
15
  "jest": "^29.7.0",
13
16
  "supertest": "^6.3.3",
14
17
  "ts-jest": "^29.1.1",
@@ -1,4 +1,4 @@
1
- import { TransactionContext, Transaction, GetApi, ArgSource, ArgSources } from '@dbos-inc/dbos-sdk'
1
+ import { TransactionContext, Transaction, GetApi, ArgSource, ArgSources } from '@dbos-inc/dbos-sdk';
2
2
  import { Knex } from 'knex';
3
3
 
4
4
  // The schema of the database table used in this example.
@@ -13,7 +13,7 @@ export class Hello {
13
13
  @Transaction() // Run this function as a database transaction
14
14
  static async helloTransaction(ctxt: TransactionContext<Knex>, @ArgSource(ArgSources.URL) user: string) {
15
15
  // Retrieve and increment the number of times this user has been greeted.
16
- const query = "INSERT INTO dbos_hello (name, greet_count) VALUES (?, 1) ON CONFLICT (name) DO UPDATE SET greet_count = dbos_hello.greet_count + 1 RETURNING greet_count;"
16
+ const query = "INSERT INTO dbos_hello (name, greet_count) VALUES (?, 1) ON CONFLICT (name) DO UPDATE SET greet_count = dbos_hello.greet_count + 1 RETURNING greet_count;";
17
17
  const { rows } = await ctxt.client.raw(query, [user]) as { rows: dbos_hello[] };
18
18
  const greet_count = rows[0].greet_count;
19
19
  return `Hello, ${user}! You have been greeted ${greet_count} times.\n`;
@@ -16,9 +16,9 @@
16
16
  "skipLibCheck": true /* Skip type checking all .d.ts files. */
17
17
  },
18
18
  "include": [ /* Specifies an array of filenames or patterns to include in the program. */
19
- "src",
19
+ "src"
20
20
  ],
21
21
  "exclude": [
22
22
  "**/*.test.ts"
23
23
  ]
24
- }
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbos-inc/dbos-sdk",
3
- "version": "0.8.28-preview",
3
+ "version": "0.8.32-preview",
4
4
  "description": "A Typescript framework built on the database",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -26,7 +26,7 @@
26
26
  "devDependencies": {
27
27
  "@prisma/client": "^5.3.1",
28
28
  "@types/jest": "^29.5.3",
29
- "@types/koa__cors": "^4.0.0",
29
+ "@types/koa__cors": "^5.0.0",
30
30
  "@types/koa__router": "^12.0.0",
31
31
  "@types/koa-logger": "^3.1.2",
32
32
  "@types/node": "^20.6.3",