GithubHelp home page GithubHelp logo

cap-go / cli Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 23.0 3.03 MB

CLI to help you to manage your version in capgo cloud

Home Page: https://capgo.app

License: GNU Affero General Public License v3.0

TypeScript 99.99% JavaScript 0.01%
capacitor cli nodejs

cli's Introduction

Capgo CLI

Capgo - Instant updates for capacitor

A CLI to upload and download files from the Capgo Cloud.

Usage

Before use the CLI, you should register here : https://capgo.app/

Then go to your account in apikey section and click in the all key to copy it.

Init

npx @capgo/cli init [apikey]

This method is here to onboard you step by step.

It will add your app to Capgo. It will add the code to your app to validate the update. Likewise, it will build your app. Furthermore, it will upload your app to Capgo. And it will help you to check if the update works.

Login

npx @capgo/cli login [apikey]

This method is here to remember the apikey for you.

:::note use --apikey=******** in any command to override it :::

Optionaly you can give:

--local This will store your apikey in the local repo and git ignore it.

Doctor

npx @capgo/cli doctor

Command to check if you are up-to-date with Capgo packages.

This command will also be useful for bug report.

App

Add

npx @capgo/cli app add [appId]

[appId] your app ID the format com.test.app is explained here.

πŸ’‘ All option will be guessed in your config if not provided.

Optionally, you can give:

  • --icon [/path/to/my/icon] to have a custom icon display in Capgo web app.
  • --name [test] to have a custom name in the list.
  • --apikey [key] API key to link to your account.

Example of capacitor.config.json for appId and AppName, the icon is guess in the resources folder

{
  "appId": "ee.forgr.capacitor_go",
  "appName": "Capgo",
  "webDir": "dist"
}

Set

npx @capgo/cli app set [appId]

[appId] is your app ID, the format is explained here.

Optionally, you can give:

  • --icon [/path/to/my/icon] to have a custom icon display in Capgo web app.
  • --name [test] to have a custom name in the list.
  • --retention [retention] retention period of app bundle in days, 0 by default = infinite.
  • --apikey [key] API key to link to your account.

List

npx @capgo/cli app list [appId]

[appId] your app ID the format com.test.app is explained here.

Optionally, you can give:

  • --apikey [key] API key to link to your account.

Delete

npx @capgo/cli app delete [appId]

[appId] your app ID the format com.test.app is explained here.

Optionally, you can give:

  • --apikey [key] API key to link to your account.
  • --bundle with the version number will only delete this version.

Debug

npx @capgo/cli app debug [appId]

[appId] your app ID the format com.test.app is explained here.

Optionally, you can give:

  • --apikey [key] API key to link to your account.
  • --device with the specific device you want to debug

Bundle

Upload

npx @capgo/cli bundle upload [appId]

[appId] is your app ID, the format is explained here.

Optionally, you can give:

  • --apikey [key] API key to link to your account.
  • --path [/path/to/my/bundle] to upload a specific folder.
  • --channel [test] to upload to a specific channel.
  • --external="https://mydomain.com/myapp.zip" to link to an external URL instead of upload to Capgo cloud, it should be a zip URL in HTTPS.
  • --key [/path/to/my/private_key] the path of your private key.
  • --key-data [privateKey] the private key data, if you want to use inline.
  • --no-key to ignore the signing key and send clear update.
  • --bundle [1.0.0] to set the bundle version number of the file to upload.
  • --iv-session-key [key] to send a custom session key to the cloud.
  • --s3-apikey [key] API key to upload to an AWS S3 account directly.
  • --s3-apisecret [secretkey] API secret necessary for uploading to S3.
  • --s3-region [region] to set the region of the AWS S3 account of the two previous API keys.
  • --s3-bucket-name [bucketName] to set the name of the AWS S3 bucket to which upload.
  • --bundle-url prints bundle url into stdout. Useful when parsing bundle url from shell.
  • --no-code-check to ignore the code check and send the bundle anyway.

⭐️ External option helps to unlock 2 cases: corporate with privacy concern, don't send the code to a third part and app bigger than 200 MB. With this setting, Capgo store only the link to the zip and sends the link to all apps.

πŸ‘€ Capgo cloud never looks at what is in the link (for external option), or in the code when stored.

πŸ”‘ You can add a second layer of security by using encryption, then Capgo will not be able to look or modify anything, it becomes β€œtrustless”.

Example of package.json for version

{
  "version": "1.0.2"
}

β›” Version should be greater than β€œ0.0.0”.

πŸ’‘ Don't forget to update the version number each time you send one, or the device will don't see the update.

List

npx @capgo/cli bundle list [appId]

[appId] your app ID the format com.test.app is explained here.

Optionally, you can give:

  • --apikey [key] API key to link to your account.

Delete

npx @capgo/cli bundle delete [appId]

[appId] your app ID the format com.test.app is explained here.

Optionally, you can give:

  • --apikey [key] API key to link to your account.
  • --bundle with the version number will only delete this version.

Cleanup

in a SemVer range for a major version to Cloud

npx @capgo/cli bundle cleanup [appId] --bundle=[majorVersion] --keep=[numberToKeep]

[appId] your app ID the format com.test.app is explained here.

Optionally, you can give:

  • --apikey [key] API key to link to your account.
  • --bundle [majorVersion] a version you wish to remove previous packages for, it will keep the last one + numberToKeep.
  • --keep [numberToKeep] the number of packages you wish to keep (default 4).

For example: If you have 10 versions from 10.0.1 to 10.0.11, and you use npx @capgo/cli cleanup [appId] --bundle=10.0.0 it will remove 10.0.1 to 10.0.6. 10.0.7 until 10.0.11 will be kept.

If you have 20 versions in total, and you don't provide a bundle number like this: npx @capgo/cli cleanup [appId] --keep=2 It will remove 18 versions, and keep the last 2.

This command will ask for confirmation, it shows a table of what it will be keeping and removing.

:::note This command will ignore bundles which are currently in use in any channel. :::

Encrypt

npx @capgo/cli bundle encrypt [path/to/zip]

This command is used when you use external source to store your code or for test purpose.

Optionally, you can give:

--key [/path/to/my/private_key] the path of your private key. --key-data [privateKey] the private key data, if you want to use inline. The command will print your ivSessionKeyy and generate an encrypted zip, to use it with the upload command or decryt command.

Decrypt

npx @capgo/cli bundle decrypt [path/to/zip] [ivSessionKey]

Optionally, you can give:

--key [/path/to/my/private_key] the path of your private key.

--key-data [privateKey] the private key data, if you want to use inline. This command is mainly used for test purpose, it will decrypt the zip and print the base64 decrypted session key in the console.

Zip

npx @capgo/cli bundle zip [appId]

[appId] is your app ID, the format is explained here.

Optionally, you can give:

  • --path [/path/to/my/bundle] to upload a specific folder.
  • --bundle [1.0.0] to set the bundle version number of the filename.
  • --name [myapp] to override the filename.

Channel

Add

npx @capgo/cli channel add [channelId] [appId]

[channelId] the name of your new channel. [appId] your app ID the format com.test.app is explained here.

Delete

npx @capgo/cli channel delete [channelId] [appId]

[channelId] the name of your channel you want to delete. [appId] your app ID the format com.test.app is explained here.

List

npx @capgo/cli channel list [appId]

[appId] your app ID the format com.test.app is explained here.

Optionally, you can give:

  • --apikey [key] API key to link to your account.

Set

npx @capgo/cli channel set [channelId] [appId]

[appId] is your app ID, the format is explained here.

Optionally, you can give:

  • --bundle [1.2.3] your app bundle already sent to the cloud, to link it to a channel.
  • --latest get the bundle version from package.json:version, cannot be used with --bundle.
  • --state [ normal | default ] set the channel state, can be normal or default. One channel needs to be default.
  • --downgrade allows the channel to send downgrade version to devices.
  • --no-downgrade disallows the channel to send downgrade version to devices.
  • --upgrade allows the channel to send upgrade (major) version to devices.
  • --no-upgrade disallow the channel to send upgrade (major) version to devices.
  • --ios allows the channel to send version to iOS devices.
  • --no-ios disallows the channel to send version to iOS devices.
  • --android allows the channel to send version to android devices.
  • --no-android disallows the channel to send version to android devices.
  • --self-assign allows devices to self assign to this channel.
  • --no-self-assign disallows devices to self assign to this channel.
  • --apikey [key] API key to link to your account.

End-to-End encryption (Trustless)

Capgo supports end-to-end encryption, this means that your bundle(code) is encrypted before sent to the cloud and decrypted on the device. For that, you need to generate an RSA key pair, you can use the following command to generate it.

The encryption system is a combination of RSA and AES, the RSA key is used to encrypt the AES key, and the AES key is used to encrypt the file.

See below for more information about the encryption system.

Ecryption schema

Create key for your app

npx @capgo/cli key create

Optionally, you can give: --force to overwrite the existing key. This command will create for you a key pair in your app, and will ask you to save the private key in a safe place. It's recommended to not git commit the private and public key, and to not share it with anyone.

After your local test, remove the key from the config file and add it on the CI step with key save

Save key in your app config

npx @capgo/cli key save

Optionally, you can give:

--key [/path/to/my/private_key] the path of your private key.

--key-data [privateKey] the private key data, if you want to use inline. This command is useful if you followed the recommendation and didn't commit the key in your app, and in the config.

Dev contribution

  1. Install development dependencies

      rm -rf node_modules
      npm i
  2. Set "sourceMap": true, in tsconfig.json

  3. Run webpack development server

      npm run dev
  4. Attach debugger to the process started with npm run dev

    VS Code:

    • Run Debug on fixtures launch configuration
    • Edit configuration to debug on different files

    Other IDEs:

    • Attach debugger of your choice to the running process, use .vscode/launch.json Debug on fixtures configuration as the example

Production build

  1. Set "sourceMap": false, in tsconfig.json

    TODO: add separate build config

  2. Run

    npm install && set NODE_ENV=production&& npx webpack --config webpack.config.js && rm -rf node_modules && npm i --only=prod && npm prune --production && npm shrinkwrap

Publish to NPM

To release a new package version:

  1. Bump version in package.json manually

  2. Run commands from Production build section

  3. Run npm publish --dry-run:

    • ensure that only necessary files are listed in package preview

    • ensure that npm-shrinkwrap.json does not include development dependencies

  4. Run npm publish or npm publish --tag beta

Pack executable

prerequisite: perform production build

Pkg will not resolve dynamic module imports, so avoid these at all costs. (Basically, just use plain ordinary static import Something from 'somewhere' and no issue should arise)

Build for all supported platforms

  pkg ./dist/index.js

You can specify targets with -t option (refer to pkg --help and examples on pkg's npm) e.g. use pkg -t node14-win-x64 ./dist/index.js to build for Node14, Windows x64

Build for Node14 Windows x64

   pkg -t node14-win-x64 ./dist/index.js

cli's People

Contributors

actions-user avatar akhill10 avatar arendjantetteroo avatar fxsalazar avatar github-actions[bot] avatar hichemfantar avatar jithuss avatar joel-loycom avatar jwelmac avatar neo773 avatar neptune650 avatar renovate[bot] avatar riderx avatar romandavlyatshin avatar simonflk avatar snyk-bot avatar wcaleniewolny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cli's Issues

Securing external file url with password

Hi,

We would like to use CapGo for our app distribution, however for privacy reasons we would be forced to use our own fileserver for the zip uploads. While this is supported with the --external flag, as far as I could dicern from the logs, it is not possible to provide login credentials to the zip file. Would that be a possibility to implement?

And if not, is it possible to use the --external flag in conjunction with encrypting the app bundle on an external file server?
While having username and password for the file download would still be great, maybe encrypting the bundle would suffice to adhere to our privacy regulations.

Thanks for your time ; )

Fix org upload fail

if your current or is expired trial or above your plan but you want to upload to another org where plan is ok the CLI will block you because it check the plan of your org.
To fix this we need to check the org of the app and not of the user for commands outside create apps.
Also create should ask what org to upload if you have several orgs

remove appId from "app list" command

Hi,
the app list [appId] [apiKey] command should list all apps a user has. In the current implementation you can provide an appId which is ignored (at least in the output). Opting here to remove the appId from the command and just have it in the form of app list [apiKey]

The appId is used to run a check against it if the apiKey has access to this app. I think that this can be removed and just return all the apps of a user. Is this something you would agree on? I would be willing to create a PR for this.

Fix delete from CLI

Since the add of stats table and device we need to delete the data in device table linked to version before try to delete versions

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update dependency @types/mime to v4
  • chore(deps): update dependency eslint to v9
  • fix(deps): update dependency @capacitor/cli to v6

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

bun
package.json
  • @aws-sdk/client-s3 ^3.540.0
  • @capacitor/cli 5.7.0
  • @capgo/find-package-manager 0.0.11
  • @clack/prompts ^0.7.0
  • @supabase/supabase-js ^2.39.3
  • @tomasklaen/checksum ^1.1.0
  • @trufflesuite/spinnies ^0.1.1
  • adm-zip ^0.5.10
  • ci-info ^4.0.0
  • commander 12.0.0
  • console-table-printer ^2.12.0
  • get-latest-version ^5.1.0
  • ky ^1.2.0
  • logsnag 1.0.0
  • mime ^4.0.1
  • node-dir ^0.1.17
  • open ^10.0.3
  • prettyjson ^1.2.5
  • prompt-sync ^4.2.0
  • qrcode ^1.5.3
  • semver ^7.6.0
  • @antfu/eslint-config ^2.6.4
  • @types/adm-zip 0.5.5
  • @types/mime ^3.0.4
  • @types/node ^20.11.17
  • @types/node-dir ^0.0.37
  • @types/npmcli__ci-detect ^2.0.3
  • @types/prettyjson ^0.0.33
  • @types/prompt-sync ^4.2.3
  • @types/qrcode ^1.5.5
  • @types/semver ^7.5.6
  • @typescript-eslint/eslint-plugin 6.21.0
  • @typescript-eslint/parser 6.21.0
  • esbuild ^0.20.0
  • eslint 8.56.0
  • eslint-config-airbnb-base ^15.0.0
  • eslint-config-prettier ^9.1.0
  • eslint-import-resolver-typescript 3.6.1
  • eslint-plugin-import 2.29.1
  • eslint-plugin-prettier ^5.1.3
  • git-format-staged 3.0.0
  • husky ^9.0.10
  • pkg 5.8.1
  • prettier 3.2.5
  • ts-loader ^9.5.1
  • ts-node ^10.9.2
  • tsconfig-paths 4.2.0
  • typescript 5.3.3
  • npm >=8.0.0
  • node >=18.0.0
github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • oven-sh/setup-bun v1.1.1
  • JS-DevTools/npm-publish v3
  • JS-DevTools/npm-publish v3
.github/workflows/bump_version.yml
  • actions/checkout v4
  • oven-sh/setup-bun v1.1.1
  • actions/checkout v4
  • oven-sh/setup-bun v1.1.1
.github/workflows/test.yml
  • actions/checkout v4
  • oven-sh/setup-bun v1.1.1

  • Check this box to trigger a request for Renovate to run again on this repository

ClI design reshape by domain

there is a missing capgo app list command.
And I would consider separating app-related functions in a subcommand,
e.g. capgo
app list, capgo app add/remove , because it feels not exactly intuitive to
have the app-related 'remove' next to the build-related 'upload' and
'cleanup' etc. But maybe I am not right :) I had some time with the
heroku's CLI and maybe that is why I feel that the above would be
intuitive (similar).

Add prettier configuration

I realized that the project is not formatted evenly and the vscode setting "editor.formatOnSave": true, ; maybe could be a good idea to add a prettier config and do a global format.

Make upload from CLI more future proof

Current upload implementation creates zip and cut them in chunk of 1 MB to send it to Netlify function to stay under the 10-sec timeout.

This work well until you have 25 MB because each time you upload a new part the function download old one to concatenate them.

A better option would be able to upload into supabase directly from the CLI without having security issue. Or lastly concatenate all file in separate call.

maybe we can use supabase functions in deno:

https://supabase.com/docs/guides/functions

Auto-delete fail upload

When the upload task fails, the backend should auto-delete the version.
This feature has to be secure and does not allow users to delete already uploaded versions.

Delete via CLI or API gives an error 400 "You can't edit this app"

Hello,

First of all, thank you for your work !

I have an issue with the cli that gives me an error "You can't edit this app" when I try to delete an app version, using :

yarn capgo delete my.app.id -v 0.0.x --apikey=xxx (all API key)

I then tried using a request on your REST API and it gives me the same result :

400 BAD REQUEST

{
	"status": "You can't edit this app"
}

Am I doing something wrong ?

Thanks in advance for your response and have a nice day :)

Detect native plugin version change

The goal of this feature is to allow user to prevent themselves sending minor update with native changes.

To achieve that the cli will save as metadata native package version and compare the current one to the last one available in cloud

Invalid JSON output

npx @capgo/cli bundle zip --json

This command provides an incorrect json for each new version of capgo/cli. It may be useful locally, but not in a build process.

β”‚
β–²  🚨 You are using @capgo/[email protected] it's not the latest version.
β”‚  Please use @capgo/[email protected]" or @capgo/cli@latest to keep up to date with the latest features and bug fixes.
{"bundle":"1.16.0","filename":"app.example.1.16.0.zip","checksum":"803073f2"}

Capgo cli just login on npx @capgo/cli init [apikey] command [Ionic Capacitor]

This command only login and terminate
Capture

Following text from Capgo cli documentation
This method is here to onboard you step by step.
It will add your app to Capgo. It will add the code to your app to validate the update. Likewise, it will build your app. Furthermore, it will upload your app to Capgo. And it will help you to check if the update works.

This is the result from npx @capgo/cli doctor

OS: Windows 8.1

Node: v16.20.1

Installed Dependencies:

@capgo/cli: 3.14.42
@capgo/capacitor-updater: 5.3.26

  • Loading latest dependencies

  • Latest Dependencies:

    @capgo/cli: 3.14.42
    @capgo/capacitor-updater: 5.3.26

3.10.6 breaks cli

With 3.10.6 we get this error when using the CLI:

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/[email protected]/node_modules/open/index.js from /Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/@[email protected]/node_modules/@capgo/cli/dist/index.js not supported.
Instead change the require of /Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/[email protected]/node_modules/open/index.js in /Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/@[email protected]/node_modules/@capgo/cli/dist/index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.6634 (/Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/@[email protected]/node_modules/@capgo/cli/dist/index.js:2:92635)
    at n (/Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/@[email protected]/node_modules/@capgo/cli/dist/index.js:2:95490)
    at Object.7978 (/Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/@[email protected]/node_modules/@capgo/cli/dist/index.js:2:86815)
    at n (/Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/@[email protected]/node_modules/@capgo/cli/dist/index.js:2:95490)
    at Object.774 (/Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/@[email protected]/node_modules/@capgo/cli/dist/index.js:2:47781)
    at n (/Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/@[email protected]/node_modules/@capgo/cli/dist/index.js:2:95490)
    at Object.738 (/Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/@[email protected]/node_modules/@capgo/cli/dist/index.js:2:60382)
    at n (/Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/@[email protected]/node_modules/@capgo/cli/dist/index.js:2:95490)
    at /Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/@[email protected]/node_modules/@capgo/cli/dist/index.js:2:95530
    at Object.<anonymous> (/Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.pnpm/@[email protected]/node_modules/@capgo/cli/dist/index.js:2:95537) {
  code: 'ERR_REQUIRE_ESM'
}
 ERROR  Command failed with exit code 1: /Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.bin/capgo bundle list

pnpm: Command failed with exit code 1: /Users/marian/Library/pnpm/store/v3/tmp/dlx-91091/node_modules/.bin/capgo bundle list
    at makeError (/Users/marian/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:22442:17)
    at handlePromise (/Users/marian/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:23013:33)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.handler [as dlx] (/Users/marian/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:188181:7)
    at async /Users/marian/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:195473:21
    at async main (/Users/marian/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:195444:34)
    at async runPnpm (/Users/marian/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:195638:5)
    at async /Users/marian/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:195630:7

It still works with 3.10.5

Feature request: Get channel active bundle from CLI

Maybe this is possible already and I couldn't find it in the docs? I'm looking to update some mobile build scripts we have, and ideally be able to guide the operator through whether they'll be doing an OTA capgo release or a native release. I could detect this if I could combine:

  1. Get from capgo the current bundle version for a specific channel (eg production)
  2. Compare that using a semver comparison against the package.json version

I don't see how to do (1) currently - I imagine this could look something like

$ npx capgo channel currentVersion [channelName eg "production"]
5.0.1

Where the output is just the version number so that I can pipe the output into another script (or offer a --quiet option or something to permit easy leveraging into scripts, other capgo CLI commands tend to be verbose in output (which is nice, but harder to use for scripting)).

Anyway, figured I'd capture the ask :)

CLI Doctor doesn't detect versions correctly

running npx @capgo/cli@latest doctor gives this result:

     πŸ’Š   Capgo Doctor  πŸ’Š

 OS: Windows 10 Pro

 Installed Dependencies:

   @capgo/cli: 3.13.27
   @capgo/capacitor-updater: ^5.2.35


βœ“ Latest Dependencies:


   @capgo/cli: 3.13.27
   @capgo/capacitor-updater: 5.2.35


🚨 Some dependencies are not up to date

removing the ^ from @capgo/capacitor-updater in package.json removes the doctor error

     πŸ’Š   Capgo Doctor  πŸ’Š

 OS: Windows 10 Pro

 Installed Dependencies:

   @capgo/cli: 3.13.27
   @capgo/capacitor-updater: 5.2.35


βœ“ Latest Dependencies:


   @capgo/cli: 3.13.27
   @capgo/capacitor-updater: 5.2.35


βœ… All dependencies are up to date

Allow deleting previous versions while keeping the last x

We are building our assets in a ci environment where we push a new version to capgo. We are not really interested in old versions, except maybe a couple in case we need to rollback. It would be useful to have a sort of "deploy" command where you can push the latest version to live and keep the last x (something like 3 or 5) versions around. And remove the rest of the versions from capgo.

This way it works the same way as tools like deployer.org

If there is a way to list all available versions with the cli tool (#14) then we can script this ourselves, but if this can be provided out of the box even better :)

capgo/cli hangs after command

Tested with both @capgo/cli login and @capgo/cli list

It hangs after the output. This causes the gitlab pipeline (and github) to fail.

I did a git bisect, this behaviour does not appear in 2.3.2, the last version before supabase v2.

78089c7f8b609417b9a6cf340794332f9478b3d8 is the first bad commit
commit 78089c7f8b609417b9a6cf340794332f9478b3d8
Author: martindonadieu <[email protected]>
Date:   Tue Dec 6 19:15:15 2022 +0800

    fix: upgrade to supabase v2

I don't see any changes in the login and list files for this commit, so it seems its something in the supabase client that causes it to hang.

Tested with

git bisect
npm install && npm run dev
nodejs dist/index.js list
`

capgo.app/onboarding/verify_email does not work

Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'n.hash')

In Firefox and Safari and is stuck on spinner.

However e-mail was verified, so it is possible to login from homepage and continue.

React template main file not detected

When adding capgo to a react ionic app, it seems that the main.tsx file isn't detected.

  1. Automatic Add "CapacitorUpdater.notifyAppReady()" code and import in io.ionic.starter?
  2. Yes
  3. No main.ts, main.js, index.ts or index.js file found, You need to add @capgo/capacitor-updater manually

image

Block upload update if notifyAppReady is not found

We got some user thinking capgo doesn’t work because of this so a regex could maybe be run on all file to check if this line exist and block upload if not.
And a option could exist to disable the check

Allow option to upload in custom S3

The goal here is to simplify the process of upload for users using external storage.

so instead of asking them to upload themselves.

we can ask them to provide s3 apikey and upload for them.

this can be option parameter or if too complex just β€”s3-upload option with env var set

Keep only keeps 1 item from the list to remove

node ../../capgo-cli/dist/index.js cleanup  --bundle 10.0.0 --keep 10
Querying available versions in Capgo between 10.0.0 and 11.0.0
(node:1593799) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Total active versions in Capgo: 31
Active versions in Capgo between 10.0.0 and 11.0.0: 23
10.0.562 created on 11/17/2022, 12:11:15 PM will be kept as it's the last release
10.0.561 created on 11/17/2022, 11:48:31 AM will be kept due to config
10.0.509 created on 11/14/2022, 9:41:11 AM will be removed
10.0.510 created on 11/14/2022, 10:42:29 AM will be removed
10.0.538 created on 11/14/2022, 10:55:48 AM will be removed
10.0.539 created on 11/14/2022, 12:41:42 PM will be removed

I will add a PR for this soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.