Skip to content

Commit 32ee782

Browse files
docs(i18n): restore zh-Hans and ja for the cloud and editions pages after #428 and #431 (#432)
* docs(i18n): translate the entry path into ja (index, why, start, editions, use) Phase 1 of the other-locale plan. Adds ja translations of the 19 entry-path pages (index, why, start/*, editions/*, use/*) and the ja sidebar labels for start/ and editions/. Every heading keeps its English id, fences match the English byte for byte, terms follow the glossary's ja column, and each page carries a --stamp. check-translations: ja 0 stale, 79 missing (was 98). Fixes #386 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate build/ and build/data/ into ja (#388, PR 1 of 7) Phase 2 of the other-locale plan, first batch: ja for the build/ top level (index, agents, ai-builder, ai-skills, extend-existing-systems, marketplace, packages, reports, templates) and build/data/ (index, relationships, formulas, validation-rules). Same rules as #386: English heading ids, fences byte for byte, glossary ja column, UI labels in English, one line per paragraph, each page stamped. check-translations: ja 0 stale, 66 missing (was 79). Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate build/automation/ and build/interface/ into ja (#388, PR 2 of 7) Adds ja translations for the 11 automation and interface pages: build/automation/{index,flows,workflows,approvals} and build/interface/{index,apps,views,forms,dashboards,pages,actions}. Both sections' meta.ja.json already match the English pages list. Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * fix(search): keep one locale index and read search text from build output (#393) /api/search kept every locale's Orama index (30-40 MB each) and every page module page.data.load() imported, so one Worker isolate grew from 58 MB after its first locale to 283 MB after all eight, and #390's ja pages tipped it past 128 MB into 503s. - scripts/gen-search-data.mjs computes each page's structuredData before next build with fumadocs-mdx's own remark chain and writes one gzipped module per locale to apps/docs/.search/; the route reads that instead of importing page modules. - The route keeps the most recently used locale's index only. - check-search-heap.mjs asks the built route in every locale twice and fails above 100 MB or when the second pass keeps growing; it runs in ci.yml after check-search-locales and its --self-test is in SELF_TESTED. Measured on the built route: levels at 50-54 MB across both passes. Fixes #393 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): re-land build/automation/ and build/interface/ ja pages (#388, PR 2 of 7) Reverts #392, which reverted #390 because /api/search ran out of Worker memory. #394 (#393) fixed that, so the same 11 ja pages come back unchanged. Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * fix(worker): stop bundling every docs page twice (#395) Six route handlers (search, og, sitemap, llms.txt, llms-full.txt, llms.mdx) import lib/source.ts, whose fumadocs-mdx collection holds a lazy import() of every compiled page. Turbopack compiles route handlers as their own module graph, so the Worker carried a second copy of every page module: ~20 MB of upload, and each translated page cost ~170-235 KiB instead of ~86. #388's PR 3 would have gone over the 61,440 KiB budget. - scripts/gen-route-data.mjs (was gen-search-data.mjs) also writes .route-data/collection.ts: .source/server.ts with each page's body import replaced by a read of generated data, and markdown.ts, the English pages' processed Markdown the llms routes serve. With --dev it re-exports the full collection so next dev sees new pages. - lib/source.ts builds its loader on that collection; the page route loads bodies through lib/page-body.ts, the only module that imports the full collection. - lib/packed.ts unpacks the generated gzip+base64 strings. - The Worker budget step prints a per-page projection from the bundle's metafile (check-worker-page-cost.mjs, in SELF_TESTED). Measured, same machine: main f7e4a57 59,173 KiB, this change 38,909 KiB; with every ja page filled in, 43,700 KiB. Fixes #395 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate configure/ into ja (#388, PR 3 of 7) Adds ja translations for the 14 configure/ pages: index, ai, api-access, authentication, data-sources, email, localization, mcp, notifications, runtime, storage, system-settings, users and webhooks. configure/ meta.ja.json already matches the English pages list. Same rules as the earlier batches: English heading ids, fences byte for byte, glossary ja column, UI labels in English, one line per paragraph, each page stamped. check-translations: ja 0 stale, 41 missing (was 55). Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate configure/permissions/ and cloud/ into ja (#388, PR 4 of 7) Adds ja translations for the 7 configure/permissions/ pages (index, managing-access, permission-sets, positions, record-access, field-level-security, hierarchy-visibility) and the 8 cloud/ pages (organization, environments, plans-and-seats, ai-credits-and-limits, storage-and-limits, domains, apps, cloud-connection), plus a new cloud/meta.ja.json whose pages match the English. configure/permissions/ meta.ja.json already matched. Same rules as the earlier batches. check-translations: ja 0 stale, 26 missing (was 41). Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate deploy/ and operate/ into ja (#388, PR 5 of 7) Adds ja translations for the 4 deploy/ pages (index, docker, kubernetes, air-gapped) and the 7 operate/ pages. Both sections' meta.ja.json already match the English pages list. Same rules as the earlier batches. check-translations: ja 0 stale, 15 missing (was 26). Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate reference/, architecture and ontology into ja (#388, PR 6 of 7) Adds ja translations for the 9 reference/ pages and the two root pages, architecture and ontology. reference/meta.ja.json already matches the English pages list; the root sidebar has only meta.json. Same rules as the earlier batches. check-translations: ja 0 stale, 4 missing (was 15). Refs #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate resources/ into ja, completing ja coverage (#388, PR 7 of 7) Adds ja translations for the 4 resources/ pages: changelog, faq, glossary and support. resources/meta.ja.json already matches the English pages list. Same rules as the earlier batches. With this batch every English page has a ja translation. check-translations: ja 0 stale, 0 missing (was 4). Fixes #388 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): re-sync start/cloud step 1 in zh-Hans, zh-Hant and ja (#404) #403 changed step 1 of "Start on ObjectOS Cloud" to link the console's register and sign-in pages instead of www.objectos.ai. This carries the same change into zh-Hans and ja, restamps both, and regenerates zh-Hant with gen:zh-hant. check-translations: zh-Hans and ja 0 stale, 0 missing. Fixes #404 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): re-sync six pages changed by #410 and #413 in zh-Hans, zh-Hant and ja (#414) #410 added subscription management, AI seat changes and Paddle as the seller to cloud/plans-and-seats and cloud/ai-credits-and-limits. #413 moved the sales contact to sales@objectos.ai on editions/license, resources/support, resources/faq and start/enterprise. This carries only the changed parts into zh-Hans and ja, restamps all twelve pages, and regenerates zh-Hant with gen:zh-hant. Paddle, emails and URLs are copied byte for byte. check-translations: zh-Hans and ja 0 stale, 0 missing. Fixes #414 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(positioning): quote the README's three-edition sentence (#341) objectstack#26148 replaced the README sentence OBJECTOS_DEFINITION quoted ("...the commercial runtime environment built on this stack") with one naming three editions: ObjectOS Community, shipped by the repository, free and self-hosted; ObjectOS Cloud, hosted; ObjectOS Enterprise, self-managed and licensed. - OBJECTOS_DEFINITION quotes README lines 27-31 from "To run it", with three declared changes: "this repository" spelled out as "the ObjectStack repository", the Markdown dropped, and the in-README "(Ship it)" link left out. - OBJECTOS_EDITIONS keeps only the #171 Q2 export clause, naming Cloud and Enterprise instead of "either edition". - POSITIONING_SHORT (152 characters) names the three editions in the README's words. - The index.mdx opening paragraph and description follow, and the zh-Hans and ja siblings are re-translated and restamped; zh-Hant is regenerated. check-positioning passes after a build. Fixes #341 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): re-sync editions/compare and editions/license after #407 (#418) #407 added Team's annual price ($20 / AI seat / month billed annually) to the Price row of editions/compare and editions/license. This adds the same to the zh-Hans and ja Price cells, in the annual-price wording each locale uses on cloud/plans-and-seats, restamps the four pages and regenerates zh-Hant. check-translations: zh-Hans and ja 0 stale, 0 missing. Fixes #418 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(architecture): ObjectOS layer row in three-edition terms (#417) The layer table on architecture still called ObjectOS "the commercial runtime environment built on the framework" with two editions, the definition objectstack#26148 retired and #416 removed from the positioning constants. The row now uses only positioning.ts's terms: ObjectOS Community free and self-hosted, ObjectOS Cloud the hosted edition, ObjectOS Enterprise the self-managed, licensed one. zh-Hans and ja use the wording their index.mdx carries since #416; both are restamped and zh-Hant is regenerated. check-positioning rule (c) now lists "commercial runtime environment" as a stale sentence, with a fixture, so the phrase cannot come back to an English source. Fixes #417 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(templates): remove the five retired templates from the catalog and entry pages (#421) On ObjectStack 17.7 the scaffolder refuses todo, compliance, content, contracts and procurement as retired, yet the docs listed them as templates and catalog apps. Per the ruling on #334 Q5 they are removed, and build/templates' "--template todo is refused as retired" stays as the one mention. - build/templates: seoTitle and description name helpdesk, hr and project; the five catalog rows and the three pick-table rows that pointed at them are gone. - index: the marketplace example names Helpdesk only. - start/community and build/marketplace: the same five rows leave their app tables, and the template clone example uses helpdesk. - build/index names none of the five and is untouched. zh-Hans and ja get the same removals and are restamped; zh-Hant is regenerated. Fixes #421 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(upgrade): JWT key rotation follows the deployment's own procedure (#423) Per the ruling on #334 Q4, the upgrade page's "Rotate the JWT signing keys" step gains one sentence: how the keys are rotated depends on how the deployment supplies them, so follow the deployment's own procedure. It names no mechanism, variable or command. zh-Hans and ja carry the same sentence and are restamped; zh-Hant is regenerated. Q2 and Q3 of the same ruling need no change; the seat measured both pages against it. Fixes #423 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(positioning): exporting a Cloud or Enterprise ontology to the open runtime is planned (#334 Q1) No mechanism exports a Cloud or Enterprise tenant's ontology to run on the open-source ObjectStack runtime yet. OBJECTOS_EDITIONS, the index opening paragraph, /llms.txt and 13 sentences across index, security, glossary, why, architecture and ontology now say the export is planned, and keep what is true today: the ontology is ordinary ObjectStack metadata, ObjectStack is Apache-2.0, and ObjectOS Community runs on your own machine. zh-Hans and ja follow, restamped; zh-Hant regenerated. Ruling-ref: #334 comment 6568804196 Fixes #425 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): translate six cloud and editions pages after one environment per organization, re-sync cloud/organization (zh-Hans, zh-Hant, ja) #428 deleted the zh-Hans, zh-Hant and ja siblings of cloud/apps, domains, environments, plans-and-seats, storage-and-limits and editions/compare. They are translated from the current English: every sentence #428 changed is new, and wording is reused only where the English sentence is unchanged. cloud/organization is re-synced in both locales. zh-Hant regenerated. Part of #429 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> * docs(i18n): follow #431 plan B in zh-Hans, zh-Hant and ja; translate editions/license fresh Re-sync cloud/plans-and-seats and editions/compare to #431's English, and translate editions/license, whose siblings #431 deleted, from the current English, reusing wording only where the English sentence is unchanged. Re-sync configure/mcp, deploy/index, index and start/enterprise. zh-Hant regenerated. Fixes #429 Claude-Session: https://claude.ai/code/session_01QsR2jRsjbApbf83iyTDDXm Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0c3fe8f commit 32ee782

36 files changed

Lines changed: 2325 additions & 59 deletions

‎content/docs/cloud/apps.ja.mdx‎

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: アプリ
3+
seoTitle: "ObjectOS Cloud のアプリ:インストール、更新、公開、CLI からのデプロイ"
4+
description: ObjectOS Cloud の環境にアプリをインストールし、更新を確認し、環境のアプリを組織向けのパッケージとして公開し、ローカルでビルドしたアプリを os CLI からデプロイします。
5+
editions: [cloud]
6+
translation:
7+
source_sha: e13d22274a9273409ca68299e567bdf0fe9183de61ffc745a1bf9c6b1591995c
8+
guide_rev: 1
9+
mode: auto
10+
---
11+
12+
アプリが ObjectOS Cloud の環境に届く方法は 3 つあります。マーケットプレイスまたは組織のレジストリから**インストール**する、環境の中で([AI Builder](/docs/build/ai-builder) を使うか手作業で)**構築**する、または自分のマシンから `os` CLI で**公開**する、のいずれかです。どの方法でも、インストールされるのは[パッケージ](/docs/build/packages)、つまりオブジェクト、ビュー、フローなどをまとめたバージョン付きのバンドルです。
13+
14+
## アプリをインストールする [#install-an-app]
15+
16+
クラウドコンソールで環境の **Settings → Apps** を開き、**Install an app**(**Install Application**)を選びます。アプリを選んでから、次を設定します。
17+
18+
- **Include sample data**:パッケージのデモレコードで環境を埋め、すぐに試せるようにします。クリーンな本番環境ではチェックを外したままにします。
19+
- **Accept additional permissions**:初回のインストールではチェックを外したままにします。これは、以前に付与された権限より多くの権限を求める更新のためのものです([更新を確認する](#check-for-updates)を参照)。
20+
21+
アプリは再起動なしで、環境への次のリクエストから表示されます。インストール後のメッセージには、どのように反映されたか(インストール、再インストール、更新、ロールバックのいずれかと、そのバージョン)と、知っておくべきこと(アプリが使う機能のうちプランに含まれないものなど)が表示されます。
22+
23+
環境の中からインストールすることもできます。環境の **Marketplace** を開き、アプリを見つけて **Install** を選びます。どちらの方法でも、同じパッケージが同じ環境にインストールされます。[マーケットプレイス](/docs/build/marketplace)を参照してください。
24+
25+
インストールは組織のオーナーと管理者が行います。
26+
27+
## 更新を確認する [#check-for-updates]
28+
29+
**Settings → Apps → Check for app updates** は、インストール済みの各アプリを公開されている最新バージョンと比較し、更新があるか、すべてのアプリが最新か、まだ何もインストールされていないかを表示します。
30+
31+
アプリを更新するには、もう一度インストールします。すでにインストールされているアプリをインストールすると、その場で公開済みの最新バージョンに移行します。
32+
33+
新しいバージョンが、アプリに以前付与されていなかった権限を求める場合、更新は `PERMISSION_RECONSENT_REQUIRED` で拒否され、メッセージに追加される各権限が一覧表示されます。内容を確認してから、**Accept additional permissions** にチェックを入れてもう一度インストールし、権限を付与します。
34+
35+
## 環境をパッケージとして公開する [#publish-an-environment-as-a-package]
36+
37+
**Settings → Apps → Publish as a package**(**Publish to Registry**)は、この環境で構築したアプリを、組織のレジストリにあるパッケージの新しいバージョンとして公開し、そこからインストールできる状態にします。
38+
39+
| フィールド | 意味 |
40+
|---|---|
41+
| **App Name** | レジストリに表示される名前。デフォルトは環境の名前です。 |
42+
| **Version** | `1.2.0` のようなセマンティックバージョン。空欄のままにすると、最新バージョンの次のパッチとして公開されます。 |
43+
| **Visibility** | **Private**:自分の組織だけがインストールできます。**Organization**:組織全体で共有されます。 |
44+
| **Description** | アプリ全体として何をするか。 |
45+
| **Release notes** | このバージョンでの変更点。バージョンとともに表示されます。 |
46+
| **Package ID**(詳細設定) | 逆ドメイン形式の識別子。空欄の場合は環境の名前から導出されます。 |
47+
48+
公開マーケットプレイスへの掲載は、審査を伴う別の手順であり、ここでは提供されません。サイドバーの **Advanced → Packages** に、組織が公開したものがすべて一覧表示されます。
49+
50+
## CLI からデプロイする [#deploy-from-the-cli]
51+
52+
アプリをコードとして(自分のマシン上の ObjectStack プロジェクトとして)開発している場合、`os` CLI でそれを組織に公開し、環境にインストールできます。流れは **ログイン → ビルド → 公開 → インストール** です。
53+
54+
必要なものは、ObjectStack プロジェクト([Path B — `os init`](/docs/start/community#path-b--os-init-developer) を参照)、`os` CLI、そして環境を持つ ObjectOS Cloud アカウントです。
55+
56+
### 1. ログイン [#1-log-in]
57+
58+
```bash
59+
os cloud login
60+
```
61+
62+
これはブラウザのサインインを開き、クラウドトークンを `~/.objectstack/cloud.json` に保存します。サインインリンクを開く代わりに表示するには `--no-browser` を使います。CI ではログインを省略し、`--token` または `OS_CLOUD_API_KEY` 変数で `os package publish` に API キーを渡します。
63+
64+
クラウドログインは、ランタイムにサインインする `os login` とは別のものです。公開には常にクラウドログインが使われます。
65+
66+
### 2. ビルド [#2-build]
67+
68+
```bash
69+
os build
70+
```
71+
72+
これはプロジェクトをひとつのアーティファクト `dist/objectstack.json` にコンパイルします。オブジェクト、ビュー、アプリ、ダッシュボード、フロー、サンプルデータが含まれます。後でアップロードされるのはこのアーティファクトだけで、ソースファイル、`node_modules`、ローカルの認証情報がアップロードされることはありません。
73+
74+
### 3. 公開 [#3-publish]
75+
76+
```bash
77+
os package publish
78+
```
79+
80+
プロジェクトのルートで実行します。パッケージを組織に登録し(初回のみ。`com.acme.crm` のような逆ドメイン形式のパッケージ id をキーとします)、アーティファクトを新しい不変のバージョンとして公開します。同じバージョンを 2 回公開することはできません。`manifest.version` を上げるか、`--version` を渡します。
81+
82+
| フラグ | 目的 |
83+
|---|---|
84+
| `--manifest-id <id>` | 逆ドメイン形式のパッケージ id。デフォルト:アーティファクトから導出 |
85+
| `--version <semver>` | 公開するバージョン。デフォルト:`manifest.version` |
86+
| `--visibility <private\|org\|marketplace>` | 誰が表示・インストールできるか。ObjectOS Cloud では新しいパッケージのデフォルトは `org` です。既存のパッケージの公開範囲を維持するにはフラグを省略します |
87+
| `--install` | 新しいバージョンをすぐに環境にインストールします |
88+
| `--env <id>` | `--install` の対象環境。デフォルト:`os environments switch` で選択した環境 |
89+
| `--seed-sample-data` | インストール時にアーティファクトのサンプルデータを含めます |
90+
| `--note "<text>"` | リリースノート |
91+
| `--submit` | `marketplace` パッケージの新しいバージョンを審査に提出します |
92+
93+
### 4. インストール [#4-install]
94+
95+
利用者は環境からインストールします。環境の **Marketplace** を開き、パッケージを見つけて **Install** を選ぶか、[前述](#install-an-app)のクラウドコンソールの **Install an app** を使います。
96+
97+
既知の環境にデプロイするパイプラインは、ひとつのコマンドで公開とインストールを行えます。
98+
99+
```bash
100+
os package publish --env <environment-id> --install --seed-sample-data
101+
```
102+
103+
これは全か無かです。インストールが拒否された場合(その環境にインストールできない、環境が存在しない、またはそのバージョンがその環境で承認されていない)、何も公開されません。コマンドは拒否内容を表示してゼロ以外で終了するため、パイプラインは失敗します。原因を修正し、同じバージョンをもう一度公開してください。
104+
105+
### マーケットプレイスへの掲載 [#marketplace-listings]
106+
107+
`--visibility marketplace` はパッケージを公開カタログの対象にしますが、新しいバージョンはそれぞれ**下書き**として届きます。審査に送るには `--submit` を渡します。プライベートと組織のパッケージは審査が不要で、組織はすぐにインストールできます。
108+
109+
## 次へ [#next]
110+
111+
- [パッケージ](/docs/build/packages):パッケージに含まれるものと、バージョンの仕組み。
112+
- [マーケットプレイス](/docs/build/marketplace):環境の中からの閲覧とインストール。
113+
- [CLI リファレンス](/docs/reference/cli):すべての `os` コマンド。
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
---
2+
title: 应用
3+
seoTitle: "ObjectOS Cloud 应用:通过 CLI 安装、更新、发布和部署"
4+
description: 将应用安装到 ObjectOS Cloud 环境中、检查更新、把一个环境的应用作为包发布给你的组织,以及通过 os CLI 部署在本地构建的应用。
5+
editions: [cloud]
6+
translation:
7+
source_sha: e13d22274a9273409ca68299e567bdf0fe9183de61ffc745a1bf9c6b1591995c
8+
guide_rev: 1
9+
mode: auto
10+
---
11+
12+
应用通过三种方式之一进入 ObjectOS Cloud 环境:你从市场或组织的注册表中
13+
**安装**一个应用,你在环境中**构建**它(使用 [AI Builder](/docs/build/ai-builder)
14+
或手动构建),或者你用 `os` CLI 从自己的机器上**发布**它。
15+
无论走哪条路,安装的都是一个[包](/docs/build/packages):一个有版本的、
16+
由对象、视图、流程等组成的集合。
17+
18+
## 安装应用 [#install-an-app]
19+
20+
在云控制台中,打开环境的 **Settings → Apps**,选择
21+
**Install an app**(**Install Application**)。挑选应用,然后:
22+
23+
- **Include sample data**(包含示例数据)—— 用包的演示记录填充环境,
24+
让你可以马上开始探索。对于干净的生产环境,请不要勾选。
25+
- **Accept additional permissions**(接受额外权限)—— 首次安装时不要勾选。
26+
它用于某次更新请求的权限多于此前授予该应用的权限的情况(参见[检查更新](#check-for-updates))。
27+
28+
应用会在环境的下一次请求时出现,无需重启。安装后的消息会说明安装的
29+
结果 —— 已安装、已重新安装、已更新或已回滚,并附带版本号 —— 以及你应当
30+
知道的任何情况,例如应用使用了你的套餐不包含的某项能力。
31+
32+
你也可以在环境内部安装:打开环境的 **Marketplace**(市场),
33+
找到应用并选择 **Install**。两种方式都会把同一个包安装到同一个环境中;
34+
参见[市场](/docs/build/marketplace)。
35+
36+
安装仅限组织的所有者和管理员。
37+
38+
## 检查更新 [#check-for-updates]
39+
40+
**Settings → Apps → Check for app updates** 会把每个已安装的应用与
41+
已发布的最新版本进行比较,并告诉你是有可用更新、所有应用都已是最新,
42+
还是尚未安装任何应用。
43+
44+
要更新一个应用,就再安装一次:安装一个已经安装的应用,会将它就地
45+
升级到已发布的最新版本。
46+
47+
如果新版本请求了此前未授予该应用的权限,更新会以
48+
`PERMISSION_RECONSENT_REQUIRED` 被拒绝,消息中会列出它新增的
49+
每一项权限。阅读它们,然后勾选 **Accept additional permissions**
50+
再次安装,以授予这些权限。
51+
52+
## 将环境发布为包 [#publish-an-environment-as-a-package]
53+
54+
**Settings → Apps → Publish as a package**(**Publish to Registry**)会获取
55+
在此环境中构建的应用,并将它们作为组织注册表中某个包的新版本发布,
56+
之后即可从注册表安装。
57+
58+
| 字段 | 含义 |
59+
|---|---|
60+
| **App Name** | 在注册表中显示的名称。默认为环境的名称。 |
61+
| **Version** | 语义化版本号,例如 `1.2.0`。留空则在最新版本之后发布下一个补丁版本。 |
62+
| **Visibility** | **Private** —— 只有你的组织可以安装;**Organization** —— 在你的组织内共享。 |
63+
| **Description** | 应用的整体用途。 |
64+
| **Release notes** | 此版本的变更内容;与版本一起显示。 |
65+
| **Package ID**(高级) | 反向域名形式的标识符。留空时,从环境名称派生。 |
66+
67+
在公共市场上架是一个单独的步骤,需要经过审核;这里不提供该选项。
68+
侧边栏中的 **Advanced → Packages** 列出了你的组织发布过的所有内容。
69+
70+
## 通过 CLI 部署 [#deploy-from-the-cli]
71+
72+
如果你以代码形式开发应用 —— 在自己机器上的一个 ObjectStack 项目 ——
73+
`os` CLI 会把它发布到你的组织,并可以将它安装到某个环境中。
74+
流程是**登录 → 构建 → 发布 → 安装**。
75+
76+
你需要一个 ObjectStack 项目(参见
77+
[路径 B —— `os init`](/docs/start/community#path-b--os-init-developer))、
78+
`os` CLI,以及一个带有环境的 ObjectOS Cloud 账户。
79+
80+
### 1. 登录 [#1-log-in]
81+
82+
```bash
83+
os cloud login
84+
```
85+
86+
这会打开浏览器登录,并将云令牌保存在
87+
`~/.objectstack/cloud.json` 中。使用 `--no-browser` 可以打印登录链接,
88+
而不是打开它。在 CI 中,跳过登录,通过 `--token` 或 `OS_CLOUD_API_KEY`
89+
变量给 `os package publish` 提供一个 API 密钥。
90+
91+
云登录与 `os login` 是分开的,后者让你登录到某个运行时;
92+
发布始终使用云登录。
93+
94+
### 2. 构建 [#2-build]
95+
96+
```bash
97+
os build
98+
```
99+
100+
这会把项目编译为一个产物 `dist/objectstack.json`:你的
101+
对象、视图、应用、仪表盘、流程以及任何示例数据。之后只会上传这个产物
102+
—— 绝不会上传源文件、`node_modules` 或本地凭据。
103+
104+
### 3. 发布 [#3-publish]
105+
106+
```bash
107+
os package publish
108+
```
109+
110+
在项目根目录下运行它。它会在你的组织中注册该包
111+
(只注册一次,以反向域名形式的包 id 为键,例如 `com.acme.crm`),并将
112+
产物作为一个新的、不可变的版本发布。同一个版本不能发布两次:提高
113+
`manifest.version` 或传入 `--version`。
114+
115+
| 参数 | 用途 |
116+
|---|---|
117+
| `--manifest-id <id>` | 反向域名形式的包 id。默认:从产物派生 |
118+
| `--version <semver>` | 要发布的版本。默认:`manifest.version` |
119+
| `--visibility <private\|org\|marketplace>` | 谁可以查看和安装它。在 ObjectOS Cloud 上,新包默认为 `org`;省略此参数则保留已有包的可见性 |
120+
| `--install` | 立即将新版本安装到某个环境中 |
121+
| `--env <id>` | `--install` 的目标环境。默认:`os environments switch` 选中的那个 |
122+
| `--seed-sample-data` | 安装时包含产物的示例数据 |
123+
| `--note "<text>"` | 发布说明 |
124+
| `--submit` | 将 `marketplace` 包的新版本提交审核 |
125+
126+
### 4. 安装 [#4-install]
127+
128+
用户从环境中安装:打开环境的 **Marketplace**,找到你的
129+
包并选择 **Install** —— 或者使用云控制台中的 **Install an app**,见[上文](#install-an-app)。
130+
131+
部署到已知环境的流水线可以用一条命令完成发布和安装:
132+
133+
```bash
134+
os package publish --env <environment-id> --install --seed-sample-data
135+
```
136+
137+
这是全有或全无的。如果安装被拒绝 —— 你可能无权安装到
138+
该环境、该环境不存在,或该版本未获准用于该环境 ——
139+
则不会发布任何内容:命令会打印拒绝原因并以非零状态退出,因此
140+
流水线会失败。修复原因后,再次发布同一个版本。
141+
142+
### 市场上架 [#marketplace-listings]
143+
144+
`--visibility marketplace` 让包有资格进入公共目录,但
145+
每个新版本仍然以**草稿**形式到达。传入 `--submit` 将其送交
146+
审核。私有包和组织包无需审核,你的组织可以立即安装。
147+
148+
## 下一步 [#next]
149+
150+
- [包](/docs/build/packages) —— 包包含什么,以及版本如何运作。
151+
- [市场](/docs/build/marketplace) —— 在环境内部浏览和安装。
152+
- [CLI 参考](/docs/reference/cli) —— 每一个 `os` 命令。

0 commit comments

Comments
 (0)