@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.
- package/dist/src/cloud-cli/applications/configure.d.ts +2 -0
- package/dist/src/cloud-cli/applications/configure.d.ts.map +1 -0
- package/dist/src/cloud-cli/applications/configure.js +64 -0
- package/dist/src/cloud-cli/applications/configure.js.map +1 -0
- package/dist/src/cloud-cli/applications/deploy-app-code.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/deploy-app-code.js +63 -6
- package/dist/src/cloud-cli/applications/deploy-app-code.js.map +1 -1
- package/dist/src/cloud-cli/cli.js +0 -0
- package/dist/src/cloud-cli/userdb.d.ts.map +1 -1
- package/dist/src/cloud-cli/userdb.js +3 -2
- package/dist/src/cloud-cli/userdb.js.map +1 -1
- package/dist/src/cloud-cli/utils.d.ts +1 -0
- package/dist/src/cloud-cli/utils.d.ts.map +1 -1
- package/dist/src/cloud-cli/utils.js +21 -1
- package/dist/src/cloud-cli/utils.js.map +1 -1
- package/dist/src/dbos-executor.d.ts +4 -3
- package/dist/src/dbos-executor.d.ts.map +1 -1
- package/dist/src/dbos-executor.js +57 -33
- package/dist/src/dbos-executor.js.map +1 -1
- package/dist/src/dbos-runtime/TypeParser.d.ts +33 -0
- package/dist/src/dbos-runtime/TypeParser.d.ts.map +1 -0
- package/dist/src/dbos-runtime/TypeParser.js +104 -0
- package/dist/src/dbos-runtime/TypeParser.js.map +1 -0
- package/dist/src/dbos-runtime/openApi.d.ts +35 -0
- package/dist/src/dbos-runtime/openApi.d.ts.map +1 -0
- package/dist/src/dbos-runtime/openApi.js +595 -0
- package/dist/src/dbos-runtime/openApi.js.map +1 -0
- package/dist/src/dbos-runtime/tsDiagUtil.d.ts +16 -0
- package/dist/src/dbos-runtime/tsDiagUtil.d.ts.map +1 -0
- package/dist/src/dbos-runtime/tsDiagUtil.js +72 -0
- package/dist/src/dbos-runtime/tsDiagUtil.js.map +1 -0
- package/dist/src/httpServer/server.js +1 -1
- package/dist/src/httpServer/server.js.map +1 -1
- package/dist/src/provenance/provenance_daemon.d.ts +34 -0
- package/dist/src/provenance/provenance_daemon.d.ts.map +1 -0
- package/dist/src/provenance/provenance_daemon.js +86 -0
- package/dist/src/provenance/provenance_daemon.js.map +1 -0
- package/dist/src/system_database.d.ts +8 -4
- package/dist/src/system_database.d.ts.map +1 -1
- package/dist/src/system_database.js +71 -10
- package/dist/src/system_database.js.map +1 -1
- package/dist/src/telemetry/signals.d.ts +20 -0
- package/dist/src/telemetry/signals.d.ts.map +1 -0
- package/dist/src/telemetry/signals.js +11 -0
- package/dist/src/telemetry/signals.js.map +1 -0
- package/dist/src/workflow.d.ts +1 -1
- package/dist/src/workflow.d.ts.map +1 -1
- package/examples/hello/.eslintignore +4 -0
- package/examples/hello/.eslintrc +19 -0
- package/examples/hello/knexfile.ts +1 -1
- package/examples/hello/package.json +5 -2
- package/examples/hello/src/operations.ts +2 -2
- package/examples/hello/tsconfig.json +2 -2
- 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
|
-
"
|
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`;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dbos-inc/dbos-sdk",
|
3
|
-
"version": "0.8.
|
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": "^
|
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",
|