Skip to content

Commit

Permalink
publish patched @oclif/core
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Razon committed Nov 27, 2023
1 parent 5455c2e commit dd5f61d
Show file tree
Hide file tree
Showing 40 changed files with 861 additions and 1,518 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/npm-publish-canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: yarn
# cache: yarn

- run: |
rm -rf node_modules packages/*/node_modules
find `yarn cache dir` -maxdepth 1 -name '*oclif*' -delete
- run: yarn

Expand Down Expand Up @@ -61,10 +65,10 @@ jobs:
yarn -s lerna version $VERSION --no-git-tag-version --preid $GIT_ID --ignore-scripts --exact --yes
# commit that goes nowhere
git commit -m "canary version $VERSION" lerna.json packages/*/package.json
git commit -m "canary version $VERSION" lerna.json packages/*/package.json yarn.lock
# publish
yarn -s lerna publish from-package --pre-dist-tag $GIT_ID --yes
yarn -s lerna publish from-package --pre-dist-tag $GIT_ID --dist-tag $GIT_ID --yes
# undo the commit
git reset --hard HEAD^1
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"private": true,
"workspaces": [
"packages/*"
],
"workspaces": ["packages/*"],
"devDependencies": {
"husky": "^8.0.0",
"lerna": "^6.6.2",
Expand All @@ -13,6 +11,9 @@
"syncpack": "^9.8.4",
"typescript": "^5.0.4"
},
"resolutions": {
"**/@oclif/core": "livecycle/oclif-core-patched-for-preevy#v3.12.0-preevy-patch-9"
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint --cache --fix"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@oclif/core": "^3",
"@oclif/core": "livecycle/oclif-core-patched-for-preevy#v3.12.0-preevy-patch-9",
"@preevy/core": "0.0.56",
"chalk": "^4.1.2",
"iter-tools-es": "^7.5.3",
Expand Down
1 change: 1 addition & 0 deletions packages/cli-common/src/commands/base-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ abstract class BaseCommand<T extends typeof Command=typeof Command> extends Comm
})
emitter.unref()
await emitter.flush()
// eslint-disable-next-line @typescript-eslint/return-await
return await super.catch(error)
}
}
Expand Down
869 changes: 16 additions & 853 deletions packages/cli/README.md

Large diffs are not rendered by default.

45 changes: 27 additions & 18 deletions packages/cli/docs/down.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,30 @@ Delete preview environments

```
USAGE
$ preevy down [-D] [-f <value>] [--system-compose-file <value>] [-p <value>] [--profile <value>] [-d
lightsail|gce|azure|kube-pod] [--lightsail-region us-east-2|us-east-1|us-west-2|ap-south-1|ap-northeast-2|ap-southea
st-1|ap-southeast-2|ap-northeast-1|ca-central-1|eu-central-1|eu-west-1|eu-west-2|eu-west-3|eu-north-1]
[--gce-project-id <value>] [--gce-zone <value>] [--azure-region <value>] [--azure-subscription-id <value>]
$ preevy down [--json] [-D] [-f <value>] [--system-compose-file <value>] [-p <value>] [--enable-plugin
<value>] [--disable-plugin <value>] [--profile <value>] [-d lightsail|gce|azure|kube-pod] [--lightsail-region
<value>] [--gce-project-id <value>] [--gce-zone <value>] [--azure-region <value>] [--azure-subscription-id <value>]
[--kube-pod-namespace <value>] [--kube-pod-kubeconfig <value>] [--kube-pod-context <value>] [--kube-pod-template
<value>] [--id <value>] [--force] [--wait] [--json]
<value>] [--id <value>] [--force] [--wait] [--github-token <value>] [--github-repo <value>] [--github-pull-request
<value>] [--github-pr-comment-template-file <value>] [--github-pr-comment-enabled auto|no|always]
FLAGS
-d, --driver=<option> Machine driver to use
<options: lightsail|gce|azure|kube-pod>
--force Do not error if the environment is not found
--id=<value> Environment id - affects created URLs. If not specified, will try to detect automatically
--profile=<value> Run in a specific profile context
--wait Wait for resource deletion to complete. If false (the default), the deletion will be started
--force Do not error if the environment is not found
--id=<value> Environment id - affects created URLs. If not specified, will try to detect automatically
--profile=<value> Run in a specific profile context
--wait Wait for resource deletion to complete. If false (the default), the deletion will be started
but not waited for
GLOBAL FLAGS
-D, --debug Enable debug logging
-f, --file=<value>... [default: ] Compose configuration file
-p, --project=<value> Project name. Defaults to the Compose project name
--json Format output as json.
--system-compose-file=<value>... [default: ] Add extra Compose configuration file without overriding the defaults
-D, --debug Enable debug logging
-f, --file=<value>... [default: ] Compose configuration file
-p, --project=<value> Project name. Defaults to the Compose project name
--disable-plugin=<value>... Disable plugin with specified package name
--enable-plugin=<value>... [default: @preevy/plugin-github] Enable plugin with specified package name
--json Format output as json.
--system-compose-file=<value>... [default: ] Add extra Compose configuration file without overriding the defaults
AZURE DRIVER FLAGS
--azure-region=<value> Microsoft Azure region in which resources will be provisioned
Expand All @@ -42,6 +44,15 @@ GCE DRIVER FLAGS
--gce-project-id=<value> Google Cloud project ID
--gce-zone=<value> Google Cloud zone in which resources will be provisioned
GITHUB INTEGRATION FLAGS
--github-pr-comment-enabled=<option> [default: auto] Whether to enable posting to the GitHub PR
<options: auto|no|always>
--github-pr-comment-template-file=<value> Path to nunjucks template file
--github-pull-request=<value> GitHub Pull Request number. Will auto-detect if not specified
--github-repo=<value> GitHub repo name in the format owner/repo. Will auto-detect if not
specified
--github-token=<value> GitHub token with write access to the repo
KUBE-POD DRIVER FLAGS
--kube-pod-context=<value> kubeconfig context name (will load config from defaults if not specified)
--kube-pod-kubeconfig=<value> Path to kubeconfig file (will load config from defaults if not specified)
Expand All @@ -50,12 +61,10 @@ KUBE-POD DRIVER FLAGS
--kube-pod-template=<value> Path to custom resources template file (will use default template if not specified)
LIGHTSAIL DRIVER FLAGS
--lightsail-region=<option> AWS region in which resources will be provisioned
<options: us-east-2|us-east-1|us-west-2|ap-south-1|ap-northeast-2|ap-southeast-1|ap-south
east-2|ap-northeast-1|ca-central-1|eu-central-1|eu-west-1|eu-west-2|eu-west-3|eu-north-1>
--lightsail-region=<value> AWS region in which resources will be provisioned
DESCRIPTION
Delete preview environments
```

_See code: [src/commands/down.ts](https://github.com/livecycle/preevy/blob/v0.0.55/src/commands/down.ts)_
_See code: [src/commands/down.ts](https://github.com/livecycle/preevy/blob/v0.0.56/src/commands/down.ts)_
2 changes: 1 addition & 1 deletion packages/cli/docs/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ DESCRIPTION
Display help for preevy.
```

_See code: [src/commands/help.ts](https://github.com/livecycle/preevy/blob/v0.0.55/src/commands/help.ts)_
_See code: [src/commands/help.ts](https://github.com/livecycle/preevy/blob/v0.0.56/src/commands/help.ts)_
15 changes: 9 additions & 6 deletions packages/cli/docs/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Initialize or import a new profile

```
USAGE
$ preevy init [PROFILE-ALIAS] [-D] [-f <value>] [--system-compose-file <value>] [-p <value>] [-f <value>]
$ preevy init [PROFILE-ALIAS] [-D] [-f <value>] [--system-compose-file <value>] [-p <value>]
[--enable-plugin <value>] [--disable-plugin <value>] [-f <value>]
ARGUMENTS
PROFILE-ALIAS [default: default] Alias of the profile
Expand All @@ -20,13 +21,15 @@ FLAGS
-f, --from=<value> Import profile from existing path
GLOBAL FLAGS
-D, --debug Enable debug logging
-f, --file=<value>... [default: ] Compose configuration file
-p, --project=<value> Project name. Defaults to the Compose project name
--system-compose-file=<value>... [default: ] Add extra Compose configuration file without overriding the defaults
-D, --debug Enable debug logging
-f, --file=<value>... [default: ] Compose configuration file
-p, --project=<value> Project name. Defaults to the Compose project name
--disable-plugin=<value>... Disable plugin with specified package name
--enable-plugin=<value>... [default: @preevy/plugin-github] Enable plugin with specified package name
--system-compose-file=<value>... [default: ] Add extra Compose configuration file without overriding the defaults
DESCRIPTION
Initialize or import a new profile
```

_See code: [src/commands/init.ts](https://github.com/livecycle/preevy/blob/v0.0.55/src/commands/init.ts)_
_See code: [src/commands/init.ts](https://github.com/livecycle/preevy/blob/v0.0.56/src/commands/init.ts)_
16 changes: 9 additions & 7 deletions packages/cli/docs/login.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,24 @@ Login to the Livecycle SaaS

```
USAGE
$ preevy login [-D] [-f <value>] [--system-compose-file <value>] [-p <value>] [--lc-auth-url <value>]
[--lc-api-url <value>] [--lc-client-id <value>]
$ preevy login [-D] [-f <value>] [--system-compose-file <value>] [-p <value>] [--enable-plugin <value>]
[--disable-plugin <value>] [--lc-auth-url <value>] [--lc-api-url <value>] [--lc-client-id <value>]
FLAGS
--lc-api-url=<value> [default: https://app.livecycle.run] The Livecycle API URL'
--lc-auth-url=<value> [default: https://auth.livecycle.dev] The login URL
--lc-client-id=<value> [default: BHXcVtapfKPEpZtYO3AJ2Livmz6j7xK0] The client ID for the OAuth app
GLOBAL FLAGS
-D, --debug Enable debug logging
-f, --file=<value>... [default: ] Compose configuration file
-p, --project=<value> Project name. Defaults to the Compose project name
--system-compose-file=<value>... [default: ] Add extra Compose configuration file without overriding the defaults
-D, --debug Enable debug logging
-f, --file=<value>... [default: ] Compose configuration file
-p, --project=<value> Project name. Defaults to the Compose project name
--disable-plugin=<value>... Disable plugin with specified package name
--enable-plugin=<value>... [default: @preevy/plugin-github] Enable plugin with specified package name
--system-compose-file=<value>... [default: ] Add extra Compose configuration file without overriding the defaults
DESCRIPTION
Login to the Livecycle SaaS
```

_See code: [src/commands/login.ts](https://github.com/livecycle/preevy/blob/v0.0.55/src/commands/login.ts)_
_See code: [src/commands/login.ts](https://github.com/livecycle/preevy/blob/v0.0.56/src/commands/login.ts)_
39 changes: 19 additions & 20 deletions packages/cli/docs/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ Show logs for an existing environment

```
USAGE
$ preevy logs [SERVICES] [-D] [-f <value>] [--system-compose-file <value>] [-p <value>] [--profile
<value>] [-d lightsail|gce|azure|kube-pod] [--lightsail-region us-east-2|us-east-1|us-west-2|ap-south-1|ap-northeast
-2|ap-southeast-1|ap-southeast-2|ap-northeast-1|ca-central-1|eu-central-1|eu-west-1|eu-west-2|eu-west-3|eu-north-1]
[--gce-project-id <value>] [--gce-zone <value>] [--azure-region <value>] [--azure-subscription-id <value>]
$ preevy logs [SERVICES] [-D] [-f <value>] [--system-compose-file <value>] [-p <value>] [--enable-plugin
<value>] [--disable-plugin <value>] [--profile <value>] [-d lightsail|gce|azure|kube-pod] [--lightsail-region
<value>] [--gce-project-id <value>] [--gce-zone <value>] [--azure-region <value>] [--azure-subscription-id <value>]
[--kube-pod-namespace <value>] [--kube-pod-kubeconfig <value>] [--kube-pod-context <value>] [--kube-pod-template
<value>] [--id <value>] [--follow] [--tail <value>] [--no-log-prefix] [--timestamps] [--since <value>] [--until
<value>]
Expand All @@ -25,20 +24,22 @@ ARGUMENTS
FLAGS
-d, --driver=<option> Machine driver to use
<options: lightsail|gce|azure|kube-pod>
--follow Follow log output
--id=<value> Environment id - affects created URLs. If not specified, will try to detect automatically
--no-log-prefix Don't print log prefix in logs
--profile=<value> Run in a specific profile context
--since=<value> Show logs since timestamp
--tail=<value> Number of lines to show from the end of the logs for each container (default: all)
--timestamps Show timestamps
--until=<value> Show logs before timestamp
--follow Follow log output
--id=<value> Environment id - affects created URLs. If not specified, will try to detect automatically
--no-log-prefix Don't print log prefix in logs
--profile=<value> Run in a specific profile context
--since=<value> Show logs since timestamp
--tail=<value> Number of lines to show from the end of the logs for each container (default: all)
--timestamps Show timestamps
--until=<value> Show logs before timestamp
GLOBAL FLAGS
-D, --debug Enable debug logging
-f, --file=<value>... [default: ] Compose configuration file
-p, --project=<value> Project name. Defaults to the Compose project name
--system-compose-file=<value>... [default: ] Add extra Compose configuration file without overriding the defaults
-D, --debug Enable debug logging
-f, --file=<value>... [default: ] Compose configuration file
-p, --project=<value> Project name. Defaults to the Compose project name
--disable-plugin=<value>... Disable plugin with specified package name
--enable-plugin=<value>... [default: @preevy/plugin-github] Enable plugin with specified package name
--system-compose-file=<value>... [default: ] Add extra Compose configuration file without overriding the defaults
AZURE DRIVER FLAGS
--azure-region=<value> Microsoft Azure region in which resources will be provisioned
Expand All @@ -56,12 +57,10 @@ KUBE-POD DRIVER FLAGS
--kube-pod-template=<value> Path to custom resources template file (will use default template if not specified)
LIGHTSAIL DRIVER FLAGS
--lightsail-region=<option> AWS region in which resources will be provisioned
<options: us-east-2|us-east-1|us-west-2|ap-south-1|ap-northeast-2|ap-southeast-1|ap-south
east-2|ap-northeast-1|ca-central-1|eu-central-1|eu-west-1|eu-west-2|eu-west-3|eu-north-1>
--lightsail-region=<value> AWS region in which resources will be provisioned
DESCRIPTION
Show logs for an existing environment
```

_See code: [src/commands/logs.ts](https://github.com/livecycle/preevy/blob/v0.0.55/src/commands/logs.ts)_
_See code: [src/commands/logs.ts](https://github.com/livecycle/preevy/blob/v0.0.56/src/commands/logs.ts)_
45 changes: 22 additions & 23 deletions packages/cli/docs/ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,35 @@ List preview environments

```
USAGE
$ preevy ls [-D] [-f <value>] [--system-compose-file <value>] [-p <value>] [--profile <value>] [-d
lightsail|gce|azure|kube-pod] [--lightsail-region us-east-2|us-east-1|us-west-2|ap-south-1|ap-northeast-2|ap-southea
st-1|ap-southeast-2|ap-northeast-1|ca-central-1|eu-central-1|eu-west-1|eu-west-2|eu-west-3|eu-north-1]
[--gce-project-id <value>] [--gce-zone <value>] [--azure-region <value>] [--azure-subscription-id <value>]
$ preevy ls [--json] [-D] [-f <value>] [--system-compose-file <value>] [-p <value>] [--enable-plugin
<value>] [--disable-plugin <value>] [--profile <value>] [-d lightsail|gce|azure|kube-pod] [--lightsail-region
<value>] [--gce-project-id <value>] [--gce-zone <value>] [--azure-region <value>] [--azure-subscription-id <value>]
[--kube-pod-namespace <value>] [--kube-pod-kubeconfig <value>] [--kube-pod-context <value>] [--kube-pod-template
<value>] [--columns <value> | -x] [--sort <value>] [--filter <value>] [--output csv|json|yaml | | [--csv |
--no-truncate]] [--no-header | ] [--json]
<value>] [--columns <value> | -x] [--filter <value>] [--no-header | [--csv | --no-truncate]] [--output csv|json|yaml
| | ] [--sort <value>]
FLAGS
-d, --driver=<option> Machine driver to use
<options: lightsail|gce|azure|kube-pod>
-x, --extended show extra columns
--columns=<value> only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=<value> filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=<option> output in a more machine friendly format
--columns=<value> only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=<value> filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=<option> output in a more machine friendly format
<options: csv|json|yaml>
--profile=<value> Run in a specific profile context
--sort=<value> property to sort by (prepend '-' for descending)
--profile=<value> Run in a specific profile context
--sort=<value> property to sort by (prepend '-' for descending)
GLOBAL FLAGS
-D, --debug Enable debug logging
-f, --file=<value>... [default: ] Compose configuration file
-p, --project=<value> Project name. Defaults to the Compose project name
--json Format output as json.
--system-compose-file=<value>... [default: ] Add extra Compose configuration file without overriding the defaults
-D, --debug Enable debug logging
-f, --file=<value>... [default: ] Compose configuration file
-p, --project=<value> Project name. Defaults to the Compose project name
--disable-plugin=<value>... Disable plugin with specified package name
--enable-plugin=<value>... [default: @preevy/plugin-github] Enable plugin with specified package name
--json Format output as json.
--system-compose-file=<value>... [default: ] Add extra Compose configuration file without overriding the defaults
AZURE DRIVER FLAGS
--azure-region=<value> Microsoft Azure region in which resources will be provisioned
Expand All @@ -56,12 +57,10 @@ KUBE-POD DRIVER FLAGS
--kube-pod-template=<value> Path to custom resources template file (will use default template if not specified)
LIGHTSAIL DRIVER FLAGS
--lightsail-region=<option> AWS region in which resources will be provisioned
<options: us-east-2|us-east-1|us-west-2|ap-south-1|ap-northeast-2|ap-southeast-1|ap-south
east-2|ap-northeast-1|ca-central-1|eu-central-1|eu-west-1|eu-west-2|eu-west-3|eu-north-1>
--lightsail-region=<value> AWS region in which resources will be provisioned
DESCRIPTION
List preview environments
```

_See code: [src/commands/ls.ts](https://github.com/livecycle/preevy/blob/v0.0.55/src/commands/ls.ts)_
_See code: [src/commands/ls.ts](https://github.com/livecycle/preevy/blob/v0.0.56/src/commands/ls.ts)_
Loading

0 comments on commit dd5f61d

Please sign in to comment.