@capgo/cli 3.13.10 → 3.13.13
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/CHANGELOG.md +16 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/api/app.ts +5 -5
- package/src/app/add.ts +3 -12
- package/src/app/debug.ts +1 -1
- package/src/app/delete.ts +2 -2
- package/src/app/list.ts +1 -1
- package/src/app/set.ts +1 -1
- package/src/bundle/cleanup.ts +1 -1
- package/src/bundle/delete.ts +1 -1
- package/src/bundle/list.ts +1 -1
- package/src/bundle/unlink.ts +2 -2
- package/src/bundle/upload.ts +2 -19
- package/src/channel/add.ts +2 -2
- package/src/channel/delete.ts +2 -2
- package/src/channel/list.ts +2 -2
- package/src/channel/set.ts +4 -4
- package/src/types/supabase.types.ts +448 -41
- package/src/utils.ts +6 -2
package/src/utils.ts
CHANGED
|
@@ -243,10 +243,10 @@ export async function uploadUrl(supabase: SupabaseClient<Database>, appId: strin
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
export const updateOrCreateChannel = async (supabase: SupabaseClient<Database>,
|
|
246
|
-
update: Database['public']['Tables']['channels']['Insert']
|
|
246
|
+
update: Database['public']['Tables']['channels']['Insert']) => {
|
|
247
247
|
// console.log('updateOrCreateChannel', update)
|
|
248
248
|
if (!update.app_id || !update.name || !update.created_by) {
|
|
249
|
-
|
|
249
|
+
p.log.error('missing app_id, name, or created_by')
|
|
250
250
|
return Promise.reject(new Error('missing app_id, name, or created_by'))
|
|
251
251
|
}
|
|
252
252
|
const { data, error } = await supabase
|
|
@@ -265,6 +265,10 @@ export const updateOrCreateChannel = async (supabase: SupabaseClient<Database>,
|
|
|
265
265
|
p.log.warn('Latest progressive deploy has not finished')
|
|
266
266
|
|
|
267
267
|
update.secondVersion = update.version
|
|
268
|
+
if (!data.secondVersion) {
|
|
269
|
+
p.log.error('missing secondVersion')
|
|
270
|
+
return Promise.reject(new Error('missing secondVersion'))
|
|
271
|
+
}
|
|
268
272
|
update.version = data.secondVersion
|
|
269
273
|
update.secondaryVersionPercentage = 0.1
|
|
270
274
|
p.log.info('Started new progressive upload!')
|