feat: Implement devcenter pull and push commands in oclif v4#47
Open
michaelmalave wants to merge 24 commits intofeat/ruby-to-typescriptfrom
Open
feat: Implement devcenter pull and push commands in oclif v4#47michaelmalave wants to merge 24 commits intofeat/ruby-to-typescriptfrom
michaelmalave wants to merge 24 commits intofeat/ruby-to-typescriptfrom
Conversation
…nter:open/preview
…nforce c8 coverage on src/**/*.ts
…ugh oclif’s this.debug
…feat/ruby-to-typescript-2
…etrc on Windows and .netrc elsewhere, matching netrc-parser
Co-authored-by: Katy Bowman <katy.bowman@salesforce.com> Signed-off-by: Michael Malave <michael.malave@salesforce.com>
…, use ux.stdout, stub browser opens via sinon, add nock init, switch to shared ESLint config, and align tsconfig/package.json with CLI
…auto-generated command docs
…_ROOT helper from tests in favor of default test-utils behavior
…from git (add to .gitignore), and remove redundant debug tests from command files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds
heroku devcenter:pullandheroku devcenter:pushto the existing Node/TypeScript oclif plugin, alongside theopen/previewcommands from PR 1.pull: loads an article from public JSON, retries with~/.netrcHeroku credentials, then falls back to the privateGET /api/v1/private/articles/<slug>.jsonAPI for drafts; supports--force/--debug; overwrite confirmation via@inquirer/prompts(tests useDEVCENTER_CLI_TEST_CONFIRM).push: reads local YAML front matter + markdown, runs broken-link check, validate, and update against Dev Center private APIs using~/.netrc(plain file only; not.netrc.gpg).pullandpush(plus existingopen,preview, andpreview-servertests).DEVCENTER_CLI_CWD,DEVCENTER_CLI_TEST, andDEVCENTER_CLI_TEST_CONFIRMkeep runs isolated and non-interactive.npm testruns Mocha then ESLint (same pattern as PR 1). c8 coverage gates and lib unit tests are intentionally deferred to PR 3 so this PR stays reviewable.The Ruby gem and
bin/devcenterare unchanged; users can keep using the gem or the plugin.Type of change
Breaking changes (major semver update)
!after your change type to denote a change that breaks current behaviorFeature additions (minor semver update)
Patch updates (patch semver update)
Testing
Setup:
npm install npm run build heroku plugins:link .First
heroku login. Then run these commands which should create the .md files in the location you run from and open the preview locallyThis will send an update to the article, not publish if in drafts.
Related Issues
GUS work items: W-20888087