trigger.dev 1.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Trigger.dev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # Trigger.dev CLI
2
+
3
+ A CLI that allows you to create, run locally and deploy Trigger.dev background tasks.
4
+
5
+ Note: this only works with Trigger.dev v3 projects and later. For older projects use the [@trigger.dev/cli](https://www.npmjs.com/package/@trigger.dev/cli) package.
6
+
7
+ Trigger.dev is an open source platform that makes it easy to create event-driven background tasks directly in your existing project.
8
+
9
+ ## Usage
10
+
11
+ ### Login
12
+
13
+ Logs that machine into Trigger.dev by creating a new Personal Access Token and storing it on the local machine. Once you're logged in you can perform the other actions below.
14
+
15
+ ```sh
16
+ npx trigger.dev@latest login
17
+ ```
18
+
19
+ | Option | Short option | Description |
20
+ | ----------- | ------------ | -------------------------------------------------------------------- |
21
+ | `--api-url` | `-a` | Set the API URL for Trigger.dev, defaults to https://api.trigger.dev |
22
+
23
+ ### Update
24
+
25
+ Will update all of your @trigger.dev packages in your package.json to the latest version.
26
+
27
+ ```sh
28
+ npx trigger.dev@latest update
29
+ ```
30
+
31
+ You can pass the path to the folder that your package.json file lives in:
32
+
33
+ ```sh
34
+ npx trigger.dev@latest update ./myapp
35
+ ```
36
+
37
+ | Option | Short option | Description |
38
+ | ------ | ------------ | ---------------------------------------------------------- |
39
+ | `--to` | `-t` | The version to update to (ex: 2.1.4), defaults to "latest" |
40
+
41
+ ### Who Am I?
42
+
43
+ Shows the current user that is logged in.
44
+
45
+ ```sh
46
+ npx trigger.dev@latest whoami
47
+ ```
48
+
49
+ | Option | Short option | Description |
50
+ | ----------- | ------------ | -------------------------------------------------------------------- |
51
+ | `--api-url` | `-a` | Set the API URL for Trigger.dev, defaults to https://api.trigger.dev |
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'module';const require = createRequire(import.meta.url);
3
+ var It=Object.create;var K=Object.defineProperty;var Rt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var Ut=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty;var n=(e,t)=>K(e,"name",{value:t,configurable:!0}),O=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var P=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$t=(e,t)=>{for(var r in t)K(e,r,{get:t[r],enumerable:!0})},se=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Nt(t))!Gt.call(e,i)&&i!==r&&K(e,i,{get:()=>t[i],enumerable:!(o=Rt(t,i))||o.enumerable});return e},Y=(e,t,r)=>(se(e,t,"default"),r&&se(r,t,"default")),ce=(e,t,r)=>(r=e!=null?It(Ut(e)):{},se(t||!e||!e.__esModule?K(r,"default",{value:e,enumerable:!0}):r,e));var Ve=P(te=>{"use strict";te.__esModule=!0;te.Adapt=void 0;function yr(e){return le(e)==="boolean"}n(yr,"isBoolean");function wr(e){return le(e)==="object"}n(wr,"isObject");function _r(e){return le(e)==="string"}n(_r,"isString");function le(e){return typeof e}n(le,"typeOf");function xr(e){var t=e.meta,r=e.path,o=e.xdg,i=function(){function c(a){a===void 0&&(a={});var s,u,f;function l(m){return m===void 0&&(m={}),new c(m)}n(l,"XDGAppPaths");var _=wr(a)?a:{name:a},d=(s=_.suffix)!==null&&s!==void 0?s:"",p=(u=_.isolated)!==null&&u!==void 0?u:!0,g=[_.name,t.pkgMainFilename(),t.mainFilename()],x="$eval",w=r.parse(((f=g.find(function(m){return _r(m)}))!==null&&f!==void 0?f:x)+d).name;l.$name=n(function(){return w},"$name"),l.$isolated=n(function(){return p},"$isolated");function V(m){var h;m=m??{isolated:p};var v=yr(m)?m:(h=m.isolated)!==null&&h!==void 0?h:p;return v}n(V,"isIsolated");function A(m){return V(m)?w:""}return n(A,"finalPathSegment"),l.cache=n(function(h){return r.join(o.cache(),A(h))},"cache"),l.config=n(function(h){return r.join(o.config(),A(h))},"config"),l.data=n(function(h){return r.join(o.data(),A(h))},"data"),l.runtime=n(function(h){return o.runtime()?r.join(o.runtime(),A(h)):void 0},"runtime"),l.state=n(function(h){return r.join(o.state(),A(h))},"state"),l.configDirs=n(function(h){return o.configDirs().map(function(v){return r.join(v,A(h))})},"configDirs"),l.dataDirs=n(function(h){return o.dataDirs().map(function(v){return r.join(v,A(h))})},"dataDirs"),l}return n(c,"XDGAppPaths_"),c}();return{XDGAppPaths:new i}}n(xr,"Adapt");te.Adapt=xr});var Ye=P(N=>{"use strict";var Ke=N&&N.__spreadArray||function(e,t){for(var r=0,o=t.length,i=e.length;r<o;r++,i++)e[i]=t[r];return e};N.__esModule=!0;N.Adapt=void 0;function Ar(e){var t=e.env,r=e.osPaths,o=e.path,i=/^darwin$/i.test(e.process.platform),c=/^win/i.test(e.process.platform);function a(){return r.home()||r.temp()}n(a,"baseDir");function s(d,p){return d||o.join.apply(o,p)}n(s,"valOrPath");var u=n(function(){var d=n(function(){return s(t.get("XDG_CACHE_HOME"),[a(),".cache"])},"cache"),p=n(function(){return s(t.get("XDG_CONFIG_HOME"),[a(),".config"])},"config"),g=n(function(){return s(t.get("XDG_DATA_HOME"),[a(),".local","share"])},"data"),x=n(function(){return t.get("XDG_RUNTIME_DIR")||void 0},"runtime"),w=n(function(){return s(t.get("XDG_STATE_HOME"),[a(),".local","state"])},"state");return{cache:d,config:p,data:g,runtime:x,state:w}},"linux"),f=n(function(){var d=n(function(){return s(t.get("XDG_CACHE_HOME"),[a(),"Library","Caches"])},"cache"),p=n(function(){return s(t.get("XDG_CONFIG_HOME"),[a(),"Library","Preferences"])},"config"),g=n(function(){return s(t.get("XDG_DATA_HOME"),[a(),"Library","Application Support"])},"data"),x=n(function(){return t.get("XDG_RUNTIME_DIR")||void 0},"runtime"),w=n(function(){return s(t.get("XDG_STATE_HOME"),[a(),"Library","State"])},"state");return{cache:d,config:p,data:g,runtime:x,state:w}},"macos"),l=n(function(){function d(){return s(t.get("APPDATA"),[a(),"AppData","Roaming"])}n(d,"appData");function p(){return s(t.get("LOCALAPPDATA"),[a(),"AppData","Local"])}n(p,"localAppData");var g=n(function(){return s(t.get("XDG_CACHE_HOME"),[p(),"xdg.cache"])},"cache"),x=n(function(){return s(t.get("XDG_CONFIG_HOME"),[d(),"xdg.config"])},"config"),w=n(function(){return s(t.get("XDG_DATA_HOME"),[d(),"xdg.data"])},"data"),V=n(function(){return t.get("XDG_RUNTIME_DIR")||void 0},"runtime"),A=n(function(){return s(t.get("XDG_STATE_HOME"),[p(),"xdg.state"])},"state");return{cache:g,config:x,data:w,runtime:V,state:A}},"windows"),_=function(){function d(){function p(){return new d}n(p,"XDG");var g=i?f():c?l():u();return p.cache=g.cache,p.config=g.config,p.data=g.data,p.runtime=g.runtime,p.state=g.state,p.configDirs=n(function(){var w=t.get("XDG_CONFIG_DIRS");return Ke([g.config()],w?w.split(o.delimiter):[])},"configDirs"),p.dataDirs=n(function(){var w=t.get("XDG_DATA_DIRS");return Ke([g.data()],w?w.split(o.delimiter):[])},"dataDirs"),p}return n(d,"XDG_"),d}();return{XDG:new _}}n(Ar,"Adapt");N.Adapt=Ar});var Ze=P(U=>{"use strict";var Pr=U&&U.__spreadArray||function(e,t){for(var r=0,o=t.length,i=e.length;r<o;r++,i++)e[i]=t[r];return e};U.__esModule=!0;U.Adapt=void 0;function me(e){return!e}n(me,"isEmpty");function Tr(e){var t=e.env,r=e.os,o=e.path,i=/^win/i.test(e.process.platform);function c(f){return f?e.path.normalize(e.path.join(f,".")):void 0}n(c,"normalizePath");function a(){var f=n(function(){return c((typeof r.homedir=="function"?r.homedir():void 0)||t.get("HOME"))},"posix"),l=n(function(){var _=[typeof r.homedir=="function"?r.homedir():void 0,t.get("USERPROFILE"),t.get("HOME"),t.get("HOMEDRIVE")||t.get("HOMEPATH")?o.join(t.get("HOMEDRIVE")||"",t.get("HOMEPATH")||""):void 0];return c(_.find(function(d){return!me(d)}))},"windows");return i?l():f()}n(a,"home");function s(){function f(d,p){return d?o.join.apply(o,Pr([d],p)):void 0}n(f,"joinPathToBase");function l(){var d="/tmp",p=[typeof r.tmpdir=="function"?r.tmpdir():void 0,t.get("TMPDIR"),t.get("TEMP"),t.get("TMP")];return c(p.find(function(g){return!me(g)}))||d}n(l,"posix");function _(){var d="C:\\Temp",p=[typeof r.tmpdir=="function"?r.tmpdir:function(){},function(){return t.get("TEMP")},function(){return t.get("TMP")},function(){return f(t.get("LOCALAPPDATA"),["Temp"])},function(){return f(a(),["AppData","Local","Temp"])},function(){return f(t.get("ALLUSERSPROFILE"),["Temp"])},function(){return f(t.get("SystemRoot"),["Temp"])},function(){return f(t.get("windir"),["Temp"])},function(){return f(t.get("SystemDrive"),["\\","Temp"])}],g=p.find(function(x){return x&&!me(x())});return g&&c(g())||d}return n(_,"windows"),i?_():l()}n(s,"temp");var u=function(){function f(){function l(){return new f}return n(l,"OSPaths"),l.home=a,l.temp=s,l}return n(f,"OSPaths_"),f}();return{OSPaths:new u}}n(Tr,"Adapt");U.Adapt=Tr});var et=P(E=>{"use strict";var Sr=E&&E.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),br=E&&E.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Qe=E&&E.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Sr(t,e,r);return br(t,e),t};E.__esModule=!0;E.adapter=void 0;var Er=Qe(O("os")),Or=Qe(O("path"));E.adapter={atImportPermissions:{env:!0},env:{get:function(e){return process.env[e]}},os:Er,path:Or,process}});var rt=P((ii,tt)=>{"use strict";var kr=Ze(),Dr=et();tt.exports=kr.Adapt(Dr.adapter).OSPaths});var nt=P(T=>{"use strict";var Cr=T&&T.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),Mr=T&&T.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Fr=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Cr(t,e,r);return Mr(t,e),t},jr=T&&T.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};T.__esModule=!0;T.adapter=void 0;var Lr=Fr(O("path")),Ir=jr(rt());T.adapter={atImportPermissions:{env:!0},env:{get:function(e){return process.env[e]}},osPaths:Ir.default,path:Lr,process}});var it=P((si,ot)=>{"use strict";var Rr=Ye(),Nr=nt();ot.exports=Rr.Adapt(Nr.adapter).XDG});var at=P(S=>{"use strict";var Ur=S&&S.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),Gr=S&&S.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$r=S&&S.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Ur(t,e,r);return Gr(t,e),t},Hr=S&&S.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};S.__esModule=!0;S.adapter=void 0;var Br=$r(O("path")),Xr=Hr(it());S.adapter={atImportPermissions:{env:!0,read:!0},meta:{mainFilename:function(){var e=typeof O<"u"&&O!==null&&O.main?O.main:{filename:void 0},t=e.filename,r=(t!==process.execArgv[0]?t:void 0)||(typeof process._eval>"u"?process.argv[1]:void 0);return r},pkgMainFilename:function(){return process.pkg?process.execPath:void 0}},path:Br,process,xdg:Xr.default}});var de=P((fi,st)=>{"use strict";var zr=Ve(),Jr=at();st.exports=zr.Adapt(Jr.adapter).XDGAppPaths});var Tt=P((wa,Pt)=>{function b(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}n(b,"RetryOperation");Pt.exports=b;b.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};b.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};b.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1);else return!1;var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},r),this._options.unref&&this._timer.unref(),!0};b.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};b.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};b.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};b.prototype.start=b.prototype.try;b.prototype.errors=function(){return this._errors};b.prototype.attempts=function(){return this._attempts};b.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,r=0,o=0;o<this._errors.length;o++){var i=this._errors[o],c=i.message,a=(e[c]||0)+1;e[c]=a,a>=r&&(t=i,r=a)}return t}});var St=P(C=>{var bn=Tt();C.operation=function(e){var t=C.timeouts(e);return new bn(t,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};C.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],i=0;i<t.retries;i++)o.push(this.createTimeout(i,t));return e&&e.forever&&!o.length&&o.push(this.createTimeout(i,t)),o.sort(function(c,a){return c-a}),o};C.createTimeout=function(e,t){var r=t.randomize?Math.random()+1:1,o=Math.round(r*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return o=Math.min(o,t.maxTimeout),o};C.wrap=function(e,t,r){if(t instanceof Array&&(r=t,t=null),!r){r=[];for(var o in e)typeof e[o]=="function"&&r.push(o)}for(var i=0;i<r.length;i++){var c=r[i],a=e[c];e[c]=n(function(u){var f=C.operation(t),l=Array.prototype.slice.call(arguments,1),_=l.pop();l.push(function(d){f.retry(d)||(d&&(arguments[0]=f.mainError()),_.apply(this,arguments))}),f.attempt(function(){u.apply(e,l)})},"retryWrapper").bind(e,a),e[c].options=t}}});var Et=P((Pa,bt)=>{bt.exports=St()});import{Command as zn}from"commander";import tr from"child_process";import rr from"util";import{z as X}from"zod";import{PostHog as Kt}from"posthog-node";import{nanoid as Yt}from"nanoid";import Vt from"path";import je from"path";import{fileURLToPath as Ht}from"url";var Bt=Ht(import.meta.url),Xt=je.dirname(Bt),Le=je.join(Xt,"../"),Ie="trigger.dev";import zt from"fs";import Jt,{writeFile as Wt}from"fs/promises";import qt from"node:fs";function Re(e){try{return qt.statSync(e).isDirectory()}catch{return!1}}n(Re,"isDirectory");async function Z(e){try{return await Jt.access(e),!0}catch{return!1}}n(Z,"pathExists");async function Ne(e,t){await Wt(e,JSON.stringify(t,null,2))}n(Ne,"writeJSONFile");function L(e){let t=zt.readFileSync(e,"utf8");return JSON.parse(t)}n(L,"readJSONFileSync");function k(){let e=Vt.join(Le,"package.json");return L(e).version??"1.0.0"}n(k,"getVersion");var Zt="phc_9aSDbJCaDUMdZdHxxMPTvcj7A9fsl3mCgM1RBPmPsl7",Q=class{#e;#t;#r;constructor(){this.#e=new Kt(Zt,{host:"https://eu.posthog.com",flushAt:1}),this.#t=`cli-${Yt()}`,this.#r=k()}identify(t,r,o){o&&this.#e.alias({distinctId:o,alias:this.#t}),this.#e.groupIdentify({groupType:"organization",groupKey:t}),this.#e.groupIdentify({groupType:"project",groupKey:r})}dev={started:(t,r)=>{this.#e.capture({distinctId:this.#t,event:"cli_dev_started",properties:{...r,path:t}})}}};n(Q,"TelemetryClient");var Ue=new Q;import I from"chalk";import Qt from"cli-table3";var y={log(...e){console.log(...e)},error(...e){console.log(I.red(...e))},warn(...e){console.log(I.yellow(...e))},info(...e){console.log(I.cyan(...e))},success(...e){console.log(I.green(...e))},table(e){if(e.length===0)return console.log("No data");let t=e.length===0?[]:Object.keys(e[0]),r=new Qt({head:t,style:{head:I.level?["blue"]:[],border:I.level?["gray"]:[]}});return r.push(...e.map(o=>t.map(i=>o[i]))),this.log(r.toString())}};import er from"path";var Ge=n(e=>er.resolve(process.cwd(),e),"resolvePath");var So=rr.promisify(tr.execFile),nr=X.object({port:X.coerce.number().optional(),hostname:X.string().optional(),envFile:X.string().optional(),clientId:X.string().optional()}),bo=new Intl.DateTimeFormat("en",{hour:"numeric",minute:"numeric",second:"numeric"});async function $e(e,t){Ue.dev.started(e,t);let r=nr.safeParse(t);if(!r.success){y.error(r.error.message);return}let o=r.data,i=Ge(e)}n($e,"devCommand");import{spinner as pr,confirm as lr}from"@clack/prompts";import mr from"path";import{run as dr}from"npm-check-updates";import{spinner as fe}from"@clack/prompts";import or from"path";async function He(e){try{return await ar(e)}catch{return ir()}}n(He,"getUserPackageManager");function ir(){let e=process.env.npm_config_user_agent;return e?e.startsWith("yarn")?"yarn":e.startsWith("pnpm")?"pnpm":"npm":"npm"}n(ir,"detectPackageManagerFromCurrentCommand");async function ar(e){let t=[{name:"yarn.lock",pm:"yarn"},{name:"pnpm-lock.yaml",pm:"pnpm"},{name:"package-lock.json",pm:"npm"},{name:"npm-shrinkwrap.json",pm:"npm"}];for(let{name:r,pm:o}of t)if(await Z(or.join(e,r)))return o;throw new Error("Could not detect package manager from artifacts")}n(ar,"detectPackageManagerFromArtifacts");import sr from"chalk";import{execa as ue}from"execa";async function Be(e){y.info("Installing dependencies...");let t=await He(e);(await cr(t,e)||fe()).stop(sr.green(`Successfully installed dependencies!
4
+ `))}n(Be,"installDependencies");async function cr(e,t){switch(e){case"npm":return await ue(e,["install"],{cwd:t,stderr:"inherit"}),null;case"pnpm":{let r=fe();r.start("Running pnpm install...");let o=ue(e,["install"],{cwd:t,stdout:"pipe"});return await new Promise((i,c)=>{o.stdout?.on("data",a=>{let s=a.toString();s.includes("Progress")&&r.message(s.includes("|")?s.split(" | ")[1]??"":s)}),o.on("error",a=>c(a)),o.on("close",()=>i())}),r}case"yarn":{let r=fe();r.start("Running yarn...");let o=ue(e,[],{cwd:t,stdout:"pipe"});return await new Promise((i,c)=>{o.stdout?.on("data",a=>{r.message(a.toString())}),o.on("error",a=>c(a)),o.on("close",()=>i())}),r}}}n(cr,"runInstallCommand");import{z as We}from"zod";import R from"chalk";var ur="#4FFF54",fr="#735BF3";function Xe(e){return R.hex("#666")(e)}n(Xe,"chalkGrey");function ee(e){return R.red(e)}n(ee,"chalkError");function pe(e){return R.green(e)}n(pe,"chalkSuccess");function ze(e){return R.underline.blue(e)}n(ze,"chalkLink");function Je(){return`${R.hex(ur).bold("Trigger")}${R.hex(fr).bold(".dev")}`}n(Je,"logo");var gr=We.object({to:We.string().optional()});async function qe(e,t){let r=pr();r.start("Checking settings");let o=gr.safeParse(t);if(!o.success){r.stop(ee(o.error.message));return}let i=o.data,c="@trigger.dev",a=mr.join(e,"package.json"),s=L(a);if(!s){r.stop(ee("Couldn't load package.json"));return}r.message("Checking for updates");let u={},f=s.dependencies||{},l=s.devDependencies||{};Object.keys(f).forEach(v=>{u[v]={type:"dependencies",version:f[v]}}),Object.keys(l).forEach(v=>{u[v]={type:"devDependencies",version:l[v]}});let _=hr(i.to),p=await dr({packageData:s,upgrade:!0,jsonUpgraded:!0,target:_});if(!p){r.stop(ee("Couldn't update dependencies"));return}let g=p.hasOwnProperty("dependencies")||p.hasOwnProperty("devDependencies"),x=p.dependencies||{},w=p.devDependencies||{},A=Object.keys(g?{...x,...w}:p).filter(v=>v.startsWith(c));if(A.length===0){r.stop(pe("All @trigger.dev/* packages are already up to date."));return}let m=A.filter(v=>p[v]);if(m.length===0){r.stop(pe("All @trigger.dev/* packages are already up to date."));return}let h=_!=="latest";if(_==="latest"&&(h=await vr(m,u,p)),h){let v=s;m.forEach(ae=>{let Fe=u[ae];Fe&&(v[Fe.type][ae]=p[ae])}),await Ne(a,v),await Be(e)}}n(qe,"updateCommand");function hr(e){return e?e==="latest"?"latest":`@${e}`:"latest"}n(hr,"getTargetVersion");async function vr(e,t,r){return console.log(`
5
+ Newer versions found for the following packages:`),console.table(e.map(i=>({name:i,old:t[i]?.version,new:r[i]}))),await lr({message:"Do you want to update these packages in package.json and re-install dependencies?"})}n(vr,"hasUserConfirmed");import{note as In,spinner as Rn}from"@clack/prompts";import{mkdirSync as Wr,writeFileSync as qr}from"node:fs";import Vr from"node:os";import re from"node:path";var G={};$t(G,{default:()=>ge});var ct=ce(de(),1);Y(G,ce(de(),1));var ge=ct.default;import{z as ut}from"zod";function Kr(){let e=ge(".trigger").config(),t=re.join(Vr.homedir(),".trigger");return Re(t)?t:e}n(Kr,"getGlobalConfigFolderPath");var Yr=ut.object({accessToken:ut.string().optional()});function ft(){return re.join(Kr(),"config","default.json")}n(ft,"getAuthConfigFilePath");function pt(e){let t=ft();Wr(re.dirname(t),{recursive:!0}),qr(re.join(t),JSON.stringify(e),{encoding:"utf-8"})}n(pt,"writeAuthConfigFile");function z(){let e=ft();if(!Z(e))return;let t=L(e);return Yr.parse(t)}n(z,"readAuthConfigFile");import{intro as Fn,log as Dt,outro as Ct,select as jn,spinner as Mt}from"@clack/prompts";import ne from"node:process";import{Buffer as xn}from"node:buffer";import _t from"node:path";import{fileURLToPath as An}from"node:url";import Pn from"node:child_process";import Te,{constants as xt}from"node:fs/promises";import dt from"node:process";import rn from"node:os";import nn from"node:fs";import en from"node:fs";import lt from"node:fs";var he;function Zr(){try{return lt.statSync("/.dockerenv"),!0}catch{return!1}}n(Zr,"hasDockerEnv");function Qr(){try{return lt.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}n(Qr,"hasDockerCGroup");function ve(){return he===void 0&&(he=Zr()||Qr()),he}n(ve,"isDocker");var ye,tn=n(()=>{try{return en.statSync("/run/.containerenv"),!0}catch{return!1}},"hasContainerEnv");function $(){return ye===void 0&&(ye=tn()||ve()),ye}n($,"isInsideContainer");var mt=n(()=>{if(dt.platform!=="linux")return!1;if(rn.release().toLowerCase().includes("microsoft"))return!$();try{return nn.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!$():!1}catch{return!1}},"isWsl"),J=dt.env.__IS_WSL_TEST__?mt:mt();function D(e,t,r){let o=n(i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),"define");return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let i=r();return o(i),i},set(i){o(i)}}),e}n(D,"defineLazyProperty");import{promisify as vn}from"node:util";import Ae from"node:process";import{execFile as yn}from"node:child_process";import{promisify as on}from"node:util";import an from"node:process";import{execFile as sn}from"node:child_process";var cn=on(sn);async function we(){if(an.platform!=="darwin")throw new Error("macOS only");let{stdout:e}=await cn("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]);return/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??"com.apple.Safari"}n(we,"defaultBrowserId");import un from"node:process";import{promisify as fn}from"node:util";import{execFile as pn,execFileSync as Bi}from"node:child_process";var ln=fn(pn);async function gt(e,{humanReadableOutput:t=!0}={}){if(un.platform!=="darwin")throw new Error("macOS only");let r=t?[]:["-ss"],{stdout:o}=await ln("osascript",["-e",e,r]);return o.trim()}n(gt,"runAppleScript");async function _e(e){return gt(`tell application "Finder" to set app_path to application file id "${e}" as string
6
+ tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}n(_e,"bundleName");import{promisify as mn}from"node:util";import{execFile as dn}from"node:child_process";var gn=mn(dn),hn={AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},MSEdgeDHTML:{name:"Edge",id:"com.microsoft.edge"},MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"}},W=class extends Error{};n(W,"UnknownBrowserError");async function xe(e=gn){let{stdout:t}=await e("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),r=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(t);if(!r)throw new W(`Cannot find Windows browser in stdout: ${JSON.stringify(t)}`);let{id:o}=r.groups,i=hn[o];if(!i)throw new W(`Unknown browser ID: ${o}`);return i}n(xe,"defaultBrowser");var wn=vn(yn),_n=n(e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,t=>t.toUpperCase()),"titleize");async function Pe(){if(Ae.platform==="darwin"){let e=await we();return{name:await _e(e),id:e}}if(Ae.platform==="linux"){let{stdout:e}=await wn("xdg-mime",["query","default","x-scheme-handler/http"]),t=e.trim();return{name:_n(t.replace(/.desktop$/,"").replace("-"," ")),id:t}}if(Ae.platform==="win32")return xe();throw new Error("Only macOS, Linux, and Windows are supported")}n(Pe,"defaultBrowser");var Se=_t.dirname(An(import.meta.url)),ht=_t.join(Se,"xdg-open"),{platform:H,arch:vt}=ne,Tn=(()=>{let e="/mnt/",t;return async function(){if(t)return t;let r="/etc/wsl.conf",o=!1;try{await Te.access(r,xt.F_OK),o=!0}catch{}if(!o)return e;let i=await Te.readFile(r,{encoding:"utf8"}),c=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return c?(t=c.groups.mountPoint.trim(),t=t.endsWith("/")?t:`${t}/`,t):e}})(),yt=n(async(e,t)=>{let r;for(let o of e)try{return await t(o)}catch(i){r=i}throw r},"pTryEach"),oe=n(async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return yt(e.app,s=>oe({...e,app:s}));let{name:t,arguments:r=[]}=e.app??{};if(r=[...r],Array.isArray(t))return yt(t,s=>oe({...e,app:{name:s,arguments:r}}));if(t==="browser"||t==="browserPrivate"){let s={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","microsoft-edge.desktop":"edge"},u={chrome:"--incognito",firefox:"--private-window",edge:"--inPrivate"},f=await Pe();if(f.id in s){let l=s[f.id];return t==="browserPrivate"&&r.push(u[l]),oe({...e,app:{name:B[l],arguments:r}})}throw new Error(`${f.name} is not supported as a default browser`)}let o,i=[],c={};if(H==="darwin")o="open",e.wait&&i.push("--wait-apps"),e.background&&i.push("--background"),e.newInstance&&i.push("--new"),t&&i.push("-a",t);else if(H==="win32"||J&&!$()&&!t){let s=await Tn();o=J?`${s}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${ne.env.SYSTEMROOT||ne.env.windir||"C:\\Windows"}\\System32\\WindowsPowerShell\\v1.0\\powershell`,i.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),J||(c.windowsVerbatimArguments=!0);let u=["Start"];e.wait&&u.push("-Wait"),t?(u.push(`"\`"${t}\`""`),e.target&&r.push(e.target)):e.target&&u.push(`"${e.target}"`),r.length>0&&(r=r.map(f=>`"\`"${f}\`""`),u.push("-ArgumentList",r.join(","))),e.target=xn.from(u.join(" "),"utf16le").toString("base64")}else{if(t)o=t;else{let s=!Se||Se==="/",u=!1;try{await Te.access(ht,xt.X_OK),u=!0}catch{}o=ne.versions.electron??(H==="android"||s||!u)?"xdg-open":ht}r.length>0&&i.push(...r),e.wait||(c.stdio="ignore",c.detached=!0)}H==="darwin"&&r.length>0&&i.push("--args",...r),e.target&&i.push(e.target);let a=Pn.spawn(o,i,c);return e.wait?new Promise((s,u)=>{a.once("error",u),a.once("close",f=>{if(!e.allowNonzeroExitCode&&f>0){u(new Error(`Exited with code ${f}`));return}s(a)})}):(a.unref(),a)},"baseOpen"),Sn=n((e,t)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return oe({...t,target:e})},"open");function wt(e){if(typeof e=="string"||Array.isArray(e))return e;let{[vt]:t}=e;if(!t)throw new Error(`${vt} is not supported`);return t}n(wt,"detectArchBinary");function be({[H]:e},{wsl:t}){if(t&&J)return wt(t);if(!e)throw new Error(`${H} is not supported`);return wt(e)}n(be,"detectPlatformBinary");var B={};D(B,"chrome",()=>be({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));D(B,"firefox",()=>be({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));D(B,"edge",()=>be({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));D(B,"browser",()=>"browser");D(B,"browserPrivate",()=>"browserPrivate");var At=Sn;var kt=ce(Et(),1);var En=Object.prototype.toString,On=n(e=>En.call(e)==="[object Error]","isError"),kn=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed"]);function Ee(e){return e&&On(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:kn.has(e.message):!1}n(Ee,"isNetworkError");var M=class extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}};n(M,"AbortError");var Ot=n((e,t,r)=>{let o=r.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=o,e},"decorateErrorWithCounts");async function Oe(e,t){return new Promise((r,o)=>{t={onFailedAttempt(){},retries:10,...t};let i=kt.default.operation(t),c=n(()=>{i.stop(),o(t.signal?.reason)},"abortHandler");t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",c,{once:!0});let a=n(()=>{t.signal?.removeEventListener("abort",c),i.stop()},"cleanUp");i.attempt(async s=>{try{let u=await e(s);a(),r(u)}catch(u){try{if(!(u instanceof Error))throw new TypeError(`Non-error was thrown: "${u}". You should only throw errors.`);if(u instanceof M)throw u.originalError;if(u instanceof TypeError&&!Ee(u))throw u;if(await t.onFailedAttempt(Ot(u,s,t)),!i.retry(u))throw i.mainError()}catch(f){Ot(f,s,t),a(),o(f)}}})})}n(Oe,"pRetry");import{CreateAuthorizationCodeResponseSchema as Dn,GetPersonalAccessTokenResponseSchema as Cn,WhoAmIResponseSchema as Mn}from"@trigger.dev/core";var F=class{constructor(t){this.apiURL=t,this.apiURL=t}async createAuthorizationCode(){return ke(Dn,`${this.apiURL}/api/v1/authorization-code`,{method:"POST"})}async getPersonalAccessToken(t){return ke(Cn,`${this.apiURL}/api/v1/token`,{method:"POST",body:JSON.stringify({authorizationCode:t})})}async whoAmI({accessToken:t}){return ke(Mn,`${this.apiURL}/api/v2/whoami`,{headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}})}};n(F,"ApiClient");async function ke(e,t,r){try{let o=await fetch(t,r);if((!r||r.method==="GET")&&o.status===404)return{success:!1,error:`404: ${o.statusText}`};if(o.status>=400&&o.status<500){let a=await o.json();return a.error?{success:!1,error:a.error}:{success:!1,error:"Something went wrong"}}if(o.status!==200)return{success:!1,error:`Failed to fetch ${t}, got status code ${o.status}`};let i=await o.json(),c=e.safeParse(i);return c.success?{success:!0,data:c.data}:"error"in i?{success:!1,error:typeof i.error=="string"?i.error:JSON.stringify(i.error)}:{success:!1,error:c.error.message}}catch(o){return{success:!1,error:o instanceof Error?o.message:JSON.stringify(o)}}}n(ke,"zodfetch");async function Ft(e){let t=ie.safeParse(e);if(!t.success){y.error(t.error.message);return}return De(t.data.apiUrl)}n(Ft,"loginCommand");async function De(e){let t=new F(e);Fn("Logging in to Trigger.dev");let r=z()?.accessToken;if(r){let a=await Ce(e);if(await jn({message:"You are already logged in.",options:[{value:!1,label:"Exit"},{value:!0,label:"Login with a different account"}],initialValue:!1})!==!0)return Ct("Already logged in"),{success:!0,accessToken:r}}let o=Mt();o.start("Creating authorition code");let i=await t.createAuthorizationCode();if(!i.success)return o.stop(`Failed to create authorization code
7
+ ${i.error}`),{success:!1,error:i.error};o.stop("Created authorization code"),Dt.step(`Please visit the following URL to login:
8
+ ${ze(i.data.url)}`),await At(i.data.url);let c=Mt();c.start("Waiting for you to login");try{let a=await Oe(()=>Ln(t,i.data.authorizationCode),{factor:1,retries:60,minTimeout:1e3});return c.stop(`Logged in with token ${a.obfuscatedToken}`),pt({accessToken:a.token}),Ct("Logged in successfully"),{success:!0,accessToken:a.token}}catch(a){return c.stop("Failed to get access token"),a instanceof M&&Dt.error(a.message),{success:!1,error:a instanceof Error?a.message:JSON.stringify(a)}}}n(De,"login");async function Ln(e,t){let r=await e.getPersonalAccessToken(t);if(!r.success)throw new M(r.error);if(!r.data.token)throw new Error("No token found yet");return{token:r.data.token.token,obfuscatedToken:r.data.token.obfuscatedToken}}n(Ln,"getPersonalAccessToken");async function jt(e){let t=ie.safeParse(e);return t.success?Ce(t.data.apiUrl):(y.error(t.error.message),{success:!1,error:t.error.message})}n(jt,"whoamiCommand");async function Ce(e){let t=Rn();if(t.start("Checking your account details"),!z()?.accessToken){t.stop("You must login.");let c=await De(e);if(!c.success)return y.error(c.error),{success:!1,error:c.error}}let r=z()?.accessToken;if(!r)return y.error("No access token after login\u2026 this should never happen"),{success:!1,error:"No access token after login\u2026 this should never happen"};let i=await new F(e).whoAmI({accessToken:r});return i.success?(t.stop("Retrieved your account details"),In(`User ID: ${i.data.userId}
9
+ Email: ${i.data.email}`,"Account details"),i):(t.stop("Error getting your account details"),y.error(i.error),{success:!1,error:i.error})}n(Ce,"whoAmI");import Un from"chalk";import Gn from"update-check";var Me={name:"trigger.dev",version:"1.0.1",description:"A Command-Line Interface for Trigger.dev (v3) projects",main:"./dist/index.js",types:"./dist/index.d.ts",license:"MIT",repository:{type:"git",url:"https://github.com/triggerdotdev/trigger.dev.git",directory:"packages/cli-v3"},publishConfig:{access:"public"},keywords:["typescript","trigger.dev","workflows","orchestration","events","webhooks","integrations","apis","jobs","background jobs","nextjs"],files:["dist"],type:"module",exports:"./dist/index.js",bin:{"trigger-v3-cli":"./dist/index.js"},devDependencies:{"@trigger.dev/core":"workspace:*","@trigger.dev/tsconfig":"workspace:*","@types/gradient-string":"^1.1.2","@types/mock-fs":"^4.13.1","@types/node":"16","@types/node-fetch":"^2.6.2","@types/ws":"^8.5.3",open:"^10.0.3","p-retry":"^6.1.0",rimraf:"^3.0.2",tsup:"^6.5.0","type-fest":"^3.6.0",typescript:"^4.9.5",vitest:"^0.34.4","xdg-app-paths":"^8.3.0"},scripts:{typecheck:"tsc",build:"tsup",dev:"tsup --watch",clean:"rimraf dist",start:"node dist/index.js",test:"vitest"},dependencies:{"@clack/prompts":"^0.7.0","@trigger.dev/core":"workspace:*","@types/degit":"^2.8.3",chalk:"^5.2.0",chokidar:"^3.5.3","cli-table3":"^0.6.3",commander:"^9.4.1",degit:"^2.8.4",dotenv:"^16.3.1",execa:"^7.0.0","gradient-string":"^2.0.2",liquidjs:"^10.9.2","mock-fs":"^5.2.0",nanoid:"^4.0.2","node-fetch":"^3.3.0","npm-check-updates":"^16.12.2","posthog-node":"^3.1.1","proxy-agent":"^6.3.0","simple-git":"^3.19.0","update-check":"^1.5.4",url:"^0.11.1",ws:"^8.11.0",zod:"3.22.3"},engines:{node:">=18.0.0"}};import{spinner as $n}from"@clack/prompts";async function q(e=!0){let t=k(),r=`
10
+ ${Je()} ${Xe(`(${t})`)}
11
+ `;y.info(r);let o;if(e){let i=$n();if(i.start("Checking for updates"),o=await Xn(),o!==void 0){i.stop(`Update available ${Un.green(o)})`);let c=parseInt(t.split(".")[0]),a=parseInt(o.split(".")[0]);a>c&&y.warn(`Please update to the latest version of \`trigger.dev\` to prevent critical errors.
12
+ Run \`npm install --save-dev trigger.dev@${a}\` to update to the latest version.
13
+ After installation, run Trigger.dev with \`npx trigger.dev\`.`)}else i.stop("On latest version")}}n(q,"printInitialBanner");async function Hn(){let e=null;try{e=await Gn(Me,{distTag:Me.version.startsWith("0.0.0")?"beta":"latest"})}catch{}return e?.latest}n(Hn,"doUpdateCheck");var Bn;function Xn(){return Bn??=Hn()}n(Xn,"updateCheck");import{z as Lt}from"zod";var j=new zn,ie=Lt.object({apiUrl:Lt.string()});j.name(Ie).description("Create, run locally and deploy Trigger.dev background tasks.").version(k(),"-v, --version","Display the version number");j.command("login").description("Login with Trigger.dev so you can perform authenticated actions").option("-a, --api-url <value>","Override the API URL, defaults to https://api.trigger.dev","https://api.trigger.dev").version(k(),"-v, --version","Display the version number").action(async e=>{try{await q(!1),await Ft(e)}catch(t){throw t}});j.command("dev").description("Run your Trigger.dev tasks locally").argument("[path]","The path to the project",".").option("-p, --port <port>","Override the local port your server is on").option("-H, --hostname <hostname>","Override the hostname on which the application is served").option("-e, --env-file <name>","Override the name of the env file to load").option("-i, --client-id <name>","The ID of the client to use for this project. Will use the value from the package.json file if not provided.").version(k(),"-v, --version","Display the version number").action(async(e,t)=>{try{await q(),await $e(e,t)}catch(r){throw r}});j.command("update").description("Updates all @trigger.dev/* packages to their latest compatible versions or the specified version").argument("[path]","The path to the directory that contains the package.json file",".").option("-t, --to <version tag>","The version to update to (ex: 2.1.4)","latest").action(async(e,t)=>{await q(!1),await qe(e,t)});j.command("whoami").description("display the current logged in user and project details").option("-a, --api-url <value>","Override the API URL, defaults to https://cloud.trigger.dev","https://cloud.trigger.dev").version(k(),"-v, --version","Display the version number").action(async e=>{try{await q(),await jt(e)}catch(t){throw t}});var Jn=n(async()=>{await j.parseAsync()},"main");Jn().catch(e=>{e instanceof Error?y.error(e):(y.error("An unknown error has occurred. Please open an issue on github with the below:"),y.error(e)),process.exit(1)});
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js","../../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js","../../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js","../../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js","../../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js","../../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js","../../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js","../../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js","../../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js","../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js","../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js","../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js","../src/cli/index.ts","../src/commands/dev.ts","../src/telemetry/telemetry.ts","../src/utilities/getVersion.ts","../src/consts.ts","../src/utilities/fileSystem.ts","../src/utilities/logger.ts","../src/utilities/parseNameAndPath.ts","../src/commands/update.ts","../src/utilities/installDependencies.ts","../src/utilities/getUserPackageManager.ts","../src/utilities/colors.ts","../src/commands/whoami.ts","../src/utilities/configFiles.ts","../../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/esm-wrapper/mod.esm.js","../src/commands/login.ts","../../../node_modules/.pnpm/open@10.0.3/node_modules/open/index.js","../../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js","../../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js","../../../node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js","../../../node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js","../../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/index.js","../../../node_modules/.pnpm/default-browser-id@5.0.0/node_modules/default-browser-id/index.js","../../../node_modules/.pnpm/run-applescript@7.0.0/node_modules/run-applescript/index.js","../../../node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js","../../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/windows.js","../../../node_modules/.pnpm/p-retry@6.1.0/node_modules/p-retry/index.js","../../../node_modules/.pnpm/is-network-error@1.0.0/node_modules/is-network-error/index.js","../src/apiClient.ts","../src/utilities/initialBanner.ts","../package.json","../src/index.ts"],"sourcesContent":["'use strict';\nexports.__esModule = true;\nexports.Adapt = void 0;\nfunction isBoolean(t) {\n return typeOf(t) === 'boolean';\n}\nfunction isObject(t) {\n return typeOf(t) === 'object';\n}\nfunction isString(t) {\n return typeOf(t) === 'string';\n}\nfunction typeOf(t) {\n return typeof t;\n}\nfunction Adapt(adapter_) {\n var meta = adapter_.meta, path = adapter_.path, xdg = adapter_.xdg;\n var XDGAppPaths_ = (function () {\n function XDGAppPaths_(options_) {\n if (options_ === void 0) { options_ = {}; }\n var _a, _b, _c;\n function XDGAppPaths(options) {\n if (options === void 0) { options = {}; }\n return new XDGAppPaths_(options);\n }\n var options = (isObject(options_) ? options_ : { name: options_ });\n var suffix = (_a = options.suffix) !== null && _a !== void 0 ? _a : '';\n var isolated_ = (_b = options.isolated) !== null && _b !== void 0 ? _b : true;\n var namePriorityList = [\n options.name,\n meta.pkgMainFilename(),\n meta.mainFilename(),\n ];\n var nameFallback = '$eval';\n var name = path.parse(((_c = namePriorityList.find(function (e) { return isString(e); })) !== null && _c !== void 0 ? _c : nameFallback) + suffix).name;\n XDGAppPaths.$name = function $name() {\n return name;\n };\n XDGAppPaths.$isolated = function $isolated() {\n return isolated_;\n };\n function isIsolated(dirOptions) {\n var _a;\n dirOptions = dirOptions !== null && dirOptions !== void 0 ? dirOptions : { isolated: isolated_ };\n var isolated = isBoolean(dirOptions) ? dirOptions : (_a = dirOptions.isolated) !== null && _a !== void 0 ? _a : isolated_;\n return isolated;\n }\n function finalPathSegment(dirOptions) {\n return isIsolated(dirOptions) ? name : '';\n }\n XDGAppPaths.cache = function cache(dirOptions) {\n return path.join(xdg.cache(), finalPathSegment(dirOptions));\n };\n XDGAppPaths.config = function config(dirOptions) {\n return path.join(xdg.config(), finalPathSegment(dirOptions));\n };\n XDGAppPaths.data = function data(dirOptions) {\n return path.join(xdg.data(), finalPathSegment(dirOptions));\n };\n XDGAppPaths.runtime = function runtime(dirOptions) {\n return xdg.runtime()\n ? path.join(xdg.runtime(), finalPathSegment(dirOptions))\n : void 0;\n };\n XDGAppPaths.state = function state(dirOptions) {\n return path.join(xdg.state(), finalPathSegment(dirOptions));\n };\n XDGAppPaths.configDirs = function configDirs(dirOptions) {\n return xdg\n .configDirs()\n .map(function (s) { return path.join(s, finalPathSegment(dirOptions)); });\n };\n XDGAppPaths.dataDirs = function dataDirs(dirOptions) {\n return xdg\n .dataDirs()\n .map(function (s) { return path.join(s, finalPathSegment(dirOptions)); });\n };\n return XDGAppPaths;\n }\n return XDGAppPaths_;\n }());\n return { XDGAppPaths: new XDGAppPaths_() };\n}\nexports.Adapt = Adapt;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiWERHQXBwUGF0aHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGliL1hER0FwcFBhdGhzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLFlBQVksQ0FBQzs7O0FBbUZiLFNBQVMsU0FBUyxDQUFJLENBQWM7SUFDbkMsT0FBTyxNQUFNLENBQUMsQ0FBQyxDQUFDLEtBQUssU0FBUyxDQUFDO0FBQ2hDLENBQUM7QUFFRCxTQUFTLFFBQVEsQ0FBSSxDQUE4QjtJQUNsRCxPQUFPLE1BQU0sQ0FBQyxDQUFDLENBQUMsS0FBSyxRQUFRLENBQUM7QUFDL0IsQ0FBQztBQUVELFNBQVMsUUFBUSxDQUFJLENBQUk7SUFDeEIsT0FBTyxNQUFNLENBQUMsQ0FBQyxDQUFDLEtBQUssUUFBUSxDQUFDO0FBQy9CLENBQUM7QUFFRCxTQUFTLE1BQU0sQ0FBSSxDQUFJO0lBQ3RCLE9BQU8sT0FBTyxDQUFDLENBQUM7QUFDakIsQ0FBQztBQUVELFNBQVMsS0FBSyxDQUFDLFFBQTBCO0lBQ2hDLElBQUEsSUFBSSxHQUFnQixRQUFRLEtBQXhCLEVBQUUsSUFBSSxHQUFVLFFBQVEsS0FBbEIsRUFBRSxHQUFHLEdBQUssUUFBUSxJQUFiLENBQWM7SUFFckM7UUFDQyxzQkFBWSxRQUErQjtZQUEvQix5QkFBQSxFQUFBLGFBQStCOztZQUMxQyxTQUFTLFdBQVcsQ0FBQyxPQUE4QjtnQkFBOUIsd0JBQUEsRUFBQSxZQUE4QjtnQkFDb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QztZQUMvRSxDQUFDLENBQUM7WUFFRixPQUFPLFdBQTBCLENBQUM7UUFDbkMsQ0FBQztRQUNGLG1CQUFDO0lBQUQsQ0FBQyxBQTNFRCxJQTJFQztJQUVELE9BQU8sRUFBRSxXQUFXLEVBQUUsSUFBSSxZQUFZLEVBQWlCLEVBQUUsQ0FBQztBQUMzRCxDQUFDO0FBR1Esc0JBQUsifQ==","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nexports.__esModule = true;\nexports.Adapt = void 0;\nfunction Adapt(adapter_) {\n var env = adapter_.env, osPaths = adapter_.osPaths, path = adapter_.path;\n var isMacOS = /^darwin$/i.test(adapter_.process.platform);\n var isWinOS = /^win/i.test(adapter_.process.platform);\n function baseDir() {\n return osPaths.home() || osPaths.temp();\n }\n function valOrPath(val, pathSegments) {\n return val || path.join.apply(path, pathSegments);\n }\n var linux = function () {\n var cache = function () { return valOrPath(env.get('XDG_CACHE_HOME'), [baseDir(), '.cache']); };\n var config = function () { return valOrPath(env.get('XDG_CONFIG_HOME'), [baseDir(), '.config']); };\n var data = function () { return valOrPath(env.get('XDG_DATA_HOME'), [baseDir(), '.local', 'share']); };\n var runtime = function () { return env.get('XDG_RUNTIME_DIR') || void 0; };\n var state = function () { return valOrPath(env.get('XDG_STATE_HOME'), [baseDir(), '.local', 'state']); };\n return { cache: cache, config: config, data: data, runtime: runtime, state: state };\n };\n var macos = function () {\n var cache = function () { return valOrPath(env.get('XDG_CACHE_HOME'), [baseDir(), 'Library', 'Caches']); };\n var config = function () {\n return valOrPath(env.get('XDG_CONFIG_HOME'), [baseDir(), 'Library', 'Preferences']);\n };\n var data = function () {\n return valOrPath(env.get('XDG_DATA_HOME'), [baseDir(), 'Library', 'Application Support']);\n };\n var runtime = function () { return env.get('XDG_RUNTIME_DIR') || void 0; };\n var state = function () { return valOrPath(env.get('XDG_STATE_HOME'), [baseDir(), 'Library', 'State']); };\n return { cache: cache, config: config, data: data, runtime: runtime, state: state };\n };\n var windows = function () {\n function appData() {\n return valOrPath(env.get('APPDATA'), [baseDir(), 'AppData', 'Roaming']);\n }\n function localAppData() {\n return valOrPath(env.get('LOCALAPPDATA'), [baseDir(), 'AppData', 'Local']);\n }\n var cache = function () { return valOrPath(env.get('XDG_CACHE_HOME'), [localAppData(), 'xdg.cache']); };\n var config = function () { return valOrPath(env.get('XDG_CONFIG_HOME'), [appData(), 'xdg.config']); };\n var data = function () { return valOrPath(env.get('XDG_DATA_HOME'), [appData(), 'xdg.data']); };\n var runtime = function () { return env.get('XDG_RUNTIME_DIR') || void 0; };\n var state = function () { return valOrPath(env.get('XDG_STATE_HOME'), [localAppData(), 'xdg.state']); };\n return { cache: cache, config: config, data: data, runtime: runtime, state: state };\n };\n var XDG_ = (function () {\n function XDG_() {\n function XDG() {\n return new XDG_();\n }\n var extension = isMacOS ? macos() : isWinOS ? windows() : linux();\n XDG.cache = extension.cache;\n XDG.config = extension.config;\n XDG.data = extension.data;\n XDG.runtime = extension.runtime;\n XDG.state = extension.state;\n XDG.configDirs = function configDirs() {\n var pathList = env.get('XDG_CONFIG_DIRS');\n return __spreadArray([extension.config()], (pathList ? pathList.split(path.delimiter) : []));\n };\n XDG.dataDirs = function dataDirs() {\n var pathList = env.get('XDG_DATA_DIRS');\n return __spreadArray([extension.data()], (pathList ? pathList.split(path.delimiter) : []));\n };\n return XDG;\n }\n return XDG_;\n }());\n return { XDG: new XDG_() };\n}\nexports.Adapt = Adapt;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiWERHLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpYi9YREcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUErQ0EsU0FBUyxLQUFLLENBQUMsUUFBMEI7SUFDaEMsSUFBQSxHQ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7WUFFRixPQUFPLEdBQUcsQ0FBQztRQUNaLENBQUM7UUFDRixXQUFDO0lBQUQsQ0FBQyxBQTFCRCxJQTBCQztJQUNELE9BQU8sRUFBRSxHQUFHLEVBQUUsSUFBSSxJQUFJLEVBQVMsRUFBRSxDQUFDO0FBQ25DLENBQUM7QUFHUSxzQkFBSyJ9","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nexports.__esModule = true;\nexports.Adapt = void 0;\nfunction isEmpty(s) {\n return !s;\n}\nfunction Adapt(adapter_) {\n var env = adapter_.env, os = adapter_.os, path = adapter_.path;\n var isWinOS = /^win/i.test(adapter_.process.platform);\n function normalizePath(path_) {\n return path_ ? adapter_.path.normalize(adapter_.path.join(path_, '.')) : void 0;\n }\n function home() {\n var posix = function () {\n return normalizePath((typeof os.homedir === 'function' ? os.homedir() : void 0) || env.get('HOME'));\n };\n var windows = function () {\n var priorityList = [\n typeof os.homedir === 'function' ? os.homedir() : void 0,\n env.get('USERPROFILE'),\n env.get('HOME'),\n env.get('HOMEDRIVE') || env.get('HOMEPATH')\n ? path.join(env.get('HOMEDRIVE') || '', env.get('HOMEPATH') || '')\n : void 0,\n ];\n return normalizePath(priorityList.find(function (v) { return !isEmpty(v); }));\n };\n return isWinOS ? windows() : posix();\n }\n function temp() {\n function joinPathToBase(base, segments) {\n return base ? path.join.apply(path, __spreadArray([base], segments)) : void 0;\n }\n function posix() {\n var fallback = '/tmp';\n var priorityList = [\n typeof os.tmpdir === 'function' ? os.tmpdir() : void 0,\n env.get('TMPDIR'),\n env.get('TEMP'),\n env.get('TMP'),\n ];\n return normalizePath(priorityList.find(function (v) { return !isEmpty(v); })) || fallback;\n }\n function windows() {\n var fallback = 'C:\\\\Temp';\n var priorityListLazy = [\n typeof os.tmpdir === 'function' ? os.tmpdir : function () { return void 0; },\n function () { return env.get('TEMP'); },\n function () { return env.get('TMP'); },\n function () { return joinPathToBase(env.get('LOCALAPPDATA'), ['Temp']); },\n function () { return joinPathToBase(home(), ['AppData', 'Local', 'Temp']); },\n function () { return joinPathToBase(env.get('ALLUSERSPROFILE'), ['Temp']); },\n function () { return joinPathToBase(env.get('SystemRoot'), ['Temp']); },\n function () { return joinPathToBase(env.get('windir'), ['Temp']); },\n function () { return joinPathToBase(env.get('SystemDrive'), ['\\\\', 'Temp']); },\n ];\n var v = priorityListLazy.find(function (v) { return v && !isEmpty(v()); });\n return (v && normalizePath(v())) || fallback;\n }\n return isWinOS ? windows() : posix();\n }\n var OSPaths_ = (function () {\n function OSPaths_() {\n function OSPaths() {\n return new OSPaths_();\n }\n OSPaths.home = home;\n OSPaths.temp = temp;\n return OSPaths;\n }\n return OSPaths_;\n }());\n return { OSPaths: new OSPaths_() };\n}\nexports.Adapt = Adapt;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT1NQYXRocy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvT1NQYXRocy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQXVCQSxTQUFTLE9BQU8sQ0FBQyxDQUE0QjtJQUM1QyxPQUFPLENBQUMsQ0FBQyxDQUFDO0FBQ1gsQ0FBQztBQUVELFNBQVMsS0FBSyxDQUFDLFFBQTBCO0lBQ2hDLElBQUEsR0FBRyxHQUFlLFFBQVEsSUFBdkIsRUFBRSxFQUFFLEdBQVcsUUFBUSxHQUFuQixFQUFFLElBQUksR0FBSyxRQUFRLEtBQWIsQ0FBYztJQUVuQyxJQUFNLE9BQU8sR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7SUFFeEQsU0FBUyxhQUFhLENBQUMsS0FBeUI7UUFDL0MsT0FBTyxLQUFLLENBQUMsQ0F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sQ0FBMkM7Z0JBQ2pELGNBQU0sT0FBQSxjQUFjLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsRUFBRSxDQUFDLElBQUksRUFBRSxNQUFNLENBQUMsQ0FBQyxFQUF0RCxDQUFzRDthQUM1RCxDQUFDO1lBQ0YsSUFBTSxDQUFDLEdBQUcsZ0JBQWdCLENBQUMsSUFBSSxDQUFDLFVBQUMsQ0FBQyxJQUFLLE9BQUEsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUMsRUFBRSxDQUFDLEVBQWxCLENBQWtCLENBQUMsQ0FBQztZQUMzRCxPQUFPLENBQUMsQ0FBQyxJQUFJLGFBQWEsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLElBQUksUUFBUSxDQUFDO1FBQzlDLENBQUM7UUFFRCxPQUFPLE9BQU8sQ0FBQyxDQUFDLENBQUMsT0FBTyxFQUFFLENBQUMsQ0FBQyxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQ3RDLENBQUM7SUFHRDtRQUNDO1lBQ0MsU0FBUyxPQUFPO2dCQUNmLE9BQU8sSUFBSSxRQUFRLEVBQWEsQ0FBQztZQUNsQyxDQUFDO1lBRUQsT0FBTyxDQUFDLElBQUksR0FBRyxJQUFJLENBQUM7WUFDcEIsT0FBTyxDQUFDLElBQUksR0FBRyxJQUFJLENBQUM7WUFFcEIsT0FBTyxPQUFPLENBQUM7UUFDaEIsQ0FBQztRQUNGLGVBQUM7SUFBRCxDQUFDLEFBWEQsSUFXQztJQUVELE9BQU8sRUFBRSxPQUFPLEVBQUUsSUFBSSxRQUFRLEVBQWEsRUFBRSxDQUFDO0FBQy9DLENBQUM7QUFHUSxzQkFBSyJ9","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nexports.__esModule = true;\nexports.adapter = void 0;\nvar os = __importStar(require(\"os\"));\nvar path = __importStar(require(\"path\"));\nexports.adapter = {\n atImportPermissions: { env: true },\n env: {\n get: function (s) {\n return process.env[s];\n }\n },\n os: os,\n path: path,\n process: process\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9wbGF0Zm9ybS1hZGFwdGVycy9ub2RlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxxQ0FBeUI7QUFDekIseUNBQTZCO0FBSWhCLFFBQUEsT0FBTyxHQUFxQjtJQUN4QyxtQkFBbUIsRUFBRSxFQUFFLEdBQUcsRUFBRSxJQUFJLEVBQUU7SUFDbEMsR0FBRyxFQUFFO1FBQ0osR0FBRyxFQUFFLFVBQUMsQ0FBQztZQUVOLE9BQU8sT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUN2QixDQUFDO0tBQ0Q7SUFDRCxFQUFFLElBQUE7SUFDRixJQUFJLE1BQUE7SUFDSixPQUFPLFNBQUE7Q0FDUCxDQUFDIn0=","\"use strict\";\nvar OSPaths_js_1 = require(\"./lib/OSPaths.js\");\nvar node_js_1 = require(\"./platform-adapters/node.js\");\nmodule.exports = OSPaths_js_1.Adapt(node_js_1.adapter).OSPaths;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kLmNqcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9tb2QuY2pzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwrQ0FBa0Q7QUFDbEQsdURBQXNEO0FBRXRELGlCQUFTLGtCQUFLLENBQUMsaUJBQU8sQ0FBQyxDQUFDLE9BQWtCLENBQUMifQ==","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nexports.__esModule = true;\nexports.adapter = void 0;\nvar path = __importStar(require(\"path\"));\nvar os_paths_1 = __importDefault(require(\"os-paths\"));\nexports.adapter = {\n atImportPermissions: { env: true },\n env: {\n get: function (s) {\n return process.env[s];\n }\n },\n osPaths: os_paths_1[\"default\"],\n path: path,\n process: process\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9wbGF0Zm9ybS1hZGFwdGVycy9ub2RlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSx5Q0FBNkI7QUFFN0Isc0RBQStCO0FBSWxCLFFBQUEsT0FBTyxHQUFxQjtJQUN4QyxtQkFBbUIsRUFBRSxFQUFFLEdBQUcsRUFBRSxJQUFJLEVBQUU7SUFDbEMsR0FBRyxFQUFFO1FBQ0osR0FBRyxFQUFFLFVBQUMsQ0FBQztZQUVOLE9BQU8sT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUN2QixDQUFDO0tBQ0Q7SUFDRCxPQUFPLHVCQUFBO0lBQ1AsSUFBSSxNQUFBO0lBQ0osT0FBTyxTQUFBO0NBQ1AsQ0FBQyJ9","\"use strict\";\nvar XDG_js_1 = require(\"./lib/XDG.js\");\nvar node_js_1 = require(\"./platform-adapters/node.js\");\nmodule.exports = XDG_js_1.Adapt(node_js_1.adapter).XDG;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kLmNqcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9tb2QuY2pzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSx1Q0FBcUM7QUFFckMsdURBQXNEO0FBRXRELGlCQUFTLGNBQUssQ0FBQyxpQkFBTyxDQUFDLENBQUMsR0FBVSxDQUFDIn0=","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nexports.__esModule = true;\nexports.adapter = void 0;\nvar path = __importStar(require(\"path\"));\nvar xdg_portable_1 = __importDefault(require(\"xdg-portable\"));\nexports.adapter = {\n atImportPermissions: { env: true, read: true },\n meta: {\n mainFilename: function () {\n var requireMain = typeof require !== 'undefined' && require !== null && require.main\n ? require.main\n : { filename: void 0 };\n var requireMainFilename = requireMain.filename;\n var filename = (requireMainFilename !== process.execArgv[0] ? requireMainFilename : void 0) ||\n (typeof process._eval === 'undefined' ? process.argv[1] : void 0);\n return filename;\n },\n pkgMainFilename: function () {\n return process.pkg ? process.execPath : void 0;\n }\n },\n path: path,\n process: process,\n xdg: xdg_portable_1[\"default\"]\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9wbGF0Zm9ybS1hZGFwdGVycy9ub2RlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFQSx5Q0FBNkI7QUFFN0IsOERBQStCO0FBSWxCLFFBQUEsT0FBTyxHQUFxQjtJQUN4QyxtQkFBbUIsRUFBRSxFQUFFLEdBQUcsRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRTtJQUM5QyxJQUFJLEVBQUU7UUFDTCxZQUFZLEVBQUU7WUFDYixJQUFNLFdBQVcsR0FDaEIsT0FBTyxPQUFPLEtBQUssV0FBVyxJQUFJLE9BQU8sS0FBSyxJQUFJLElBQUksT0FBTyxDQUFDLElBQUk7Z0JBQ2pFLENBQUMsQ0FBQyxPQUFPLENBQUMsSUFBSTtnQkFDZCxDQUFDLENBQUMsRUFBRSxRQUFRLEVBQUUsS0FBSyxDQUFDLEVBQUUsQ0FBQztZQUN6QixJQUFNLG1CQUFtQixHQUFHLFdBQVcsQ0FBQyxRQUFRLENBQUM7WUFDakQsSUFBTSxRQUFRLEdBRWIsQ0FBQyxtQkFBbUIsS0FBSyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUM7Z0JBRzVFLENBQUMsT0FBUSxPQUFlLENBQUMsS0FBSyxLQUFLLFdBQVcsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztZQUM1RSxPQUFPLFFBQVEsQ0FBQztRQUNqQixDQUFDO1FBQ0QsZUFBZSxFQUFFO1lBRWhCLE9BQVEsT0FBZSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDekQsQ0FBQztLQUNEO0lBQ0QsSUFBSSxNQUFBO0lBQ0osT0FBTyxTQUFBO0lBQ1AsR0FBRywyQkFBQTtDQUNILENBQUMifQ==","\"use strict\";\nvar XDGAppPaths_js_1 = require(\"./lib/XDGAppPaths.js\");\nvar node_js_1 = require(\"./platform-adapters/node.js\");\nmodule.exports = XDGAppPaths_js_1.Adapt(node_js_1.adapter).XDGAppPaths;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kLmNqcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9tb2QuY2pzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQSx1REFBNkM7QUFFN0MsdURBQXNEO0FBRXRELGlCQUFTLHNCQUFLLENBQUMsaUJBQU8sQ0FBQyxDQUFDLFdBQTBCLENBQUMifQ==","function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n this._timer = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts.slice(0);\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n if (this._timer) {\n clearTimeout(this._timer);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.push(err);\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(0, this._errors.length - 1);\n timeout = this._cachedTimeouts.slice(-1);\n } else {\n return false;\n }\n }\n\n var self = this;\n this._timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n this._timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n","var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && (options.forever || options.retries === Infinity),\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n","module.exports = require('./lib/retry');","import { Command } from \"commander\";\nimport { devCommand } from \"../commands/dev\";\nimport { updateCommand } from \"../commands/update\";\nimport { whoamiCommand } from \"../commands/whoami.js\";\nimport { COMMAND_NAME } from \"../consts\";\nimport { getVersion } from \"../utilities/getVersion\";\nimport { printInitialBanner } from \"../utilities/initialBanner\";\nimport { login, loginCommand } from \"../commands/login\";\nimport { z } from \"zod\";\n\nexport const program = new Command();\n\nexport const ApiUrlOptionsSchema = z.object({\n apiUrl: z.string(),\n});\n\nprogram\n .name(COMMAND_NAME)\n .description(\"Create, run locally and deploy Trigger.dev background tasks.\")\n .version(getVersion(), \"-v, --version\", \"Display the version number\");\n\nprogram\n .command(\"login\")\n .description(\"Login with Trigger.dev so you can perform authenticated actions\")\n .option(\n \"-a, --api-url <value>\",\n \"Override the API URL, defaults to https://api.trigger.dev\",\n \"https://api.trigger.dev\"\n )\n .version(getVersion(), \"-v, --version\", \"Display the version number\")\n .action(async (options) => {\n try {\n await printInitialBanner(false);\n await loginCommand(options);\n //todo login command\n } catch (e) {\n //todo error reporting\n throw e;\n }\n });\n\n//todo update for the new version\n//todo add usage instructions to the README\nprogram\n .command(\"dev\")\n .description(\"Run your Trigger.dev tasks locally\")\n .argument(\"[path]\", \"The path to the project\", \".\")\n .option(\"-p, --port <port>\", \"Override the local port your server is on\")\n .option(\"-H, --hostname <hostname>\", \"Override the hostname on which the application is served\")\n .option(\"-e, --env-file <name>\", \"Override the name of the env file to load\")\n .option(\n \"-i, --client-id <name>\",\n \"The ID of the client to use for this project. Will use the value from the package.json file if not provided.\"\n )\n .version(getVersion(), \"-v, --version\", \"Display the version number\")\n .action(async (path, options) => {\n try {\n await printInitialBanner();\n await devCommand(path, options);\n } catch (e) {\n //todo error reporting\n throw e;\n }\n });\n\nprogram\n .command(\"update\")\n .description(\n \"Updates all @trigger.dev/* packages to their latest compatible versions or the specified version\"\n )\n .argument(\"[path]\", \"The path to the directory that contains the package.json file\", \".\")\n .option(\"-t, --to <version tag>\", \"The version to update to (ex: 2.1.4)\", \"latest\")\n .action(async (path, options) => {\n await printInitialBanner(false);\n await updateCommand(path, options);\n });\n\nprogram\n .command(\"whoami\")\n .description(\"display the current logged in user and project details\")\n .option(\n \"-a, --api-url <value>\",\n \"Override the API URL, defaults to https://cloud.trigger.dev\",\n \"https://cloud.trigger.dev\"\n )\n .version(getVersion(), \"-v, --version\", \"Display the version number\")\n .action(async (options) => {\n try {\n await printInitialBanner();\n await whoamiCommand(options);\n } catch (e) {\n throw e;\n }\n });\n","import childProcess from \"child_process\";\nimport util from \"util\";\nimport { z } from \"zod\";\nimport { telemetryClient } from \"../telemetry/telemetry\";\nimport { logger } from \"../utilities/logger\";\nimport { resolvePath } from \"../utilities/parseNameAndPath\";\nimport { RequireKeys } from \"../utilities/requiredKeys\";\n\nconst asyncExecFile = util.promisify(childProcess.execFile);\n\nexport const DevCommandOptionsSchema = z.object({\n port: z.coerce.number().optional(),\n hostname: z.string().optional(),\n envFile: z.string().optional(),\n clientId: z.string().optional(),\n});\n\nexport type DevCommandOptions = z.infer<typeof DevCommandOptionsSchema>;\ntype ResolvedOptions = RequireKeys<DevCommandOptions, \"envFile\">;\n\nconst formattedDate = new Intl.DateTimeFormat(\"en\", {\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n});\n\nexport async function devCommand(path: string, anyOptions: any) {\n telemetryClient.dev.started(path, anyOptions);\n\n const result = DevCommandOptionsSchema.safeParse(anyOptions);\n if (!result.success) {\n logger.error(result.error.message);\n\n return;\n }\n const options = result.data;\n\n const resolvedPath = resolvePath(path);\n}\n","import { PostHog } from \"posthog-node\";\nimport { nanoid } from \"nanoid\";\nimport { getVersion } from \"../utilities/getVersion\";\n\nconst postHogApiKey = \"phc_9aSDbJCaDUMdZdHxxMPTvcj7A9fsl3mCgM1RBPmPsl7\";\n\nexport class TelemetryClient {\n #client: PostHog;\n #sessionId: string;\n #version: string;\n\n constructor() {\n this.#client = new PostHog(postHogApiKey, {\n host: \"https://eu.posthog.com\",\n flushAt: 1,\n });\n this.#sessionId = `cli-${nanoid()}`;\n this.#version = getVersion();\n }\n\n identify(organizationId: string, projectId: string, userId?: string) {\n if (userId) {\n this.#client.alias({\n distinctId: userId,\n alias: this.#sessionId,\n });\n }\n\n this.#client.groupIdentify({\n groupType: \"organization\",\n groupKey: organizationId,\n });\n\n this.#client.groupIdentify({\n groupType: \"project\",\n groupKey: projectId,\n });\n }\n\n dev = {\n started: (path: string, options: Record<string, string | number | boolean>) => {\n this.#client.capture({\n distinctId: this.#sessionId,\n event: \"cli_dev_started\",\n properties: { ...options, path },\n });\n },\n };\n}\n\nexport const telemetryClient = new TelemetryClient();\n","import { type PackageJson } from \"type-fest\";\nimport path from \"path\";\nimport { PKG_ROOT } from \"../consts\";\nimport { readJSONFileSync } from \"./fileSystem\";\n\nexport function getVersion() {\n const packageJsonPath = path.join(PKG_ROOT, \"package.json\");\n\n const packageJsonContent = readJSONFileSync(packageJsonPath) as PackageJson;\n\n return packageJsonContent.version ?? \"1.0.0\";\n}\n","import path from \"path\";\nimport { fileURLToPath } from \"url\";\n\n// With the move to TSUP as a build tool, this keeps path routes in other files (installers, loaders, etc) in check more easily.\n// Path is in relation to a single index.js file inside ./dist\nconst __filename = fileURLToPath(import.meta.url);\nconst distPath = path.dirname(__filename);\n\nexport const PKG_ROOT = path.join(distPath, \"../\");\nexport const COMMAND_NAME = \"trigger.dev\";\nexport const CLOUD_WEB_URL = \"https://cloud.trigger.dev\";\nexport const CLOUD_API_URL = \"https://api.trigger.dev\";\n","import fsSync from \"fs\";\nimport fsModule, { writeFile } from \"fs/promises\";\nimport fs from \"node:fs\";\nimport pathModule from \"path\";\n\n// Creates a file at the given path, if the directory doesn't exist it will be created\nexport async function createFile(path: string, contents: string): Promise<string> {\n await fsModule.mkdir(pathModule.dirname(path), { recursive: true });\n await fsModule.writeFile(path, contents);\n\n return path;\n}\n\nexport function isDirectory(configPath: string) {\n try {\n return fs.statSync(configPath).isDirectory();\n } catch (error) {\n // ignore error\n return false;\n }\n}\n\nexport async function pathExists(path: string): Promise<boolean> {\n try {\n await fsModule.access(path);\n\n return true;\n } catch (err) {\n return false;\n }\n}\n\nexport async function someFileExists(directory: string, filenames: string[]): Promise<boolean> {\n for (let index = 0; index < filenames.length; index++) {\n const filename = filenames[index];\n if (!filename) continue;\n\n const path = pathModule.join(directory, filename);\n if (await pathExists(path)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport async function removeFile(path: string) {\n await fsModule.unlink(path);\n}\n\nexport async function readFile(path: string) {\n return await fsModule.readFile(path, \"utf8\");\n}\n\nexport async function readJSONFile(path: string) {\n const fileContents = await fsModule.readFile(path, \"utf8\");\n\n return JSON.parse(fileContents);\n}\n\nexport async function writeJSONFile(path: string, json: any) {\n await writeFile(path, JSON.stringify(json, null, 2));\n}\n\nexport function readJSONFileSync(path: string) {\n const fileContents = fsSync.readFileSync(path, \"utf8\");\n\n return JSON.parse(fileContents);\n}\n","import chalk from \"chalk\";\nimport CLITable from \"cli-table3\";\n\nexport type Logger = typeof logger;\n\nexport type TableRow<Keys extends string> = Record<Keys, string>;\n\nexport const logger = {\n log(...args: unknown[]) {\n console.log(...args);\n },\n error(...args: unknown[]) {\n console.log(chalk.red(...args));\n },\n warn(...args: unknown[]) {\n console.log(chalk.yellow(...args));\n },\n info(...args: unknown[]) {\n console.log(chalk.cyan(...args));\n },\n success(...args: unknown[]) {\n console.log(chalk.green(...args));\n },\n table<Keys extends string>(data: TableRow<Keys>[]) {\n if (data.length === 0) return console.log(\"No data\");\n const keys: Keys[] = data.length === 0 ? [] : (Object.keys(data[0] as {}) as Keys[]);\n const t = new CLITable({\n head: keys,\n style: {\n head: chalk.level ? [\"blue\"] : [],\n border: chalk.level ? [\"gray\"] : [],\n },\n });\n t.push(...data.map((row) => keys.map((k) => row[k])));\n return this.log(t.toString());\n },\n};\n","import pathModule from \"path\";\n\n// Takes a relative path (like .) and resolves it to a full path (like /Users/username/Projects/my-triggers)\nexport const resolvePath = (input: string) => {\n return pathModule.resolve(process.cwd(), input);\n};\n\n// Takes an absolute path and derives the relative path from the current working directory \nexport const relativePath = (input: string) => {\n return pathModule.relative(process.cwd(), input);\n};\n","import { spinner, confirm } from \"@clack/prompts\";\nimport path from \"path\";\nimport { run, RunOptions } from \"npm-check-updates\";\nimport { installDependencies } from \"../utilities/installDependencies\";\nimport { readJSONFileSync, writeJSONFile } from \"../utilities/fileSystem.js\";\nimport { logger } from \"../utilities/logger.js\";\nimport { z } from \"zod\";\nimport { chalkError, chalkSuccess } from \"../utilities/colors\";\n\nexport const UpdateCommandOptionsSchema = z.object({\n to: z.string().optional(),\n});\n\nexport type UpdateCommandOptions = z.infer<typeof UpdateCommandOptionsSchema>;\n\ntype NcuRunOptionTarget = \"latest\" | `@${string}`;\n\nexport async function updateCommand(projectPath: string, anyOptions: any) {\n const loadingSpinner = spinner();\n loadingSpinner.start(\"Checking settings\");\n\n const parseRes = UpdateCommandOptionsSchema.safeParse(anyOptions);\n if (!parseRes.success) {\n loadingSpinner.stop(chalkError(parseRes.error.message));\n return;\n }\n const options = parseRes.data;\n\n const triggerDevPackage = \"@trigger.dev\";\n const packageJSONPath = path.join(projectPath, \"package.json\");\n const packageData = readJSONFileSync(packageJSONPath);\n if (!packageData) {\n loadingSpinner.stop(chalkError(\"Couldn't load package.json\"));\n return;\n }\n\n loadingSpinner.message(\"Checking for updates\");\n\n const packageMaps: { [k: string]: { type: string; version: string } } = {};\n const packageDependencies = packageData.dependencies || {};\n const packageDevDependencies = packageData.devDependencies || {};\n Object.keys(packageDependencies).forEach((i) => {\n packageMaps[i] = { type: \"dependencies\", version: packageDependencies[i] };\n });\n Object.keys(packageDevDependencies).forEach((i) => {\n packageMaps[i] = {\n type: \"devDependencies\",\n version: packageDevDependencies[i],\n };\n });\n\n const targetVersion = getTargetVersion(options.to);\n\n // Use npm-check-updates to get updated dependency versions\n const ncuOptions: RunOptions = {\n packageData,\n upgrade: true,\n jsonUpgraded: true,\n target: targetVersion,\n };\n\n // Can either give a json like package.json or just with deps and their new versions\n const updatedDependencies: { [k: string]: any } | void = await run(ncuOptions);\n\n if (!updatedDependencies) {\n loadingSpinner.stop(chalkError(\"Couldn't update dependencies\"));\n return;\n }\n\n const ifUpdatedDependenciesIsPackageJSON =\n updatedDependencies.hasOwnProperty(\"dependencies\") ||\n updatedDependencies.hasOwnProperty(\"devDependencies\");\n\n const dependencies = updatedDependencies.dependencies || {};\n const devDependencies = updatedDependencies.devDependencies || {};\n\n const allDependencies = ifUpdatedDependenciesIsPackageJSON\n ? Object.keys({ ...dependencies, ...devDependencies })\n : Object.keys(updatedDependencies);\n\n const triggerPackages = allDependencies.filter((pkg) => pkg.startsWith(triggerDevPackage));\n\n // If there are no @trigger.dev packages\n if (triggerPackages.length === 0) {\n loadingSpinner.stop(chalkSuccess(`All @trigger.dev/* packages are already up to date.`));\n return;\n }\n\n // Filter the packages with null and what don't match what\n // they are installed with so that they can be updated\n const packagesToUpdate = triggerPackages.filter((pkg: string) => updatedDependencies[pkg]);\n\n // If no packages require any updation\n if (packagesToUpdate.length === 0) {\n loadingSpinner.stop(chalkSuccess(`All @trigger.dev/* packages are already up to date.`));\n return;\n }\n\n let applyUpdates = targetVersion !== \"latest\";\n\n if (targetVersion === \"latest\") {\n applyUpdates = await hasUserConfirmed(packagesToUpdate, packageMaps, updatedDependencies);\n }\n\n if (applyUpdates) {\n const newPackageJSON = packageData;\n packagesToUpdate.forEach((packageName) => {\n const tmp = packageMaps[packageName];\n if (tmp) {\n newPackageJSON[tmp.type][packageName] = updatedDependencies[packageName];\n }\n });\n await writeJSONFile(packageJSONPath, newPackageJSON);\n await installDependencies(projectPath);\n }\n}\n\n// expects a version number, or latest.\n// if version number is specified, prepend it with '@' for ncu.\nfunction getTargetVersion(toVersion?: string): NcuRunOptionTarget {\n if (!toVersion) {\n return \"latest\";\n }\n return toVersion === \"latest\" ? \"latest\" : `@${toVersion}`;\n}\n\nasync function hasUserConfirmed(\n packagesToUpdate: string[],\n packageMaps: { [x: string]: { type: string; version: string } },\n updatedDependencies: { [x: string]: any }\n): Promise<boolean> {\n // Inform the user of the dependencies that can be updated\n console.log(\"\\nNewer versions found for the following packages:\");\n console.table(\n packagesToUpdate.map((i) => ({\n name: i,\n old: packageMaps[i]?.version,\n new: updatedDependencies[i],\n }))\n );\n\n // Ask the user if they want to update the dependencies\n const shouldContinue = await confirm({\n message: \"Do you want to update these packages in package.json and re-install dependencies?\",\n });\n\n return shouldContinue as boolean;\n}\n","import { spinner, confirm } from \"@clack/prompts\";\nimport { getUserPackageManager, type PackageManager } from \"./getUserPackageManager\";\nimport { logger } from \"./logger\";\nimport chalk from \"chalk\";\nimport { execa } from \"execa\";\n\nexport async function installDependencies(projectDir: string) {\n logger.info(\"Installing dependencies...\");\n\n const pkgManager = await getUserPackageManager(projectDir);\n\n const installSpinner = await runInstallCommand(pkgManager, projectDir);\n\n // If the spinner was used to show the progress, use succeed method on it\n // If not, use the succeed on a new spinner\n (installSpinner || spinner()).stop(chalk.green(\"Successfully installed dependencies!\\n\"));\n}\n\nasync function runInstallCommand(\n pkgManager: PackageManager,\n projectDir: string\n): Promise<ReturnType<typeof spinner> | null> {\n switch (pkgManager) {\n // When using npm, inherit the stderr stream so that the progress bar is shown\n case \"npm\":\n await execa(pkgManager, [\"install\"], {\n cwd: projectDir,\n stderr: \"inherit\",\n });\n\n return null;\n // When using yarn or pnpm, use the stdout stream and ora spinner to show the progress\n case \"pnpm\": {\n const loadingSpinner = spinner();\n loadingSpinner.start(\"Running pnpm install...\");\n const pnpmSubprocess = execa(pkgManager, [\"install\"], {\n cwd: projectDir,\n stdout: \"pipe\",\n });\n\n await new Promise<void>((res, rej) => {\n pnpmSubprocess.stdout?.on(\"data\", (data: Buffer) => {\n const text = data.toString();\n\n if (text.includes(\"Progress\")) {\n loadingSpinner.message(text.includes(\"|\") ? text.split(\" | \")[1] ?? \"\" : text);\n }\n });\n pnpmSubprocess.on(\"error\", (e) => rej(e));\n pnpmSubprocess.on(\"close\", () => res());\n });\n\n return loadingSpinner;\n }\n case \"yarn\": {\n const loadingSpinner = spinner();\n loadingSpinner.start(\"Running yarn...\");\n const yarnSubprocess = execa(pkgManager, [], {\n cwd: projectDir,\n stdout: \"pipe\",\n });\n\n await new Promise<void>((res, rej) => {\n yarnSubprocess.stdout?.on(\"data\", (data: Buffer) => {\n loadingSpinner.message(data.toString());\n });\n yarnSubprocess.on(\"error\", (e) => rej(e));\n yarnSubprocess.on(\"close\", () => res());\n });\n\n return loadingSpinner;\n }\n }\n}\n","import pathModule from \"path\";\nimport { pathExists } from \"./fileSystem\";\n\nexport type PackageManager = \"npm\" | \"pnpm\" | \"yarn\";\n\nexport async function getUserPackageManager(path: string): Promise<PackageManager> {\n try {\n return await detectPackageManagerFromArtifacts(path);\n } catch (error) {\n return detectPackageManagerFromCurrentCommand();\n }\n}\n\nfunction detectPackageManagerFromCurrentCommand(): PackageManager {\n // This environment variable is set by npm and yarn but pnpm seems less consistent\n const userAgent = process.env.npm_config_user_agent;\n\n if (userAgent) {\n if (userAgent.startsWith(\"yarn\")) {\n return \"yarn\";\n } else if (userAgent.startsWith(\"pnpm\")) {\n return \"pnpm\";\n } else {\n return \"npm\";\n }\n } else {\n // If no user agent is set, assume npm\n return \"npm\";\n }\n}\n\nasync function detectPackageManagerFromArtifacts(path: string): Promise<PackageManager> {\n const packageFiles = [\n { name: \"yarn.lock\", pm: \"yarn\" } as const,\n { name: \"pnpm-lock.yaml\", pm: \"pnpm\" } as const,\n { name: \"package-lock.json\", pm: \"npm\" } as const,\n { name: \"npm-shrinkwrap.json\", pm: \"npm\" } as const,\n ];\n\n for (const { name, pm } of packageFiles) {\n const exists = await pathExists(pathModule.join(path, name));\n if (exists) {\n return pm;\n }\n }\n\n throw new Error(\"Could not detect package manager from artifacts\");\n}\n","import chalk from \"chalk\";\n\nexport const green = \"#4FFF54\";\nexport const purple = \"#735BF3\";\n\nexport function chalkGreen(text: string) {\n return chalk.hex(green)(text);\n}\n\nexport function chalkPurple(text: string) {\n return chalk.hex(purple)(text);\n}\n\nexport function chalkGrey(text: string) {\n return chalk.hex(\"#666\")(text);\n}\n\nexport function chalkError(text: string) {\n return chalk.red(text);\n}\n\nexport function chalkSuccess(text: string) {\n return chalk.green(text);\n}\n\nexport function chalkLink(text: string) {\n return chalk.underline.blue(text);\n}\n\nexport function logo() {\n return `${chalk.hex(green).bold(\"Trigger\")}${chalk.hex(purple).bold(\".dev\")}`;\n}\n","import { note, spinner } from \"@clack/prompts\";\nimport { ApiUrlOptionsSchema } from \"../cli\";\nimport { logger } from \"../utilities/logger\";\nimport { resolvePath } from \"../utilities/parseNameAndPath\";\nimport { readAuthConfigFile } from \"../utilities/configFiles\";\nimport { login } from \"./login\";\nimport { ApiClient } from \"../apiClient\";\n\ntype WhoAmIResult =\n | {\n success: true;\n data: {\n userId: string;\n email: string;\n };\n }\n | {\n success: false;\n error: string;\n };\n\nexport async function whoamiCommand(options: any): Promise<WhoAmIResult> {\n const result = ApiUrlOptionsSchema.safeParse(options);\n if (!result.success) {\n logger.error(result.error.message);\n return {\n success: false,\n error: result.error.message,\n };\n }\n\n return whoAmI(result.data.apiUrl);\n}\n\nexport async function whoAmI(apiUrl: string): Promise<WhoAmIResult> {\n const loadingSpinner = spinner();\n loadingSpinner.start(\"Checking your account details\");\n\n if (!readAuthConfigFile()?.accessToken) {\n loadingSpinner.stop(\"You must login.\");\n const loginResult = await login(apiUrl);\n if (!loginResult.success) {\n logger.error(loginResult.error);\n return {\n success: false,\n error: loginResult.error,\n };\n }\n }\n\n const accessToken = readAuthConfigFile()?.accessToken;\n if (!accessToken) {\n logger.error(\"No access token after login… this should never happen\");\n return {\n success: false,\n error: \"No access token after login… this should never happen\",\n };\n }\n\n const apiClient = new ApiClient(apiUrl);\n const userData = await apiClient.whoAmI({ accessToken });\n\n if (!userData.success) {\n loadingSpinner.stop(\"Error getting your account details\");\n logger.error(userData.error);\n return {\n success: false,\n error: userData.error,\n };\n }\n\n loadingSpinner.stop(\"Retrieved your account details\");\n\n note(\n `User ID: ${userData.data.userId}\nEmail: ${userData.data.email}`,\n \"Account details\"\n );\n\n return userData;\n}\n","import fs, { mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport xdgAppPaths from \"xdg-app-paths\";\nimport { z } from \"zod\";\nimport { isDirectory, pathExists, readJSONFileSync } from \"./fileSystem\";\n\nfunction getGlobalConfigFolderPath() {\n const configDir = xdgAppPaths(\".trigger\").config();\n const legacyConfigDir = path.join(os.homedir(), \".trigger\"); // Legacy config in user's home directory\n\n // Check for the .trigger directory in root, if it is not there then use the XDG compliant path.\n if (isDirectory(legacyConfigDir)) {\n return legacyConfigDir;\n } else {\n return configDir;\n }\n}\n\n//auth config file\nexport const UserAuthConfigSchema = z.object({\n accessToken: z.string().optional(),\n});\nexport type UserAuthConfig = z.infer<typeof UserAuthConfigSchema>;\n\nfunction getAuthConfigFilePath() {\n return path.join(getGlobalConfigFolderPath(), \"config\", \"default.json\");\n}\n\nexport function writeAuthConfigFile(config: UserAuthConfig) {\n const authConfigFilePath = getAuthConfigFilePath();\n mkdirSync(path.dirname(authConfigFilePath), {\n recursive: true,\n });\n writeFileSync(path.join(authConfigFilePath), JSON.stringify(config), {\n encoding: \"utf-8\",\n });\n}\n\nexport function readAuthConfigFile(): UserAuthConfig | undefined {\n const authConfigFilePath = getAuthConfigFilePath();\n if (!pathExists(authConfigFilePath)) {\n return;\n }\n\n const json = readJSONFileSync(authConfigFilePath);\n const parsed = UserAuthConfigSchema.parse(json);\n return parsed;\n}\n","// deno-fmt-ignore-file ## prefer customized `prettier` formatting\n\nimport _ from '../mod.cjs.js';\nexport * from '../mod.cjs.js';\nexport default _;\n","import { intro, log, outro, select, spinner } from \"@clack/prompts\";\nimport open from \"open\";\nimport pRetry, { AbortError } from \"p-retry\";\nimport { ApiClient } from \"../apiClient\";\nimport { ApiUrlOptionsSchema } from \"../cli\";\nimport { chalkLink } from \"../utilities/colors\";\nimport { readAuthConfigFile, writeAuthConfigFile } from \"../utilities/configFiles\";\nimport { logger } from \"../utilities/logger\";\nimport { whoAmI } from \"./whoami\";\n\nexport async function loginCommand(options: any) {\n const result = ApiUrlOptionsSchema.safeParse(options);\n if (!result.success) {\n logger.error(result.error.message);\n return;\n }\n\n return login(result.data.apiUrl);\n}\n\nexport type LoginResult =\n | {\n success: true;\n accessToken: string;\n }\n | {\n success: false;\n error: string;\n };\n\nexport async function login(apiUrl: string): Promise<LoginResult> {\n const apiClient = new ApiClient(apiUrl);\n\n intro(\"Logging in to Trigger.dev\");\n\n const existingAccessToken = readAuthConfigFile()?.accessToken;\n if (existingAccessToken) {\n const whoAmiI = await whoAmI(apiUrl);\n\n const continueOption = await select({\n message: \"You are already logged in.\",\n options: [\n {\n value: false,\n label: \"Exit\",\n },\n {\n value: true,\n label: \"Login with a different account\",\n },\n ],\n initialValue: false,\n });\n\n if (continueOption !== true) {\n outro(\"Already logged in\");\n return {\n success: true,\n accessToken: existingAccessToken,\n };\n }\n }\n\n //generate authorization code\n const createAuthCodeSpinner = spinner();\n createAuthCodeSpinner.start(\"Creating authorition code\");\n const authorizationCodeResult = await apiClient.createAuthorizationCode();\n if (!authorizationCodeResult.success) {\n createAuthCodeSpinner.stop(\n `Failed to create authorization code\\n${authorizationCodeResult.error}`\n );\n return {\n success: false,\n error: authorizationCodeResult.error,\n };\n }\n createAuthCodeSpinner.stop(\"Created authorization code\");\n\n //Link the user to the authorization code\n log.step(\n `Please visit the following URL to login:\\n${chalkLink(authorizationCodeResult.data.url)}`\n );\n await open(authorizationCodeResult.data.url);\n\n //poll for personal access token (we need to poll for it)\n const getPersonalAccessTokenSpinner = spinner();\n getPersonalAccessTokenSpinner.start(\"Waiting for you to login\");\n try {\n const indexResult = await pRetry(\n () => getPersonalAccessToken(apiClient, authorizationCodeResult.data.authorizationCode),\n {\n //this means we're polling, same distance between each attempt\n factor: 1,\n retries: 60,\n minTimeout: 1000,\n }\n );\n\n getPersonalAccessTokenSpinner.stop(`Logged in with token ${indexResult.obfuscatedToken}`);\n\n writeAuthConfigFile({ accessToken: indexResult.token });\n\n outro(\"Logged in successfully\");\n\n return {\n success: true,\n accessToken: indexResult.token,\n };\n } catch (e) {\n getPersonalAccessTokenSpinner.stop(`Failed to get access token`);\n if (e instanceof AbortError) {\n log.error(e.message);\n }\n return {\n success: false,\n error: e instanceof Error ? e.message : JSON.stringify(e),\n };\n }\n}\n\nasync function getPersonalAccessToken(apiClient: ApiClient, authorizationCode: string) {\n const token = await apiClient.getPersonalAccessToken(authorizationCode);\n\n if (!token.success) {\n throw new AbortError(token.error);\n }\n\n if (!token.data.token) {\n throw new Error(\"No token found yet\");\n }\n\n return {\n token: token.data.token.token,\n obfuscatedToken: token.data.token.obfuscatedToken,\n };\n}\n","import process from 'node:process';\nimport {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\nimport isWsl from 'is-wsl';\nimport defineLazyProperty from 'define-lazy-prop';\nimport defaultBrowser from 'default-browser';\nimport isInsideContainer from 'is-inside-container';\n\n// Path to included `xdg-open`.\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\nconst localXdgOpenPath = path.join(__dirname, 'xdg-open');\n\nconst {platform, arch} = process;\n\n/**\nGet the mount point for fixed drives in WSL.\n\n@inner\n@returns {string} The mount point.\n*/\nconst getWslDrivesMountPoint = (() => {\n\t// Default value for \"root\" param\n\t// according to https://docs.microsoft.com/en-us/windows/wsl/wsl-config\n\tconst defaultMountPoint = '/mnt/';\n\n\tlet mountPoint;\n\n\treturn async function () {\n\t\tif (mountPoint) {\n\t\t\t// Return memoized mount point value\n\t\t\treturn mountPoint;\n\t\t}\n\n\t\tconst configFilePath = '/etc/wsl.conf';\n\n\t\tlet isConfigFileExists = false;\n\t\ttry {\n\t\t\tawait fs.access(configFilePath, fsConstants.F_OK);\n\t\t\tisConfigFileExists = true;\n\t\t} catch {}\n\n\t\tif (!isConfigFileExists) {\n\t\t\treturn defaultMountPoint;\n\t\t}\n\n\t\tconst configContent = await fs.readFile(configFilePath, {encoding: 'utf8'});\n\t\tconst configMountPoint = /(?<!#.*)root\\s*=\\s*(?<mountPoint>.*)/g.exec(configContent);\n\n\t\tif (!configMountPoint) {\n\t\t\treturn defaultMountPoint;\n\t\t}\n\n\t\tmountPoint = configMountPoint.groups.mountPoint.trim();\n\t\tmountPoint = mountPoint.endsWith('/') ? mountPoint : `${mountPoint}/`;\n\n\t\treturn mountPoint;\n\t};\n})();\n\nconst pTryEach = async (array, mapper) => {\n\tlet latestError;\n\n\tfor (const item of array) {\n\t\ttry {\n\t\t\treturn await mapper(item); // eslint-disable-line no-await-in-loop\n\t\t} catch (error) {\n\t\t\tlatestError = error;\n\t\t}\n\t}\n\n\tthrow latestError;\n};\n\nconst baseOpen = async options => {\n\toptions = {\n\t\twait: false,\n\t\tbackground: false,\n\t\tnewInstance: false,\n\t\tallowNonzeroExitCode: false,\n\t\t...options,\n\t};\n\n\tif (Array.isArray(options.app)) {\n\t\treturn pTryEach(options.app, singleApp => baseOpen({\n\t\t\t...options,\n\t\t\tapp: singleApp,\n\t\t}));\n\t}\n\n\tlet {name: app, arguments: appArguments = []} = options.app ?? {};\n\tappArguments = [...appArguments];\n\n\tif (Array.isArray(app)) {\n\t\treturn pTryEach(app, appName => baseOpen({\n\t\t\t...options,\n\t\t\tapp: {\n\t\t\t\tname: appName,\n\t\t\t\targuments: appArguments,\n\t\t\t},\n\t\t}));\n\t}\n\n\tif (app === 'browser' || app === 'browserPrivate') {\n\t\t// IDs from default-browser for macOS and windows are the same\n\t\tconst ids = {\n\t\t\t'com.google.chrome': 'chrome',\n\t\t\t'google-chrome.desktop': 'chrome',\n\t\t\t'org.mozilla.firefox': 'firefox',\n\t\t\t'firefox.desktop': 'firefox',\n\t\t\t'com.microsoft.msedge': 'edge',\n\t\t\t'com.microsoft.edge': 'edge',\n\t\t\t'microsoft-edge.desktop': 'edge',\n\t\t};\n\n\t\t// Incognito flags for each browser in `apps`.\n\t\tconst flags = {\n\t\t\tchrome: '--incognito',\n\t\t\tfirefox: '--private-window',\n\t\t\tedge: '--inPrivate',\n\t\t};\n\n\t\tconst browser = await defaultBrowser();\n\t\tif (browser.id in ids) {\n\t\t\tconst browserName = ids[browser.id];\n\n\t\t\tif (app === 'browserPrivate') {\n\t\t\t\tappArguments.push(flags[browserName]);\n\t\t\t}\n\n\t\t\treturn baseOpen({\n\t\t\t\t...options,\n\t\t\t\tapp: {\n\t\t\t\t\tname: apps[browserName],\n\t\t\t\t\targuments: appArguments,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tthrow new Error(`${browser.name} is not supported as a default browser`);\n\t}\n\n\tlet command;\n\tconst cliArguments = [];\n\tconst childProcessOptions = {};\n\n\tif (platform === 'darwin') {\n\t\tcommand = 'open';\n\n\t\tif (options.wait) {\n\t\t\tcliArguments.push('--wait-apps');\n\t\t}\n\n\t\tif (options.background) {\n\t\t\tcliArguments.push('--background');\n\t\t}\n\n\t\tif (options.newInstance) {\n\t\t\tcliArguments.push('--new');\n\t\t}\n\n\t\tif (app) {\n\t\t\tcliArguments.push('-a', app);\n\t\t}\n\t} else if (platform === 'win32' || (isWsl && !isInsideContainer() && !app)) {\n\t\tconst mountPoint = await getWslDrivesMountPoint();\n\n\t\tcommand = isWsl\n\t\t\t? `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`\n\t\t\t: `${process.env.SYSTEMROOT || process.env.windir || 'C:\\\\Windows'}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell`;\n\n\t\tcliArguments.push(\n\t\t\t'-NoProfile',\n\t\t\t'-NonInteractive',\n\t\t\t'-ExecutionPolicy',\n\t\t\t'Bypass',\n\t\t\t'-EncodedCommand',\n\t\t);\n\n\t\tif (!isWsl) {\n\t\t\tchildProcessOptions.windowsVerbatimArguments = true;\n\t\t}\n\n\t\tconst encodedArguments = ['Start'];\n\n\t\tif (options.wait) {\n\t\t\tencodedArguments.push('-Wait');\n\t\t}\n\n\t\tif (app) {\n\t\t\t// Double quote with double quotes to ensure the inner quotes are passed through.\n\t\t\t// Inner quotes are delimited for PowerShell interpretation with backticks.\n\t\t\tencodedArguments.push(`\"\\`\"${app}\\`\"\"`);\n\t\t\tif (options.target) {\n\t\t\t\tappArguments.push(options.target);\n\t\t\t}\n\t\t} else if (options.target) {\n\t\t\tencodedArguments.push(`\"${options.target}\"`);\n\t\t}\n\n\t\tif (appArguments.length > 0) {\n\t\t\tappArguments = appArguments.map(argument => `\"\\`\"${argument}\\`\"\"`);\n\t\t\tencodedArguments.push('-ArgumentList', appArguments.join(','));\n\t\t}\n\n\t\t// Using Base64-encoded command, accepted by PowerShell, to allow special characters.\n\t\toptions.target = Buffer.from(encodedArguments.join(' '), 'utf16le').toString('base64');\n\t} else {\n\t\tif (app) {\n\t\t\tcommand = app;\n\t\t} else {\n\t\t\t// When bundled by Webpack, there's no actual package file path and no local `xdg-open`.\n\t\t\tconst isBundled = !__dirname || __dirname === '/';\n\n\t\t\t// Check if local `xdg-open` exists and is executable.\n\t\t\tlet exeLocalXdgOpen = false;\n\t\t\ttry {\n\t\t\t\tawait fs.access(localXdgOpenPath, fsConstants.X_OK);\n\t\t\t\texeLocalXdgOpen = true;\n\t\t\t} catch {}\n\n\t\t\tconst useSystemXdgOpen = process.versions.electron\n\t\t\t\t?? (platform === 'android' || isBundled || !exeLocalXdgOpen);\n\t\t\tcommand = useSystemXdgOpen ? 'xdg-open' : localXdgOpenPath;\n\t\t}\n\n\t\tif (appArguments.length > 0) {\n\t\t\tcliArguments.push(...appArguments);\n\t\t}\n\n\t\tif (!options.wait) {\n\t\t\t// `xdg-open` will block the process unless stdio is ignored\n\t\t\t// and it's detached from the parent even if it's unref'd.\n\t\t\tchildProcessOptions.stdio = 'ignore';\n\t\t\tchildProcessOptions.detached = true;\n\t\t}\n\t}\n\n\tif (platform === 'darwin' && appArguments.length > 0) {\n\t\tcliArguments.push('--args', ...appArguments);\n\t}\n\n\t// This has to come after `--args`.\n\tif (options.target) {\n\t\tcliArguments.push(options.target);\n\t}\n\n\tconst subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);\n\n\tif (options.wait) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsubprocess.once('error', reject);\n\n\t\t\tsubprocess.once('close', exitCode => {\n\t\t\t\tif (!options.allowNonzeroExitCode && exitCode > 0) {\n\t\t\t\t\treject(new Error(`Exited with code ${exitCode}`));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresolve(subprocess);\n\t\t\t});\n\t\t});\n\t}\n\n\tsubprocess.unref();\n\n\treturn subprocess;\n};\n\nconst open = (target, options) => {\n\tif (typeof target !== 'string') {\n\t\tthrow new TypeError('Expected a `target`');\n\t}\n\n\treturn baseOpen({\n\t\t...options,\n\t\ttarget,\n\t});\n};\n\nexport const openApp = (name, options) => {\n\tif (typeof name !== 'string') {\n\t\tthrow new TypeError('Expected a `name`');\n\t}\n\n\tconst {arguments: appArguments = []} = options ?? {};\n\tif (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {\n\t\tthrow new TypeError('Expected `appArguments` as Array type');\n\t}\n\n\treturn baseOpen({\n\t\t...options,\n\t\tapp: {\n\t\t\tname,\n\t\t\targuments: appArguments,\n\t\t},\n\t});\n};\n\nfunction detectArchBinary(binary) {\n\tif (typeof binary === 'string' || Array.isArray(binary)) {\n\t\treturn binary;\n\t}\n\n\tconst {[arch]: archBinary} = binary;\n\n\tif (!archBinary) {\n\t\tthrow new Error(`${arch} is not supported`);\n\t}\n\n\treturn archBinary;\n}\n\nfunction detectPlatformBinary({[platform]: platformBinary}, {wsl}) {\n\tif (wsl && isWsl) {\n\t\treturn detectArchBinary(wsl);\n\t}\n\n\tif (!platformBinary) {\n\t\tthrow new Error(`${platform} is not supported`);\n\t}\n\n\treturn detectArchBinary(platformBinary);\n}\n\nexport const apps = {};\n\ndefineLazyProperty(apps, 'chrome', () => detectPlatformBinary({\n\tdarwin: 'google chrome',\n\twin32: 'chrome',\n\tlinux: ['google-chrome', 'google-chrome-stable', 'chromium'],\n}, {\n\twsl: {\n\t\tia32: '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe',\n\t\tx64: ['/mnt/c/Program Files/Google/Chrome/Application/chrome.exe', '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'],\n\t},\n}));\n\ndefineLazyProperty(apps, 'firefox', () => detectPlatformBinary({\n\tdarwin: 'firefox',\n\twin32: 'C:\\\\Program Files\\\\Mozilla Firefox\\\\firefox.exe',\n\tlinux: 'firefox',\n}, {\n\twsl: '/mnt/c/Program Files/Mozilla Firefox/firefox.exe',\n}));\n\ndefineLazyProperty(apps, 'edge', () => detectPlatformBinary({\n\tdarwin: 'microsoft edge',\n\twin32: 'msedge',\n\tlinux: ['microsoft-edge', 'microsoft-edge-dev'],\n}, {\n\twsl: '/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe',\n}));\n\ndefineLazyProperty(apps, 'browser', () => 'browser');\n\ndefineLazyProperty(apps, 'browserPrivate', () => 'browserPrivate');\n\nexport default open;\n","import process from 'node:process';\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport isInsideContainer from 'is-inside-container';\n\nconst isWsl = () => {\n\tif (process.platform !== 'linux') {\n\t\treturn false;\n\t}\n\n\tif (os.release().toLowerCase().includes('microsoft')) {\n\t\tif (isInsideContainer()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\ttry {\n\t\treturn fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')\n\t\t\t? !isInsideContainer() : false;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default process.env.__IS_WSL_TEST__ ? isWsl : isWsl();\n","import fs from 'node:fs';\nimport isDocker from 'is-docker';\n\nlet cachedResult;\n\n// Podman detection\nconst hasContainerEnv = () => {\n\ttry {\n\t\tfs.statSync('/run/.containerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default function isInsideContainer() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (cachedResult === undefined) {\n\t\tcachedResult = hasContainerEnv() || isDocker();\n\t}\n\n\treturn cachedResult;\n}\n","import fs from 'node:fs';\n\nlet isDockerCached;\n\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs.statSync('/.dockerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport default function isDocker() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (isDockerCached === undefined) {\n\t\tisDockerCached = hasDockerEnv() || hasDockerCGroup();\n\t}\n\n\treturn isDockerCached;\n}\n","export default function defineLazyProperty(object, propertyName, valueGetter) {\n\tconst define = value => Object.defineProperty(object, propertyName, {value, enumerable: true, writable: true});\n\n\tObject.defineProperty(object, propertyName, {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\tget() {\n\t\t\tconst result = valueGetter();\n\t\t\tdefine(result);\n\t\t\treturn result;\n\t\t},\n\t\tset(value) {\n\t\t\tdefine(value);\n\t\t}\n\t});\n\n\treturn object;\n}\n","import {promisify} from 'node:util';\nimport process from 'node:process';\nimport {execFile} from 'node:child_process';\nimport defaultBrowserId from 'default-browser-id';\nimport bundleName from 'bundle-name';\nimport windows from './windows.js';\n\nconst execFileAsync = promisify(execFile);\n\n// Inlined: https://github.com/sindresorhus/titleize/blob/main/index.js\nconst titleize = string => string.toLowerCase().replaceAll(/(?:^|\\s|-)\\S/g, x => x.toUpperCase());\n\nexport default async function defaultBrowser() {\n\tif (process.platform === 'darwin') {\n\t\tconst id = await defaultBrowserId();\n\t\tconst name = await bundleName(id);\n\t\treturn {name, id};\n\t}\n\n\tif (process.platform === 'linux') {\n\t\tconst {stdout} = await execFileAsync('xdg-mime', ['query', 'default', 'x-scheme-handler/http']);\n\t\tconst id = stdout.trim();\n\t\tconst name = titleize(id.replace(/.desktop$/, '').replace('-', ' '));\n\t\treturn {name, id};\n\t}\n\n\tif (process.platform === 'win32') {\n\t\treturn windows();\n\t}\n\n\tthrow new Error('Only macOS, Linux, and Windows are supported');\n}\n","import {promisify} from 'node:util';\nimport process from 'node:process';\nimport {execFile} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\nexport default async function defaultBrowserId() {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst {stdout} = await execFileAsync('defaults', ['read', 'com.apple.LaunchServices/com.apple.launchservices.secure', 'LSHandlers']);\n\n\t// `(?!-)` is to prevent matching `LSHandlerRoleAll = \"-\";`.\n\tconst match = /LSHandlerRoleAll = \"(?!-)(?<id>[^\"]+?)\";\\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);\n\n\treturn match?.groups.id ?? 'com.apple.Safari';\n}\n","import process from 'node:process';\nimport {promisify} from 'node:util';\nimport {execFile, execFileSync} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\nexport async function runAppleScript(script, {humanReadableOutput = true} = {}) {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst outputArguments = humanReadableOutput ? [] : ['-ss'];\n\n\tconst {stdout} = await execFileAsync('osascript', ['-e', script, outputArguments]);\n\treturn stdout.trim();\n}\n\nexport function runAppleScriptSync(script, {humanReadableOutput = true} = {}) {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst outputArguments = humanReadableOutput ? [] : ['-ss'];\n\n\tconst stdout = execFileSync('osascript', ['-e', script, ...outputArguments], {\n\t\tencoding: 'utf8',\n\t\tstdio: ['ignore', 'pipe', 'ignore'],\n\t\ttimeout: 500,\n\t});\n\n\treturn stdout.trim();\n}\n","import {runAppleScript} from 'run-applescript';\n\nexport default async function bundleName(bundleId) {\n\treturn runAppleScript(`tell application \"Finder\" to set app_path to application file id \"${bundleId}\" as string\\ntell application \"System Events\" to get value of property list item \"CFBundleName\" of property list file (app_path & \":Contents:Info.plist\")`);\n}\n","import {promisify} from 'node:util';\nimport {execFile} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\n// Windows doesn't have browser IDs in the same way macOS/Linux does so we give fake\n// ones that look real and match the macOS/Linux versions for cross-platform apps.\nconst windowsBrowserProgIds = {\n\tAppXq0fevzme2pys62n3e0fbqa7peapykr8v: {name: 'Edge', id: 'com.microsoft.edge.old'},\n\tMSEdgeDHTML: {name: 'Edge', id: 'com.microsoft.edge'}, // On macOS, it's \"com.microsoft.edgemac\"\n\tMSEdgeHTM: {name: 'Edge', id: 'com.microsoft.edge'}, // Newer Edge/Win10 releases\n\t'IE.HTTP': {name: 'Internet Explorer', id: 'com.microsoft.ie'},\n\tFirefoxURL: {name: 'Firefox', id: 'org.mozilla.firefox'},\n\tChromeHTML: {name: 'Chrome', id: 'com.google.chrome'},\n\tBraveHTML: {name: 'Brave', id: 'com.brave.Browser'},\n\tBraveBHTML: {name: 'Brave Beta', id: 'com.brave.Browser.beta'},\n\tBraveSSHTM: {name: 'Brave Nightly', id: 'com.brave.Browser.nightly'},\n};\n\nexport class UnknownBrowserError extends Error {}\n\nexport default async function defaultBrowser(_execFileAsync = execFileAsync) {\n\tconst {stdout} = await _execFileAsync('reg', [\n\t\t'QUERY',\n\t\t' HKEY_CURRENT_USER\\\\Software\\\\Microsoft\\\\Windows\\\\Shell\\\\Associations\\\\UrlAssociations\\\\http\\\\UserChoice',\n\t\t'/v',\n\t\t'ProgId',\n\t]);\n\n\tconst match = /ProgId\\s*REG_SZ\\s*(?<id>\\S+)/.exec(stdout);\n\tif (!match) {\n\t\tthrow new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);\n\t}\n\n\tconst {id} = match.groups;\n\n\tconst browser = windowsBrowserProgIds[id];\n\tif (!browser) {\n\t\tthrow new UnknownBrowserError(`Unknown browser ID: ${id}`);\n\t}\n\n\treturn browser;\n}\n","import retry from 'retry';\nimport isNetworkError from 'is-network-error';\n\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\n\t\tif (message instanceof Error) {\n\t\t\tthis.originalError = message;\n\t\t\t({message} = message);\n\t\t} else {\n\t\t\tthis.originalError = new Error(message);\n\t\t\tthis.originalError.stack = this.stack;\n\t\t}\n\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\nconst decorateErrorWithCounts = (error, attemptNumber, options) => {\n\t// Minus 1 from attemptNumber because the first attempt does not count as a retry\n\tconst retriesLeft = options.retries - (attemptNumber - 1);\n\n\terror.attemptNumber = attemptNumber;\n\terror.retriesLeft = retriesLeft;\n\treturn error;\n};\n\nexport default async function pRetry(input, options) {\n\treturn new Promise((resolve, reject) => {\n\t\toptions = {\n\t\t\tonFailedAttempt() {},\n\t\t\tretries: 10,\n\t\t\t...options,\n\t\t};\n\n\t\tconst operation = retry.operation(options);\n\n\t\tconst abortHandler = () => {\n\t\t\toperation.stop();\n\t\t\treject(options.signal?.reason);\n\t\t};\n\n\t\tif (options.signal && !options.signal.aborted) {\n\t\t\toptions.signal.addEventListener('abort', abortHandler, {once: true});\n\t\t}\n\n\t\tconst cleanUp = () => {\n\t\t\toptions.signal?.removeEventListener('abort', abortHandler);\n\t\t\toperation.stop();\n\t\t};\n\n\t\toperation.attempt(async attemptNumber => {\n\t\t\ttry {\n\t\t\t\tconst result = await input(attemptNumber);\n\t\t\t\tcleanUp();\n\t\t\t\tresolve(result);\n\t\t\t} catch (error) {\n\t\t\t\ttry {\n\t\t\t\t\tif (!(error instanceof Error)) {\n\t\t\t\t\t\tthrow new TypeError(`Non-error was thrown: \"${error}\". You should only throw errors.`);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error instanceof AbortError) {\n\t\t\t\t\t\tthrow error.originalError;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error instanceof TypeError && !isNetworkError(error)) {\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\n\t\t\t\t\tawait options.onFailedAttempt(decorateErrorWithCounts(error, attemptNumber, options));\n\n\t\t\t\t\tif (!operation.retry(error)) {\n\t\t\t\t\t\tthrow operation.mainError();\n\t\t\t\t\t}\n\t\t\t\t} catch (finalError) {\n\t\t\t\t\tdecorateErrorWithCounts(finalError, attemptNumber, options);\n\t\t\t\t\tcleanUp();\n\t\t\t\t\treject(finalError);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n","const objectToString = Object.prototype.toString;\n\nconst isError = value => objectToString.call(value) === '[object Error]';\n\nconst errorMessages = new Set([\n\t'Failed to fetch', // Chrome\n\t'NetworkError when attempting to fetch resource.', // Firefox\n\t'The Internet connection appears to be offline.', // Safari 16\n\t'Load failed', // Safari 17+\n\t'Network request failed', // `cross-fetch`\n\t'fetch failed', // Undici (Node.js)\n]);\n\nexport default function isNetworkError(error) {\n\tconst isValid = error\n\t\t&& isError(error)\n\t\t&& error.name === 'TypeError'\n\t\t&& typeof error.message === 'string';\n\n\tif (!isValid) {\n\t\treturn false;\n\t}\n\n\t// We do an extra check for Safari 17+ as it has a very generic error message.\n\t// Network errors in Safari have no stack.\n\tif (error.message === 'Load failed') {\n\t\treturn error.stack === undefined;\n\t}\n\n\treturn errorMessages.has(error.message);\n}\n","import { z } from \"zod\";\nimport {\n CreateAuthorizationCodeResponseSchema,\n GetPersonalAccessTokenResponseSchema,\n WhoAmIResponseSchema,\n} from \"@trigger.dev/core\";\n\nexport class ApiClient {\n constructor(private readonly apiURL: string) {\n this.apiURL = apiURL;\n }\n\n async createAuthorizationCode() {\n return zodfetch(\n CreateAuthorizationCodeResponseSchema,\n `${this.apiURL}/api/v1/authorization-code`,\n {\n method: \"POST\",\n }\n );\n }\n\n async getPersonalAccessToken(authorizationCode: string) {\n return zodfetch(GetPersonalAccessTokenResponseSchema, `${this.apiURL}/api/v1/token`, {\n method: \"POST\",\n body: JSON.stringify({\n authorizationCode,\n }),\n });\n }\n\n async whoAmI({ accessToken }: { accessToken: string }) {\n return zodfetch(WhoAmIResponseSchema, `${this.apiURL}/api/v2/whoami`, {\n headers: {\n Authorization: `Bearer ${accessToken}`,\n \"Content-Type\": \"application/json\",\n },\n });\n }\n}\n\ntype ApiResult<TSuccessResult> =\n | { success: true; data: TSuccessResult }\n | {\n success: false;\n error: string;\n };\n\nasync function zodfetch<TResponseBody extends any>(\n schema: z.Schema<TResponseBody>,\n url: string,\n requestInit?: RequestInit\n): Promise<ApiResult<TResponseBody>> {\n try {\n const response = await fetch(url, requestInit);\n\n if ((!requestInit || requestInit.method === \"GET\") && response.status === 404) {\n return {\n success: false,\n error: `404: ${response.statusText}`,\n };\n }\n\n if (response.status >= 400 && response.status < 500) {\n const body = await response.json();\n if (!body.error) {\n return { success: false, error: \"Something went wrong\" };\n }\n\n return { success: false, error: body.error };\n }\n\n if (response.status !== 200) {\n return {\n success: false,\n error: `Failed to fetch ${url}, got status code ${response.status}`,\n };\n }\n\n const jsonBody = await response.json();\n const parsedResult = schema.safeParse(jsonBody);\n\n if (parsedResult.success) {\n return { success: true, data: parsedResult.data };\n }\n\n if (\"error\" in jsonBody) {\n return {\n success: false,\n error: typeof jsonBody.error === \"string\" ? jsonBody.error : JSON.stringify(jsonBody.error),\n };\n }\n\n return { success: false, error: parsedResult.error.message };\n } catch (error) {\n return {\n success: false,\n error: error instanceof Error ? error.message : JSON.stringify(error),\n };\n }\n}\n","import chalk from \"chalk\";\nimport type { Result } from \"update-check\";\nimport checkForUpdate from \"update-check\";\nimport pkg from \"../../package.json\";\nimport { chalkGrey, logo } from \"./colors\";\nimport { getVersion } from \"./getVersion\";\nimport { logger } from \"./logger\";\nimport { spinner, intro } from \"@clack/prompts\";\n\nexport async function printInitialBanner(performUpdateCheck = true) {\n const packageVersion = getVersion();\n const text = `\\n${logo()} ${chalkGrey(`(${packageVersion})`)}\\n`;\n\n logger.info(text);\n\n let maybeNewVersion: string | undefined;\n if (performUpdateCheck) {\n const loadingSpinner = spinner();\n loadingSpinner.start(\"Checking for updates\");\n maybeNewVersion = await updateCheck();\n\n // Log a slightly more noticeable message if this is a major bump\n if (maybeNewVersion !== undefined) {\n loadingSpinner.stop(`Update available ${chalk.green(maybeNewVersion)})`);\n const currentMajor = parseInt(packageVersion.split(\".\")[0]!);\n const newMajor = parseInt(maybeNewVersion.split(\".\")[0]!);\n if (newMajor > currentMajor) {\n logger.warn(\n `Please update to the latest version of \\`trigger.dev\\` to prevent critical errors.\nRun \\`npm install --save-dev trigger.dev@${newMajor}\\` to update to the latest version.\nAfter installation, run Trigger.dev with \\`npx trigger.dev\\`.`\n );\n }\n } else {\n loadingSpinner.stop(\"On latest version\");\n }\n }\n}\n\nasync function doUpdateCheck(): Promise<string | undefined> {\n let update: Result | null = null;\n try {\n // default cache for update check is 1 day\n update = await checkForUpdate(pkg, {\n distTag: pkg.version.startsWith(\"0.0.0\") ? \"beta\" : \"latest\",\n });\n } catch (err) {\n // ignore error\n }\n return update?.latest;\n}\n\n//only do this once while the cli is running\nlet updateCheckPromise: Promise<string | undefined>;\nexport function updateCheck(): Promise<string | undefined> {\n return (updateCheckPromise ??= doUpdateCheck());\n}\n","{\n \"name\": \"trigger.dev\",\n \"version\": \"1.0.1\",\n \"description\": \"A Command-Line Interface for Trigger.dev (v3) projects\",\n \"main\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/triggerdotdev/trigger.dev.git\",\n \"directory\": \"packages/cli-v3\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"keywords\": [\n \"typescript\",\n \"trigger.dev\",\n \"workflows\",\n \"orchestration\",\n \"events\",\n \"webhooks\",\n \"integrations\",\n \"apis\",\n \"jobs\",\n \"background jobs\",\n \"nextjs\"\n ],\n \"files\": [\n \"dist\"\n ],\n \"type\": \"module\",\n \"exports\": \"./dist/index.js\",\n \"bin\": {\n \"trigger-v3-cli\": \"./dist/index.js\"\n },\n \"devDependencies\": {\n \"@trigger.dev/core\": \"workspace:*\",\n \"@trigger.dev/tsconfig\": \"workspace:*\",\n \"@types/gradient-string\": \"^1.1.2\",\n \"@types/mock-fs\": \"^4.13.1\",\n \"@types/node\": \"16\",\n \"@types/node-fetch\": \"^2.6.2\",\n \"@types/ws\": \"^8.5.3\",\n \"open\": \"^10.0.3\",\n \"p-retry\": \"^6.1.0\",\n \"rimraf\": \"^3.0.2\",\n \"tsup\": \"^6.5.0\",\n \"type-fest\": \"^3.6.0\",\n \"typescript\": \"^4.9.5\",\n \"vitest\": \"^0.34.4\",\n \"xdg-app-paths\": \"^8.3.0\"\n },\n \"scripts\": {\n \"typecheck\": \"tsc\",\n \"build\": \"tsup\",\n \"dev\": \"tsup --watch\",\n \"clean\": \"rimraf dist\",\n \"start\": \"node dist/index.js\",\n \"test\": \"vitest\"\n },\n \"dependencies\": {\n \"@clack/prompts\": \"^0.7.0\",\n \"@trigger.dev/core\": \"workspace:*\",\n \"@types/degit\": \"^2.8.3\",\n \"chalk\": \"^5.2.0\",\n \"chokidar\": \"^3.5.3\",\n \"cli-table3\": \"^0.6.3\",\n \"commander\": \"^9.4.1\",\n \"degit\": \"^2.8.4\",\n \"dotenv\": \"^16.3.1\",\n \"execa\": \"^7.0.0\",\n \"gradient-string\": \"^2.0.2\",\n \"liquidjs\": \"^10.9.2\",\n \"mock-fs\": \"^5.2.0\",\n \"nanoid\": \"^4.0.2\",\n \"node-fetch\": \"^3.3.0\",\n \"npm-check-updates\": \"^16.12.2\",\n \"posthog-node\": \"^3.1.1\",\n \"proxy-agent\": \"^6.3.0\",\n \"simple-git\": \"^3.19.0\",\n \"update-check\": \"^1.5.4\",\n \"url\": \"^0.11.1\",\n \"ws\": \"^8.11.0\",\n \"zod\": \"3.22.3\"\n },\n \"engines\": {\n \"node\": \">=18.0.0\"\n }\n}\n","#!/usr/bin/env node\n\nimport { program } from \"./cli/index\";\nimport { logger } from \"./utilities/logger\";\n\nconst main = async () => {\n await program.parseAsync();\n};\n\nmain().catch((err) => {\n if (err instanceof Error) {\n logger.error(err);\n } else {\n logger.error(\"An unknown error has occurred. Please open an issue on github with the below:\");\n logger.error(err);\n }\n process.exit(1);\n});\n"],"mappings":";;y6BAAA,IAAAA,GAAAC,EAAAC,IAAA,cACAA,G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,oBAAqB,2CAAA,EAC5BA,OAAO,4BAA6B,0DAAA,EACpCA,OAAO,wBAAyB,2CAAA,EAChCA,OACC,yBACA,8GAAA,EAEDH,QAAQC,EAAAA,EAAc,gBAAiB,4BAAA,EACvCG,OAAO,MAAOM,EAAML,IAAY,CAC/B,GAAI,CACF,MAAMC,EAAAA,EACN,MAAMK,GAAWD,EAAML,CAAAA,CACzB,OAASG,EAAP,CAEA,MAAMA,CACR,CACF,CAAA,EAEFjB,EACGW,QAAQ,QAAA,EACRH,YACC,kGAAA,EAEDU,SAAS,SAAU,gEAAiE,GAAA,EACpFN,OAAO,yBAA0B,uCAAwC,QAAA,EACzEC,OAAO,MAAOM,EAAML,IAAY,CAC/B,MAAMC,EAAmB,EAAK,EAC9B,MAAMM,GAAcF,EAAML,CAAAA,CAC5B,CAAA,EAEFd,EACGW,QAAQ,QAAA,EACRH,YAAY,wDAAA,EACZI,OACC,wBACA,8DACA,2BAAA,EAEDH,QAAQC,EAAAA,EAAc,gBAAiB,4BAAA,EACvCG,OAAO,MAAOC,GAAY,CACzB,GAAI,CACF,MAAMC,EAAAA,EACN,MAAMO,GAAcR,CAAAA,CACtB,OAASG,EAAP,CACA,MAAMA,CACR,CACF,CAAA,E+BxFF,IAAMM,GAAOC,EAAA,SAAY,CACvB,MAAMC,EAAQC,WAAU,CAC1B,EAFa,QAIbH,GAAAA,EAAOI,MAAOC,GAAQ,CAChBA,aAAeC,MACjBC,EAAOC,MAAMH,CAAAA,GAEbE,EAAOC,MAAM,+EAAA,EACbD,EAAOC,MAAMH,CAAAA,GAEfI,QAAQC,KAAK,CAAA,CACf,CAAA","names":["require_XDGAppPaths","__commonJSMin","exports","__esModule","Adapt","isBoolean","t","typeOf","isObject","isString","adapter_","meta","path","xdg","XDGAppPaths_","options_","_a","_b","_c","XDGAppPaths","options","name","suffix","isolated_","isolated","namePriorityList","pkgMainFilename","mainFilename","nameFallback","parse","find","e","$name","__name","$isolated","isIsolated","dirOptions","finalPathSegment","cache","join","config","data","runtime","state","configDirs","map","s","dataDirs","require_XDG","__commonJSMin","exports","__spreadArray","to","from","i","il","length","j","__esModule","Adapt","adapter_","env","osPaths","path","isMacOS","test","process","platform","isWinOS","baseDir","home","temp","valOrPath","val","pathSegments","join","apply","linux","__name","cache","get","config","data","runtime","state","macos","windows","appData","localAppData","XDG_","XDG","extension","configDirs","pathList","split","delimiter","dataDirs","require_OSPaths","__commonJSMin","exports","__spreadArray","to","from","i","il","length","j","__esModule","Adapt","isEmpty","s","adapter_","env","os","path","isWinOS","test","process","platform","normalizePath","path_","normalize","join","home","posix","__name","homedir","get","windows","priorityList","find","v","temp","joinPathToBase","base","segments","apply","fallback","tmpdir","priorityListLazy","OSPaths_","OSPaths","require_node","__commonJSMin","exports","__createBinding","Object","create","o","m","k","k2","undefined","defineProperty","enumerable","get","__setModuleDefault","v","value","__importStar","mod","__esModule","result","prototype","hasOwnProperty","call","adapter","os","require","path","atImportPermissions","env","s","process","require_mod_cjs","__commonJSMin","exports","module","OSPaths_js_1","require","node_js_1","Adapt","adapter","OSPaths","require_node","__commonJSMin","exports","__createBinding","Object","create","o","m","k","k2","undefined","defineProperty","enumerable","get","__setModuleDefault","v","value","__importStar","mod","__esModule","result","prototype","hasOwnProperty","call","__importDefault","adapter","path","require","os_paths_1","atImportPermissions","env","s","process","osPaths","require_mod_cjs","__commonJSMin","exports","module","XDG_js_1","require","node_js_1","Adapt","adapter","XDG","require_node","__commonJSMin","exports","__createBinding","Object","create","o","m","k","k2","undefined","defineProperty","enumerable","get","__setModuleDefault","v","value","__importStar","mod","__esModule","result","prototype","hasOwnProperty","call","__importDefault","adapter","path","require","xdg_portable_1","atImportPermissions","env","read","meta","mainFilename","requireMain","main","filename","requireMainFilename","process","execArgv","_eval","argv","pkgMainFilename","pkg","execPath","xdg","require_mod_cjs","__commonJSMin","exports","module","XDGAppPaths_js_1","require","node_js_1","Adapt","adapter","XDGAppPaths","require_retry_operation","__commonJSMin","exports","module","RetryOperation","timeouts","options","forever","_originalTimeouts","JSON","parse","stringify","_timeouts","_options","_maxRetryTime","maxRetryTime","Infinity","_fn","_errors","_attempts","_operationTimeout","_operationTimeoutCb","_timeout","_operationStart","_timer","_cachedTimeouts","slice","prototype","reset","stop","clearTimeout","retry","err","currentTime","Date","getTime","push","unshift","Error","timeout","shift","undefined","splice","length","self","setTimeout","unref","attempt","fn","timeoutOps","cb","try","console","log","start","errors","attempts","mainError","counts","mainErrorCount","i","error","message","count","require_retry","__commonJSMin","exports","RetryOperation","require","operation","options","timeouts","forever","retries","Infinity","unref","maxRetryTime","Array","concat","opts","factor","minTimeout","maxTimeout","randomize","key","Error","i","push","createTimeout","length","sort","a","b","attempt","random","Math","timeout","round","max","pow","min","wrap","obj","methods","method","original","__name","op","args","prototype","slice","call","arguments","callback","pop","err","retry","mainError","apply","bind","module","exports","require","Command","childProcess","util","z","PostHog","nanoid","path","path","fileURLToPath","__filename","url","distPath","dirname","PKG_ROOT","join","COMMAND_NAME","fsSync","fsModule","writeFile","fs","isDirectory","configPath","fs","statSync","pathExists","path","fsModule","access","writeJSONFile","path","json","writeFile","JSON","stringify","readJSONFileSync","fileContents","fsSync","readFileSync","parse","getVersion","packageJsonPath","path","join","PKG_ROOT","readJSONFileSync","version","postHogApiKey","TelemetryClient","#client","#sessionId","#version","constructor","PostHog","host","flushAt","nanoid","getVersion","identify","organizationId","projectId","userId","alias","distinctId","groupIdentify","groupType","groupKey","dev","started","path","options","capture","event","properties","telemetryClient","chalk","CLITable","logger","log","args","console","error","red","warn","yellow","info","cyan","success","green","table","data","length","keys","Object","t","head","style","level","border","push","map","row","k","toString","pathModule","resolvePath","__name","input","pathModule","resolve","process","cwd","asyncExecFile","util","promisify","childProcess","execFile","DevCommandOptionsSchema","z","object","port","coerce","number","optional","hostname","string","envFile","clientId","formattedDate","Intl","DateTimeFormat","hour","minute","second","devCommand","path","anyOptions","telemetryClient","dev","started","result","safeParse","success","logger","error","message","options","data","resolvedPath","resolvePath","spinner","confirm","path","run","spinner","pathModule","getUserPackageManager","path","detectPackageManagerFromArtifacts","detectPackageManagerFromCurrentCommand","userAgent","process","env","npm_config_user_agent","startsWith","packageFiles","name","pm","pathExists","pathModule","join","Error","chalk","execa","installDependencies","projectDir","logger","info","pkgManager","getUserPackageManager","runInstallCommand","spinner","stop","chalk","green","execa","cwd","stderr","loadingSpinner","start","pnpmSubprocess","stdout","Promise","res","rej","on","data","text","toString","includes","message","split","e","yarnSubprocess","z","chalk","green","purple","chalkGrey","text","chalk","hex","chalkError","red","chalkSuccess","green","chalkLink","underline","blue","logo","bold","purple","UpdateCommandOptionsSchema","z","object","to","string","optional","updateCommand","projectPath","anyOptions","loadingSpinner","spinner","start","parseRes","safeParse","success","stop","chalkError","error","message","options","data","triggerDevPackage","packageJSONPath","path","join","packageData","readJSONFileSync","packageMaps","packageDependencies","dependencies","packageDevDependencies","devDependencies","Object","keys","forEach","i","type","version","targetVersion","getTargetVersion","updatedDependencies","run","upgrade","jsonUpgraded","target","ncuOptions","ifUpdatedDependenciesIsPackageJSON","hasOwnProperty","triggerPackages","filter","pkg","startsWith","length","chalkSuccess","packagesToUpdate","applyUpdates","hasUserConfirmed","newPackageJSON","packageName","tmp","writeJSONFile","installDependencies","toVersion","console","log","table","map","name","old","new","confirm","note","spinner","mkdirSync","writeFileSync","os","path","mod_esm_exports","__export","mod_esm_default","import_mod_cjs","__reExport","_","z","getGlobalConfigFolderPath","configDir","xdgAppPaths","config","legacyConfigDir","path","join","os","homedir","isDirectory","UserAuthConfigSchema","z","object","accessToken","string","optional","getAuthConfigFilePath","writeAuthConfigFile","authConfigFilePath","mkdirSync","dirname","recursive","writeFileSync","JSON","stringify","encoding","readAuthConfigFile","pathExists","json","readJSONFileSync","parse","intro","log","outro","select","spinner","process","Buffer","path","fileURLToPath","childProcess","fs","constants","fsConstants","process","os","fs","fs","fs","isDockerCached","hasDockerEnv","fs","statSync","hasDockerCGroup","readFileSync","includes","isDocker","undefined","cachedResult","hasContainerEnv","__name","fs","statSync","isInsideContainer","undefined","isDocker","isWsl","__name","process","platform","os","release","toLowerCase","includes","isInsideContainer","fs","readFileSync","is_wsl_default","env","__IS_WSL_TEST__","defineLazyProperty","object","propertyName","valueGetter","define","value","Object","defineProperty","enumerable","writable","configurable","get","result","set","promisify","process","execFile","promisify","process","execFile","execFileAsync","promisify","execFile","defaultBrowserId","process","platform","Error","stdout","exec","groups","id","process","promisify","execFile","execFileSync","execFileAsync","promisify","execFile","runAppleScript","script","humanReadableOutput","process","platform","Error","outputArguments","stdout","trim","bundleName","bundleId","runAppleScript","promisify","execFile","execFileAsync","promisify","execFile","windowsBrowserProgIds","AppXq0fevzme2pys62n3e0fbqa7peapykr8v","name","id","MSEdgeDHTML","MSEdgeHTM","FirefoxURL","ChromeHTML","BraveHTML","BraveBHTML","BraveSSHTM","UnknownBrowserError","Error","defaultBrowser","_execFileAsync","stdout","match","exec","JSON","stringify","groups","browser","execFileAsync","promisify","execFile","titleize","string","toLowerCase","replaceAll","x","toUpperCase","defaultBrowser","process","platform","id","defaultBrowserId","name","bundleName","stdout","trim","replace","windows","Error","__dirname","path","dirname","fileURLToPath","url","localXdgOpenPath","join","platform","arch","process","getWslDrivesMountPoint","defaultMountPoint","mountPoint","configFilePath","isConfigFileExists","fs","access","fsConstants","F_OK","configContent","readFile","encoding","configMountPoint","exec","groups","trim","endsWith","pTryEach","__name","array","mapper","latestError","item","error","baseOpen","options","wait","background","newInstance","allowNonzeroExitCode","Array","isArray","app","singleApp","name","arguments","appArguments","appName","ids","flags","chrome","firefox","edge","browser","defaultBrowser","id","browserName","push","apps","Error","command","cliArguments","childProcessOptions","isWsl","isInsideContainer","env","SYSTEMROOT","windir","windowsVerbatimArguments","encodedArguments","target","length","map","argument","Buffer","from","toString","isBundled","exeLocalXdgOpen","X_OK","versions","electron","stdio","detached","subprocess","childProcess","spawn","Promise","resolve","reject","once","exitCode","unref","open","TypeError","detectArchBinary","binary","Array","isArray","arch","archBinary","Error","detectPlatformBinary","platform","platformBinary","wsl","isWsl","apps","defineLazyProperty","darwin","win32","linux","ia32","x64","open_default","open","import_retry","objectToString","Object","prototype","toString","isError","value","call","errorMessages","Set","isNetworkError","error","name","message","stack","undefined","has","AbortError","Error","constructor","message","originalError","stack","name","decorateErrorWithCounts","__name","error","attemptNumber","options","retriesLeft","retries","pRetry","input","Promise","resolve","reject","onFailedAttempt","operation","retry","abortHandler","stop","signal","reason","aborted","addEventListener","once","cleanUp","removeEventListener","attempt","result","TypeError","isNetworkError","mainError","finalError","CreateAuthorizationCodeResponseSchema","GetPersonalAccessTokenResponseSchema","WhoAmIResponseSchema","ApiClient","constructor","apiURL","createAuthorizationCode","zodfetch","CreateAuthorizationCodeResponseSchema","method","getPersonalAccessToken","authorizationCode","GetPersonalAccessTokenResponseSchema","body","JSON","stringify","whoAmI","accessToken","WhoAmIResponseSchema","headers","Authorization","schema","url","requestInit","response","fetch","status","success","error","statusText","json","jsonBody","parsedResult","safeParse","data","message","Error","loginCommand","options","result","ApiUrlOptionsSchema","safeParse","success","logger","error","message","login","data","apiUrl","apiClient","ApiClient","intro","existingAccessToken","readAuthConfigFile","accessToken","whoAmiI","whoAmI","select","value","label","initialValue","outro","createAuthCodeSpinner","spinner","start","authorizationCodeResult","createAuthorizationCode","stop","log","step","chalkLink","url","open","getPersonalAccessTokenSpinner","indexResult","pRetry","getPersonalAccessToken","authorizationCode","factor","retries","minTimeout","obfuscatedToken","writeAuthConfigFile","token","e","AbortError","Error","JSON","stringify","whoamiCommand","options","result","ApiUrlOptionsSchema","safeParse","success","whoAmI","data","apiUrl","logger","error","message","loadingSpinner","spinner","start","readAuthConfigFile","accessToken","stop","loginResult","login","userData","ApiClient","note","userId","email","chalk","checkForUpdate","package_default","spinner","printInitialBanner","performUpdateCheck","packageVersion","getVersion","text","logo","chalkGrey","logger","info","maybeNewVersion","loadingSpinner","spinner","start","updateCheck","undefined","stop","chalk","green","currentMajor","parseInt","split","newMajor","warn","doUpdateCheck","update","checkForUpdate","pkg","distTag","version","startsWith","latest","updateCheckPromise","z","program","Command","ApiUrlOptionsSchema","object","apiUrl","string","name","COMMAND_NAME","description","version","getVersion","command","option","action","options","printInitialBanner","loginCommand","e","argument","path","devCommand","updateCommand","whoamiCommand","main","__name","program","parseAsync","catch","err","Error","logger","error","process","exit"]}
@@ -0,0 +1 @@
1
+ {"inputs":{"src/consts.ts":{"bytes":2043,"imports":[{"path":"path","kind":"import-statement","external":true},{"path":"url","kind":"import-statement","external":true}],"format":"esm"},"src/utilities/fileSystem.ts":{"bytes":6669,"imports":[{"path":"fs","kind":"import-statement","external":true},{"path":"fs/promises","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utilities/getVersion.ts":{"bytes":1456,"imports":[{"path":"path","kind":"import-statement","external":true},{"path":"src/consts.ts","kind":"import-statement","original":"../consts"},{"path":"src/utilities/fileSystem.ts","kind":"import-statement","original":"./fileSystem"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/telemetry/telemetry.ts":{"bytes":4875,"imports":[{"path":"posthog-node","kind":"import-statement","external":true},{"path":"nanoid","kind":"import-statement","external":true},{"path":"src/utilities/getVersion.ts","kind":"import-statement","original":"../utilities/getVersion"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utilities/logger.ts":{"bytes":4062,"imports":[{"path":"chalk","kind":"import-statement","external":true},{"path":"cli-table3","kind":"import-statement","external":true}],"format":"esm"},"src/utilities/parseNameAndPath.ts":{"bytes":1624,"imports":[{"path":"path","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/commands/dev.ts":{"bytes":4389,"imports":[{"path":"child_process","kind":"import-statement","external":true},{"path":"util","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"src/telemetry/telemetry.ts","kind":"import-statement","original":"../telemetry/telemetry"},{"path":"src/utilities/logger.ts","kind":"import-statement","original":"../utilities/logger"},{"path":"src/utilities/parseNameAndPath.ts","kind":"import-statement","original":"../utilities/parseNameAndPath"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utilities/getUserPackageManager.ts":{"bytes":5032,"imports":[{"path":"path","kind":"import-statement","external":true},{"path":"src/utilities/fileSystem.ts","kind":"import-statement","original":"./fileSystem"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utilities/installDependencies.ts":{"bytes":8659,"imports":[{"path":"@clack/prompts","kind":"import-statement","external":true},{"path":"src/utilities/getUserPackageManager.ts","kind":"import-statement","original":"./getUserPackageManager"},{"path":"src/utilities/logger.ts","kind":"import-statement","original":"./logger"},{"path":"chalk","kind":"import-statement","external":true},{"path":"execa","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utilities/colors.ts":{"bytes":2855,"imports":[{"path":"chalk","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/commands/update.ts":{"bytes":17184,"imports":[{"path":"@clack/prompts","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"npm-check-updates","kind":"import-statement","external":true},{"path":"src/utilities/installDependencies.ts","kind":"import-statement","original":"../utilities/installDependencies"},{"path":"src/utilities/fileSystem.ts","kind":"import-statement","original":"../utilities/fileSystem.js"},{"path":"zod","kind":"import-statement","external":true},{"path":"src/utilities/colors.ts","kind":"import-statement","original":"../utilities/colors"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js":{"bytes":22561,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js":{"bytes":28780,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js":{"bytes":23705,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js":{"bytes":6594,"imports":[{"path":"os","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true}],"format":"cjs"},"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js":{"bytes":1587,"imports":[{"path":"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js","kind":"require-call","original":"./lib/OSPaths.js"},{"path":"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js","kind":"require-call","original":"./platform-adapters/node.js"}],"format":"cjs"},"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js":{"bytes":7301,"imports":[{"path":"path","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js","kind":"require-call","original":"os-paths"}],"format":"cjs"},"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js":{"bytes":1527,"imports":[{"path":"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js","kind":"require-call","original":"./lib/XDG.js"},{"path":"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js","kind":"require-call","original":"./platform-adapters/node.js"}],"format":"cjs"},"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js":{"bytes":10979,"imports":[{"path":"path","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js","kind":"require-call","original":"xdg-portable"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js":{"bytes":1639,"imports":[{"path":"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js","kind":"require-call","original":"./lib/XDGAppPaths.js"},{"path":"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js","kind":"require-call","original":"./platform-adapters/node.js"}],"format":"cjs"},"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/esm-wrapper/mod.esm.js":{"bytes":613,"imports":[{"path":"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js","kind":"import-statement","original":"../mod.cjs.js"},{"path":"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js","kind":"import-statement","original":"../mod.cjs.js"}],"format":"esm"},"src/utilities/configFiles.ts":{"bytes":5619,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/esm-wrapper/mod.esm.js","kind":"import-statement","original":"xdg-app-paths"},{"path":"zod","kind":"import-statement","external":true},{"path":"src/utilities/fileSystem.ts","kind":"import-statement","original":"./fileSystem"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js":{"bytes":2126,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js":{"bytes":1769,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"../../node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js","kind":"import-statement","original":"is-docker"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js":{"bytes":2447,"imports":[{"path":"node:process","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js","kind":"import-statement","original":"is-inside-container"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js":{"bytes":2033,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/default-browser-id@5.0.0/node_modules/default-browser-id/index.js":{"bytes":2420,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/run-applescript@7.0.0/node_modules/run-applescript/index.js":{"bytes":3859,"imports":[{"path":"node:process","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js":{"bytes":1252,"imports":[{"path":"../../node_modules/.pnpm/run-applescript@7.0.0/node_modules/run-applescript/index.js","kind":"import-statement","original":"run-applescript"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/windows.js":{"bytes":6098,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/index.js":{"bytes":4152,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"../../node_modules/.pnpm/default-browser-id@5.0.0/node_modules/default-browser-id/index.js","kind":"import-statement","original":"default-browser-id"},{"path":"../../node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js","kind":"import-statement","original":"bundle-name"},{"path":"../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/windows.js","kind":"import-statement","original":"./windows.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/open@10.0.3/node_modules/open/index.js":{"bytes":33956,"imports":[{"path":"node:process","kind":"import-statement","external":true},{"path":"node:buffer","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js","kind":"import-statement","original":"is-wsl"},{"path":"../../node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js","kind":"import-statement","original":"define-lazy-prop"},{"path":"../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/index.js","kind":"import-statement","original":"default-browser"},{"path":"../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js","kind":"import-statement","original":"is-inside-container"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js":{"bytes":15198,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js":{"bytes":9629,"imports":[{"path":"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js","kind":"require-call","original":"./retry_operation"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js":{"bytes":331,"imports":[{"path":"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js","kind":"require-call","original":"./lib/retry"}],"format":"cjs"},"../../node_modules/.pnpm/is-network-error@1.0.0/node_modules/is-network-error/index.js":{"bytes":3094,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/.pnpm/p-retry@6.1.0/node_modules/p-retry/index.js":{"bytes":8762,"imports":[{"path":"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js","kind":"import-statement","original":"retry"},{"path":"../../node_modules/.pnpm/is-network-error@1.0.0/node_modules/is-network-error/index.js","kind":"import-statement","original":"is-network-error"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/apiClient.ts":{"bytes":9435,"imports":[{"path":"@trigger.dev/core","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/commands/login.ts":{"bytes":13340,"imports":[{"path":"@clack/prompts","kind":"import-statement","external":true},{"path":"../../node_modules/.pnpm/open@10.0.3/node_modules/open/index.js","kind":"import-statement","original":"open"},{"path":"../../node_modules/.pnpm/p-retry@6.1.0/node_modules/p-retry/index.js","kind":"import-statement","original":"p-retry"},{"path":"src/apiClient.ts","kind":"import-statement","original":"../apiClient"},{"path":"src/cli/index.ts","kind":"import-statement","original":"../cli"},{"path":"src/utilities/colors.ts","kind":"import-statement","original":"../utilities/colors"},{"path":"src/utilities/configFiles.ts","kind":"import-statement","original":"../utilities/configFiles"},{"path":"src/utilities/logger.ts","kind":"import-statement","original":"../utilities/logger"},{"path":"src/commands/whoami.ts","kind":"import-statement","original":"./whoami"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/commands/whoami.ts":{"bytes":7058,"imports":[{"path":"@clack/prompts","kind":"import-statement","external":true},{"path":"src/cli/index.ts","kind":"import-statement","original":"../cli"},{"path":"src/utilities/logger.ts","kind":"import-statement","original":"../utilities/logger"},{"path":"src/utilities/configFiles.ts","kind":"import-statement","original":"../utilities/configFiles"},{"path":"src/commands/login.ts","kind":"import-statement","original":"./login"},{"path":"src/apiClient.ts","kind":"import-statement","original":"../apiClient"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"package.json":{"bytes":2090,"imports":[]},"src/utilities/initialBanner.ts":{"bytes":6915,"imports":[{"path":"chalk","kind":"import-statement","external":true},{"path":"update-check","kind":"import-statement","external":true},{"path":"package.json","kind":"import-statement","original":"../../package.json"},{"path":"src/utilities/colors.ts","kind":"import-statement","original":"./colors"},{"path":"src/utilities/getVersion.ts","kind":"import-statement","original":"./getVersion"},{"path":"src/utilities/logger.ts","kind":"import-statement","original":"./logger"},{"path":"@clack/prompts","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/cli/index.ts":{"bytes":9768,"imports":[{"path":"commander","kind":"import-statement","external":true},{"path":"src/commands/dev.ts","kind":"import-statement","original":"../commands/dev"},{"path":"src/commands/update.ts","kind":"import-statement","original":"../commands/update"},{"path":"src/commands/whoami.ts","kind":"import-statement","original":"../commands/whoami.js"},{"path":"src/consts.ts","kind":"import-statement","original":"../consts"},{"path":"src/utilities/getVersion.ts","kind":"import-statement","original":"../utilities/getVersion"},{"path":"src/utilities/initialBanner.ts","kind":"import-statement","original":"../utilities/initialBanner"},{"path":"src/commands/login.ts","kind":"import-statement","original":"../commands/login"},{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1637,"imports":[{"path":"src/cli/index.ts","kind":"import-statement","original":"./cli/index"},{"path":"src/utilities/logger.ts","kind":"import-statement","original":"./utilities/logger"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":156695},"dist/index.js":{"imports":[{"path":"os","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"commander","kind":"import-statement","external":true},{"path":"child_process","kind":"import-statement","external":true},{"path":"util","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"posthog-node","kind":"import-statement","external":true},{"path":"nanoid","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"url","kind":"import-statement","external":true},{"path":"fs","kind":"import-statement","external":true},{"path":"fs/promises","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"chalk","kind":"import-statement","external":true},{"path":"cli-table3","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"@clack/prompts","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"npm-check-updates","kind":"import-statement","external":true},{"path":"@clack/prompts","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"chalk","kind":"import-statement","external":true},{"path":"execa","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"chalk","kind":"import-statement","external":true},{"path":"@clack/prompts","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"@clack/prompts","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true},{"path":"node:buffer","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"@trigger.dev/core","kind":"import-statement","external":true},{"path":"chalk","kind":"import-statement","external":true},{"path":"update-check","kind":"import-statement","external":true},{"path":"@clack/prompts","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js":{"bytesInOutput":1579},"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js":{"bytesInOutput":2472},"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js":{"bytesInOutput":1795},"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js":{"bytesInOutput":733},"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js":{"bytesInOutput":94},"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js":{"bytesInOutput":818},"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js":{"bytesInOutput":90},"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js":{"bytesInOutput":1052},"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js":{"bytesInOutput":98},"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js":{"bytesInOutput":2332},"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js":{"bytesInOutput":1185},"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js":{"bytesInOutput":37},"src/cli/index.ts":{"bytesInOutput":1904},"src/commands/dev.ts":{"bytesInOutput":485},"src/telemetry/telemetry.ts":{"bytesInOutput":583},"src/utilities/getVersion.ts":{"bytesInOutput":114},"src/consts.ts":{"bytesInOutput":141},"src/utilities/fileSystem.ts":{"bytesInOutput":439},"src/utilities/logger.ts":{"bytesInOutput":484},"src/utilities/parseNameAndPath.ts":{"bytesInOutput":76},"src/commands/update.ts":{"bytesInOutput":1742},"src/utilities/installDependencies.ts":{"bytesInOutput":932},"src/utilities/getUserPackageManager.ts":{"bytesInOutput":626},"src/utilities/colors.ts":{"bytesInOutput":361},"src/commands/whoami.ts":{"bytesInOutput":891},"src/utilities/configFiles.ts":{"bytesInOutput":641},"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/esm-wrapper/mod.esm.js":{"bytesInOutput":84},"src/commands/login.ts":{"bytesInOutput":1594},"../../node_modules/.pnpm/open@10.0.3/node_modules/open/index.js":{"bytesInOutput":3950},"../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js":{"bytesInOutput":342},"../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js":{"bytesInOutput":202},"../../node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js":{"bytesInOutput":321},"../../node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js":{"bytesInOutput":240},"../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/index.js":{"bytesInOutput":611},"../../node_modules/.pnpm/default-browser-id@5.0.0/node_modules/default-browser-id/index.js":{"bytesInOutput":474},"../../node_modules/.pnpm/run-applescript@7.0.0/node_modules/run-applescript/index.js":{"bytesInOutput":357},"../../node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js":{"bytesInOutput":276},"../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/windows.js":{"bytesInOutput":1078},"../../node_modules/.pnpm/p-retry@6.1.0/node_modules/p-retry/index.js":{"bytesInOutput":1061},"../../node_modules/.pnpm/is-network-error@1.0.0/node_modules/is-network-error/index.js":{"bytesInOutput":435},"src/apiClient.ts":{"bytesInOutput":1284},"src/utilities/initialBanner.ts":{"bytesInOutput":864},"package.json":{"bytesInOutput":1553},"src/index.ts":{"bytesInOutput":214}},"bytes":37689}}}
package/package.json ADDED
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "trigger.dev",
3
+ "version": "1.0.1",
4
+ "description": "A Command-Line Interface for Trigger.dev (v3) projects",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/triggerdotdev/trigger.dev.git",
11
+ "directory": "packages/cli-v3"
12
+ },
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "keywords": [
17
+ "typescript",
18
+ "trigger.dev",
19
+ "workflows",
20
+ "orchestration",
21
+ "events",
22
+ "webhooks",
23
+ "integrations",
24
+ "apis",
25
+ "jobs",
26
+ "background jobs",
27
+ "nextjs"
28
+ ],
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "type": "module",
33
+ "exports": "./dist/index.js",
34
+ "bin": {
35
+ "trigger-v3-cli": "./dist/index.js"
36
+ },
37
+ "devDependencies": {
38
+ "@types/gradient-string": "^1.1.2",
39
+ "@types/mock-fs": "^4.13.1",
40
+ "@types/node": "16",
41
+ "@types/node-fetch": "^2.6.2",
42
+ "@types/ws": "^8.5.3",
43
+ "open": "^10.0.3",
44
+ "p-retry": "^6.1.0",
45
+ "rimraf": "^3.0.2",
46
+ "tsup": "^6.5.0",
47
+ "type-fest": "^3.6.0",
48
+ "typescript": "^4.9.5",
49
+ "vitest": "^0.34.4",
50
+ "xdg-app-paths": "^8.3.0",
51
+ "@trigger.dev/tsconfig": "0.0.0",
52
+ "@trigger.dev/core": "2.3.12"
53
+ },
54
+ "dependencies": {
55
+ "@clack/prompts": "^0.7.0",
56
+ "@types/degit": "^2.8.3",
57
+ "chalk": "^5.2.0",
58
+ "chokidar": "^3.5.3",
59
+ "cli-table3": "^0.6.3",
60
+ "commander": "^9.4.1",
61
+ "degit": "^2.8.4",
62
+ "dotenv": "^16.3.1",
63
+ "execa": "^7.0.0",
64
+ "gradient-string": "^2.0.2",
65
+ "liquidjs": "^10.9.2",
66
+ "mock-fs": "^5.2.0",
67
+ "nanoid": "^4.0.2",
68
+ "node-fetch": "^3.3.0",
69
+ "npm-check-updates": "^16.12.2",
70
+ "posthog-node": "^3.1.1",
71
+ "proxy-agent": "^6.3.0",
72
+ "simple-git": "^3.19.0",
73
+ "update-check": "^1.5.4",
74
+ "url": "^0.11.1",
75
+ "ws": "^8.11.0",
76
+ "zod": "3.22.3",
77
+ "@trigger.dev/core": "2.3.12"
78
+ },
79
+ "engines": {
80
+ "node": ">=18.0.0"
81
+ },
82
+ "scripts": {
83
+ "typecheck": "tsc",
84
+ "build": "tsup",
85
+ "dev": "tsup --watch",
86
+ "clean": "rimraf dist",
87
+ "start": "node dist/index.js",
88
+ "test": "vitest"
89
+ }
90
+ }