@thatopen/services 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -62
- package/dist/built-in/index.d.ts +569 -0
- package/dist/cli.js +12 -23
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +41 -49
- package/dist/vite-env.d.ts +1 -1
- package/docs/ai-quickstart.md +37 -0
- package/docs/builtin/paths.json +4 -0
- package/docs/cli/create.md +29 -29
- package/docs/cli/local-server.md +38 -38
- package/docs/cli/login.md +32 -32
- package/docs/cli/publish.md +31 -31
- package/docs/cli/run.md +26 -26
- package/docs/cli/serve.md +43 -43
- package/docs/cli/swap.md +30 -30
- package/docs/flow-architecture.md +389 -0
- package/docs/flow-plugin-guide.md +337 -0
- package/docs/platform-token.md +81 -0
- package/docs/revit-collab-quickstart.md +363 -173
- package/docs/rhino-interop-quickstart.md +391 -0
- package/package.json +1 -1
- package/resources/AGENTS.md +40 -40
- package/src/built-in/CDEManager/example.ts +214 -214
- package/src/built-in/CDEManager/examples/FileEditing/example.ts +226 -226
- package/src/built-in/CDEManager/examples/FileMoves/example.ts +186 -186
- package/src/built-in/CDEManager/examples/FileOperations/example.ts +295 -295
- package/src/built-in/CDEManager/examples/FileTransfers/example.ts +210 -210
- package/src/built-in/CDEManager/examples/FolderManagement/example.ts +230 -230
- package/src/built-in/CDEManager/examples/MetadataSchema/example.ts +230 -230
- package/src/built-in/CDEManager/examples/MetadataViews/example.ts +166 -166
- package/src/built-in/CDEManager/examples/ProjectConfig/example.ts +177 -177
- package/src/built-in/UIManager/src/app/example.ts +97 -97
- package/src/built-in/UIManager/src/app/examples/AppState/example.ts +140 -140
- package/src/built-in/UIManager/src/app/examples/Banner/example.ts +159 -159
- package/src/built-in/UIManager/src/app/examples/Contexts/example.ts +123 -123
- package/src/built-in/UIManager/src/app/examples/FileDrop/example.ts +124 -124
- package/src/built-in/UIManager/src/app/examples/FloatingLayout/example.ts +90 -90
- package/src/built-in/UIManager/src/app/examples/Modal/example.ts +163 -163
- package/src/built-in/UIManager/src/app/examples/Notifications/example.ts +133 -133
- package/src/built-in/UIManager/src/app/examples/ProjectFileStorage/example.ts +150 -150
- package/src/built-in/UIManager/src/app/examples/Sidebar/example.ts +102 -102
- package/src/built-in/UIManager/src/clashes-panel/example.ts +183 -183
- package/src/built-in/UIManager/src/git-history-panel/example.ts +70 -0
- package/src/built-in/UIManager/src/models-list/example.ts +122 -122
- package/src/built-in/UIManager/src/topics-panel/example.ts +170 -170
- package/src/built-in/index.ts +570 -0
- package/src/cli/templates/app/index.html +35 -35
- package/src/cli/templates/app/package.json +32 -32
- package/src/cli/templates/app/src/bim-components/CloudRunner/index.ts +95 -95
- package/src/cli/templates/app/src/bim-components/CloudRunner/src/index.ts +1 -1
- package/src/cli/templates/app/src/bim-components/CloudRunner/src/types.ts +5 -5
- package/src/cli/templates/app/src/bim-components/index.ts +1 -1
- package/src/cli/templates/app/src/globals.ts +1 -1
- package/src/cli/templates/app/src/ui-components/app-info-section/index.ts +26 -26
- package/src/cli/templates/app/src/ui-components/app-info-section/src/index.ts +1 -1
- package/src/cli/templates/app/src/ui-components/app-info-section/src/types.ts +15 -15
- package/src/cli/templates/app/src/ui-components/cloud-runner-section/index.ts +37 -37
- package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/index.ts +1 -1
- package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/types.ts +14 -14
- package/src/cli/templates/app/src/ui-components/index.ts +2 -2
- package/src/cli/templates/app/tsconfig.json +16 -16
- package/src/cli/templates/app/vite.config.js +57 -57
- package/src/cli/templates/cloud-component/README.md +205 -205
- package/src/cli/templates/cloud-component/_thatopen +5 -5
- package/src/cli/templates/cloud-component/declarations.json +4 -4
- package/src/cli/templates/cloud-component/package.json +21 -21
- package/src/cli/templates/cloud-component/src/main.ts +70 -70
- package/src/cli/templates/cloud-component/tsconfig.json +16 -16
- package/src/cli/templates/cloud-component/vite.config.js +46 -46
- package/src/cli/templates/shared/AGENTS.md +8 -8
- package/src/cli/templates/shared/CLAUDE.md +1 -1
- package/src/cli/templates/shared/_gitignore +5 -5
package/docs/ai-quickstart.md
CHANGED
|
@@ -9,6 +9,28 @@ on the [That Open Platform](https://platform.thatopen.com) from scratch, using
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
+
> **Not building anything — here to work in Revit?** If what the user actually wants is to share a
|
|
13
|
+
> Revit model with their team, join one a colleague uploaded, or review a change some other tool
|
|
14
|
+
> proposed to their model, this is the wrong guide and nothing below applies. Go to
|
|
15
|
+
> **[the Revit collaboration quickstart](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/revit-collab-quickstart.md)** and follow that instead.
|
|
16
|
+
> It is the same shape as this one: ask first, then drive the CLI.
|
|
17
|
+
>
|
|
18
|
+
> Phrases that mean that guide, not this one: *"I want to collaborate on a Revit project"*, *"share
|
|
19
|
+
> my central"*, *"join my team's model"*, *"someone sent me a change to approve"*, *"work on the
|
|
20
|
+
> same model as my colleague"*.
|
|
21
|
+
|
|
22
|
+
> **Making another application talk to this one?** If the user wants their own tool — Rhino, Blender,
|
|
23
|
+
> a script, an in-house app — to send changes into somebody's model or to show a model it did not
|
|
24
|
+
> author, that is a third thing again: **[Writing a flow plugin](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/flow-plugin-guide.md)** is the
|
|
25
|
+
> byte contract, and **[the architecture notes](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/flow-architecture.md)** say why it is shaped that
|
|
26
|
+
> way. Start at its section 0, which sorts the work into three sizes; most integrations are the
|
|
27
|
+
> smallest one and need no ownership, no history and no collaboration layer.
|
|
28
|
+
>
|
|
29
|
+
> Phrases that mean those: *"export my model to the platform"*, *"send my geometry to Revit"*,
|
|
30
|
+
> *"write a plugin for X"*, *"read a .frag in my app"*.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
12
34
|
## First — what are you building? (ask if the user hasn't said)
|
|
13
35
|
|
|
14
36
|
There are two kinds of project. **If the user hasn't told you which they want, ASK them
|
|
@@ -47,6 +69,11 @@ Get the token from the platform dashboard — **https://platform.thatopen.com/da
|
|
|
47
69
|
thatopen login --token <platform-token>
|
|
48
70
|
```
|
|
49
71
|
|
|
72
|
+
**[Logging in to That Open Platform](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/platform-token.md)** is the short version of everything that
|
|
73
|
+
goes wrong here: production and dev are separate worlds, `login` does not say which one it saved,
|
|
74
|
+
and a machine that is already logged in is somebody's previous session rather than a decision. Read
|
|
75
|
+
it if the user is not on a fresh machine, or if anything comes back `Unauthorized` or `403`.
|
|
76
|
+
|
|
50
77
|
This validates the token and stores it in `~/.thatopen/config.json`. Login **must** come
|
|
51
78
|
first: the next step's install pulls the private `@thatopen-platform/*-beta` packages, and
|
|
52
79
|
`create` uses your logged-in token to write an authenticated `.npmrc` so that install can
|
|
@@ -83,6 +110,16 @@ npm run dev
|
|
|
83
110
|
Serves the app and opens it inside the platform. **You now have a complete, working viewer** —
|
|
84
111
|
model loading, spatial tree, properties, measurement, sectioning, and more.
|
|
85
112
|
|
|
113
|
+
> **`npx tsc --noEmit` reports errors in a fresh beta scaffold, and they are not real.** You will see
|
|
114
|
+
> a handful of `Cannot find module '@thatopen/components'` and friends. A beta project aliases those
|
|
115
|
+
> imports to the `@thatopen-platform/*-beta` packages in `vite.config.js`, which bare `tsc` does not
|
|
116
|
+
> read — so it is looking for packages this project deliberately does not install.
|
|
117
|
+
>
|
|
118
|
+
> **In this project, `tsc` is not a signal.** Do not try to fix those errors, do not report them as
|
|
119
|
+
> problems you found, and do not use a clean `tsc` as your definition of done. `npm run dev` and
|
|
120
|
+
> `npm run build` are the ones that tell you anything; to check that something you added really
|
|
121
|
+
> shipped, grep the built bundle for it.
|
|
122
|
+
|
|
86
123
|
**[component]**
|
|
87
124
|
```bash
|
|
88
125
|
npm run run # executes the component locally against the platform (no browser)
|
package/docs/builtin/paths.json
CHANGED
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
"path": "src/built-in/UIManager/src/clashes-panel/example.ts",
|
|
84
84
|
"description": "clashes-panel — BIM coordinators need a dedicated review environment where they can see all detected clashes, filter by status, navigate to each issue in the 3D viewer, and mark items as resolved — without writing any UI code themselves."
|
|
85
85
|
},
|
|
86
|
+
{
|
|
87
|
+
"path": "src/built-in/UIManager/src/git-history-panel/example.ts",
|
|
88
|
+
"description": "git-history-panel — `top-git-history` is a GitKraken-style commit timeline for the **revit-flow** feature. It lists the commits pushed by the Revit add-in (newest first) and, when you click a commit, drives the shared 3D viewer to color that commit's changed elements — created green, modified blue, deleted red — on the loaded baseline model."
|
|
89
|
+
},
|
|
86
90
|
{
|
|
87
91
|
"path": "src/built-in/UIManager/src/models-list/example.ts",
|
|
88
92
|
"description": "top-models-list — top-models-list is the project's 3D-viewable-files tree: it mirrors the real storage folder structure, converts IFC to fragments, and loads `.frag`/`.potree`/`.splat` models into the 3D scene. Its loaders are PLUGGABLE — the panel owns the UI and the orchestration (progress, refresh, association), but the HOST decides how each extra file format is loaded, so you can teach it new formats without forking the built-in."
|
package/docs/cli/create.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Scaffold a new app or cloud component project from a template. Covers --template (app for browser BIM apps, cloud-component for server-side components), --beta for switching to private beta engine libraries at scaffold time, and using '.' as the project name to scaffold into the current directory."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## thatopen create
|
|
6
|
-
|
|
7
|
-
Scaffolds a new ThatOpen project and runs `npm install` automatically.
|
|
8
|
-
|
|
9
|
-
**Usage:**
|
|
10
|
-
```bash
|
|
11
|
-
thatopen create <project-name> [flags]
|
|
12
|
-
thatopen create . # scaffold into the current directory
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
**Flags:**
|
|
16
|
-
|
|
17
|
-
- `--template <template>`, `-t` — Template to use. Default: `app`.
|
|
18
|
-
- `app` — Browser BIM app running inside the platform iframe.
|
|
19
|
-
- `cloud-component` — Server-side component executed by the platform's cloud engine and consumed in apps and/or automations.
|
|
20
|
-
- `--beta` — Use private beta engine libraries (`@thatopen-platform/*-beta`) instead of the public ones. Sets `beta: true` in `.thatopen` so `serve`, `local-server`, and `vite build` all resolve to beta packages automatically. Requires beta npm access configured (handled automatically once you `thatopen login`).
|
|
21
|
-
|
|
22
|
-
> **`--beta` is currently required.** The templates depend on engine APIs that only exist in the beta libraries, so scaffolding without `--beta` errors out for now. Public (non-beta) support is coming with the October release.
|
|
23
|
-
|
|
24
|
-
**Examples:**
|
|
25
|
-
```bash
|
|
26
|
-
thatopen create my-app --beta
|
|
27
|
-
thatopen create my-app -t cloud-component --beta
|
|
28
|
-
thatopen create . --beta
|
|
29
|
-
```
|
|
1
|
+
---
|
|
2
|
+
description: "Scaffold a new app or cloud component project from a template. Covers --template (app for browser BIM apps, cloud-component for server-side components), --beta for switching to private beta engine libraries at scaffold time, and using '.' as the project name to scaffold into the current directory."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## thatopen create
|
|
6
|
+
|
|
7
|
+
Scaffolds a new ThatOpen project and runs `npm install` automatically.
|
|
8
|
+
|
|
9
|
+
**Usage:**
|
|
10
|
+
```bash
|
|
11
|
+
thatopen create <project-name> [flags]
|
|
12
|
+
thatopen create . # scaffold into the current directory
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Flags:**
|
|
16
|
+
|
|
17
|
+
- `--template <template>`, `-t` — Template to use. Default: `app`.
|
|
18
|
+
- `app` — Browser BIM app running inside the platform iframe.
|
|
19
|
+
- `cloud-component` — Server-side component executed by the platform's cloud engine and consumed in apps and/or automations.
|
|
20
|
+
- `--beta` — Use private beta engine libraries (`@thatopen-platform/*-beta`) instead of the public ones. Sets `beta: true` in `.thatopen` so `serve`, `local-server`, and `vite build` all resolve to beta packages automatically. Requires beta npm access configured (handled automatically once you `thatopen login`).
|
|
21
|
+
|
|
22
|
+
> **`--beta` is currently required.** The templates depend on engine APIs that only exist in the beta libraries, so scaffolding without `--beta` errors out for now. Public (non-beta) support is coming with the October release.
|
|
23
|
+
|
|
24
|
+
**Examples:**
|
|
25
|
+
```bash
|
|
26
|
+
thatopen create my-app --beta
|
|
27
|
+
thatopen create my-app -t cloud-component --beta
|
|
28
|
+
thatopen create . --beta
|
|
29
|
+
```
|
package/docs/cli/local-server.md
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Start a local HTTP + Socket.IO server that replicates the platform's cloud execution API on port 4001, with esbuild watch mode. Connect an app to it via EngineServicesClient's localServerUrl option to execute and monitor a local cloud component without publishing."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## thatopen local-server
|
|
6
|
-
|
|
7
|
-
Starts a local server that mimics the platform's cloud execution API. Runs esbuild in watch mode and rebuilds the component on every save.
|
|
8
|
-
|
|
9
|
-
Connect an app to it by passing `localServerUrl` to `EngineServicesClient`:
|
|
10
|
-
|
|
11
|
-
```ts
|
|
12
|
-
const client = new EngineServicesClient(token, apiUrl, {
|
|
13
|
-
localServerUrl: 'http://localhost:4001'
|
|
14
|
-
});
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
**Usage:**
|
|
18
|
-
```bash
|
|
19
|
-
thatopen local-server [flags]
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
**Flags:**
|
|
23
|
-
|
|
24
|
-
- `--port <port>` — Port to run the server on. Default: `4001`.
|
|
25
|
-
- `--skip-build` — Skip the initial build and use the existing `dist/bundle.js`.
|
|
26
|
-
|
|
27
|
-
**Endpoints:**
|
|
28
|
-
|
|
29
|
-
- `POST /api/processor/:componentId/execute`
|
|
30
|
-
- `GET /api/processor/progress/:executionId`
|
|
31
|
-
- `POST /api/processor/progress/:executionId/abort`
|
|
32
|
-
- `GET /api/processor/:componentId/progress`
|
|
33
|
-
|
|
34
|
-
**Example:**
|
|
35
|
-
```bash
|
|
36
|
-
thatopen local-server
|
|
37
|
-
thatopen local-server --port 5000
|
|
38
|
-
```
|
|
1
|
+
---
|
|
2
|
+
description: "Start a local HTTP + Socket.IO server that replicates the platform's cloud execution API on port 4001, with esbuild watch mode. Connect an app to it via EngineServicesClient's localServerUrl option to execute and monitor a local cloud component without publishing."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## thatopen local-server
|
|
6
|
+
|
|
7
|
+
Starts a local server that mimics the platform's cloud execution API. Runs esbuild in watch mode and rebuilds the component on every save.
|
|
8
|
+
|
|
9
|
+
Connect an app to it by passing `localServerUrl` to `EngineServicesClient`:
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
const client = new EngineServicesClient(token, apiUrl, {
|
|
13
|
+
localServerUrl: 'http://localhost:4001'
|
|
14
|
+
});
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Usage:**
|
|
18
|
+
```bash
|
|
19
|
+
thatopen local-server [flags]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Flags:**
|
|
23
|
+
|
|
24
|
+
- `--port <port>` — Port to run the server on. Default: `4001`.
|
|
25
|
+
- `--skip-build` — Skip the initial build and use the existing `dist/bundle.js`.
|
|
26
|
+
|
|
27
|
+
**Endpoints:**
|
|
28
|
+
|
|
29
|
+
- `POST /api/processor/:componentId/execute`
|
|
30
|
+
- `GET /api/processor/progress/:executionId`
|
|
31
|
+
- `POST /api/processor/progress/:executionId/abort`
|
|
32
|
+
- `GET /api/processor/:componentId/progress`
|
|
33
|
+
|
|
34
|
+
**Example:**
|
|
35
|
+
```bash
|
|
36
|
+
thatopen local-server
|
|
37
|
+
thatopen local-server --port 5000
|
|
38
|
+
```
|
package/docs/cli/login.md
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Authenticate with the ThatOpen platform by validating an access token against the API. Saves credentials globally (~/.thatopen/config.json) by default, or locally to the project's .thatopen file with --local. Local config takes priority over global."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## thatopen login
|
|
6
|
-
|
|
7
|
-
Validates an access token against the platform API and saves the credentials. Run this once globally before using any other command, or per-project with `--local`.
|
|
8
|
-
|
|
9
|
-
To get a token:
|
|
10
|
-
1. Go to [https://platform.thatopen.com](https://platform.thatopen.com)
|
|
11
|
-
2. In the header, click **Data**
|
|
12
|
-
3. Find the **Tokens** card and create a new token
|
|
13
|
-
4. Enable the permissions: **Apps**, **Components**, and **Storage**
|
|
14
|
-
5. Copy the token
|
|
15
|
-
|
|
16
|
-
**Usage:**
|
|
17
|
-
```bash
|
|
18
|
-
thatopen login --token <token> [flags]
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
**Flags:**
|
|
22
|
-
|
|
23
|
-
- `--token <token>` — Access token from the dashboard. Required.
|
|
24
|
-
- `--api-url <url>` — Platform API URL. Default: `https://platform.thatopen.com` (production). Pass `https://dev.platform.thatopen.com` to target the dev environment.
|
|
25
|
-
- `--local` — Save credentials to `.thatopen` in the current directory instead of the global config. Use this inside a project to override the global token for that project only.
|
|
26
|
-
|
|
27
|
-
**Examples:**
|
|
28
|
-
```bash
|
|
29
|
-
thatopen login --token my-token
|
|
30
|
-
thatopen login --token my-token --local
|
|
31
|
-
npm run login -- --token my-token # from inside a scaffolded project
|
|
32
|
-
```
|
|
1
|
+
---
|
|
2
|
+
description: "Authenticate with the ThatOpen platform by validating an access token against the API. Saves credentials globally (~/.thatopen/config.json) by default, or locally to the project's .thatopen file with --local. Local config takes priority over global."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## thatopen login
|
|
6
|
+
|
|
7
|
+
Validates an access token against the platform API and saves the credentials. Run this once globally before using any other command, or per-project with `--local`.
|
|
8
|
+
|
|
9
|
+
To get a token:
|
|
10
|
+
1. Go to [https://platform.thatopen.com](https://platform.thatopen.com)
|
|
11
|
+
2. In the header, click **Data**
|
|
12
|
+
3. Find the **Tokens** card and create a new token
|
|
13
|
+
4. Enable the permissions: **Apps**, **Components**, and **Storage**
|
|
14
|
+
5. Copy the token
|
|
15
|
+
|
|
16
|
+
**Usage:**
|
|
17
|
+
```bash
|
|
18
|
+
thatopen login --token <token> [flags]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Flags:**
|
|
22
|
+
|
|
23
|
+
- `--token <token>` — Access token from the dashboard. Required.
|
|
24
|
+
- `--api-url <url>` — Platform API URL. Default: `https://platform.thatopen.com` (production). Pass `https://dev.platform.thatopen.com` to target the dev environment.
|
|
25
|
+
- `--local` — Save credentials to `.thatopen` in the current directory instead of the global config. Use this inside a project to override the global token for that project only.
|
|
26
|
+
|
|
27
|
+
**Examples:**
|
|
28
|
+
```bash
|
|
29
|
+
thatopen login --token my-token
|
|
30
|
+
thatopen login --token my-token --local
|
|
31
|
+
npm run login -- --token my-token # from inside a scaffolded project
|
|
32
|
+
```
|
package/docs/cli/publish.md
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Build and upload the project to the platform. Automatically detects app vs cloud component from the local .thatopen config. On first publish, saves the assigned item ID back to .thatopen so subsequent runs update the same item instead of creating a new one."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## thatopen publish
|
|
6
|
-
|
|
7
|
-
Builds the project and uploads it to the platform. Works for both apps and cloud components — the project type is read from `.thatopen` (`itemType: APP | COMPONENT`).
|
|
8
|
-
|
|
9
|
-
First publish creates the item and auto-saves its ID to `.thatopen`. Subsequent publishes update that same item.
|
|
10
|
-
|
|
11
|
-
**Usage:**
|
|
12
|
-
```bash
|
|
13
|
-
thatopen publish [flags]
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
**Flags:**
|
|
17
|
-
|
|
18
|
-
- `--name <name>` — Item name on the platform. Defaults to `name` in `package.json`.
|
|
19
|
-
- `--version-tag <tag>` — Version tag. Defaults to `version` in `package.json`.
|
|
20
|
-
- `--app-id <id>` — Target an existing app by ID (overrides `.thatopen`).
|
|
21
|
-
- `--component-id <id>` — Target an existing cloud component by ID (overrides `.thatopen`).
|
|
22
|
-
- `--skip-build` — Skip the build step and upload the existing `dist/bundle.js`.
|
|
23
|
-
- `--icon <path>` — Path to an icon file (PNG, WebP, or ICO, max 512 KB). Saved to `.thatopen` for future publishes.
|
|
24
|
-
|
|
25
|
-
**Examples:**
|
|
26
|
-
```bash
|
|
27
|
-
thatopen publish
|
|
28
|
-
thatopen publish --version-tag 2.0.0
|
|
29
|
-
thatopen publish --skip-build
|
|
30
|
-
thatopen publish --icon assets/icon.png
|
|
31
|
-
```
|
|
1
|
+
---
|
|
2
|
+
description: "Build and upload the project to the platform. Automatically detects app vs cloud component from the local .thatopen config. On first publish, saves the assigned item ID back to .thatopen so subsequent runs update the same item instead of creating a new one."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## thatopen publish
|
|
6
|
+
|
|
7
|
+
Builds the project and uploads it to the platform. Works for both apps and cloud components — the project type is read from `.thatopen` (`itemType: APP | COMPONENT`).
|
|
8
|
+
|
|
9
|
+
First publish creates the item and auto-saves its ID to `.thatopen`. Subsequent publishes update that same item.
|
|
10
|
+
|
|
11
|
+
**Usage:**
|
|
12
|
+
```bash
|
|
13
|
+
thatopen publish [flags]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Flags:**
|
|
17
|
+
|
|
18
|
+
- `--name <name>` — Item name on the platform. Defaults to `name` in `package.json`.
|
|
19
|
+
- `--version-tag <tag>` — Version tag. Defaults to `version` in `package.json`.
|
|
20
|
+
- `--app-id <id>` — Target an existing app by ID (overrides `.thatopen`).
|
|
21
|
+
- `--component-id <id>` — Target an existing cloud component by ID (overrides `.thatopen`).
|
|
22
|
+
- `--skip-build` — Skip the build step and upload the existing `dist/bundle.js`.
|
|
23
|
+
- `--icon <path>` — Path to an icon file (PNG, WebP, or ICO, max 512 KB). Saved to `.thatopen` for future publishes.
|
|
24
|
+
|
|
25
|
+
**Examples:**
|
|
26
|
+
```bash
|
|
27
|
+
thatopen publish
|
|
28
|
+
thatopen publish --version-tag 2.0.0
|
|
29
|
+
thatopen publish --skip-build
|
|
30
|
+
thatopen publish --icon assets/icon.png
|
|
31
|
+
```
|
package/docs/cli/run.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Build and run a cloud component locally as a child process, mirroring the backend execution environment. Accepts execution parameters as JSON via --params, validates them against declarations.json, and streams progress output to the terminal."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## thatopen run
|
|
6
|
-
|
|
7
|
-
Builds and executes a cloud component locally, replicating what the platform's cloud engine does. Useful for testing component logic and parameters before publishing.
|
|
8
|
-
|
|
9
|
-
Execution output (`MESSAGE`, `PROGRESS`, `SUCCESS`, `FAIL`) is streamed to the terminal with elapsed time.
|
|
10
|
-
|
|
11
|
-
**Usage:**
|
|
12
|
-
```bash
|
|
13
|
-
thatopen run [flags]
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
**Flags:**
|
|
17
|
-
|
|
18
|
-
- `--params <json>` — Execution parameters as a JSON string. Default: `'{}'`. Validated against `declarations.json` if present (warns, does not fail).
|
|
19
|
-
- `--skip-build` — Skip the build step and run the existing `dist/bundle.js`.
|
|
20
|
-
|
|
21
|
-
**Examples:**
|
|
22
|
-
```bash
|
|
23
|
-
thatopen run
|
|
24
|
-
thatopen run --params '{"fileId": "abc123"}'
|
|
25
|
-
thatopen run --skip-build
|
|
26
|
-
```
|
|
1
|
+
---
|
|
2
|
+
description: "Build and run a cloud component locally as a child process, mirroring the backend execution environment. Accepts execution parameters as JSON via --params, validates them against declarations.json, and streams progress output to the terminal."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## thatopen run
|
|
6
|
+
|
|
7
|
+
Builds and executes a cloud component locally, replicating what the platform's cloud engine does. Useful for testing component logic and parameters before publishing.
|
|
8
|
+
|
|
9
|
+
Execution output (`MESSAGE`, `PROGRESS`, `SUCCESS`, `FAIL`) is streamed to the terminal with elapsed time.
|
|
10
|
+
|
|
11
|
+
**Usage:**
|
|
12
|
+
```bash
|
|
13
|
+
thatopen run [flags]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Flags:**
|
|
17
|
+
|
|
18
|
+
- `--params <json>` — Execution parameters as a JSON string. Default: `'{}'`. Validated against `declarations.json` if present (warns, does not fail).
|
|
19
|
+
- `--skip-build` — Skip the build step and run the existing `dist/bundle.js`.
|
|
20
|
+
|
|
21
|
+
**Examples:**
|
|
22
|
+
```bash
|
|
23
|
+
thatopen run
|
|
24
|
+
thatopen run --params '{"fileId": "abc123"}'
|
|
25
|
+
thatopen run --skip-build
|
|
26
|
+
```
|
package/docs/cli/serve.md
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Start a local dev server for a browser app. Uses esbuild in watch mode and serves the IIFE bundle on port 4000 with SSE live reload. To connect: open the project on platform.thatopen.com, click the Local App icon, then Get Started."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## thatopen serve
|
|
6
|
-
|
|
7
|
-
Builds the app in watch mode and serves the IIFE bundle locally. On every save, esbuild rebuilds and the platform reloads the bundle automatically via SSE.
|
|
8
|
-
|
|
9
|
-
Does **not** open a browser tab — the app runs inside the platform iframe. Open your project on the platform, then click the debug button to connect it to the local server.
|
|
10
|
-
|
|
11
|
-
**Usage:**
|
|
12
|
-
```bash
|
|
13
|
-
thatopen serve [flags]
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
**Flags:**
|
|
17
|
-
|
|
18
|
-
- `--port <port>` — Port to serve the bundle on. Default: `4000`.
|
|
19
|
-
|
|
20
|
-
**Endpoints served:**
|
|
21
|
-
|
|
22
|
-
- `GET /bundle.js` — The compiled IIFE bundle.
|
|
23
|
-
- `GET /bundle.js.map` — Source map.
|
|
24
|
-
- `GET /events` — SSE stream for live reload.
|
|
25
|
-
|
|
26
|
-
**Example:**
|
|
27
|
-
```bash
|
|
28
|
-
thatopen serve
|
|
29
|
-
thatopen serve --port 4321
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**Connecting the platform to your local server:**
|
|
33
|
-
|
|
34
|
-
1. Go to [https://platform.thatopen.com](https://platform.thatopen.com) and open a project (create one first if needed).
|
|
35
|
-
2. In the top right corner, click the **Local App** icon.
|
|
36
|
-
3. Click **Get Started**.
|
|
37
|
-
|
|
38
|
-
The platform loads the bundle from port 4000 and renders the app inside the project context, with full access to its models, data, and users. The dev server must be running before opening this URL — if nothing is served on port 4000, the platform will fail to load the app.
|
|
39
|
-
|
|
40
|
-
The resulting URL follows this pattern:
|
|
41
|
-
```
|
|
42
|
-
https://platform.thatopen.com/dashboard/projects/{projectId}/apps/local-app
|
|
43
|
-
```
|
|
1
|
+
---
|
|
2
|
+
description: "Start a local dev server for a browser app. Uses esbuild in watch mode and serves the IIFE bundle on port 4000 with SSE live reload. To connect: open the project on platform.thatopen.com, click the Local App icon, then Get Started."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## thatopen serve
|
|
6
|
+
|
|
7
|
+
Builds the app in watch mode and serves the IIFE bundle locally. On every save, esbuild rebuilds and the platform reloads the bundle automatically via SSE.
|
|
8
|
+
|
|
9
|
+
Does **not** open a browser tab — the app runs inside the platform iframe. Open your project on the platform, then click the debug button to connect it to the local server.
|
|
10
|
+
|
|
11
|
+
**Usage:**
|
|
12
|
+
```bash
|
|
13
|
+
thatopen serve [flags]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Flags:**
|
|
17
|
+
|
|
18
|
+
- `--port <port>` — Port to serve the bundle on. Default: `4000`.
|
|
19
|
+
|
|
20
|
+
**Endpoints served:**
|
|
21
|
+
|
|
22
|
+
- `GET /bundle.js` — The compiled IIFE bundle.
|
|
23
|
+
- `GET /bundle.js.map` — Source map.
|
|
24
|
+
- `GET /events` — SSE stream for live reload.
|
|
25
|
+
|
|
26
|
+
**Example:**
|
|
27
|
+
```bash
|
|
28
|
+
thatopen serve
|
|
29
|
+
thatopen serve --port 4321
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Connecting the platform to your local server:**
|
|
33
|
+
|
|
34
|
+
1. Go to [https://platform.thatopen.com](https://platform.thatopen.com) and open a project (create one first if needed).
|
|
35
|
+
2. In the top right corner, click the **Local App** icon.
|
|
36
|
+
3. Click **Get Started**.
|
|
37
|
+
|
|
38
|
+
The platform loads the bundle from port 4000 and renders the app inside the project context, with full access to its models, data, and users. The dev server must be running before opening this URL — if nothing is served on port 4000, the platform will fail to load the app.
|
|
39
|
+
|
|
40
|
+
The resulting URL follows this pattern:
|
|
41
|
+
```
|
|
42
|
+
https://platform.thatopen.com/dashboard/projects/{projectId}/apps/local-app
|
|
43
|
+
```
|
package/docs/cli/swap.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Toggle or explicitly set the engine library mode between stable public packages (@thatopen/*) and private beta packages (@thatopen-platform/*-beta). Updates package.json and .thatopen, then runs npm install. Source code never changes — aliases handle resolution."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## thatopen swap
|
|
6
|
-
|
|
7
|
-
Switches the project between stable and beta engine libraries. Without flags, it toggles from the current state. Updates `package.json` dependencies and sets `beta` in `.thatopen` so `thatopen serve`, `thatopen local-server`, and `vite build` all pick up the change automatically.
|
|
8
|
-
|
|
9
|
-
Source code stays unchanged — `@thatopen/components` imports resolve to the correct package via esbuild/vite aliases based on the `beta` flag in `.thatopen`.
|
|
10
|
-
|
|
11
|
-
**Usage:**
|
|
12
|
-
```bash
|
|
13
|
-
thatopen swap # toggle: stable → beta or beta → stable
|
|
14
|
-
thatopen swap --beta # force beta
|
|
15
|
-
thatopen swap --stable # force stable
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
**Flags:**
|
|
19
|
-
|
|
20
|
-
- `--beta` — Switch to beta libraries (`@thatopen-platform/*-beta`).
|
|
21
|
-
- `--stable` — Switch back to stable public libraries (`@thatopen/*`).
|
|
22
|
-
|
|
23
|
-
**Examples:**
|
|
24
|
-
```bash
|
|
25
|
-
thatopen swap
|
|
26
|
-
thatopen swap --beta
|
|
27
|
-
thatopen swap --stable
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
> Beta packages are private and the access must be explicitly granted by That Open Company.
|
|
1
|
+
---
|
|
2
|
+
description: "Toggle or explicitly set the engine library mode between stable public packages (@thatopen/*) and private beta packages (@thatopen-platform/*-beta). Updates package.json and .thatopen, then runs npm install. Source code never changes — aliases handle resolution."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## thatopen swap
|
|
6
|
+
|
|
7
|
+
Switches the project between stable and beta engine libraries. Without flags, it toggles from the current state. Updates `package.json` dependencies and sets `beta` in `.thatopen` so `thatopen serve`, `thatopen local-server`, and `vite build` all pick up the change automatically.
|
|
8
|
+
|
|
9
|
+
Source code stays unchanged — `@thatopen/components` imports resolve to the correct package via esbuild/vite aliases based on the `beta` flag in `.thatopen`.
|
|
10
|
+
|
|
11
|
+
**Usage:**
|
|
12
|
+
```bash
|
|
13
|
+
thatopen swap # toggle: stable → beta or beta → stable
|
|
14
|
+
thatopen swap --beta # force beta
|
|
15
|
+
thatopen swap --stable # force stable
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Flags:**
|
|
19
|
+
|
|
20
|
+
- `--beta` — Switch to beta libraries (`@thatopen-platform/*-beta`).
|
|
21
|
+
- `--stable` — Switch back to stable public libraries (`@thatopen/*`).
|
|
22
|
+
|
|
23
|
+
**Examples:**
|
|
24
|
+
```bash
|
|
25
|
+
thatopen swap
|
|
26
|
+
thatopen swap --beta
|
|
27
|
+
thatopen swap --stable
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
> Beta packages are private and the access must be explicitly granted by That Open Company.
|