-
Notifications
You must be signed in to change notification settings - Fork 5
Improve generation of reference docs #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| The `composition convert` command converts a Crossplane composition to use a | ||
| different version or migrate away from features that are no longer supported. | ||
|
|
||
| The currently supported conversions are: | ||
| The supported conversions are: | ||
|
|
||
| - Native Composition Environment → `function-environment-configs` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| The `dependency update-cache` command updates the local dependency cache for the | ||
| current project. It caches all dependencies listed in the | ||
| `crossplane-project.yaml` file and re-generates language bindings (schemas) for | ||
| them if needed. Any dependency whose version is expressed as a semantic version | ||
| constraint will have the constraint re-resolved to a specific version (i.e., | ||
| schemas will be updated if a newer version is available). | ||
| current project. It re-resolves semantic version constraints to specific | ||
| versions (fetching newer versions if available), caches all dependencies, and | ||
| re-generates language bindings (schemas) for them if needed. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,7 +1,7 @@ | ||||||
| The `function generate` command creates an embedded function in the specified | ||||||
| language under the project's `functions/` directory. If a path to a Composition | ||||||
| file is supplied, the new function is also idempotently added as a step to the | ||||||
| end of the Composition's pipeline. | ||||||
| language under the project's `functions/` directory. It optionally idempotently | ||||||
| adds the new function to end of a Composition's pipeline when given a | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add missing article for grammatical correctness. Line 3 should read "to the end of a Composition's pipeline" rather than "to end of a Composition's pipeline." ✏️ Suggested fix-adds the new function to end of a Composition's pipeline when given a
+adds the new function to the end of a Composition's pipeline when given a📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| Composition path. | ||||||
|
|
||||||
| ## Supported languages | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,16 +1,17 @@ | ||||||
| The `project build` command builds a Crossplane Project into a set of xpkgs. It | ||||||
| The `project build` command builds a Crossplane Project into a set of xpkgs. It | ||||||
| builds each embedded function in the project and a Configuration package that | ||||||
| ties everything together. A special `.xpkg` file containing all the built | ||||||
| packages is written to the project's output directory (`_output/` by | ||||||
| default). This file can be consumed by the `project push` command to push the | ||||||
| packages to an OCI registry. | ||||||
|
|
||||||
| The repository for the built Configuration is taken from `spec.repository` in | ||||||
| `crossplane-project.yaml`. Override it for a single build with `--repository`. | ||||||
|
|
||||||
| > **Important:** The repository is used to construct the function names used for | ||||||
| > embedded function references in compositions. The same repository must be | ||||||
| > specified when building and pushing a project. | ||||||
| ties everything together. The output of the build is a special `.xpkg` file | ||||||
| containing all the built packages, placed in the project's output directory | ||||||
| (`_output/` by default). The `project push` command can consume packges from the | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix the typo: "packges" → "packages". Line 5 contains a typo that was also flagged by the spell checker. 📝 Proposed fix-(`_output/` by default). The `project push` command can consume packges from the
+(`_output/` by default). The `project push` command can consume packages from the📝 Committable suggestion
Suggested change
🧰 Tools🪛 LanguageTool[grammar] ~5-~5: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) 🤖 Prompt for AI Agents |
||||||
| output file and push them to an OCI registry. | ||||||
|
|
||||||
| The `build `command constructs the repository for the built Configuration from | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the extra space in the backtick formatting. Line 8 has an extra space between "build" and the closing backtick: 📝 Proposed fix-The `build `command constructs the repository for the built Configuration from
+The `build` command constructs the repository for the built Configuration from📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| `spec.repository` in `crossplane-project.yaml`. Override it for a single build | ||||||
| with `--repository`. | ||||||
|
|
||||||
| > **Important:** The repository influences the function names used for embedded | ||||||
| > function references in compositions. You must specify the same repository when | ||||||
| > building and pushing a project. | ||||||
|
|
||||||
| The build reuses the dependency cache populated by `crossplane dependency add` | ||||||
| and `crossplane dependency update-cache`. Override the cache location with | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,11 +1,12 @@ | ||||||
| The `project stop` command tears down the local development control plane | ||||||
| previously created by `crossplane project run`. The KIND cluster and the local | ||||||
| OCI registry are both removed. | ||||||
| created by `crossplane project run`. It removes both the KIND cluster and the | ||||||
| local OCI registry. | ||||||
|
|
||||||
| When run from a project directory the control plane name is derived from the | ||||||
| project name. When run outside a project directory, pass `--control-plane-name` | ||||||
| to identify the control plane to tear down. Pass `--registry-dir` to point at | ||||||
| the local registry directory used by `project run` if it was overridden there. | ||||||
| When run from a project directory, the `stop` command tears down the control | ||||||
| plane whose name matches the project name. When run outside a project directory, | ||||||
| pass `--control-plane-name` to identify the control plane to tear down. If you | ||||||
| passed `--registry-dir` to `up project run`, pass it to `up project stop` as | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct the command references: "up project" → "crossplane project". Line 8 references 📝 Proposed fix-passed `--registry-dir` to `up project run`, pass it to `up project stop` as
+passed `--registry-dir` to `crossplane project run`, pass it to `crossplane project stop` as📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| well to clean up the registry data. | ||||||
|
|
||||||
| ## Examples | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Close table shortcode when detail ends with a table
Nice catch adding the EOF hint close. Could we also close the table shortcode at EOF?
Right now, if the last content line is a table row, the
{{< /table >}}close tag is never emitted.Proposed fix
// Close the "hint" box if it appeared at the very end of the detail. if bq { sb.WriteString("{{< /hint >}}\n") } + // Close the table shortcode if detail ended with a table. + if table { + sb.WriteString("{{< /table >}}\n") + } return strings.TrimSpace(sb.String()) }📝 Committable suggestion
🤖 Prompt for AI Agents