-
Notifications
You must be signed in to change notification settings - Fork 0
feat: CLI installers and Package Publishing #8
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
Merged
Merged
Changes from all commits
Commits
Show all changes
176 commits
Select commit
Hold shift + click to select a range
ed348e3
basic scaffolding
stevensJourney 2e6fa58
confg templates
stevensJourney 73763b2
Schema packages. Improve templates. WIP link commands.
stevensJourney f8021ca
wip: linking
stevensJourney 16352ad
unify config types
stevensJourney 63eebde
Command structures and implement deploy command
stevensJourney ec8d323
Add destroy and stop command implementation
stevensJourney 77cc382
fetch and pull cloud config commands
stevensJourney a066fd7
Improvements from testing deploy workflow
stevensJourney 0def649
Add multiple options for specifying cloud instance
stevensJourney 23ad67e
Various command improvements. cloud Token and schema generation comma…
stevensJourney 5d9a090
wip: shared commands
stevensJourney 14d3e51
Help groups for CLI command flags. Unify linking resolve patterns. Up…
stevensJourney 51bd353
validation commands
stevensJourney 5a916c1
update docs
stevensJourney 874e4d4
Support for naming and creating cloud instances
stevensJourney 78fcb42
cleanup token input
stevensJourney 321591c
update commands' descriptions
stevensJourney 4d76397
strategic command shuffle
stevensJourney 873d463
cli plugin framework. Docker deploy for self hosting example plugin.
stevensJourney a13c9f8
monorepo structure
stevensJourney 69c3250
add usage docs for docker
stevensJourney 5ec0fe3
wip: update docker templates
stevensJourney 8a70580
docker plugin templating improvements
stevensJourney 40a92b4
update workspace layout
stevensJourney 78cc6d3
cleanup templates
stevensJourney 35d2983
update readme
stevensJourney 2798d21
formatting
stevensJourney 68104f7
cleanup cloud commands
stevensJourney ec8180f
add colour to logs
stevensJourney 756db05
update packages
stevensJourney 90164bc
update start command docs
stevensJourney e6df80f
colourize errors. Add some basic examples
stevensJourney deface8
pretty format client errors
stevensJourney 4ed581b
fix cloud deploy command failure. use micro web sdk client.
stevensJourney 78f1c48
styled errors
stevensJourney bd40e12
cleanup logs - format command strings to standout
stevensJourney f8ed092
update fetch status command
stevensJourney b6face2
update examples with readmes
stevensJourney 7c13bdc
Add basic node.js example app
stevensJourney a7a91fc
update docs
stevensJourney 885dd0b
share code with core-api
stevensJourney 604cab3
use relative paths for Docker
stevensJourney 34e0ade
specify docker project name in compose projects
stevensJourney 59edbca
accounts client and list instances command
stevensJourney 5030b44
cleanup project loading
stevensJourney 30720bb
cleanup token storage. Improve login command.
stevensJourney e517f95
wip: browser based PAT for login
stevensJourney cc979fa
improve config pull output
stevensJourney 91e7667
improve schemas and config validation
stevensJourney 758cf7e
update readmes
stevensJourney 5781534
split init commands. Add interactivity to docker configure
stevensJourney b7aee18
refactor: rename link.yaml to cli.yaml
stevensJourney aef9ced
clean login command
stevensJourney 4506cdc
Add ability to configure custom YAML tags for VSCode.
stevensJourney 89aeec9
show progress during validations. neaten init commad logs.
stevensJourney 25faae9
add more usage docs. refactor command name to powersync pull instance
stevensJourney c3a19f4
default org-id for PAT tokens with single org
stevensJourney e8aea02
readme cleanup
stevensJourney fe892ac
fallback login token to prompt if dashboard cannot send it
stevensJourney 66a7fb5
improve PAT login with encryption for edge cases.
stevensJourney 3d1a218
respond with html for long
stevensJourney 4de930f
feat: migration of sync rules
stevensJourney ef7bac7
remove service-schema override
stevensJourney 22d410c
less colour is more colour
stevensJourney 0c60b99
rename sync rules to sync config. Add command for only deploying sync…
stevensJourney e082df0
YAML language server templating
stevensJourney 23aff77
More token storage options.
stevensJourney a239df9
minor log cleanup
stevensJourney c837230
remove pnpm overrides
stevensJourney 9d1a14d
formatting
stevensJourney 1cc41b8
use single pnpm version
stevensJourney 50d9ef1
remove local override
stevensJourney ae2f997
fix prettier ignore
stevensJourney 770426c
pretty lint
stevensJourney 6d1cd26
more cleanup
stevensJourney dce470e
cleanup
stevensJourney 9e54182
try fix windows
stevensJourney 39ac48a
tests for login command
stevensJourney bcf14bc
Add example commands
stevensJourney a2929c0
cleanup template config
stevensJourney 9fd74e8
Merge branch 'init' into sync-rules-migrate
stevensJourney d61e2bc
update sync stream defaults
stevensJourney 921e61b
formatting
stevensJourney 054fadf
lint
stevensJourney 50a45f6
update readme
stevensJourney caebe3f
Update cli/src/api/write-vscode-settings-for-yaml-env.ts
stevensJourney dccb61d
pr feedback items
stevensJourney d6f249f
Merge branch 'init' of github.com:powersync-ja/temp-cli into init
stevensJourney 8429145
lint
stevensJourney 2f6af9f
cleanup
stevensJourney f86df4e
ensure directory is required for multiple directories
stevensJourney e16a941
update sync config examples to edition 3
stevensJourney e729d8e
remove debug_api from templates
stevensJourney 4c5bbaf
list is_provisioned in instance statuses. Wait for destroy and stop c…
stevensJourney 34cef60
document oclif plugins
stevensJourney 1c140ba
update templates in order to create cloud instances without replicati…
stevensJourney 9a4bcd1
update instance status data_queries to used_for_replication
stevensJourney 7cfd2e9
update validate message.
stevensJourney 89385b8
update validation messages. refresh unit tests
stevensJourney 4a5d932
fix tests
stevensJourney 8665efe
husky lint
stevensJourney 23d5999
more husky
stevensJourney 3c4329d
update docs to refer to powersync docker command and topic - not plugin
stevensJourney 78c4f15
wip: cleanup commands and topics
stevensJourney a6c1f0a
add autocomplete
stevensJourney 1ba7179
add commands plugin
stevensJourney c35a15d
rename sync.yaml to sync-config.yaml
stevensJourney d952cca
update package name
stevensJourney 268e879
add install instructions to readme
stevensJourney 2188bef
update build script
stevensJourney 11eb305
fix login command when pasting a PAT
stevensJourney b88dbe6
cleanup flag resolution order
stevensJourney 80560f9
cleanup login command
stevensJourney d33535d
add ability to deploy only service config changes (no sync config)
stevensJourney 7e1c365
cleanup deploy logging
stevensJourney 4844ba2
Polish the yaml templates (#5)
benitav fe6fc60
fix format
stevensJourney 38d88b5
Merge branch 'init' of github.com:powersync-ja/temp-cli into init
stevensJourney 04019b7
fix tests
stevensJourney 72f6b7f
fix typo
stevensJourney 7f986e7
add note about cloud secrets
stevensJourney e29b1c5
allow linking if project directory does not exist
stevensJourney 58d23b7
add powersync status alias
stevensJourney 64e25ec
add objectId validation, and org - project existance checks
stevensJourney 0653202
remove unknown error code.
stevensJourney 1d87c0d
rename TOKEN to PS_ADMIN_TOKEN
stevensJourney 9ff2af3
fix format
stevensJourney 05177fb
assign project for self hosted commands
stevensJourney 96cdb73
fix filename casing
stevensJourney 2e60a40
fix order of spreading default options.
stevensJourney a10ed87
fix: destroy command should call destroyInstance
stevensJourney 2d0b2a2
fix: docker typo
stevensJourney adc5964
temp move
stevensJourney 6a4d1f4
move op
stevensJourney 8894d8a
patch oclif for pnpm monorepo
stevensJourney 91504cd
add workflows
stevensJourney 683f3c0
try fix windows build
stevensJourney e0d5f69
more windows fixes
stevensJourney 70eea12
some debug
stevensJourney a035435
try bump oclif
stevensJourney 7e37d6e
windows: list output
stevensJourney 8ed0dec
more windows test
stevensJourney 59aba86
test s3 uploads
stevensJourney 6cb73c8
fix
stevensJourney bf29b9a
declare s3 bucket for update
stevensJourney 186391e
fix missing region
stevensJourney d46046b
fix for acls
stevensJourney 7d5c048
test promote action
stevensJourney 6a68eba
cleanup powersync status examples
stevensJourney a9d08d3
feedback from AI review
stevensJourney 7ec5ee8
cleanup
stevensJourney 682e439
Merge branch 'init' into packaging
stevensJourney 903cae6
Merge remote-tracking branch 'origin/main' into packaging
stevensJourney a2042ad
update license to FSL
stevensJourney 329b33f
remove S3 for now
stevensJourney 230402a
update github workflows
stevensJourney fba0d37
changesets config
stevensJourney 9cf8274
remove updates for now
stevensJourney eee998c
delete unused workflow
stevensJourney c373094
test
stevensJourney 8540ee2
allow specifying retention days
stevensJourney 46ddda8
allow specifying retention days
stevensJourney f52c9d8
remove temp push event
stevensJourney 8ef38c0
cleanup
stevensJourney dd9a7ab
only build installers on powersync cli package release
stevensJourney 164a8e4
update license dates
stevensJourney eedd2dc
Merge remote-tracking branch 'origin/main' into packaging
stevensJourney c2b224c
cleanup
stevensJourney 2625538
Merge remote-tracking branch 'origin/main' into packaging
stevensJourney a9922a2
update repository name to powersync-cli
stevensJourney b6766e5
Set to version 0.9.0 in order to do manual release for trusted publis…
stevensJourney 3e8c0ba
Merge branch 'main' into packaging
stevensJourney 31beff8
update readmes
stevensJourney b228e5d
add previous changelog entries
stevensJourney 1011d46
Update cli/README.md
stevensJourney File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json", | ||
| "changelog": "@changesets/cli/changelog", | ||
| "commit": false, | ||
| "fixed": [["powersync", "@powersync/cli-core", "@powersync/cli-schemas", "@powersync/cli-plugin-docker"]], | ||
| "linked": [], | ||
| "access": "public", | ||
| "baseBranch": "main", | ||
| "updateInternalDependencies": "patch", | ||
| "ignore": [] | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'powersync': patch | ||
| --- | ||
|
|
||
| [Internal] Configure trusted publishing and Github release flow. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| name: Build CLI Installer Artifacts Partial | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| retention-days: | ||
| description: 'Number of days to retain uploaded artifacts' | ||
| type: number | ||
| default: 7 | ||
|
|
||
| jobs: | ||
| package-installers: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - os: macos-latest | ||
| command: pack macos | ||
| artifact_name: macos-pkg | ||
| artifact_path: cli/dist/**/*.pkg | ||
| - os: windows-latest | ||
| command: pack win --targets win32-x64 | ||
| artifact_name: windows-installer | ||
| artifact_path: cli/dist/**/*.exe | ||
| - os: ubuntu-latest | ||
| command: pack deb | ||
| artifact_name: linux-deb | ||
| artifact_path: cli/dist/**/*.deb | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
| cache: 'pnpm' | ||
| - name: Configure pnpm linker for Windows packaging | ||
| if: ${{ matrix.os == 'windows-latest' }} | ||
| shell: pwsh | ||
| run: Set-Content -Path cli/.npmrc -Value "node-linker=hoisted" | ||
| - run: pnpm install --frozen-lockfile | ||
| - run: pnpm run build | ||
| - name: Install Windows packaging dependencies | ||
| if: ${{ matrix.os == 'windows-latest' }} | ||
| run: choco install nsis.portable 7zip grep --no-progress -y | ||
| - name: Verify Windows packaging dependencies | ||
| if: ${{ matrix.os == 'windows-latest' }} | ||
| shell: pwsh | ||
| run: | | ||
| where.exe makensis | ||
| where.exe 7z | ||
| where.exe grep | ||
| - name: Build installer | ||
| run: pnpm -C cli exec oclif ${{ matrix.command }} | ||
| - name: Upload installer artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.artifact_name }} | ||
| path: ${{ matrix.artifact_path }} | ||
| retention-days: ${{ inputs.retention-days }} | ||
|
|
||
| package-tarballs: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
| cache: 'pnpm' | ||
| - run: pnpm install --frozen-lockfile | ||
| - run: pnpm run build | ||
| - name: Install 7-zip for packaging | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y p7zip-full | ||
| - name: Build tarballs | ||
| run: pnpm -C cli exec oclif pack tarballs | ||
| - name: Upload tarball artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: tarballs | ||
| path: | | ||
| cli/dist/**/*.tar.gz | ||
| cli/dist/**/*.tar.xz | ||
| retention-days: ${{ inputs.retention-days }} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| name: Manually Build CLI Installers for Testing | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
stevensJourney marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| inputs: | ||
| retention-days: | ||
| description: 'Number of days to retain uploaded artifacts' | ||
| type: number | ||
| default: 7 | ||
|
|
||
| jobs: | ||
| build-artifacts: | ||
| uses: ./.github/workflows/buildArtifacts.yml | ||
| with: | ||
| retention-days: ${{ inputs.retention-days || 7 }} | ||
This file was deleted.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: # For dev publishing | ||
|
|
||
| concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
|
||
| permissions: | ||
| id-token: write # Required for OIDC / trusted publishing | ||
| contents: write # Required for changesets pushing commits | ||
| pull-requests: write # Required for changesets creating PRs | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Release | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Repo | ||
| uses: actions/checkout@v6 | ||
| - name: Enable Corepack | ||
| run: corepack enable | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
| cache: pnpm | ||
| - name: Update npm | ||
| run: | | ||
| npm install -g npm@latest | ||
| npm --version | ||
| - name: Install dependencies | ||
| run: pnpm install | ||
|
|
||
| - name: Create Release Pull Request or Publish to npm | ||
| id: changesets | ||
| uses: changesets/action@v1 | ||
| if: ${{ github.event_name == 'push' }} | ||
| with: | ||
| # Update the monorepo lockfile after versioning | ||
| version: pnpm changeset:version | ||
| # This expects you to have a script called release which does a build for your packages and calls changeset publish | ||
| publish: pnpm release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Dev publish | ||
| if: ${{ github.event_name == 'workflow_dispatch' }} | ||
| run: | | ||
| pnpm build:packages | ||
| pnpm changeset version --no-git-tag --snapshot dev | ||
| pnpm changeset publish --tag dev | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.