@@ -12,22 +12,22 @@ import ColorizeSwift
1212import Segment
1313
1414class EdgeFnGroup : CommandGroup {
15- let name = " edgefn "
16- let shortDescription = " Work with and develop edge functions "
15+ let name = " liveplugins "
16+ let shortDescription = " Work with and develop analytics live plugins "
1717 let children : [ Routable ] = [ EdgeFnLatestCommand ( ) , EdgeFnUpload ( ) , EdgeFnDisable ( ) ]
1818 init ( ) { }
1919}
2020
2121class EdgeFnDisable : Command {
2222 let name = " disable "
23- let shortDescription = " Disable edge functions for a given source ID "
23+ let shortDescription = " Disable Live Plugins for a given source ID "
2424
2525 @Param var sourceId : String
2626
2727 func execute( ) throws {
2828 guard let workspace = currentWorkspace else { exitWithError ( code: . commandFailed, message: " No authentication tokens found. " ) ; return }
2929 executeAndWait { semaphore in
30- let spinner = Spinner ( . dots, " Uploading edge function ... " )
30+ let spinner = Spinner ( . dots, " Uploading live plugin ... " )
3131 spinner. start ( )
3232
3333 PAPI . shared. edgeFunctions. disable ( token: workspace. token, sourceId: sourceId) { data, response, error in
@@ -42,14 +42,14 @@ class EdgeFnDisable: Command {
4242 switch statusCode {
4343 case . ok:
4444 // success!
45- print ( " Edge functions disabled for \( self . sourceId. italic. bold) . " )
45+ print ( " Live plugins disabled for \( self . sourceId. italic. bold) . " )
4646
4747 case . unauthorized:
4848 fallthrough
4949 case . unauthorized2:
5050 exitWithError ( code: . commandFailed, message: " Supplied token is not authorized. " )
5151 case . notFound:
52- exitWithError ( code: . commandFailed, message: " No edge functions were found. " )
52+ exitWithError ( code: . commandFailed, message: " No live plugins were found. " )
5353 default :
5454 exitWithError ( " An unknown error occurred. " )
5555 }
@@ -62,7 +62,7 @@ class EdgeFnDisable: Command {
6262
6363class EdgeFnUpload : Command {
6464 let name = " upload "
65- let shortDescription = " Upload an edge function "
65+ let shortDescription = " Upload a Live Plugin "
6666
6767 @Param var sourceId : String
6868 @Param var filePath : String
@@ -102,7 +102,7 @@ class EdgeFnUpload: Command {
102102 case . unauthorized2:
103103 exitWithError ( code: . commandFailed, message: " Supplied token is not authorized. " )
104104 case . notFound:
105- exitWithError ( code: . commandFailed, message: " No edge functions were found. " )
105+ exitWithError ( code: . commandFailed, message: " No live plugins were found. " )
106106 default :
107107 exitWithError ( " An unknown error occurred. " )
108108 }
@@ -134,7 +134,7 @@ class EdgeFnUpload: Command {
134134 case . unauthorized2:
135135 exitWithError ( code: . commandFailed, message: " Supplied token is not authorized. " )
136136 case . notFound:
137- exitWithError ( code: . commandFailed, message: " No edge functions were found. " )
137+ exitWithError ( code: . commandFailed, message: " No live plugins were found. " )
138138 default :
139139 exitWithError ( " An unknown error occurred. " )
140140 }
@@ -144,7 +144,7 @@ class EdgeFnUpload: Command {
144144
145145 // call create to make a new connection to the version we just posted.
146146 executeAndWait { semaphore in
147- let spinner = Spinner ( . dots, " Creating new edge function version ... " )
147+ let spinner = Spinner ( . dots, " Creating new live plugin version ... " )
148148 spinner. start ( )
149149
150150 PAPI . shared. edgeFunctions. createNewVersion ( token: workspace. token, sourceId: sourceId, uploadURL: uploadURL) { data, response, error in
@@ -170,7 +170,7 @@ class EdgeFnUpload: Command {
170170 case . unauthorized2:
171171 exitWithError ( code: . commandFailed, message: " Supplied token is not authorized. " )
172172 case . notFound:
173- exitWithError ( code: . commandFailed, message: " No edge functions were found. " )
173+ exitWithError ( code: . commandFailed, message: " No live plugins were found. " )
174174 default :
175175 exitWithError ( " An unknown error occurred. " )
176176 }
@@ -183,15 +183,15 @@ class EdgeFnUpload: Command {
183183
184184class EdgeFnLatestCommand : Command {
185185 let name = " latest "
186- let shortDescription = " Get info about the latest Edge Function in use "
186+ let shortDescription = " Get info about the latest Live Plugin in use "
187187
188188 @Param var sourceId : String
189189
190190 func execute( ) throws {
191191 guard let workspace = currentWorkspace else { exitWithError ( code: . commandFailed, message: " No authentication tokens found. " ) ; return }
192192
193193 executeAndWait { semaphore in
194- let spinner = Spinner ( . dots, " Retrieving latest Edge Functino info ... " )
194+ let spinner = Spinner ( . dots, " Retrieving latest Live Plugin info ... " )
195195 spinner. start ( )
196196
197197 PAPI . shared. edgeFunctions. latest ( token: workspace. token, sourceId: sourceId) { data, response, error in
@@ -217,7 +217,7 @@ class EdgeFnLatestCommand: Command {
217217 case . unauthorized2:
218218 exitWithError ( code: . commandFailed, message: " Supplied token is not authorized. " )
219219 case . notFound:
220- exitWithError ( code: . commandFailed, message: " No edge functions were found. " )
220+ exitWithError ( code: . commandFailed, message: " No live plugins were found. " )
221221 default :
222222 exitWithError ( " An unknown error occurred. " )
223223 }
0 commit comments