Skip to content

Commit

Permalink
[pocketbase#3066] added the application name as part of the autogener…
Browse files Browse the repository at this point in the history
…ated backup name for easier identification
  • Loading branch information
ganigeorgiev committed Aug 28, 2023
1 parent f7f8f09 commit bde7a86
Show file tree
Hide file tree
Showing 34 changed files with 126 additions and 113 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

- Bumped the min TLS version to 1.2 in order to improve the cert score.

- Added option to upload a backup file from the Admin UI ([#2599](https://github.com/pocketbase/pocketbase/issues/2599)).
- (@todo docs) Added option to upload a backup file from the Admin UI ([#2599](https://github.com/pocketbase/pocketbase/issues/2599)).

- Added the application name as part of the autogenerated backup name for easier identification ([#3066](https://github.com/pocketbase/pocketbase/issues/3066)).

- Added new `SmtpConfig.LocalName` option to specify a custom domain name (or IP address) for the initial EHLO/HELO exchange ([#3097](https://github.com/pocketbase/pocketbase/discussions/3097)).
_This is usually required for verification purposes only by some SMTP providers, such as on-premise [Gmail SMTP-relay](https://support.google.com/a/answer/2956491)._
Expand Down
30 changes: 18 additions & 12 deletions core/base_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/pocketbase/pocketbase/tools/archive"
"github.com/pocketbase/pocketbase/tools/cron"
"github.com/pocketbase/pocketbase/tools/filesystem"
"github.com/pocketbase/pocketbase/tools/inflector"
"github.com/pocketbase/pocketbase/tools/osutils"
"github.com/pocketbase/pocketbase/tools/security"
)
Expand Down Expand Up @@ -46,12 +47,8 @@ func (app *BaseApp) CreateBackup(ctx context.Context, name string) error {
return errors.New("try again later - another backup/restore operation has already been started")
}

// auto generate backup name
if name == "" {
name = fmt.Sprintf(
"pb_backup_%s.zip",
time.Now().UTC().Format("20060102150405"),
)
name = app.generateBackupName("pb_backup_")
}

app.Cache().Set(CacheKeyActiveBackup, name)
Expand Down Expand Up @@ -234,7 +231,6 @@ func (app *BaseApp) RestoreBackup(ctx context.Context, name string) error {
}

// initAutobackupHooks registers the autobackup app serve hooks.
// @todo add tests
func (app *BaseApp) initAutobackupHooks() error {
c := cron.New()
isServe := false
Expand All @@ -248,13 +244,9 @@ func (app *BaseApp) initAutobackupHooks() error {
}

c.Add("@autobackup", rawSchedule, func() {
autoPrefix := "@auto_pb_backup_"
const autoPrefix = "@auto_pb_backup_"

name := fmt.Sprintf(
"%s%s.zip",
autoPrefix,
time.Now().UTC().Format("20060102150405"),
)
name := app.generateBackupName(autoPrefix)

if err := app.CreateBackup(context.Background(), name); err != nil && app.IsDebug() {
// @todo replace after logs generalization
Expand Down Expand Up @@ -333,3 +325,17 @@ func (app *BaseApp) initAutobackupHooks() error {

return nil
}

func (app *BaseApp) generateBackupName(prefix string) string {
appName := inflector.Snakecase(app.Settings().Meta.AppName)
if len(appName) > 50 {
appName = appName[:50]
}

return fmt.Sprintf(
"%s%s_%s.zip",
prefix,
appName,
time.Now().UTC().Format("20060102150405"),
)
}
9 changes: 7 additions & 2 deletions core/base_backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ func TestCreateBackup(t *testing.T) {
app, _ := tests.NewTestApp()
defer app.Cleanup()

// set some long app name with spaces and special characters
app.Settings().Meta.AppName = "test @! " + strings.Repeat("a", 100)

expectedAppNamePrefix := "test_" + strings.Repeat("a", 45)

// test pending error
app.Cache().Set(core.CacheKeyActiveBackup, "")
if err := app.CreateBackup(context.Background(), "test.zip"); err == nil {
Expand Down Expand Up @@ -49,8 +54,8 @@ func TestCreateBackup(t *testing.T) {
}

expectedFiles := []string{
`^pb_backup_\w+\.zip$`,
`^pb_backup_\w+\.zip.attrs$`,
`^pb_backup_` + expectedAppNamePrefix + `_\w+\.zip$`,
`^pb_backup_` + expectedAppNamePrefix + `_\w+\.zip.attrs$`,
"custom",
"custom.attrs",
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{S as Me,i as Se,s as ye,e as c,w,b as k,c as oe,f as h,g as d,h as a,m as se,x as G,O as we,P as Te,k as je,Q as Ae,n as Be,t as U,a as W,o as u,d as ae,C as Oe,p as Fe,r as V,u as Qe,N as Ne}from"./index-3a334d90.js";import{S as He}from"./SdkTabs-e6c8b783.js";import{F as Ke}from"./FieldsQueryParam-33e0f348.js";function ve(n,l,o){const s=n.slice();return s[5]=l[o],s}function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Pe(n,l){let o,s=l[5].code+"",_,p,i,f;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=c("button"),_=w(s),p=k(),h(o,"class","tab-item"),V(o,"active",l[1]===l[5].code),this.first=o},m(v,C){d(v,o,C),a(o,_),a(o,p),i||(f=Qe(o,"click",m),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(_,s),C&6&&V(o,"active",l[1]===l[5].code)},d(v){v&&u(o),i=!1,f()}}}function $e(n,l){let o,s,_,p;return s=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=c("div"),oe(s.$$.fragment),_=k(),h(o,"class","tab-item"),V(o,"active",l[1]===l[5].code),this.first=o},m(i,f){d(i,o,f),se(s,o,null),a(o,_),p=!0},p(i,f){l=i;const m={};f&4&&(m.content=l[5].body),s.$set(m),(!p||f&6)&&V(o,"active",l[1]===l[5].code)},i(i){p||(U(s.$$.fragment,i),p=!0)},o(i){W(s.$$.fragment,i),p=!1},d(i){i&&u(o),ae(s)}}}function qe(n){var _e,be;let l,o,s=n[0].name+"",_,p,i,f,m,v,C,H=n[0].name+"",L,ne,E,P,I,j,J,$,K,ie,q,A,ce,Y,z=n[0].name+"",X,re,R,B,Z,M,x,de,ee,T,te,O,le,S,F,g=[],ue=new Map,fe,Q,b=[],me=new Map,y;P=new He({props:{js:`
import{S as Me,i as Se,s as ye,e as c,w,b as k,c as oe,f as h,g as d,h as a,m as se,x as G,O as we,P as Te,k as je,Q as Ae,n as Be,t as U,a as W,o as u,d as ae,C as Oe,p as Fe,r as V,u as Qe,N as Ne}from"./index-908b4400.js";import{S as He}from"./SdkTabs-81ac167b.js";import{F as Ke}from"./FieldsQueryParam-6bf0342f.js";function ve(n,l,o){const s=n.slice();return s[5]=l[o],s}function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Pe(n,l){let o,s=l[5].code+"",_,p,i,f;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=c("button"),_=w(s),p=k(),h(o,"class","tab-item"),V(o,"active",l[1]===l[5].code),this.first=o},m(v,C){d(v,o,C),a(o,_),a(o,p),i||(f=Qe(o,"click",m),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(_,s),C&6&&V(o,"active",l[1]===l[5].code)},d(v){v&&u(o),i=!1,f()}}}function $e(n,l){let o,s,_,p;return s=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=c("div"),oe(s.$$.fragment),_=k(),h(o,"class","tab-item"),V(o,"active",l[1]===l[5].code),this.first=o},m(i,f){d(i,o,f),se(s,o,null),a(o,_),p=!0},p(i,f){l=i;const m={};f&4&&(m.content=l[5].body),s.$set(m),(!p||f&6)&&V(o,"active",l[1]===l[5].code)},i(i){p||(U(s.$$.fragment,i),p=!0)},o(i){W(s.$$.fragment,i),p=!1},d(i){i&&u(o),ae(s)}}}function qe(n){var _e,be;let l,o,s=n[0].name+"",_,p,i,f,m,v,C,H=n[0].name+"",L,ne,E,P,I,j,J,$,K,ie,q,A,ce,Y,z=n[0].name+"",X,re,R,B,Z,M,x,de,ee,T,te,O,le,S,F,g=[],ue=new Map,fe,Q,b=[],me=new Map,y;P=new He({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${n[3]}');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{S as Ue,i as je,s as xe,N as Qe,e as s,w as k,b as p,c as J,f as b,g as d,h as o,m as K,x as ce,O as He,P as Je,k as Ke,Q as Ie,n as We,t as N,a as V,o as u,d as I,C as Ee,p as Ge,r as W,u as Xe}from"./index-3a334d90.js";import{S as Ye}from"./SdkTabs-e6c8b783.js";import{F as Ze}from"./FieldsQueryParam-33e0f348.js";function Le(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ne(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ve(r,l){let a,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){a=s("button"),m=k(n),_=p(),b(a,"class","tab-item"),W(a,"active",l[1]===l[5].code),this.first=a},m($,w){d($,a,w),o(a,m),o(a,_),i||(f=Xe(a,"click",v),i=!0)},p($,w){l=$,w&4&&n!==(n=l[5].code+"")&&ce(m,n),w&6&&W(a,"active",l[1]===l[5].code)},d($){$&&u(a),i=!1,f()}}}function ze(r,l){let a,n,m,_;return n=new Qe({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),J(n.$$.fragment),m=p(),b(a,"class","tab-item"),W(a,"active",l[1]===l[5].code),this.first=a},m(i,f){d(i,a,f),K(n,a,null),o(a,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&W(a,"active",l[1]===l[5].code)},i(i){_||(N(n.$$.fragment,i),_=!0)},o(i){V(n.$$.fragment,i),_=!1},d(i){i&&u(a),I(n)}}}function et(r){var qe,De;let l,a,n=r[0].name+"",m,_,i,f,v,$,w,M,G,S,z,de,Q,q,ue,X,U=r[0].name+"",Y,pe,fe,j,Z,D,ee,T,te,he,F,C,oe,be,le,me,h,_e,R,ke,ve,$e,ae,ge,se,ye,Se,we,ne,Te,Ce,A,re,O,ie,P,H,y=[],Pe=new Map,Re,E,g=[],Ae=new Map,B;$=new Ye({props:{js:`
import{S as Ue,i as je,s as xe,N as Qe,e as s,w as k,b as p,c as J,f as b,g as d,h as o,m as K,x as ce,O as He,P as Je,k as Ke,Q as Ie,n as We,t as N,a as V,o as u,d as I,C as Ee,p as Ge,r as W,u as Xe}from"./index-908b4400.js";import{S as Ye}from"./SdkTabs-81ac167b.js";import{F as Ze}from"./FieldsQueryParam-6bf0342f.js";function Le(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ne(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ve(r,l){let a,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){a=s("button"),m=k(n),_=p(),b(a,"class","tab-item"),W(a,"active",l[1]===l[5].code),this.first=a},m($,w){d($,a,w),o(a,m),o(a,_),i||(f=Xe(a,"click",v),i=!0)},p($,w){l=$,w&4&&n!==(n=l[5].code+"")&&ce(m,n),w&6&&W(a,"active",l[1]===l[5].code)},d($){$&&u(a),i=!1,f()}}}function ze(r,l){let a,n,m,_;return n=new Qe({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),J(n.$$.fragment),m=p(),b(a,"class","tab-item"),W(a,"active",l[1]===l[5].code),this.first=a},m(i,f){d(i,a,f),K(n,a,null),o(a,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&W(a,"active",l[1]===l[5].code)},i(i){_||(N(n.$$.fragment,i),_=!0)},o(i){V(n.$$.fragment,i),_=!1},d(i){i&&u(a),I(n)}}}function et(r){var qe,De;let l,a,n=r[0].name+"",m,_,i,f,v,$,w,M,G,S,z,de,Q,q,ue,X,U=r[0].name+"",Y,pe,fe,j,Z,D,ee,T,te,he,F,C,oe,be,le,me,h,_e,R,ke,ve,$e,ae,ge,se,ye,Se,we,ne,Te,Ce,A,re,O,ie,P,H,y=[],Pe=new Map,Re,E,g=[],Ae=new Map,B;$=new Ye({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${r[3]}');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{S as Ve,i as Le,s as Ee,N as je,e as s,w as k,b as h,c as z,f as p,g as r,h as a,m as I,x as he,O as xe,P as Je,k as Ne,Q as Qe,n as ze,t as V,a as L,o as c,d as K,C as We,p as Ie,r as G,u as Ke}from"./index-3a334d90.js";import{S as Ge}from"./SdkTabs-e6c8b783.js";import{F as Xe}from"./FieldsQueryParam-33e0f348.js";function Ue(i,l,o){const n=i.slice();return n[5]=l[o],n}function Be(i,l,o){const n=i.slice();return n[5]=l[o],n}function Fe(i,l){let o,n=l[5].code+"",m,g,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=k(n),g=h(),p(o,"class","tab-item"),G(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,g),u||(b=Ke(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&he(m,n),A&6&&G(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function He(i,l){let o,n,m,g;return n=new je({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),z(n.$$.fragment),m=h(),p(o,"class","tab-item"),G(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),I(n,o,null),a(o,m),g=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!g||b&6)&&G(o,"active",l[1]===l[5].code)},i(u){g||(V(n.$$.fragment,u),g=!0)},o(u){L(n.$$.fragment,u),g=!1},d(u){u&&c(o),K(n)}}}function Ye(i){let l,o,n=i[0].name+"",m,g,u,b,_,v,A,P,X,S,E,pe,J,M,be,Y,N=i[0].name+"",Z,fe,ee,R,te,x,ae,W,le,y,oe,me,U,$,se,ge,ne,ke,f,_e,C,ve,we,Oe,ie,Ae,re,Se,ye,$e,ce,Te,Ce,q,ue,B,de,T,F,O=[],qe=new Map,De,H,w=[],Pe=new Map,D;v=new Ge({props:{js:`
import{S as Ve,i as Le,s as Ee,N as je,e as s,w as k,b as h,c as z,f as p,g as r,h as a,m as I,x as he,O as xe,P as Je,k as Ne,Q as Qe,n as ze,t as V,a as L,o as c,d as K,C as We,p as Ie,r as G,u as Ke}from"./index-908b4400.js";import{S as Ge}from"./SdkTabs-81ac167b.js";import{F as Xe}from"./FieldsQueryParam-6bf0342f.js";function Ue(i,l,o){const n=i.slice();return n[5]=l[o],n}function Be(i,l,o){const n=i.slice();return n[5]=l[o],n}function Fe(i,l){let o,n=l[5].code+"",m,g,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=k(n),g=h(),p(o,"class","tab-item"),G(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,g),u||(b=Ke(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&he(m,n),A&6&&G(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function He(i,l){let o,n,m,g;return n=new je({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),z(n.$$.fragment),m=h(),p(o,"class","tab-item"),G(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),I(n,o,null),a(o,m),g=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!g||b&6)&&G(o,"active",l[1]===l[5].code)},i(u){g||(V(n.$$.fragment,u),g=!0)},o(u){L(n.$$.fragment,u),g=!1},d(u){u&&c(o),K(n)}}}function Ye(i){let l,o,n=i[0].name+"",m,g,u,b,_,v,A,P,X,S,E,pe,J,M,be,Y,N=i[0].name+"",Z,fe,ee,R,te,x,ae,W,le,y,oe,me,U,$,se,ge,ne,ke,f,_e,C,ve,we,Oe,ie,Ae,re,Se,ye,$e,ce,Te,Ce,q,ue,B,de,T,F,O=[],qe=new Map,De,H,w=[],Pe=new Map,D;v=new Ge({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${i[3]}');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{S as we,i as ye,s as ge,N as ve,e as s,w as f,b as d,c as at,f as h,g as r,h as e,m as st,x as Mt,O as ue,P as $e,k as Pe,Q as Re,n as Ce,t as Z,a as x,o as c,d as nt,C as fe,p as Oe,r as it,u as Ae}from"./index-3a334d90.js";import{S as Te}from"./SdkTabs-e6c8b783.js";import{F as Ue}from"./FieldsQueryParam-33e0f348.js";function pe(n,l,o){const i=n.slice();return i[8]=l[o],i}function be(n,l,o){const i=n.slice();return i[8]=l[o],i}function Me(n){let l;return{c(){l=f("email")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function De(n){let l;return{c(){l=f("username")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function Ee(n){let l;return{c(){l=f("username/email")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function me(n){let l;return{c(){l=s("strong"),l.textContent="username"},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function he(n){let l;return{c(){l=f("or")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function _e(n){let l;return{c(){l=s("strong"),l.textContent="email"},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function ke(n,l){let o,i=l[8].code+"",S,m,p,u;function _(){return l[7](l[8])}return{key:n,first:null,c(){o=s("button"),S=f(i),m=d(),h(o,"class","tab-item"),it(o,"active",l[3]===l[8].code),this.first=o},m(R,C){r(R,o,C),e(o,S),e(o,m),p||(u=Ae(o,"click",_),p=!0)},p(R,C){l=R,C&16&&i!==(i=l[8].code+"")&&Mt(S,i),C&24&&it(o,"active",l[3]===l[8].code)},d(R){R&&c(o),p=!1,u()}}}function Se(n,l){let o,i,S,m;return i=new ve({props:{content:l[8].body}}),{key:n,first:null,c(){o=s("div"),at(i.$$.fragment),S=d(),h(o,"class","tab-item"),it(o,"active",l[3]===l[8].code),this.first=o},m(p,u){r(p,o,u),st(i,o,null),e(o,S),m=!0},p(p,u){l=p;const _={};u&16&&(_.content=l[8].body),i.$set(_),(!m||u&24)&&it(o,"active",l[3]===l[8].code)},i(p){m||(Z(i.$$.fragment,p),m=!0)},o(p){x(i.$$.fragment,p),m=!1},d(p){p&&c(o),nt(i)}}}function We(n){var ie,re;let l,o,i=n[0].name+"",S,m,p,u,_,R,C,O,B,Dt,rt,T,ct,N,dt,U,tt,Et,et,I,Wt,ut,lt=n[0].name+"",ft,Lt,pt,V,bt,M,mt,Bt,Q,D,ht,qt,_t,Ft,$,Ht,kt,St,vt,Yt,wt,yt,j,gt,E,$t,Nt,J,W,Pt,It,Rt,Vt,k,Qt,q,jt,Jt,Kt,Ct,zt,Ot,Gt,Xt,Zt,At,xt,te,F,Tt,K,Ut,L,z,A=[],ee=new Map,le,G,v=[],oe=new Map,H;function ae(t,a){if(t[1]&&t[2])return Ee;if(t[1])return De;if(t[2])return Me}let Y=ae(n),P=Y&&Y(n);T=new Te({props:{js:`
import{S as we,i as ye,s as ge,N as ve,e as s,w as f,b as d,c as at,f as h,g as r,h as e,m as st,x as Mt,O as ue,P as $e,k as Pe,Q as Re,n as Ce,t as Z,a as x,o as c,d as nt,C as fe,p as Oe,r as it,u as Ae}from"./index-908b4400.js";import{S as Te}from"./SdkTabs-81ac167b.js";import{F as Ue}from"./FieldsQueryParam-6bf0342f.js";function pe(n,l,o){const i=n.slice();return i[8]=l[o],i}function be(n,l,o){const i=n.slice();return i[8]=l[o],i}function Me(n){let l;return{c(){l=f("email")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function De(n){let l;return{c(){l=f("username")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function Ee(n){let l;return{c(){l=f("username/email")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function me(n){let l;return{c(){l=s("strong"),l.textContent="username"},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function he(n){let l;return{c(){l=f("or")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function _e(n){let l;return{c(){l=s("strong"),l.textContent="email"},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function ke(n,l){let o,i=l[8].code+"",S,m,p,u;function _(){return l[7](l[8])}return{key:n,first:null,c(){o=s("button"),S=f(i),m=d(),h(o,"class","tab-item"),it(o,"active",l[3]===l[8].code),this.first=o},m(R,C){r(R,o,C),e(o,S),e(o,m),p||(u=Ae(o,"click",_),p=!0)},p(R,C){l=R,C&16&&i!==(i=l[8].code+"")&&Mt(S,i),C&24&&it(o,"active",l[3]===l[8].code)},d(R){R&&c(o),p=!1,u()}}}function Se(n,l){let o,i,S,m;return i=new ve({props:{content:l[8].body}}),{key:n,first:null,c(){o=s("div"),at(i.$$.fragment),S=d(),h(o,"class","tab-item"),it(o,"active",l[3]===l[8].code),this.first=o},m(p,u){r(p,o,u),st(i,o,null),e(o,S),m=!0},p(p,u){l=p;const _={};u&16&&(_.content=l[8].body),i.$set(_),(!m||u&24)&&it(o,"active",l[3]===l[8].code)},i(p){m||(Z(i.$$.fragment,p),m=!0)},o(p){x(i.$$.fragment,p),m=!1},d(p){p&&c(o),nt(i)}}}function We(n){var ie,re;let l,o,i=n[0].name+"",S,m,p,u,_,R,C,O,B,Dt,rt,T,ct,N,dt,U,tt,Et,et,I,Wt,ut,lt=n[0].name+"",ft,Lt,pt,V,bt,M,mt,Bt,Q,D,ht,qt,_t,Ft,$,Ht,kt,St,vt,Yt,wt,yt,j,gt,E,$t,Nt,J,W,Pt,It,Rt,Vt,k,Qt,q,jt,Jt,Kt,Ct,zt,Ot,Gt,Xt,Zt,At,xt,te,F,Tt,K,Ut,L,z,A=[],ee=new Map,le,G,v=[],oe=new Map,H;function ae(t,a){if(t[1]&&t[2])return Ee;if(t[1])return De;if(t[2])return Me}let Y=ae(n),P=Y&&Y(n);T=new Te({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${n[6]}');
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{S as Ce,i as $e,s as Pe,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,O as pe,P as Se,k as we,Q as Oe,n as Re,t as Z,a as x,o as m,d as ge,C as Te,p as Ee,r as j,u as ye,N as Be}from"./index-3a334d90.js";import{S as qe}from"./SdkTabs-e6c8b783.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(C,s,$),n(s,_),n(s,u),i||(d=ye(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new Be({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&m(s),ge(a)}}}function Ae(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,P,I,R,L,S,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,w,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;P=new qe({props:{js:`
import{S as Ce,i as $e,s as Pe,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,O as pe,P as Se,k as we,Q as Oe,n as Re,t as Z,a as x,o as m,d as ge,C as Te,p as Ee,r as j,u as ye,N as Be}from"./index-908b4400.js";import{S as qe}from"./SdkTabs-81ac167b.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(C,s,$),n(s,_),n(s,u),i||(d=ye(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new Be({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&m(s),ge(a)}}}function Ae(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,P,I,R,L,S,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,w,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;P=new qe({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');
Expand Down
Loading

0 comments on commit bde7a86

Please sign in to comment.