You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api-reference/cli.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
---
2
2
sidebar_position: 1
3
-
title: SDK CLI
4
-
description: DBOS CLI reference
3
+
title: DBOS Transact CLI
4
+
description: DBOS Transact CLI reference
5
5
---
6
6
7
-
The DBOS SDK CLI helps you run DBOS applications locally.
7
+
The DBOS Transact CLI helps you run applications locally.
8
8
9
9
## Commands
10
10
11
11
---
12
12
13
-
### `npx dbos-sdk start`
13
+
### `npx dbos start`
14
14
15
15
**Description:**
16
-
This command launches the DBOS runtime and HTTP server to serve an application.
16
+
This command launches the DBOS Transact runtime and HTTP server to serve an application.
17
17
It registers all functions and serves all endpoints in classes exported from the specified entrypoint file (typically `src/operations.ts`).
18
18
Parameters set from the command line take precedence over parameters set in the [configuration file](./configuration).
19
19
You must compile your code (`npm run build`) before running this command.
@@ -40,25 +40,25 @@ This command initializes a new DBOS application from a template into a target di
40
40
41
41
---
42
42
43
-
### `npx dbos-sdk migrate`
43
+
### `npx dbos migrate`
44
44
45
45
**Description:**
46
46
Run all migration commands specified in your [configuration file](./configuration) to apply your application's schema to the database.
47
47
48
48
---
49
49
50
-
### `npx dbos-sdk rollback`
50
+
### `npx dbos rollback`
51
51
52
52
**Description:**
53
53
Run all rollback commands specified in your [configuration file](./configuration) to roll back the last batch of schema migrations.
54
54
55
55
---
56
56
57
-
### `npx dbos-sdk debug`
57
+
### `npx dbos debug`
58
58
59
59
**Description:**
60
60
This command launches the DBOS runtime in debug mode to replay a specified workflow.
61
-
It is similar to `dbos-sdk start`, but instead of starting an HTTP server, it replays a single workflow and connects to a locally running DBOS [time travel debug proxy](../cloud-tutorials/timetravel-debugging.md#time-travel-with-dbos-sdk-cli-non-vs-code-users).
61
+
It is similar to `dbos start`, but instead of starting an HTTP server, it replays a single workflow and connects to a locally running DBOS [time travel debug proxy](../cloud-tutorials/timetravel-debugging.md#time-travel-with-dbos-cli-non-vs-code-users).
62
62
You must compile your code (`npm run build`) and start the debug proxy before running this command.
Copy file name to clipboardExpand all lines: docs/api-reference/configuration.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -54,8 +54,8 @@ database:
54
54
55
55
This section is used to specify DBOS runtime parameters.
56
56
57
-
- **port** (optional): The port from which to serve your functions. Defaults to `3000`. Using [`npx dbos-sdk start -p <port>`](./cli#npx-dbos-sdk-start) overrides this config parameter.
58
-
- **entrypoint** (optional): The compiled Javascript file where DBOS looks for your application's code. At startup, the DBOS runtime automatically loads all classes exported from this file, serving their endpoints and registering their decorated functions. Defaults to `dist/operations.js`. Using [`npx dbos-sdk start -e <entrypoint-file>`](./cli#npx-dbos-sdk-start) overrides this config parameter.
57
+
- **port** (optional): The port from which to serve your functions. Defaults to `3000`. Using [`npx dbos start -p <port>`](./cli#npx-dbos-start) overrides this config parameter.
58
+
- **entrypoint** (optional): The compiled Javascript file where DBOS looks for your application's code. At startup, the DBOS runtime automatically loads all classes exported from this file, serving their endpoints and registering their decorated functions. Defaults to `dist/operations.js`. Using [`npx dbos start -e <entrypoint-file>`](./cli#npx-dbos-start) overrides this config parameter.
59
59
60
60
**Example**:
61
61
@@ -85,7 +85,7 @@ You can use the configuration file to tune the behavior of DBOS logging facility
85
85
Note all options in this section are optional and will, if not specified, use the default values indicated in the example below.
86
86
87
87
#### Logs
88
-
- **logLevel**: Filters, by severity, what logs should be printed. Defaults to `'info'`. Using [`npx dbos-sdk start -l <logLevel>`](./cli#npx-dbos-sdk-start) overrides this config parameter.
88
+
- **logLevel**: Filters, by severity, what logs should be printed. Defaults to `'info'`. Using [`npx dbos start -l <logLevel>`](./cli#npx-dbos-start) overrides this config parameter.
89
89
- **addContextMetadata**: Enables the addition of contextual information, such as workflow identity UUID, to each log entry. Defaults to `true`.
90
90
- **silent**: Silences the logger. Defaults to `false`.
Copy file name to clipboardExpand all lines: docs/api-reference/static-analysis.md
+5-6
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,8 @@ While the list of "gotchas" is long and easily neglected, the good news is that
15
15
DBOS recommends using static analysis as an ingredient in a comprehensive security strategy. As adding rule enforcement to a large, established codebase can be a hassle, DBOS recommends using tools from the beginning of a project, and therefore includes tool configuration in its [demo applications](https://github.com/dbos-inc/dbos-demo-apps) and [quickstart templates](../getting-started/quickstart.md).
16
16
17
17
DBOS uses several techniques to ensure that static analysis is as productive as possible, with minimal hassle:
18
-
* DBOS builds on popular frameworks, thereby leveraging community best-practices and tools integration.
18
+
* DBOS Transact builds on popular frameworks, thereby leveraging community best-practices and tools integration.
19
19
* DBOS focuses on analysis rules that detect incorrect API usage and potential security vulnerabilities, rather than nitpicking on coding style.
20
-
* The DBOS SDK is designed for straightforward analysis, reporting, and suggestion of superior alternatives.
21
20
22
21
---
23
22
@@ -30,7 +29,7 @@ Many DBOS=suggested coding practices can be enforced by a combination of `eslint
30
29
### Installing And Configuring `eslint`
31
30
32
31
::::tip
33
-
If you got started with the [DBOS SDK Quickstart](../getting-started/quickstart.md), `eslint` and required plugins are already installed.
32
+
If you got started with the [quickstart](../getting-started/quickstart.md), `eslint` and required plugins are already installed.
34
33
Plugins to support TypeScript and detect common vulerabilities are automatically installed with `@dbos-inc/eslint-plugin` as dependencies and do not need to be installed separately.
35
34
::::
36
35
@@ -91,7 +90,7 @@ Many programmers use `console` statements during the development and debugging p
91
90
92
91
The `no-console` rule, provided by the primary `eslint` package, is automatically enabled in all configs of the DBOS plugin.
93
92
94
-
Use of `console` should be removed from code prior to use in production. Activities such as logging should use [SDK logging facilities](../tutorials/logging.md), so that data remains structured and can be automatically collected in a central database.
93
+
Use of `console` should be removed from code prior to use in production. Activities such as logging should use [DBOS Transact logging facilities](../tutorials/logging.md), so that data remains structured and can be automatically collected in a central database.
95
94
96
95
#### `no-eval`
97
96
Interpreted languages like JavaScript support the ability to treat data directly as executable code. If arbitrary user data can become code, many of the negative security implications are obvious.
@@ -126,15 +125,15 @@ Some DBOS lint rules are provided in the [`@dbos-inc/eslint-plugin`](https://git
126
125
127
126
Calls to functions such as `Math.random()` are [nondeterministic](../tutorials/workflow-tutorial#determinism), and may interfere with consistent workflow results or the debugger.
128
127
129
-
Such operations should use functions provided by the SDK, or at a minimum, be encapsulated in a [Communicator](../tutorials/communicator-tutorial).
128
+
Such operations should use functions provided by DBOS Transact, or at a minimum, be encapsulated in a [Communicator](../tutorials/communicator-tutorial).
130
129
131
130
This rule is enabled by default in all `@dbos-inc/eslint-plugin` configurations.
132
131
133
132
#### `@dbos-inc/detect-new-date`
134
133
135
134
Calls to functions such as `new Date()` are [nondeterministic](../tutorials/workflow-tutorial#determinism), and may interfere with transactional data, consistent workflow execution, or the debugger.
136
135
137
-
Such operations should use functions provided by the SDK, or at a minimum, be encapsulated in a [Communicator](../tutorials/communicator-tutorial).
136
+
Such operations should use functions provided by DBOS Transact, or at a minimum, be encapsulated in a [Communicator](../tutorials/communicator-tutorial).
138
137
139
138
This rule is enabled by default in all `@dbos-inc/eslint-plugin` configurations.
Copy file name to clipboardExpand all lines: docs/cloud-tutorials/application-management.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Run this command in your application root directory:
43
43
npx dbos-cloud app deploy
44
44
```
45
45
46
-
When you deploy an application, DBOS Cloud first runs [`npx dbos-sdk migrate`](../api-reference/cli.md#npx-dbos-sdk-migrate) on your application database to apply all schema migrations you've defined.
46
+
When you deploy an application, DBOS Cloud first runs [`npx dbos migrate`](../api-reference/cli.md#npx-dbos-migrate) on your application database to apply all schema migrations you've defined.
47
47
It then starts your application.
48
48
After your application is deployed, DBOS Cloud hosts it at this URL, which is also printed by the deploy command:
49
49
@@ -64,7 +64,7 @@ Be careful making breaking schema changes such as deleting or renaming a column&
64
64
### Rolling Back Application Databases
65
65
66
66
To [roll back your application database](./database-management.md#database-schema-management), run `npx dbos-cloud app rollback`.
67
-
This command works analagously to `deploy`, but instead of running `npx dbos-sdk migrate`, it runs [`npx dbos-sdk rollback`](../api-reference/cli.md#npx-dbos-sdk-rollback) to execute the rollback commands defined in your [configuration file](../api-reference/configuration.md#database).
67
+
This command works analagously to `deploy`, but instead of running `npx dbos migrate`, it runs [`npx dbos rollback`](../api-reference/cli.md#npx-dbos-rollback) to execute the rollback commands defined in your [configuration file](../api-reference/configuration.md#database).
Copy file name to clipboardExpand all lines: docs/cloud-tutorials/database-management.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -69,10 +69,10 @@ database:
69
69
rollback: ['npx knex migrate:down']
70
70
```
71
71
72
-
To run your migrations locally, run `npx dbos-sdk migrate` or `npx dbos-sdk rollback`.
72
+
To run your migrations locally, run `npx dbos migrate` or `npx dbos rollback`.
73
73
74
-
When you [deploy](./application-management.md#registering-and-deploying-applications) an application to DBOS Cloud it runs `npx dbos-sdk migrate` to apply all schema changes before starting your application or updating its code.
75
-
When you [roll back](./application-management.md#rolling-back-application-databases) an application on DBOS Cloud, it runs `npx dbos-sdk rollback` to roll back schema changes before updating your application's code.
74
+
When you [deploy](./application-management.md#registering-and-deploying-applications) an application to DBOS Cloud it runs `npx dbos migrate` to apply all schema changes before starting your application or updating its code.
75
+
When you [roll back](./application-management.md#rolling-back-application-databases) an application on DBOS Cloud, it runs `npx dbos rollback` to roll back schema changes before updating your application's code.
76
76
77
77
:::info
78
78
Be careful making breaking schema changes such as deleting or renaming a column—they may break active workflows running on a previous application version.
Copy file name to clipboardExpand all lines: docs/cloud-tutorials/timetravel-debugging.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ inside VS Code for "DBOS"
31
31
Once installed, the DBOS Time Travel Extension will automatically update as new releases are published to the VS Code Marketplace.
32
32
33
33
:::info
34
-
If you're not a VS Code user, please see the section below on [Time Travel Debugging with the DBOS SDK CLI](#time-travel-with-dbos-sdk-cli-non-vs-code-users) below.
34
+
If you're not a VS Code user, please see the section below on [Time Travel Debugging with the DBOS CLI](#time-travel-with-dbos-cli-non-vs-code-users) below.
35
35
:::
36
36
37
37
### Launching a Debug Session
@@ -186,9 +186,9 @@ Currently, the time travel debugger supports stepping through any past workflows
186
186
187
187
For more information, please read the [debugger extension reference](../api-reference/time-travel-debugger).
188
188
189
-
## Time Travel with DBOS SDK CLI (Non-VS Code Users)
189
+
## Time Travel with DBOS CLI (Non-VS Code Users)
190
190
191
-
For non-VS Code users, you can run the time-travel debugger manually through the DBOS SDK CLI.
191
+
For non-VS Code users, you can run the time-travel debugger manually through the DBOS CLI.
192
192
193
193
### Manual Setup
194
194
@@ -219,11 +219,11 @@ Open another terminal window, enter your application folder, compile your code,
219
219
```bash
220
220
cd<Your App Folder>/
221
221
npm run build
222
-
npx dbos-sdk debug -u <workflow UUID>
222
+
npx dbos debug -u <workflow UUID>
223
223
```
224
224
225
225
:::info
226
-
Every time you modify your code, you need to recompile it before running the `dbos-sdk debug` command again.
226
+
Every time you modify your code, you need to recompile it before running the `dbos debug` command again.
227
227
:::
228
228
229
-
For more information on the debug command, please see our [references](../api-reference/cli.md#npx-dbos-sdk-debug)
229
+
For more information on the debug command, please see our [references](../api-reference/cli.md#npx-dbos-debug)
Copy file name to clipboardExpand all lines: docs/explanations/application-structure-explanation.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -103,4 +103,4 @@ Once you've written your functions, there are two basic ways to call them:
103
103
1. Any function (not just handlers) can be called from HTTP if it's annotated with the [`GetApi`](../api-reference/decorators#getapi) or [`PostApi`](../api-reference/decorators#postapi) decorators. See our [HTTP serving tutorial](../tutorials/http-serving-tutorial) for details.
104
104
2. Handlers and workflows can invoke other functions via their contexts' `invoke` ([workflow](../api-reference/contexts#workflowctxtinvoketargetclass), [handler](../api-reference/contexts#handlerctxtinvoketargetclass-workflowuuid)) method.
105
105
106
-
To learn more about each individual type of function and what it can do, see our [tutorials](../category/dbos-sdk-tutorials/).
106
+
To learn more about each individual type of function and what it can do, see our [tutorials](../category/dbos-transact-tutorials/).
Copy file name to clipboardExpand all lines: docs/explanations/core-concepts.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
2
sidebar_position: 2
3
-
description: Learn the core ideas underlying the DBOS SDK
3
+
description: Learn the core ideas underlying DBOS Transact
4
4
---
5
5
6
-
# SDK Core Concepts
6
+
# DBOS Transact Core Concepts
7
7
8
-
The DBOS SDK is a transactional serverless TypeScript framework that helps you develop stateful applications that work right by default.
8
+
DBOS Transact is a transactional serverless TypeScript framework that helps you develop stateful applications that work right by default.
9
9
Its two main principles are inspired by the [DBOS research project from Stanford and MIT](https://dbos-project.github.io/):
10
10
11
11
1.**Store all application state in the database.** By managing database connections and transactions, DBOS makes it easy for you to store all your app state in the database so it can be safe, consistent, and durable. Under the hood, we use the database to manage the state of workflow execution as well as all [messages](../tutorials/workflow-communication-tutorial#messages-api) and [events](../tutorials/workflow-communication-tutorial#events-api).
0 commit comments