-
Notifications
You must be signed in to change notification settings - Fork 5
Refactor autify-cli into a subdirectory so it works with workspaces #697
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
Changes from all commits
8da76ac
e5c540b
613fd5d
c487b24
83d13de
76d99f9
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 |
|---|---|---|
|
|
@@ -20,3 +20,4 @@ runs: | |
| shell: bash | ||
| - run: npm run release upload ${{ inputs.target }} | ||
| shell: bash | ||
| working-directory: autify-cli | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,11 +41,9 @@ jobs: | |
| with: | ||
| title: "chore: release packages" | ||
| commit: "chore: release packages" | ||
| version: | | ||
| npx changeset version | ||
| npx oclif readme --repository-prefix='<%- repo %>/blob/@autifyhq/autify-cli@<%- version %>/<%- commandPath %>' | ||
| # Publish must be a single command (action splits on whitespace). | ||
| publish: bash scripts/changesets-detect-publish.sh | ||
| # version and publish must be single commands (action splits on whitespace). | ||
| version: bash autify-cli/scripts/changesets-version.sh | ||
| publish: bash autify-cli/scripts/changesets-detect-publish.sh | ||
|
Contributor
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. I also wonder if we can use working-directory here
Contributor
Author
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. Pretty sure this one needs to run at the root where the |
||
| createGithubReleases: false | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | ||
|
|
@@ -79,7 +77,7 @@ jobs: | |
| uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0 | ||
| with: | ||
| # Only tag the CLI itself, not the integration-test workspace. | ||
| publish: bash scripts/changesets-tag.sh | ||
| publish: bash autify-cli/scripts/changesets-tag.sh | ||
| createGithubReleases: true | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /dist | ||
| /tmp |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| { | ||
| "name": "@autifyhq/autify-cli", | ||
| "version": "0.73.0-beta.0", | ||
| "description": "Autify Command Line Interface (CLI)", | ||
| "author": "Autify", | ||
| "bin": { | ||
| "autify": "./bin/run" | ||
| }, | ||
| "homepage": "https://github.com/autifyhq/autify-cli", | ||
| "license": "MIT", | ||
| "main": "dist/index.js", | ||
| "repository": "autifyhq/autify-cli", | ||
| "files": [ | ||
| "/bin", | ||
| "/dist", | ||
| "/npm-shrinkwrap.json", | ||
| "/oclif.manifest.json" | ||
| ], | ||
| "dependencies": { | ||
| "@autifyhq/autify-sdk": "^0.28.3", | ||
| "@oclif/core": "^4.8.0", | ||
| "@oclif/plugin-help": "^6.2.36", | ||
| "@oclif/plugin-not-found": "^3.2.73", | ||
| "@oclif/plugin-update": "^4.7.16", | ||
| "@oclif/plugin-warn-if-update-available": "^2.1.1", | ||
| "abort-controller": "^3.0.0", | ||
| "archiver": "^7.0.1", | ||
| "axios": "^1.15.2", | ||
| "envfile": "^7.1.0", | ||
| "get-port": "^7.1.0", | ||
| "inquirer": "^12.11.1", | ||
| "listr": "^0.14.3", | ||
| "node-emoji": "^2.2.0", | ||
| "node-stream-zip": "^1.15.0", | ||
| "os-proxy-config": "^1.1.2", | ||
| "per-env": "^1.0.2", | ||
| "shell-quote": "^1.8.3", | ||
| "tar": "^7.5.2", | ||
| "undici": "^6.19.8", | ||
| "unzip-stream": "^0.3.4", | ||
| "uuid": "^11.1.0", | ||
| "which": "^5.0.0", | ||
| "winston": "^3.18.3", | ||
| "xstate": "^4.38.3" | ||
| }, | ||
| "devDependencies": { | ||
| "@autifyhq/autify-cli-integration-test": "*", | ||
| "@eslint/eslintrc": "^3.3.1", | ||
| "@eslint/js": "^9.39.1", | ||
| "@oclif/prettier-config": "^0.2.1", | ||
| "@types/archiver": "^6.0.4", | ||
| "@types/chai": "^5.2.3", | ||
| "@types/listr": "^0.14.10", | ||
| "@types/node": "^22.19.1", | ||
| "@types/shell-quote": "^1.7.5", | ||
| "@types/unzip-stream": "^0.3.4", | ||
| "chai": "^5.3.3", | ||
| "cross-env": "^7.0.3", | ||
| "eslint": "^9.39.1", | ||
| "eslint-config-oclif": "^6.0.118", | ||
| "eslint-config-prettier": "^10.1.8", | ||
| "eslint-plugin-unicorn": "^59.0.1", | ||
| "execa": "^5.1.1", | ||
| "jest": "^29.7.0", | ||
| "oclif": "^4.22.47", | ||
| "prettier": "^3.6.2", | ||
| "shx": "^0.4.0", | ||
| "ts-jest": "^29.4.5", | ||
| "ts-morph": "^26.0.0", | ||
| "ts-node": "^10.9.2", | ||
| "tslib": "^2.8.1", | ||
| "typed-emitter": "^2.1.0", | ||
| "typescript": "^5.9.3", | ||
| "typescript-eslint": "^8.47.0" | ||
| }, | ||
| "oclif": { | ||
| "bin": "autify", | ||
| "dirname": "autify", | ||
| "commands": "./dist/commands", | ||
| "hooks": { | ||
| "init": "./dist/hooks/init/proxy" | ||
| }, | ||
| "plugins": [ | ||
| "@oclif/plugin-help", | ||
| "@oclif/plugin-not-found", | ||
| "@oclif/plugin-update", | ||
| "@oclif/plugin-warn-if-update-available" | ||
| ], | ||
| "topicSeparator": " ", | ||
| "topics": { | ||
| "web": { | ||
| "description": "Autify for Web" | ||
| }, | ||
| "web:api": { | ||
| "description": "Low-level APIs on Autify for Web" | ||
| }, | ||
| "web:auth": { | ||
| "description": "Authentication on Autify for Web" | ||
| }, | ||
| "web:test": { | ||
| "description": "Test on Autify for Web" | ||
| }, | ||
| "mobile": { | ||
| "description": "Autify for Mobile" | ||
| }, | ||
| "mobile:api": { | ||
| "description": "Low-level APIs on Autify for Mobile" | ||
| }, | ||
| "mobile:auth": { | ||
| "description": "Authentication on Autify for Mobile" | ||
| }, | ||
| "mobile:build": { | ||
| "description": "Build on Autify for Mobile" | ||
| }, | ||
| "mobile:test": { | ||
| "description": "Test on Autify for Mobile" | ||
| }, | ||
| "connect": { | ||
| "description": "Autify Connect" | ||
| }, | ||
| "connect:access-point": { | ||
| "description": "Autify Connect Access Point" | ||
| }, | ||
| "connect:client": { | ||
| "description": "Autify Connect Client" | ||
| } | ||
| }, | ||
| "update": { | ||
| "s3": { | ||
| "host": "https://autify-cli-assets.s3.us-west-2.amazonaws.com", | ||
| "bucket": "autify-cli-assets", | ||
| "folder": "autify-cli" | ||
| } | ||
| }, | ||
| "macos": { | ||
| "identifier": "com.autify.cli" | ||
| } | ||
| }, | ||
| "scripts": { | ||
| "generate:api-commands": "ts-node scripts/generate-api-commands.ts", | ||
| "generate": "npm run generate:api-commands web && npm run generate:api-commands mobile && npm run format-lint-api-commands && npm run build", | ||
| "build": "shx rm -rf dist && tsc -b", | ||
| "lint": "eslint .", | ||
| "format": "prettier . --write", | ||
| "format-api-commands": "prettier --write src/commands/web/api src/commands/mobile/api", | ||
| "lint-api-commands": "eslint --fix src/commands/web/api src/commands/mobile/api", | ||
| "format-lint-api-commands": "npm run format-api-commands && npm run lint-api-commands", | ||
| "postpack": "shx rm -f oclif.manifest.json", | ||
| "posttest": "npm run lint", | ||
| "prepack": "npm run build && oclif manifest && oclif readme", | ||
| "release": "ts-node ./scripts/release.ts", | ||
| "test:integration": "autify-cli-integration-test", | ||
| "test:integration:dev": "cross-env AUTIFY_CLI_PATH=../autify-cli/bin/dev autify-cli-integration-test", | ||
| "test:integration:record": "cross-env AUTIFY_CLI_INTEGRATION_TEST_RECORD=1 AUTIFY_CONNECT_CLIENT_MODE=real autify-cli-integration-test", | ||
| "test:integration:dev:record": "cross-env AUTIFY_CLI_PATH=../autify-cli/bin/dev AUTIFY_CLI_INTEGRATION_TEST_RECORD=1 AUTIFY_CONNECT_CLIENT_MODE=real autify-cli-integration-test", | ||
| "test:integration:connect": "AUTIFY_CONNECT_CLIENT_MODE=fake autify connect client install && npm run test:integration AutifyConnectClient", | ||
| "test:integration:connect:dev": "AUTIFY_CONNECT_CLIENT_MODE=fake ./bin/dev connect client install && npm run test:integration:dev AutifyConnectClient", | ||
| "test:integration:connect:record": "autify connect client install && npm run test:integration:record AutifyConnectClient", | ||
| "test:integration:connect:dev:record": "./bin/dev connect client install && npm run test:integration:dev:record AutifyConnectClient", | ||
| "test:e2e": "npx jest --config e2e-test/jest.config.js" | ||
| }, | ||
| "engines": { | ||
| "node": ">=22.16.0" | ||
| }, | ||
| "bugs": "https://github.com/autifyhq/autify-cli/issues", | ||
| "keywords": [ | ||
| "oclif" | ||
| ], | ||
| "types": "dist/index.d.ts" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/usr/bin/env bash | ||
| # Version step for changesets/action: bumps versions, builds, regenerates README. | ||
| # Build must run before `oclif readme` so it can enumerate commands from dist/. | ||
| set -euo pipefail | ||
|
|
||
| npx changeset version | ||
| npm run build | ||
| cd autify-cli && npx oclif readme --repository-prefix='<%- repo %>/blob/@autifyhq/autify-cli@<%- version %>/autify-cli/<%- commandPath %>' |
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.
minor nit but seems possible to use working-directory here