@capgo/cli 0.13.9 → 0.13.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.cz.toml CHANGED
@@ -1,7 +1,7 @@
1
1
  [tool.commitizen]
2
2
  name = "cz_conventional_commits"
3
3
  tag_format = "$major.$minor.$patch$prerelease"
4
- version = "0.13.9"
4
+ version = "0.13.10"
5
5
  version_files = [
6
6
  "package.json:version",
7
7
  ".cz.toml"
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.13.10 (2022-06-17)
2
+
3
+ ### Fix
4
+
5
+ - usage instructions
6
+
1
7
  ## 0.13.9 (2022-06-17)
2
8
 
3
9
  ### Fix
package/README.md CHANGED
@@ -12,7 +12,7 @@ Before use the CLI you should register here : https://capgo.app/
12
12
  Then go in you account in apikey section and click in the read/write key to copy it.
13
13
 
14
14
  ## Add new app to Cloud
15
- `capgo add [appId] --apikey=********`
15
+ `npx @capgo/cli add [appId] --apikey=********`
16
16
  `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/init)
17
17
 
18
18
  Optionally you can give:
@@ -21,7 +21,7 @@ Optionally you can give:
21
21
 
22
22
 
23
23
  ### Send version to Cloud
24
- `capgo upload [appId] --apikey=********`
24
+ `npx @capgo/cli upload [appId] --apikey=********`
25
25
  `[appId]` is your app ID the format is explained [here](https://capacitorjs.com/docs/cli/init)
26
26
 
27
27
  Optionally you can give:
@@ -29,13 +29,13 @@ Optionally you can give:
29
29
  - name with `--name test` to have a custom name in the list
30
30
  - channel with `--channel prod` to link this version to channel
31
31
  ### Send version to Cloud channel
32
- `capgo set [appId] [version] [channel] --apikey=********`
32
+ `npx @capgo/cli set [appId] [version] [channel] --apikey=********`
33
33
  `[appId]` your app ID the format is explained [here](https://capacitorjs.com/docs/cli/init)
34
34
  `[version]` your app version already sended to the cloud
35
35
  `[channel]` the channel you want to link the version
36
36
 
37
37
  ### Delete package to Cloud
38
- `capgo delete [appId] --apikey=********`
38
+ `npx @capgo/cli delete [appId] --apikey=********`
39
39
  `[appId]` your app ID present in the Cloud
40
40
 
41
41
 
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (()=>{"use strict";var e={548:function(e,o,r){var t=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{s(t.next(e))}catch(e){a(e)}}function p(e){try{s(t.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}s((t=t.apply(e,o||[])).next())}))};Object.defineProperty(o,"__esModule",{value:!0}),o.addApp=void 0;const n=r(304),a=r(113),i=r(147),p=r(470),s=r(11),d=r(233),l="assets/icon.png";o.addApp=(e,o)=>t(void 0,void 0,void 0,(function*(){var r,t;let{name:c,icon:u}=o;const f=o.apikey||(0,d.findSavedKey)(),g=yield(0,d.getConfig)();e=e||(null===(r=null==g?void 0:g.app)||void 0===r?void 0:r.appId),c=c||(null===(t=null==g?void 0:g.app)||void 0===t?void 0:t.appName)||"Unknown",u=u||"resources/icon.png",f||n.program.error("Missing API key, you need to provide a API key to add your app"),e&&c||n.program.error("Missing argument, you need to provide a appid and a name, or be in a capacitor project"),console.log(`Add ${e} to Capgo`);const v=(0,d.createSupabaseClient)(f);yield(0,d.checkKey)(v,f,["write","all"]);const{data:m,error:y}=yield v.rpc("get_user_id",{apikey:f}),h=m?m.toString():"";let _,b;h&&!y||n.program.error(`Cannot verify user ${(0,d.formatError)(y)}`),yield(0,d.checkPlan)(v,h),console.log("Adding..."),u&&(0,p.existsSync)(u)?(_=(0,i.readFileSync)(u),b=(0,s.getType)(u)||"image/png",console.warn(`Found app icon ${u}`)):(0,p.existsSync)(l)?(_=(0,i.readFileSync)(l),b=(0,s.getType)(l)||"image/png",console.warn(`Found app icon ${l}`)):console.warn(`Cannot find app icon in any of the following locations: ${u}, ${l}`);const{data:k,error:$}=yield v.rpc("exist_app",{appid:e,apikey:f});(k||$)&&n.program.error(`App already exists ${(0,d.formatError)($)}`);const w=`icon_${(0,a.randomUUID)()}`;let x="https://xvwzpoazmxkqosrdewyv.supabase.co/storage/v1/object/public/images/capgo.png";if(_&&b){const{error:o}=yield v.storage.from(`images/${h}/${e}`).upload(w,_,{contentType:b});o&&n.program.error(`Could not add app ${(0,d.formatError)(o)}`);const{data:r}=yield v.storage.from(`images/${h}/${e}`).getPublicUrl(w);x=(null==r?void 0:r.publicURL)||x}const{error:C}=yield v.from("apps").insert({icon_url:x,user_id:h,name:c,app_id:e},{returning:"minimal"});C&&n.program.error(`Could not add app ${(0,d.formatError)(C)}`),console.log("App added to server, you can upload a version now")}))},453:function(e,o,r){var t=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{s(t.next(e))}catch(e){a(e)}}function p(e){try{s(t.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}s((t=t.apply(e,o||[])).next())}))};Object.defineProperty(o,"__esModule",{value:!0}),o.deleteApp=void 0;const n=r(304),a=r(233);o.deleteApp=(e,o)=>t(void 0,void 0,void 0,(function*(){var r;const{version:t}=o,i=o.apikey||(0,a.findSavedKey)(),p=yield(0,a.getConfig)();e=e||(null===(r=null==p?void 0:p.app)||void 0===r?void 0:r.appId),i||n.program.error("Missing API key, you need to provide an API key to delete your app"),e||n.program.error("Missing argument, you need to provide a appid, or be in a capacitor project"),console.log(`Delete ${e} to Capgo`);const s=(0,a.createSupabaseClient)(i);yield(0,a.checkKey)(s,i,["all"]);const{data:d,error:l}=yield s.rpc("get_user_id",{apikey:i}),c=d?d.toString():"";c&&!l||n.program.error(`Cannot verify user ${(0,a.formatError)(l)}`);const{data:u,error:f}=yield s.rpc("exist_app",{appid:e,apikey:i});if(u&&!f||n.program.error("No permission to delete"),t){const{data:o,error:r}=yield s.from("app_versions").select().eq("app_id",e).eq("user_id",c).eq("name",t).eq("deleted",!1);o&&o.length&&!r||n.program.error(`Version ${e}@${t} don't exist ${(0,a.formatError)(r)}`);const{data:i,error:p}=yield s.from("channels").select().eq("app_id",e).eq("created_by",c).eq("version",o[0].id);(i&&i.length||p)&&n.program.error(`Version ${e}@${t} is used in a channel, unlink it first ${(0,a.formatError)(p)}`);const{data:d,error:l}=yield s.from("devices_override").select().eq("app_id",e).eq("version",o[0].id);(d&&d.length||l)&&n.program.error(`Version ${e} @${t} is used in a device override, unlink it first ${(0,a.formatError)(l)}`);const{error:u}=yield s.storage.from("apps").remove([`${c} /${e}/versions / ${o[0].bucket_id} `]);u&&n.program.error(`Something went wrong when trying to delete ${e} @${t} ${u} `);const{error:f}=yield s.from("app_versions").update({deleted:!0}).eq("app_id",e).eq("name",t).eq("user_id",c);return f&&n.program.error(`App ${e} @${t} not found in database ${f} `),void console.log("App version deleted from server")}const{data:g,error:v}=yield s.from("app_versions").select().eq("app_id",e).eq("user_id",c);if(v&&n.program.error(`App ${e} not found in database ${v} `),g&&g.length){const o=g.map((o=>`${c}/${e}/versions/${o.bucket_id} `)),{error:r}=yield s.storage.from("apps").remove(o);r&&n.program.error(`Cannot delete stored version for app ${e} from storage ${r} `)}const{error:m}=yield s.from("app_versions").delete().eq("app_id",e).eq("user_id",c);m&&n.program.error(`Cannot delete version for app ${e} from database ${m} `);const{error:y}=yield s.from("apps").delete().eq("app_id",e).eq("user_id",c);y&&n.program.error(`Cannot delete from database ${y} `),console.log("App deleted from server")}))},473:function(e,o,r){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0});const n=r(304),a=r(548),i=r(453),p=r(666),s=r(310),d=t(r(598)),l=r(937);n.program.version(d.default.version).command("add [appid]").alias("a").action(a.addApp).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account"),n.program.version(d.default.version).command("login [apikey]").alias("l").action(l.login).option("--local","Only save in local folder"),n.program.command("upload [appid]").alias("u").action(s.uploadVersion).option("-a, --apikey <apikey>","apikey to link to your account").option("-p, --path <path>","path of the file to upload").option("-c, --channel <channel>","channel to link to").option("-e, --external <url>","link to external url intead of upload to capgo cloud").option("-f, --format <base64|hex|binary|utf8>","choose the upload format default base64").option("-v, --version <version>","version number of the file to upload"),n.program.command("set [appid]").alias("s").action(p.setChannel).option("-c, --channel <channel>","channel to link to").option("-v, --version <version>","version number of the file to upload").option("-s, --state <state>","set the state of the channel, public or private").option("-a, --apikey <apikey>","apikey to link to your account"),n.program.description("Manage package and version in capgo Cloud").command("delete [appid]").alias("d").action(i.deleteApp).option("-a, --apikey <apikey>","apikey to link to your account").option("-v, --version <version>","version number of the app to delete"),n.program.parse(process.argv)},937:function(e,o,r){var t=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{s(t.next(e))}catch(e){a(e)}}function p(e){try{s(t.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}s((t=t.apply(e,o||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.login=void 0;const a=r(304),i=n(r(147)),p=n(r(37));o.login=(e,o)=>t(void 0,void 0,void 0,(function*(){const{local:r}=o;if(r)i.default.existsSync(".git")||a.program.error("To use local you should be in a git repository"),i.default.writeFileSync(".capgo",`${e}\n`),i.default.appendFileSync(".gitignore",".capgo\n");else{const o=p.default.homedir();i.default.writeFileSync(`${o}/.capgo`,`${e}\n`)}console.log(`login saved into .capgo file in ${r?"local":"home"} directory`)}))},666:function(e,o,r){var t=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{s(t.next(e))}catch(e){a(e)}}function p(e){try{s(t.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}s((t=t.apply(e,o||[])).next())}))};Object.defineProperty(o,"__esModule",{value:!0}),o.setChannel=void 0;const n=r(304),a=r(233);o.setChannel=(e,o)=>t(void 0,void 0,void 0,(function*(){var r,t,i;let{version:p}=o;const{state:s,channel:d="dev"}=o,l=o.apikey||(0,a.findSavedKey)(),c=yield(0,a.getConfig)();let u;e=e||(null===(r=null==c?void 0:c.app)||void 0===r?void 0:r.appId),p=p||(null===(i=null===(t=null==c?void 0:c.app)||void 0===t?void 0:t.package)||void 0===i?void 0:i.version),"public"!==s&&"private"!==s||(u="public"===s),l||n.program.error("Missing API key, you need to provide a API key to add your app"),e||n.program.error("Missing argument, you need to provide a appid, or be in a capacitor project"),p||u||n.program.error("Missing argument, you need to provide a state or a version"),p?console.log(`Set ${d} to @${p} in ${e}`):console.log(`Set${d} to @${s} in ${e}`);try{const o=(0,a.createSupabaseClient)(l);yield(0,a.checkKey)(o,l,["write","all"]);const{data:r,error:t}=yield o.rpc("get_user_id",{apikey:l}),i=r?r.toString():"";i&&!t||n.program.error(`Cannot verify user ${(0,a.formatError)(t)}`),yield(0,a.checkPlan)(o,i);const s={created_by:i,app_id:e,name:d};if(p){const{data:r,error:t}=yield o.from("app_versions").select().eq("app_id",e).eq("name",p).eq("user_id",i).eq("deleted",!1);!t&&r&&r.length||n.program.error(`Cannot find version ${p}`),s.version=r[0].id}void 0!==u&&(s.public=u);try{const{error:e}=yield(0,a.updateOrCreateChannel)(o,s,l);e&&n.program.error(`Cannot set channel ${(0,a.formatError)(e)}`)}catch(e){n.program.error(`Cannot set channel ${(0,a.formatError)(e)}`)}}catch(e){n.program.error(`Unknow error ${(0,a.formatError)(e)}`)}p?console.log("Done ✅"):console.log(`You can use now is channel in your app with the url: ${a.host}/api/latest?appid=${e}&channel=${d}`)}))},310:function(e,o,r){var t=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{s(t.next(e))}catch(e){a(e)}}function p(e){try{s(t.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}s((t=t.apply(e,o||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.uploadVersion=void 0;const a=n(r(844)),i=r(304),p=r(113),s=n(r(295)),d=n(r(912)),l=r(233);o.uploadVersion=(e,o)=>t(void 0,void 0,void 0,(function*(){var r,t,n,c;let{version:u,path:f,channel:g}=o;const{external:v}=o,m=o.apikey||(0,l.findSavedKey)();g=g||"dev";const y=yield(0,l.getConfig)();e=e||(null===(r=null==y?void 0:y.app)||void 0===r?void 0:r.appId),u=u||(null===(n=null===(t=null==y?void 0:y.app)||void 0===t?void 0:t.package)||void 0===n?void 0:n.version),d.default.valid(u)||i.program.error(`Your version name ${u}, is not valid it should follow semver convention : https://semver.org/`),f=f||(null===(c=null==y?void 0:y.app)||void 0===c?void 0:c.webDir),m||i.program.error("Missing API key, you need to provide a API key to add your app"),e&&u&&f||i.program.error("Missing argument, you need to provide a appid and a version and a path, or be in a capacitor project"),console.log(`Upload ${e}@${u} started from path "${f}" to Capgo cloud`);const h=(0,l.createSupabaseClient)(m);yield(0,l.checkKey)(h,m,["write","all"]);const _=new s.default.MultiBar({clearOnComplete:!1,hideCursor:!0},s.default.Presets.shades_grey),b=_.create(7,0,{format:"Uploading: [{bar}] {percentage}% | ETA: {eta}s | {value}/{total} Part"},s.default.Presets.shades_grey);b.start(7,0,{speed:"N/A"});const{data:k,error:$}=yield h.rpc("exist_app_versions",{apikey:m,name_version:u,appid:e});(k||$)&&(_.stop(),i.program.error(`This app version already exist or was deleted, you cannot re-upload it ${(0,l.formatError)($)}`)),b.increment();const{data:w,error:x}=yield h.rpc("get_user_id",{apikey:m}),C=w?w.toString():"";C&&!x||(_.stop(),i.program.error(`Cannot verify user ${(0,l.formatError)(x)}`)),yield(0,l.checkPlan)(h,C,!1);const{data:q,error:S}=yield h.rpc("is_trial",{userid:C}).single();(q&&q>0||S)&&_.log(`WARNING !!\nTrial expires in ${q} days, upgrade here: ${l.hostWeb}/app/usage\n`),b.increment();const{data:A,error:P}=yield h.rpc("exist_app",{appid:e,apikey:m});A&&!P||(_.stop(),i.program.error(`Cannot find app ${e} in your account \n${(0,l.formatError)(P)}`)),b.increment();const{data:I,error:M}=yield h.rpc("exist_app_versions",{appid:e,apikey:m,name_version:u});(I||M)&&i.program.error(`Version already exists ${(0,l.formatError)(M)}`),b.increment();const j=(0,p.randomUUID)();if(v)v&&!v.startsWith("https://")&&(_.stop(),i.program.error(`External link should should start with "https://" current is "${v}"`));else{const o=new a.default;o.addLocalFolder(f);const r=o.toBuffer(),t=Math.floor(r.byteLength/1024/1024),n=`apps/${C}/${e}/versions`;b.increment(),t>30&&(_.stop(),i.program.error(`The app is too big, the limit is 30 Mb, your is ${t} Mb`)),t>25&&_.log(`WARNING !!\nThe app size is ${t} Mb, the limit is 30 Mb\n`);const{error:p}=yield h.storage.from(n).upload(j,r,{contentType:"application/zip"});p&&(_.stop(),i.program.error(`Cannot upload ${(0,l.formatError)(p)}`))}b.increment();const{data:E,error:O}=yield(0,l.updateOrCreateVersion)(h,{bucket_id:v?void 0:j,user_id:C,name:u,app_id:e,external_url:v},m);if(O&&(_.stop(),i.program.error(`Cannot add version ${(0,l.formatError)(O)}`)),b.increment(),E&&E.length){const{error:o}=yield(0,l.updateOrCreateChannel)(h,{name:g,app_id:e,created_by:C,version:E[0].id},m);o&&_.log("Cannot set version with upload key, use key with more rights for that\n")}else _.log("Cannot set version with upload key, use key with more rights for that\n");_.stop();const T=e.replace(/\./g,"--");console.log("App uploaded to server"),console.log(`Try it in mobile app: ${l.host}/app_mobile`),console.log(`Or set the channel ${g} as public here: ${l.hostWeb}/app/package/${T}`),console.log("To use with live update in your own app"),console.log(`You can link specific device to this version to make user try it first, here: ${l.hostWeb}/app/p/${T}/devices`)}))},233:function(e,o,r){var t=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{s(t.next(e))}catch(e){a(e)}}function p(e){try{s(t.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}s((t=t.apply(e,o||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.updateOrCreateChannel=o.updateOrCreateVersion=o.getConfig=o.formatError=o.findSavedKey=o.checkPlan=o.isTrial=o.isGoodPlan=o.checkKey=o.createSupabaseClient=o.supaAnon=o.hostSupa=o.hostWeb=o.host=void 0;const a=r(778),i=r(304),p=r(885),s=n(r(867)),d=n(r(147)),l=n(r(37));o.host="https://capgo.app",o.hostWeb="https://web.capgo.app",o.hostSupa="https://xvwzpoazmxkqosrdewyv.supabase.co",o.supaAnon="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYzNzgwNTAwOSwiZXhwIjoxOTUzMzgxMDA5fQ.8tgID1d4jodPwuo_fz4KHN4o1XKB9fnqyt0_GaJSj-w",o.createSupabaseClient=e=>(0,p.createClient)(o.hostSupa,o.supaAnon,{headers:{capgkey:e}}),o.checkKey=(e,r,n)=>t(void 0,void 0,void 0,(function*(){const{data:t,error:a}=yield e.rpc("is_allowed_capgkey",{apikey:r,keymode:n});t&&!a||i.program.error(`Invalid API key or insufficient permissions ${(0,o.formatError)(a)}`)})),o.isGoodPlan=(e,o)=>t(void 0,void 0,void 0,(function*(){const{data:r,error:t}=yield e.rpc("is_good_plan",{userid:o}).single();if(t)throw t;return r||!1})),o.isTrial=(e,o)=>t(void 0,void 0,void 0,(function*(){const{data:r,error:t}=yield e.rpc("is_trial",{userid:o}).single();if(t)throw t;return r||0})),o.checkPlan=(e,r,n=!0)=>t(void 0,void 0,void 0,(function*(){let t=yield(0,o.isGoodPlan)(e,r);const a=yield(0,o.isTrial)(e,r);a>0&&(t=!0),t||i.program.error(`You need to upgrade your plan to continue to use capgo.\n Upgrade here: ${o.hostWeb}/app/usage\n`),a>0&&n&&console.log(`WARNING !!\nTrial expires in ${a} days, upgrade here: ${o.hostWeb}/app/usage\n`)})),o.findSavedKey=()=>{let e=`${l.default.homedir()}/.capgo`;return d.default.existsSync(e)?d.default.readFileSync(e,"utf8").trim():(e=".capgo",d.default.existsSync(e)?d.default.readFileSync(e,"utf8").trim():null)},o.formatError=e=>e?`\n${s.default.render(e)}`:"",o.getConfig=()=>t(void 0,void 0,void 0,(function*(){let e;try{e=yield(0,a.loadConfig)()}catch(e){i.program.error("No capacitor config file found, run `cap init` first")}return e})),o.updateOrCreateVersion=(e,o,r)=>t(void 0,void 0,void 0,(function*(){const{data:t,error:n}=yield e.rpc("exist_app_versions",{appid:o.app_id,name_version:o.name,apikey:r});return t&&!n?(o.deleted=!1,e.from("app_versions").update(o).eq("app_id",o.app_id).eq("name",o.name)):e.from("app_versions").insert(o)})),o.updateOrCreateChannel=(e,o,r)=>t(void 0,void 0,void 0,(function*(){if(!o.app_id||!o.name||!o.created_by)return console.error("missing app_id, name, or created_by"),Promise.reject(new Error("missing app_id, name, or created_by"));const{data:t,error:n}=yield e.rpc("exist_channel",{appid:o.app_id,name_channel:o.name,apikey:r});return t&&!n?e.from("channels").update(o,{returning:"minimal"}).eq("app_id",o.app_id).eq("name",o.name).eq("created_by",o.created_by):e.from("channels").insert(o,{returning:"minimal"})}))},778:e=>{e.exports=require("@capacitor/cli/dist/config")},885:e=>{e.exports=require("@supabase/supabase-js")},844:e=>{e.exports=require("adm-zip")},295:e=>{e.exports=require("cli-progress")},304:e=>{e.exports=require("commander")},470:e=>{e.exports=require("fs-extra")},11:e=>{e.exports=require("mime")},867:e=>{e.exports=require("prettyjson")},912:e=>{e.exports=require("semver")},113:e=>{e.exports=require("crypto")},147:e=>{e.exports=require("fs")},37:e=>{e.exports=require("os")},598:e=>{e.exports=JSON.parse('{"name":"@capgo/cli","version":"0.13.9","description":"A CLI to upload to capgo servers","main":"dist/index.js","bin":{"capgo":"dist/index.js"},"repository":{"type":"git","url":"git+https://github.com/Cap-go/capgo-cli.git"},"bugs":{"url":"https://github.com/Cap-go/capgo-cli/issues"},"keywords":["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli"],"scripts":{"dev":"set NODE_ENV=development && npx webpack --config webpack.config.js","no-debug":"node dist/index.js","build":"npx webpack --config webpack.config.js","dev-build":"SUPA_DB=development npx webpack --config webpack.config.js","pack":"pkg","test_rls":"ts-node ./test/test_headers_rls.ts","lint":"eslint . --ext .ts --fix"},"author":"github.com/riderx","license":"Apache 2.0","dependencies":{"@capacitor/cli":"3.5.1","@supabase/supabase-js":"^1.35.3","adm-zip":"^0.5.9","cli-progress":"3.11.0","commander":"9.2.0","form-data":"^4.0.0","fs-extra":"10.1.0","mime":"^3.0.0","node-stream-zip":"^1.15.0","prettyjson":"^1.2.5","semver":"^7.3.7","upath":"^2.0.1"},"devDependencies":{"@types/adm-zip":"0.5.0","@types/cli-progress":"^3.11.0","@types/fs-extra":"^9.0.13","@types/mime":"^2.0.3","@types/node":"^17.0.31","@types/prettyjson":"^0.0.30","@types/semver":"^7.3.10","@typescript-eslint/eslint-plugin":"5.22.0","@typescript-eslint/parser":"5.22.0","eslint":"8.14.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^8.5.0","eslint-import-resolver-typescript":"2.7.1","eslint-plugin-import":"2.26.0","eslint-plugin-prettier":"^4.0.0","git-format-staged":"3.0.0","husky":"^7.0.4","nodemon":"2.0.16","pkg":"5.6.0","prettier":"2.6.2","ts-loader":"^9.3.0","ts-node":"^10.7.0","tsconfig-paths":"4.0.0","typescript":"4.6.4","webpack":"5.72.0","webpack-cli":"^4.9.2","webpack-node-externals":"^3.0.0"}}')}},o={};!function r(t){var n=o[t];if(void 0!==n)return n.exports;var a=o[t]={exports:{}};return e[t].call(a.exports,a,a.exports,r),a.exports}(473)})();
2
+ (()=>{"use strict";var e={548:function(e,o,r){var t=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{s(t.next(e))}catch(e){a(e)}}function p(e){try{s(t.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}s((t=t.apply(e,o||[])).next())}))};Object.defineProperty(o,"__esModule",{value:!0}),o.addApp=void 0;const n=r(304),a=r(113),i=r(147),p=r(470),s=r(11),d=r(233),l="assets/icon.png";o.addApp=(e,o)=>t(void 0,void 0,void 0,(function*(){var r,t;let{name:c,icon:u}=o;const f=o.apikey||(0,d.findSavedKey)(),g=yield(0,d.getConfig)();e=e||(null===(r=null==g?void 0:g.app)||void 0===r?void 0:r.appId),c=c||(null===(t=null==g?void 0:g.app)||void 0===t?void 0:t.appName)||"Unknown",u=u||"resources/icon.png",f||n.program.error("Missing API key, you need to provide a API key to add your app"),e&&c||n.program.error("Missing argument, you need to provide a appid and a name, or be in a capacitor project"),console.log(`Add ${e} to Capgo`);const v=(0,d.createSupabaseClient)(f);yield(0,d.checkKey)(v,f,["write","all"]);const{data:m,error:y}=yield v.rpc("get_user_id",{apikey:f}),h=m?m.toString():"";let _,b;h&&!y||n.program.error(`Cannot verify user ${(0,d.formatError)(y)}`),yield(0,d.checkPlan)(v,h),console.log("Adding..."),u&&(0,p.existsSync)(u)?(_=(0,i.readFileSync)(u),b=(0,s.getType)(u)||"image/png",console.warn(`Found app icon ${u}`)):(0,p.existsSync)(l)?(_=(0,i.readFileSync)(l),b=(0,s.getType)(l)||"image/png",console.warn(`Found app icon ${l}`)):console.warn(`Cannot find app icon in any of the following locations: ${u}, ${l}`);const{data:k,error:$}=yield v.rpc("exist_app",{appid:e,apikey:f});(k||$)&&n.program.error(`App already exists ${(0,d.formatError)($)}`);const w=`icon_${(0,a.randomUUID)()}`;let x="https://xvwzpoazmxkqosrdewyv.supabase.co/storage/v1/object/public/images/capgo.png";if(_&&b){const{error:o}=yield v.storage.from(`images/${h}/${e}`).upload(w,_,{contentType:b});o&&n.program.error(`Could not add app ${(0,d.formatError)(o)}`);const{data:r}=yield v.storage.from(`images/${h}/${e}`).getPublicUrl(w);x=(null==r?void 0:r.publicURL)||x}const{error:C}=yield v.from("apps").insert({icon_url:x,user_id:h,name:c,app_id:e},{returning:"minimal"});C&&n.program.error(`Could not add app ${(0,d.formatError)(C)}`),console.log("App added to server, you can upload a version now")}))},453:function(e,o,r){var t=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{s(t.next(e))}catch(e){a(e)}}function p(e){try{s(t.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}s((t=t.apply(e,o||[])).next())}))};Object.defineProperty(o,"__esModule",{value:!0}),o.deleteApp=void 0;const n=r(304),a=r(233);o.deleteApp=(e,o)=>t(void 0,void 0,void 0,(function*(){var r;const{version:t}=o,i=o.apikey||(0,a.findSavedKey)(),p=yield(0,a.getConfig)();e=e||(null===(r=null==p?void 0:p.app)||void 0===r?void 0:r.appId),i||n.program.error("Missing API key, you need to provide an API key to delete your app"),e||n.program.error("Missing argument, you need to provide a appid, or be in a capacitor project"),console.log(`Delete ${e} to Capgo`);const s=(0,a.createSupabaseClient)(i);yield(0,a.checkKey)(s,i,["all"]);const{data:d,error:l}=yield s.rpc("get_user_id",{apikey:i}),c=d?d.toString():"";c&&!l||n.program.error(`Cannot verify user ${(0,a.formatError)(l)}`);const{data:u,error:f}=yield s.rpc("exist_app",{appid:e,apikey:i});if(u&&!f||n.program.error("No permission to delete"),t){const{data:o,error:r}=yield s.from("app_versions").select().eq("app_id",e).eq("user_id",c).eq("name",t).eq("deleted",!1);o&&o.length&&!r||n.program.error(`Version ${e}@${t} don't exist ${(0,a.formatError)(r)}`);const{data:i,error:p}=yield s.from("channels").select().eq("app_id",e).eq("created_by",c).eq("version",o[0].id);(i&&i.length||p)&&n.program.error(`Version ${e}@${t} is used in a channel, unlink it first ${(0,a.formatError)(p)}`);const{data:d,error:l}=yield s.from("devices_override").select().eq("app_id",e).eq("version",o[0].id);(d&&d.length||l)&&n.program.error(`Version ${e} @${t} is used in a device override, unlink it first ${(0,a.formatError)(l)}`);const{error:u}=yield s.storage.from("apps").remove([`${c} /${e}/versions / ${o[0].bucket_id} `]);u&&n.program.error(`Something went wrong when trying to delete ${e} @${t} ${u} `);const{error:f}=yield s.from("app_versions").update({deleted:!0}).eq("app_id",e).eq("name",t).eq("user_id",c);return f&&n.program.error(`App ${e} @${t} not found in database ${f} `),void console.log("App version deleted from server")}const{data:g,error:v}=yield s.from("app_versions").select().eq("app_id",e).eq("user_id",c);if(v&&n.program.error(`App ${e} not found in database ${v} `),g&&g.length){const o=g.map((o=>`${c}/${e}/versions/${o.bucket_id} `)),{error:r}=yield s.storage.from("apps").remove(o);r&&n.program.error(`Cannot delete stored version for app ${e} from storage ${r} `)}const{error:m}=yield s.from("app_versions").delete().eq("app_id",e).eq("user_id",c);m&&n.program.error(`Cannot delete version for app ${e} from database ${m} `);const{error:y}=yield s.from("apps").delete().eq("app_id",e).eq("user_id",c);y&&n.program.error(`Cannot delete from database ${y} `),console.log("App deleted from server")}))},473:function(e,o,r){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0});const n=r(304),a=r(548),i=r(453),p=r(666),s=r(310),d=t(r(598)),l=r(937);n.program.version(d.default.version).command("add [appid]").alias("a").action(a.addApp).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account"),n.program.version(d.default.version).command("login [apikey]").alias("l").action(l.login).option("--local","Only save in local folder"),n.program.command("upload [appid]").alias("u").action(s.uploadVersion).option("-a, --apikey <apikey>","apikey to link to your account").option("-p, --path <path>","path of the file to upload").option("-c, --channel <channel>","channel to link to").option("-e, --external <url>","link to external url intead of upload to capgo cloud").option("-f, --format <base64|hex|binary|utf8>","choose the upload format default base64").option("-v, --version <version>","version number of the file to upload"),n.program.command("set [appid]").alias("s").action(p.setChannel).option("-c, --channel <channel>","channel to link to").option("-v, --version <version>","version number of the file to upload").option("-s, --state <state>","set the state of the channel, public or private").option("-a, --apikey <apikey>","apikey to link to your account"),n.program.description("Manage package and version in capgo Cloud").command("delete [appid]").alias("d").action(i.deleteApp).option("-a, --apikey <apikey>","apikey to link to your account").option("-v, --version <version>","version number of the app to delete"),n.program.parse(process.argv)},937:function(e,o,r){var t=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{s(t.next(e))}catch(e){a(e)}}function p(e){try{s(t.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}s((t=t.apply(e,o||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.login=void 0;const a=r(304),i=n(r(147)),p=n(r(37));o.login=(e,o)=>t(void 0,void 0,void 0,(function*(){const{local:r}=o;if(r)i.default.existsSync(".git")||a.program.error("To use local you should be in a git repository"),i.default.writeFileSync(".capgo",`${e}\n`),i.default.appendFileSync(".gitignore",".capgo\n");else{const o=p.default.homedir();i.default.writeFileSync(`${o}/.capgo`,`${e}\n`)}console.log(`login saved into .capgo file in ${r?"local":"home"} directory`)}))},666:function(e,o,r){var t=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{s(t.next(e))}catch(e){a(e)}}function p(e){try{s(t.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}s((t=t.apply(e,o||[])).next())}))};Object.defineProperty(o,"__esModule",{value:!0}),o.setChannel=void 0;const n=r(304),a=r(233);o.setChannel=(e,o)=>t(void 0,void 0,void 0,(function*(){var r,t,i;let{version:p}=o;const{state:s,channel:d="dev"}=o,l=o.apikey||(0,a.findSavedKey)(),c=yield(0,a.getConfig)();let u;e=e||(null===(r=null==c?void 0:c.app)||void 0===r?void 0:r.appId),p=p||(null===(i=null===(t=null==c?void 0:c.app)||void 0===t?void 0:t.package)||void 0===i?void 0:i.version),"public"!==s&&"private"!==s||(u="public"===s),l||n.program.error("Missing API key, you need to provide a API key to add your app"),e||n.program.error("Missing argument, you need to provide a appid, or be in a capacitor project"),p||u||n.program.error("Missing argument, you need to provide a state or a version"),p?console.log(`Set ${d} to @${p} in ${e}`):console.log(`Set${d} to @${s} in ${e}`);try{const o=(0,a.createSupabaseClient)(l);yield(0,a.checkKey)(o,l,["write","all"]);const{data:r,error:t}=yield o.rpc("get_user_id",{apikey:l}),i=r?r.toString():"";i&&!t||n.program.error(`Cannot verify user ${(0,a.formatError)(t)}`),yield(0,a.checkPlan)(o,i);const s={created_by:i,app_id:e,name:d};if(p){const{data:r,error:t}=yield o.from("app_versions").select().eq("app_id",e).eq("name",p).eq("user_id",i).eq("deleted",!1);!t&&r&&r.length||n.program.error(`Cannot find version ${p}`),s.version=r[0].id}void 0!==u&&(s.public=u);try{const{error:e}=yield(0,a.updateOrCreateChannel)(o,s,l);e&&n.program.error(`Cannot set channel ${(0,a.formatError)(e)}`)}catch(e){n.program.error(`Cannot set channel ${(0,a.formatError)(e)}`)}}catch(e){n.program.error(`Unknow error ${(0,a.formatError)(e)}`)}p?console.log("Done ✅"):console.log(`You can use now is channel in your app with the url: ${a.host}/api/latest?appid=${e}&channel=${d}`)}))},310:function(e,o,r){var t=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{s(t.next(e))}catch(e){a(e)}}function p(e){try{s(t.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}s((t=t.apply(e,o||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.uploadVersion=void 0;const a=n(r(844)),i=r(304),p=r(113),s=n(r(295)),d=n(r(912)),l=r(233);o.uploadVersion=(e,o)=>t(void 0,void 0,void 0,(function*(){var r,t,n,c;let{version:u,path:f,channel:g}=o;const{external:v}=o,m=o.apikey||(0,l.findSavedKey)();g=g||"dev";const y=yield(0,l.getConfig)();e=e||(null===(r=null==y?void 0:y.app)||void 0===r?void 0:r.appId),u=u||(null===(n=null===(t=null==y?void 0:y.app)||void 0===t?void 0:t.package)||void 0===n?void 0:n.version),d.default.valid(u)||i.program.error(`Your version name ${u}, is not valid it should follow semver convention : https://semver.org/`),f=f||(null===(c=null==y?void 0:y.app)||void 0===c?void 0:c.webDir),m||i.program.error("Missing API key, you need to provide a API key to add your app"),e&&u&&f||i.program.error("Missing argument, you need to provide a appid and a version and a path, or be in a capacitor project"),console.log(`Upload ${e}@${u} started from path "${f}" to Capgo cloud`);const h=(0,l.createSupabaseClient)(m);yield(0,l.checkKey)(h,m,["write","all"]);const _=new s.default.MultiBar({clearOnComplete:!1,hideCursor:!0},s.default.Presets.shades_grey),b=_.create(7,0,{format:"Uploading: [{bar}] {percentage}% | ETA: {eta}s | {value}/{total} Part"},s.default.Presets.shades_grey);b.start(7,0,{speed:"N/A"});const{data:k,error:$}=yield h.rpc("exist_app_versions",{apikey:m,name_version:u,appid:e});(k||$)&&(_.stop(),i.program.error(`This app version already exist or was deleted, you cannot re-upload it ${(0,l.formatError)($)}`)),b.increment();const{data:w,error:x}=yield h.rpc("get_user_id",{apikey:m}),C=w?w.toString():"";C&&!x||(_.stop(),i.program.error(`Cannot verify user ${(0,l.formatError)(x)}`)),yield(0,l.checkPlan)(h,C,!1);const{data:q,error:S}=yield h.rpc("is_trial",{userid:C}).single();(q&&q>0||S)&&_.log(`WARNING !!\nTrial expires in ${q} days, upgrade here: ${l.hostWeb}/app/usage\n`),b.increment();const{data:A,error:P}=yield h.rpc("exist_app",{appid:e,apikey:m});A&&!P||(_.stop(),i.program.error(`Cannot find app ${e} in your account \n${(0,l.formatError)(P)}`)),b.increment();const{data:I,error:M}=yield h.rpc("exist_app_versions",{appid:e,apikey:m,name_version:u});(I||M)&&i.program.error(`Version already exists ${(0,l.formatError)(M)}`),b.increment();const j=(0,p.randomUUID)();if(v)v&&!v.startsWith("https://")&&(_.stop(),i.program.error(`External link should should start with "https://" current is "${v}"`));else{const o=new a.default;o.addLocalFolder(f);const r=o.toBuffer(),t=Math.floor(r.byteLength/1024/1024),n=`apps/${C}/${e}/versions`;b.increment(),t>30&&(_.stop(),i.program.error(`The app is too big, the limit is 30 Mb, your is ${t} Mb`)),t>25&&_.log(`WARNING !!\nThe app size is ${t} Mb, the limit is 30 Mb\n`);const{error:p}=yield h.storage.from(n).upload(j,r,{contentType:"application/zip"});p&&(_.stop(),i.program.error(`Cannot upload ${(0,l.formatError)(p)}`))}b.increment();const{data:E,error:O}=yield(0,l.updateOrCreateVersion)(h,{bucket_id:v?void 0:j,user_id:C,name:u,app_id:e,external_url:v},m);if(O&&(_.stop(),i.program.error(`Cannot add version ${(0,l.formatError)(O)}`)),b.increment(),E&&E.length){const{error:o}=yield(0,l.updateOrCreateChannel)(h,{name:g,app_id:e,created_by:C,version:E[0].id},m);o&&_.log("Cannot set version with upload key, use key with more rights for that\n")}else _.log("Cannot set version with upload key, use key with more rights for that\n");_.stop();const T=e.replace(/\./g,"--");console.log("App uploaded to server"),console.log(`Try it in mobile app: ${l.host}/app_mobile`),console.log(`Or set the channel ${g} as public here: ${l.hostWeb}/app/package/${T}`),console.log("To use with live update in your own app"),console.log(`You can link specific device to this version to make user try it first, here: ${l.hostWeb}/app/p/${T}/devices`)}))},233:function(e,o,r){var t=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{s(t.next(e))}catch(e){a(e)}}function p(e){try{s(t.throw(e))}catch(e){a(e)}}function s(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}s((t=t.apply(e,o||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.updateOrCreateChannel=o.updateOrCreateVersion=o.getConfig=o.formatError=o.findSavedKey=o.checkPlan=o.isTrial=o.isGoodPlan=o.checkKey=o.createSupabaseClient=o.supaAnon=o.hostSupa=o.hostWeb=o.host=void 0;const a=r(778),i=r(304),p=r(885),s=n(r(867)),d=n(r(147)),l=n(r(37));o.host="https://capgo.app",o.hostWeb="https://web.capgo.app",o.hostSupa="https://xvwzpoazmxkqosrdewyv.supabase.co",o.supaAnon="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYzNzgwNTAwOSwiZXhwIjoxOTUzMzgxMDA5fQ.8tgID1d4jodPwuo_fz4KHN4o1XKB9fnqyt0_GaJSj-w",o.createSupabaseClient=e=>(0,p.createClient)(o.hostSupa,o.supaAnon,{headers:{capgkey:e}}),o.checkKey=(e,r,n)=>t(void 0,void 0,void 0,(function*(){const{data:t,error:a}=yield e.rpc("is_allowed_capgkey",{apikey:r,keymode:n});t&&!a||i.program.error(`Invalid API key or insufficient permissions ${(0,o.formatError)(a)}`)})),o.isGoodPlan=(e,o)=>t(void 0,void 0,void 0,(function*(){const{data:r,error:t}=yield e.rpc("is_good_plan",{userid:o}).single();if(t)throw t;return r||!1})),o.isTrial=(e,o)=>t(void 0,void 0,void 0,(function*(){const{data:r,error:t}=yield e.rpc("is_trial",{userid:o}).single();if(t)throw t;return r||0})),o.checkPlan=(e,r,n=!0)=>t(void 0,void 0,void 0,(function*(){let t=yield(0,o.isGoodPlan)(e,r);const a=yield(0,o.isTrial)(e,r);a>0&&(t=!0),t||i.program.error(`You need to upgrade your plan to continue to use capgo.\n Upgrade here: ${o.hostWeb}/app/usage\n`),a>0&&n&&console.log(`WARNING !!\nTrial expires in ${a} days, upgrade here: ${o.hostWeb}/app/usage\n`)})),o.findSavedKey=()=>{let e=`${l.default.homedir()}/.capgo`;return d.default.existsSync(e)?d.default.readFileSync(e,"utf8").trim():(e=".capgo",d.default.existsSync(e)?d.default.readFileSync(e,"utf8").trim():null)},o.formatError=e=>e?`\n${s.default.render(e)}`:"",o.getConfig=()=>t(void 0,void 0,void 0,(function*(){let e;try{e=yield(0,a.loadConfig)()}catch(e){i.program.error("No capacitor config file found, run `cap init` first")}return e})),o.updateOrCreateVersion=(e,o,r)=>t(void 0,void 0,void 0,(function*(){const{data:t,error:n}=yield e.rpc("exist_app_versions",{appid:o.app_id,name_version:o.name,apikey:r});return t&&!n?(o.deleted=!1,e.from("app_versions").update(o).eq("app_id",o.app_id).eq("name",o.name)):e.from("app_versions").insert(o)})),o.updateOrCreateChannel=(e,o,r)=>t(void 0,void 0,void 0,(function*(){if(!o.app_id||!o.name||!o.created_by)return console.error("missing app_id, name, or created_by"),Promise.reject(new Error("missing app_id, name, or created_by"));const{data:t,error:n}=yield e.rpc("exist_channel",{appid:o.app_id,name_channel:o.name,apikey:r});return t&&!n?e.from("channels").update(o,{returning:"minimal"}).eq("app_id",o.app_id).eq("name",o.name).eq("created_by",o.created_by):e.from("channels").insert(o,{returning:"minimal"})}))},778:e=>{e.exports=require("@capacitor/cli/dist/config")},885:e=>{e.exports=require("@supabase/supabase-js")},844:e=>{e.exports=require("adm-zip")},295:e=>{e.exports=require("cli-progress")},304:e=>{e.exports=require("commander")},470:e=>{e.exports=require("fs-extra")},11:e=>{e.exports=require("mime")},867:e=>{e.exports=require("prettyjson")},912:e=>{e.exports=require("semver")},113:e=>{e.exports=require("crypto")},147:e=>{e.exports=require("fs")},37:e=>{e.exports=require("os")},598:e=>{e.exports=JSON.parse('{"name":"@capgo/cli","version":"0.13.10","description":"A CLI to upload to capgo servers","main":"dist/index.js","bin":{"capgo":"dist/index.js"},"repository":{"type":"git","url":"git+https://github.com/Cap-go/capgo-cli.git"},"bugs":{"url":"https://github.com/Cap-go/capgo-cli/issues"},"keywords":["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli"],"scripts":{"dev":"set NODE_ENV=development && npx webpack --config webpack.config.js","no-debug":"node dist/index.js","build":"npx webpack --config webpack.config.js","dev-build":"SUPA_DB=development npx webpack --config webpack.config.js","pack":"pkg","test_rls":"ts-node ./test/test_headers_rls.ts","lint":"eslint . --ext .ts --fix"},"author":"github.com/riderx","license":"Apache 2.0","dependencies":{"@capacitor/cli":"3.5.1","@supabase/supabase-js":"^1.35.3","adm-zip":"^0.5.9","cli-progress":"3.11.0","commander":"9.2.0","form-data":"^4.0.0","fs-extra":"10.1.0","mime":"^3.0.0","node-stream-zip":"^1.15.0","prettyjson":"^1.2.5","semver":"^7.3.7","upath":"^2.0.1"},"devDependencies":{"@types/adm-zip":"0.5.0","@types/cli-progress":"^3.11.0","@types/fs-extra":"^9.0.13","@types/mime":"^2.0.3","@types/node":"^17.0.31","@types/prettyjson":"^0.0.30","@types/semver":"^7.3.10","@typescript-eslint/eslint-plugin":"5.22.0","@typescript-eslint/parser":"5.22.0","eslint":"8.14.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^8.5.0","eslint-import-resolver-typescript":"2.7.1","eslint-plugin-import":"2.26.0","eslint-plugin-prettier":"^4.0.0","git-format-staged":"3.0.0","husky":"^7.0.4","nodemon":"2.0.16","pkg":"5.6.0","prettier":"2.6.2","ts-loader":"^9.3.0","ts-node":"^10.7.0","tsconfig-paths":"4.0.0","typescript":"4.6.4","webpack":"5.72.0","webpack-cli":"^4.9.2","webpack-node-externals":"^3.0.0"}}')}},o={};!function r(t){var n=o[t];if(void 0!==n)return n.exports;var a=o[t]={exports:{}};return e[t].call(a.exports,a,a.exports,r),a.exports}(473)})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
- "version": "0.13.9",
3
+ "version": "0.13.10",
4
4
  "description": "A CLI to upload to capgo servers",
5
5
  "main": "dist/index.js",
6
6
  "bin": {