Skip to content
Open
57 changes: 57 additions & 0 deletions COMPONENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Whether you’re using core components or experimenting with new ones, this guid
- [Using RelatedRead](#using-relatedread)
- [Using ToolTipTerm](#using-tooltipterm)
- [Using ZoomingImage](#using-zoomingimage)
- [Using ReleaseNoteHeader](#using-release-note-header)

## Finding Components

Expand Down Expand Up @@ -375,3 +376,59 @@ Usage:
```

Images are normally stored in the '/static' folder in `img` or `diagrams`.

## Using ReleaseNoteHeader

Role: To provide a consistent component for adding, updating, and removing release stages on different features.

Usage:

In `/src/constants`, update the [`featureReleaseTypes.js`](./src/constants/featureReleaseTypes.js) file to include the release stage for the feature you want.

Example: `serverlessWorkers: "prerelease"`

Then on the pages you want it to show, add this to the top of the content, right below the frontmatter. The `featureName` prop is how you share the release stages you add to `featureReleaseTypes.js` across pages.

```js
import { ReleaseNoteHeader } from '@site/src/components';

<ReleaseNoteHeader
featureName="nexus"
/>
```

Or you can choose one of these variations.

Use the `type` prop to set a specific type if the release stage is only for one page.
```js
<ReleaseNoteHeader
type="publicPreview"
/>
```

Add `children` for more detailed messaging.
```js
<ReleaseNoteHeader featureName="serverlessWorkers">
To request access during Pre-release, create a [support ticket](/cloud/support#support-ticket) or contact your account team.
APIs are experimental and may be subject to backwards-incompatible changes.
[Sign up for updates](https://temporal.io/pages/serverless-workers-updates) to be notified when Serverless Workers reach Public Preview.
</ReleaseNoteHeader>
```

Show the supported languages by using the `languages` prop.
```js
<ReleaseNoteHeader
type="prerelease"
languages={["Go", "TypeScript", "Java", ".NET", "Python"]}
/>
```

Use the `href` prop to make the `children` content a link.
```js
<ReleaseNoteHeader
featureName="serverlessWorkers"
href="https://temporal.io/pages/serverless-workers-updates"
>
Sign up for updates to be notified when Serverless Workers reach Public Preview.
</ReleaseNoteHeader>
```
60 changes: 44 additions & 16 deletions bin/post-process-cli-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
//
// - Regenerates the command-reference index to list top-level commands
// (not individual cloud subcommands).
// - Injects a pre-release admonition into cloud CLI reference pages.
// - Injects a ReleaseNoteHeader component into cloud CLI reference pages.
// - Removes pages for unreleased features.
//
// Run after copying gen-docs output into docs/cli/command-reference/.
// When the cloud CLI reaches GA, remove the admonition block below.
// When the cloud CLI reaches GA, remove the ReleaseNoteHeader injection below
// and the "cloudCli" entry from src/constants/featureReleaseTypes.js.
// When a feature ships, remove it from EXCLUDED_PAGES.

const fs = require("fs");
Expand All @@ -24,12 +25,9 @@ const CMD_REF_DIR = path.join(

const CLOUD_DIR = path.join(CMD_REF_DIR, "cloud");

const ADMONITION = `:::tip SUPPORT, STABILITY, and DEPENDENCY INFO
const IMPORT_LINE = `import { ReleaseNoteHeader } from '@site/src/components';`;

The \`temporal cloud\` CLI extension is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release).
Commands and options may change before the stable release.

:::`;
const COMPONENT_BLOCK = `<ReleaseNoteHeader featureName="cloudCli" />`;

const EXCLUDED_PAGES = ["custom-role.mdx"];

Expand Down Expand Up @@ -92,7 +90,7 @@ fs.writeFileSync(path.join(CMD_REF_DIR, "index.mdx"), indexLines.join("\n"));
console.log(`[post-process] regenerated command-reference index with ${topLevelCommands.length} entries`);

// ---------------------------------------------------------------------------
// 3. Inject admonition into each cloud page
// 3. Inject ReleaseNoteHeader into each cloud page
// ---------------------------------------------------------------------------
const cloudFiles = fs.readdirSync(CLOUD_DIR).filter((f) => f.endsWith(".mdx"));
let count = 0;
Expand All @@ -101,28 +99,58 @@ for (const file of cloudFiles) {
const filePath = path.join(CLOUD_DIR, file);
const content = fs.readFileSync(filePath, "utf-8");

// Skip if admonition already present
if (content.includes("SUPPORT, STABILITY, and DEPENDENCY INFO")) {
// Skip if component already present
if (content.includes("ReleaseNoteHeader")) {
continue;
}

// Insert after the auto-generated comment block
const marker = "*/}\n\n";
const markerIndex = content.indexOf(marker);
if (markerIndex === -1) {
console.warn(`[post-process] no marker found in cloud/${file}, skipping`);
// For index.mdx and other non-generated pages, insert after frontmatter
const fmEnd = content.indexOf("---", 3);
if (fmEnd === -1) {
console.warn(`[post-process] no insertion point found in cloud/${file}, skipping`);
continue;
}
const insertAt = fmEnd + 4; // after "---\n"
const updated =
content.slice(0, insertAt) +
"\n" +
IMPORT_LINE +
"\n\n" +
COMPONENT_BLOCK +
"\n\n" +
content.slice(insertAt);

fs.writeFileSync(filePath, updated);
count++;
continue;
}

const insertAt = markerIndex + marker.length;
// Insert import after frontmatter
const fmEnd = content.indexOf("---", 3);
const afterFm = fmEnd + 4; // after "---\n"
const withImport =
content.slice(0, afterFm) +
"\n" +
IMPORT_LINE +
"\n" +
content.slice(afterFm);

// Recalculate marker position after import insertion
const newMarkerIndex = withImport.indexOf(marker);
const newInsertAt = newMarkerIndex + marker.length;

const updated =
content.slice(0, insertAt) +
ADMONITION +
withImport.slice(0, newInsertAt) +
COMPONENT_BLOCK +
"\n\n" +
content.slice(insertAt);
withImport.slice(newInsertAt);

fs.writeFileSync(filePath, updated);
count++;
}

console.log(`[post-process] injected pre-release admonition into ${count} cloud page(s)`);
console.log(`[post-process] injected ReleaseNoteHeader into ${count} cloud page(s)`);
9 changes: 3 additions & 6 deletions docs/cli/cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,16 @@ keywords:
- cloud extension
---

import { ReleaseNoteHeader } from "@site/src/components";

The Temporal CLI works with Temporal Cloud. The same commands you use for local or self-hosted Temporal services, such
as `temporal workflow start` and `temporal workflow list`, work with Temporal Cloud as allowed by your role once you
provide an address and credentials.

For administrative tasks, [install the Temporal Cloud extension](/cli/setup-cli#install-the-temporal-cloud-extension). The extension adds `temporal cloud` commands for
managing your Temporal Cloud account, including Namespaces, users, API keys, and Nexus endpoints.

:::tip Support, stability, and dependency info

The Temporal Cloud extension is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release).
APIs and configuration may change before the stable release.

:::
<ReleaseNoteHeader featureName="cloudCli" />

Access to Temporal Cloud is governed by role-based access control (RBAC). Your ability to perform actions, including
running CLI commands against in Temporal Cloud is determined by the roles and permissions you have been assigned. Refer
Expand Down
9 changes: 3 additions & 6 deletions docs/cli/command-reference/cloud/account.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ tags:
- account
---

import { ReleaseNoteHeader } from "@site/src/components";

{/* NOTE: This is an auto-generated file. Any edit to this file will be overwritten.
This file is generated from https://github.com/temporalio/cli via cmd/gen-docs */}

:::tip SUPPORT, STABILITY, and DEPENDENCY INFO

The `temporal cloud` CLI extension is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release).
Commands and options may change before the stable release.

:::
<ReleaseNoteHeader featureName="cloudCli" />

This page provides a reference for the `temporal cloud account` commands. The flags applicable to each subcommand are presented in a table within the heading for the subcommand. Refer to [Global Flags](#global-flags) for flags that you can use with every subcommand.

Expand Down
9 changes: 3 additions & 6 deletions docs/cli/command-reference/cloud/apikey.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@ tags:
- apikeys
---

import { ReleaseNoteHeader } from "@site/src/components";

{/* NOTE: This is an auto-generated file. Any edit to this file will be overwritten.
This file is generated from https://github.com/temporalio/cli via cmd/gen-docs */}

:::tip SUPPORT, STABILITY, and DEPENDENCY INFO

The `temporal cloud` CLI extension is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release).
Commands and options may change before the stable release.

:::
<ReleaseNoteHeader featureName="cloudCli" />

This page provides a reference for the `temporal cloud apikey` commands. The flags applicable to each subcommand are presented in a table within the heading for the subcommand. Refer to [Global Flags](#global-flags) for flags that you can use with every subcommand.

Expand Down
9 changes: 3 additions & 6 deletions docs/cli/command-reference/cloud/async-operation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@ tags:
- async-operations
---

import { ReleaseNoteHeader } from "@site/src/components";

{/* NOTE: This is an auto-generated file. Any edit to this file will be overwritten.
This file is generated from https://github.com/temporalio/cli via cmd/gen-docs */}

:::tip SUPPORT, STABILITY, and DEPENDENCY INFO

The `temporal cloud` CLI extension is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release).
Commands and options may change before the stable release.

:::
<ReleaseNoteHeader featureName="cloudCli" />

This page provides a reference for the `temporal cloud async-operation` commands. The flags applicable to each subcommand are presented in a table within the heading for the subcommand. Refer to [Global Flags](#global-flags) for flags that you can use with every subcommand.

Expand Down
9 changes: 3 additions & 6 deletions docs/cli/command-reference/cloud/connectivity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ tags:
- connectivity
---

import { ReleaseNoteHeader } from "@site/src/components";

{/* NOTE: This is an auto-generated file. Any edit to this file will be overwritten.
This file is generated from https://github.com/temporalio/cli via cmd/gen-docs */}

:::tip SUPPORT, STABILITY, and DEPENDENCY INFO

The `temporal cloud` CLI extension is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release).
Commands and options may change before the stable release.

:::
<ReleaseNoteHeader featureName="cloudCli" />

This page provides a reference for the `temporal cloud connectivity` commands. The flags applicable to each subcommand are presented in a table within the heading for the subcommand. Refer to [Global Flags](#global-flags) for flags that you can use with every subcommand.

Expand Down
7 changes: 2 additions & 5 deletions docs/cli/command-reference/cloud/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ tags:
- Temporal CLI
---

:::tip SUPPORT, STABILITY, and DEPENDENCY INFO
import { ReleaseNoteHeader } from "@site/src/components";

The `temporal cloud` CLI extension is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release).
Commands and options may change before the stable release.

:::
<ReleaseNoteHeader featureName="cloudCli" />

This section includes the command reference for the `temporal cloud` CLI extension.

Expand Down
9 changes: 3 additions & 6 deletions docs/cli/command-reference/cloud/login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@ tags:
- login
---

import { ReleaseNoteHeader } from "@site/src/components";

{/* NOTE: This is an auto-generated file. Any edit to this file will be overwritten.
This file is generated from https://github.com/temporalio/cli via cmd/gen-docs */}

:::tip SUPPORT, STABILITY, and DEPENDENCY INFO

The `temporal cloud` CLI extension is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release).
Commands and options may change before the stable release.

:::
<ReleaseNoteHeader featureName="cloudCli" />

This page provides a reference for the `temporal cloud login` command.

Expand Down
9 changes: 3 additions & 6 deletions docs/cli/command-reference/cloud/logout.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@ tags:
- login
---

import { ReleaseNoteHeader } from "@site/src/components";

{/* NOTE: This is an auto-generated file. Any edit to this file will be overwritten.
This file is generated from https://github.com/temporalio/cli via cmd/gen-docs */}

:::tip SUPPORT, STABILITY, and DEPENDENCY INFO

The `temporal cloud` CLI extension is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release).
Commands and options may change before the stable release.

:::
<ReleaseNoteHeader featureName="cloudCli" />

This page provides a reference for the `temporal cloud logout` command.

Expand Down
9 changes: 3 additions & 6 deletions docs/cli/command-reference/cloud/namespace.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ tags:
- namespaces
---

import { ReleaseNoteHeader } from "@site/src/components";

{/* NOTE: This is an auto-generated file. Any edit to this file will be overwritten.
This file is generated from https://github.com/temporalio/cli via cmd/gen-docs */}

:::tip SUPPORT, STABILITY, and DEPENDENCY INFO

The `temporal cloud` CLI extension is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release).
Commands and options may change before the stable release.

:::
<ReleaseNoteHeader featureName="cloudCli" />

This page provides a reference for the `temporal cloud namespace` commands. The flags applicable to each subcommand are presented in a table within the heading for the subcommand. Refer to [Global Flags](#global-flags) for flags that you can use with every subcommand.

Expand Down
9 changes: 3 additions & 6 deletions docs/cli/command-reference/cloud/nexus.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ tags:
- nexus
---

import { ReleaseNoteHeader } from "@site/src/components";

{/* NOTE: This is an auto-generated file. Any edit to this file will be overwritten.
This file is generated from https://github.com/temporalio/cli via cmd/gen-docs */}

:::tip SUPPORT, STABILITY, and DEPENDENCY INFO

The `temporal cloud` CLI extension is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release).
Commands and options may change before the stable release.

:::
<ReleaseNoteHeader featureName="cloudCli" />

This page provides a reference for the `temporal cloud nexus` commands. The flags applicable to each subcommand are presented in a table within the heading for the subcommand. Refer to [Global Flags](#global-flags) for flags that you can use with every subcommand.

Expand Down
9 changes: 3 additions & 6 deletions docs/cli/command-reference/cloud/region.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ tags:
- region
---

import { ReleaseNoteHeader } from "@site/src/components";

{/* NOTE: This is an auto-generated file. Any edit to this file will be overwritten.
This file is generated from https://github.com/temporalio/cli via cmd/gen-docs */}

:::tip SUPPORT, STABILITY, and DEPENDENCY INFO

The `temporal cloud` CLI extension is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release).
Commands and options may change before the stable release.

:::
<ReleaseNoteHeader featureName="cloudCli" />

This page provides a reference for the `temporal cloud region` commands. The flags applicable to each subcommand are presented in a table within the heading for the subcommand. Refer to [Global Flags](#global-flags) for flags that you can use with every subcommand.

Expand Down
Loading