Skip to content

Commit

Permalink
chore: move CLI exp setup to exp setup-opentelemetry (#8256)
Browse files Browse the repository at this point in the history
* move `exp setup` to `exp setup-opentelemetry`

* Add alias to docs

* fix commented-out packages

---------

Co-authored-by: Josh-Walker-GM <56300765+Josh-Walker-GM@users.noreply.github.com>
  • Loading branch information
thedavidprice and Josh-Walker-GM authored May 8, 2023
1 parent 53d225b commit 85c4d0d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 42 deletions.
11 changes: 3 additions & 8 deletions docs/docs/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ You can pass any flags to the command and use them within your script:
See [this how to](how-to/background-worker.md) for an example of using exec to run a background worker.
## experimental
## experimental (alias exp)
Set up and run experimental features.
Expand All @@ -414,11 +414,6 @@ For more information, including details about specific features, see this Redwoo
**Available Experimental Features**
View all that can be _set up_:
```
yarn redwood experimental setup --help
```
View all that can be _run_:
```
yarn redwood experimental --help
```
Expand Down Expand Up @@ -1462,7 +1457,7 @@ yarn redwood lint
## prisma
Run Prisma CLI with experimental features.
Run Prisma CLI within the context of a Redwood project.
```
yarn redwood prisma
Expand All @@ -1474,7 +1469,7 @@ Redwood's `prisma` command is a lightweight wrapper around the Prisma CLI. It's
>
> By lightweight wrapper, we mean that we're handling some flags under the hood for you.
> You can use the Prisma CLI directly (`yarn prisma`), but letting Redwood act as a proxy (`yarn redwood prisma`) saves you a lot of keystrokes.
> For example, Redwood adds the `--preview-feature` and `--schema=api/db/schema.prisma` flags automatically.
> For example, Redwood adds the `--schema=api/db/schema.prisma` flags automatically.
>
> If you want to know exactly what `yarn redwood prisma <command>` runs, which flags it's passing, etc., it's right at the top:
>
Expand Down
28 changes: 0 additions & 28 deletions packages/cli/src/commands/experimental/setup.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const command = 'opentelemetry'
export const command = 'setup-opentelemetry'

export const description = 'Setup OpenTelemetry within the api side'
export const description = 'Setup OpenTelemetry within the API side'

export const builder = (yargs) => {
yargs.option('force', {
Expand All @@ -18,6 +18,6 @@ export const builder = (yargs) => {
}

export const handler = async (options) => {
const { handler } = await import('./opentelemetryHandler')
const { handler } = await import('./setupOpentelemetryHandler')
return handler(options)
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { addApiPackages } from '@redwoodjs/cli-helpers'
import { getConfigPath } from '@redwoodjs/project-config'
import { errorTelemetry } from '@redwoodjs/telemetry'

import { getPaths, transformTSToJS, writeFile } from '../../../../lib'
import c from '../../../../lib/colors'
import { isTypeScriptProject } from '../../../../lib/project'
import { getPaths, transformTSToJS, writeFile } from '../../lib'
import c from '../../lib/colors'
import { isTypeScriptProject } from '../../lib/project'

export const handler = async ({ force, verbose }) => {
const ts = isTypeScriptProject()
Expand Down

0 comments on commit 85c4d0d

Please sign in to comment.