mirror of
https://github.com/pockethost/pockethost.git
synced 2025-06-28 17:02:31 +00:00
chore: lint formatting
This commit is contained in:
parent
3c2157be6b
commit
e97d5f1ca2
@ -1,492 +1,496 @@
|
|||||||
migrate((db) => {
|
migrate(
|
||||||
const snapshot = [
|
(db) => {
|
||||||
{
|
const snapshot = [
|
||||||
"id": "etae8tuiaxl6xfv",
|
{
|
||||||
"created": "2022-10-20 08:51:44.195Z",
|
id: 'etae8tuiaxl6xfv',
|
||||||
"updated": "2023-06-07 22:41:11.725Z",
|
created: '2022-10-20 08:51:44.195Z',
|
||||||
"name": "instances",
|
updated: '2023-06-07 22:41:11.725Z',
|
||||||
"type": "base",
|
name: 'instances',
|
||||||
"system": false,
|
type: 'base',
|
||||||
"schema": [
|
system: false,
|
||||||
{
|
schema: [
|
||||||
"system": false,
|
{
|
||||||
"id": "qdtuuld1",
|
system: false,
|
||||||
"name": "subdomain",
|
id: 'qdtuuld1',
|
||||||
"type": "text",
|
name: 'subdomain',
|
||||||
"required": true,
|
type: 'text',
|
||||||
"unique": true,
|
required: true,
|
||||||
"options": {
|
unique: true,
|
||||||
"min": null,
|
options: {
|
||||||
"max": 50,
|
min: null,
|
||||||
"pattern": "^[a-z][\\-a-z]+$"
|
max: 50,
|
||||||
}
|
pattern: '^[a-z][\\-a-z]+$',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
system: false,
|
||||||
|
id: 'rbj14krn',
|
||||||
|
name: 'uid',
|
||||||
|
type: 'relation',
|
||||||
|
required: true,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
collectionId: 'systemprofiles0',
|
||||||
|
cascadeDelete: false,
|
||||||
|
minSelect: null,
|
||||||
|
maxSelect: 1,
|
||||||
|
displayFields: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
system: false,
|
||||||
|
id: 'c2y74d7h',
|
||||||
|
name: 'status',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
pattern: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
system: false,
|
||||||
|
id: 'yxby5r6b',
|
||||||
|
name: 'platform',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
pattern: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
system: false,
|
||||||
|
id: '4ydffkv3',
|
||||||
|
name: 'version',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
pattern: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
system: false,
|
||||||
|
id: '1arlklqq',
|
||||||
|
name: 'secondsThisMonth',
|
||||||
|
type: 'number',
|
||||||
|
required: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
system: false,
|
||||||
|
id: '66vjgzcg',
|
||||||
|
name: 'isBackupAllowed',
|
||||||
|
type: 'bool',
|
||||||
|
required: false,
|
||||||
|
unique: false,
|
||||||
|
options: {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
system: false,
|
||||||
|
id: 'qew2o2d6',
|
||||||
|
name: 'currentWorkerBundleId',
|
||||||
|
type: 'text',
|
||||||
|
required: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
pattern: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
system: false,
|
||||||
|
id: '3yu1db4p',
|
||||||
|
name: 'secrets',
|
||||||
|
type: 'json',
|
||||||
|
required: false,
|
||||||
|
unique: false,
|
||||||
|
options: {},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
indexes: [
|
||||||
|
'CREATE UNIQUE INDEX "idx_unique_qdtuuld1" on "instances" ("subdomain")',
|
||||||
|
],
|
||||||
|
listRule: 'uid=@request.auth.id',
|
||||||
|
viewRule: 'uid = @request.auth.id',
|
||||||
|
createRule: null,
|
||||||
|
updateRule: null,
|
||||||
|
deleteRule: null,
|
||||||
|
options: {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'systemprofiles0',
|
||||||
|
created: '2022-10-31 21:31:52.175Z',
|
||||||
|
updated: '2023-06-07 22:41:11.723Z',
|
||||||
|
name: 'users',
|
||||||
|
type: 'auth',
|
||||||
|
system: false,
|
||||||
|
schema: [
|
||||||
|
{
|
||||||
|
system: false,
|
||||||
|
id: 'pbfieldname',
|
||||||
|
name: 'name',
|
||||||
|
type: 'text',
|
||||||
|
required: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
pattern: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
system: false,
|
||||||
|
id: 'pbfieldavatar',
|
||||||
|
name: 'avatar',
|
||||||
|
type: 'file',
|
||||||
|
required: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
maxSelect: 1,
|
||||||
|
maxSize: 5242880,
|
||||||
|
mimeTypes: [
|
||||||
|
'image/jpg',
|
||||||
|
'image/jpeg',
|
||||||
|
'image/png',
|
||||||
|
'image/svg+xml',
|
||||||
|
'image/gif',
|
||||||
|
],
|
||||||
|
thumbs: null,
|
||||||
|
protected: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
indexes: [],
|
||||||
|
listRule: 'id = @request.auth.id',
|
||||||
|
viewRule: 'id = @request.auth.id',
|
||||||
|
createRule: '',
|
||||||
|
updateRule: 'id = @request.auth.id',
|
||||||
|
deleteRule: null,
|
||||||
|
options: {
|
||||||
|
allowEmailAuth: true,
|
||||||
|
allowOAuth2Auth: true,
|
||||||
|
allowUsernameAuth: false,
|
||||||
|
exceptEmailDomains: null,
|
||||||
|
manageRule: null,
|
||||||
|
minPasswordLength: 8,
|
||||||
|
onlyEmailDomains: null,
|
||||||
|
requireEmail: true,
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
"system": false,
|
{
|
||||||
"id": "rbj14krn",
|
id: 'aiw8te7y7atklwn',
|
||||||
"name": "uid",
|
created: '2022-11-04 13:54:23.745Z',
|
||||||
"type": "relation",
|
updated: '2023-06-07 22:41:11.723Z',
|
||||||
"required": true,
|
name: 'invocations',
|
||||||
"unique": false,
|
type: 'base',
|
||||||
"options": {
|
system: false,
|
||||||
"collectionId": "systemprofiles0",
|
schema: [
|
||||||
"cascadeDelete": false,
|
{
|
||||||
"minSelect": null,
|
system: false,
|
||||||
"maxSelect": 1,
|
id: 'st9ydrbo',
|
||||||
"displayFields": null
|
name: 'instanceId',
|
||||||
}
|
type: 'relation',
|
||||||
},
|
required: true,
|
||||||
{
|
unique: false,
|
||||||
"system": false,
|
options: {
|
||||||
"id": "c2y74d7h",
|
collectionId: 'etae8tuiaxl6xfv',
|
||||||
"name": "status",
|
cascadeDelete: false,
|
||||||
"type": "text",
|
minSelect: null,
|
||||||
"required": true,
|
maxSelect: 1,
|
||||||
"unique": false,
|
displayFields: null,
|
||||||
"options": {
|
},
|
||||||
"min": null,
|
},
|
||||||
"max": null,
|
{
|
||||||
"pattern": ""
|
system: false,
|
||||||
}
|
id: 'av4mpuyh',
|
||||||
},
|
name: 'startedAt',
|
||||||
{
|
type: 'date',
|
||||||
"system": false,
|
required: true,
|
||||||
"id": "yxby5r6b",
|
unique: false,
|
||||||
"name": "platform",
|
options: {
|
||||||
"type": "text",
|
min: '',
|
||||||
"required": true,
|
max: '',
|
||||||
"unique": false,
|
},
|
||||||
"options": {
|
},
|
||||||
"min": null,
|
{
|
||||||
"max": null,
|
system: false,
|
||||||
"pattern": ""
|
id: 'fnwatixg',
|
||||||
}
|
name: 'endedAt',
|
||||||
},
|
type: 'date',
|
||||||
{
|
required: false,
|
||||||
"system": false,
|
unique: false,
|
||||||
"id": "4ydffkv3",
|
options: {
|
||||||
"name": "version",
|
min: '',
|
||||||
"type": "text",
|
max: '',
|
||||||
"required": true,
|
},
|
||||||
"unique": false,
|
},
|
||||||
"options": {
|
{
|
||||||
"min": null,
|
system: false,
|
||||||
"max": null,
|
id: 'awjozhbn',
|
||||||
"pattern": ""
|
name: 'pid',
|
||||||
}
|
type: 'number',
|
||||||
},
|
required: false,
|
||||||
{
|
unique: false,
|
||||||
"system": false,
|
options: {
|
||||||
"id": "1arlklqq",
|
min: null,
|
||||||
"name": "secondsThisMonth",
|
max: null,
|
||||||
"type": "number",
|
},
|
||||||
"required": false,
|
},
|
||||||
"unique": false,
|
{
|
||||||
"options": {
|
system: false,
|
||||||
"min": null,
|
id: 'vdkfqege',
|
||||||
"max": null
|
name: 'totalSeconds',
|
||||||
}
|
type: 'number',
|
||||||
},
|
required: false,
|
||||||
{
|
unique: false,
|
||||||
"system": false,
|
options: {
|
||||||
"id": "66vjgzcg",
|
min: null,
|
||||||
"name": "isBackupAllowed",
|
max: null,
|
||||||
"type": "bool",
|
},
|
||||||
"required": false,
|
},
|
||||||
"unique": false,
|
],
|
||||||
"options": {}
|
indexes: [],
|
||||||
},
|
listRule: null,
|
||||||
{
|
viewRule: null,
|
||||||
"system": false,
|
createRule: null,
|
||||||
"id": "qew2o2d6",
|
updateRule: null,
|
||||||
"name": "currentWorkerBundleId",
|
deleteRule: null,
|
||||||
"type": "text",
|
options: {},
|
||||||
"required": false,
|
},
|
||||||
"unique": false,
|
{
|
||||||
"options": {
|
id: 'v7s41iokt1vizxd',
|
||||||
"min": null,
|
created: '2022-11-06 17:23:25.947Z',
|
||||||
"max": null,
|
updated: '2023-06-07 22:41:11.723Z',
|
||||||
"pattern": ""
|
name: 'rpc',
|
||||||
}
|
type: 'base',
|
||||||
},
|
system: false,
|
||||||
{
|
schema: [
|
||||||
"system": false,
|
{
|
||||||
"id": "3yu1db4p",
|
system: false,
|
||||||
"name": "secrets",
|
id: 'yv38czcf',
|
||||||
"type": "json",
|
name: 'userId',
|
||||||
"required": false,
|
type: 'relation',
|
||||||
"unique": false,
|
required: true,
|
||||||
"options": {}
|
unique: false,
|
||||||
}
|
options: {
|
||||||
],
|
collectionId: 'systemprofiles0',
|
||||||
"indexes": [
|
cascadeDelete: false,
|
||||||
"CREATE UNIQUE INDEX \"idx_unique_qdtuuld1\" on \"instances\" (\"subdomain\")"
|
minSelect: null,
|
||||||
],
|
maxSelect: 1,
|
||||||
"listRule": "uid=@request.auth.id",
|
displayFields: null,
|
||||||
"viewRule": "uid = @request.auth.id",
|
},
|
||||||
"createRule": null,
|
},
|
||||||
"updateRule": null,
|
{
|
||||||
"deleteRule": null,
|
system: false,
|
||||||
"options": {}
|
id: 'tgvaxwfv',
|
||||||
},
|
name: 'payload',
|
||||||
{
|
type: 'json',
|
||||||
"id": "systemprofiles0",
|
required: true,
|
||||||
"created": "2022-10-31 21:31:52.175Z",
|
unique: false,
|
||||||
"updated": "2023-06-07 22:41:11.723Z",
|
options: {},
|
||||||
"name": "users",
|
},
|
||||||
"type": "auth",
|
{
|
||||||
"system": false,
|
system: false,
|
||||||
"schema": [
|
id: 'zede8pci',
|
||||||
{
|
name: 'status',
|
||||||
"system": false,
|
type: 'text',
|
||||||
"id": "pbfieldname",
|
required: false,
|
||||||
"name": "name",
|
unique: false,
|
||||||
"type": "text",
|
options: {
|
||||||
"required": false,
|
min: null,
|
||||||
"unique": false,
|
max: null,
|
||||||
"options": {
|
pattern: '',
|
||||||
"min": null,
|
},
|
||||||
"max": null,
|
},
|
||||||
"pattern": ""
|
{
|
||||||
}
|
system: false,
|
||||||
},
|
id: 'nd7cwqmn',
|
||||||
{
|
name: 'result',
|
||||||
"system": false,
|
type: 'json',
|
||||||
"id": "pbfieldavatar",
|
required: false,
|
||||||
"name": "avatar",
|
unique: false,
|
||||||
"type": "file",
|
options: {},
|
||||||
"required": false,
|
},
|
||||||
"unique": false,
|
{
|
||||||
"options": {
|
system: false,
|
||||||
"maxSelect": 1,
|
id: '2hlrcx5j',
|
||||||
"maxSize": 5242880,
|
name: 'cmd',
|
||||||
"mimeTypes": [
|
type: 'text',
|
||||||
"image/jpg",
|
required: true,
|
||||||
"image/jpeg",
|
unique: false,
|
||||||
"image/png",
|
options: {
|
||||||
"image/svg+xml",
|
min: null,
|
||||||
"image/gif"
|
max: null,
|
||||||
],
|
pattern: '',
|
||||||
"thumbs": null,
|
},
|
||||||
"protected": false
|
},
|
||||||
}
|
],
|
||||||
}
|
indexes: [],
|
||||||
],
|
listRule: 'userId = @request.auth.id',
|
||||||
"indexes": [],
|
viewRule: 'userId = @request.auth.id',
|
||||||
"listRule": "id = @request.auth.id",
|
createRule:
|
||||||
"viewRule": "id = @request.auth.id",
|
"userId = @request.auth.id && status='' && result='' && cmd ?= @collection.rpc_cmds.name",
|
||||||
"createRule": "",
|
updateRule: null,
|
||||||
"updateRule": "id = @request.auth.id",
|
deleteRule: null,
|
||||||
"deleteRule": null,
|
options: {},
|
||||||
"options": {
|
},
|
||||||
"allowEmailAuth": true,
|
{
|
||||||
"allowOAuth2Auth": true,
|
id: '72clb6v41bzsay9',
|
||||||
"allowUsernameAuth": false,
|
created: '2022-11-09 15:23:20.313Z',
|
||||||
"exceptEmailDomains": null,
|
updated: '2023-06-07 22:41:11.723Z',
|
||||||
"manageRule": null,
|
name: 'backups',
|
||||||
"minPasswordLength": 8,
|
type: 'base',
|
||||||
"onlyEmailDomains": null,
|
system: false,
|
||||||
"requireEmail": true
|
schema: [
|
||||||
}
|
{
|
||||||
},
|
system: false,
|
||||||
{
|
id: 'someqtjw',
|
||||||
"id": "aiw8te7y7atklwn",
|
name: 'message',
|
||||||
"created": "2022-11-04 13:54:23.745Z",
|
type: 'text',
|
||||||
"updated": "2023-06-07 22:41:11.723Z",
|
required: false,
|
||||||
"name": "invocations",
|
unique: false,
|
||||||
"type": "base",
|
options: {
|
||||||
"system": false,
|
min: null,
|
||||||
"schema": [
|
max: null,
|
||||||
{
|
pattern: '',
|
||||||
"system": false,
|
},
|
||||||
"id": "st9ydrbo",
|
},
|
||||||
"name": "instanceId",
|
{
|
||||||
"type": "relation",
|
system: false,
|
||||||
"required": true,
|
id: 'jk4zwiaj',
|
||||||
"unique": false,
|
name: 'instanceId',
|
||||||
"options": {
|
type: 'relation',
|
||||||
"collectionId": "etae8tuiaxl6xfv",
|
required: true,
|
||||||
"cascadeDelete": false,
|
unique: false,
|
||||||
"minSelect": null,
|
options: {
|
||||||
"maxSelect": 1,
|
collectionId: 'etae8tuiaxl6xfv',
|
||||||
"displayFields": null
|
cascadeDelete: false,
|
||||||
}
|
minSelect: null,
|
||||||
},
|
maxSelect: 1,
|
||||||
{
|
displayFields: null,
|
||||||
"system": false,
|
},
|
||||||
"id": "av4mpuyh",
|
},
|
||||||
"name": "startedAt",
|
{
|
||||||
"type": "date",
|
system: false,
|
||||||
"required": true,
|
id: 'wsy3l5gm',
|
||||||
"unique": false,
|
name: 'status',
|
||||||
"options": {
|
type: 'text',
|
||||||
"min": "",
|
required: true,
|
||||||
"max": ""
|
unique: false,
|
||||||
}
|
options: {
|
||||||
},
|
min: null,
|
||||||
{
|
max: null,
|
||||||
"system": false,
|
pattern: '',
|
||||||
"id": "fnwatixg",
|
},
|
||||||
"name": "endedAt",
|
},
|
||||||
"type": "date",
|
{
|
||||||
"required": false,
|
system: false,
|
||||||
"unique": false,
|
id: 'gmkrc5d9',
|
||||||
"options": {
|
name: 'bytes',
|
||||||
"min": "",
|
type: 'number',
|
||||||
"max": ""
|
required: false,
|
||||||
}
|
unique: false,
|
||||||
},
|
options: {
|
||||||
{
|
min: null,
|
||||||
"system": false,
|
max: null,
|
||||||
"id": "awjozhbn",
|
},
|
||||||
"name": "pid",
|
},
|
||||||
"type": "number",
|
{
|
||||||
"required": false,
|
system: false,
|
||||||
"unique": false,
|
id: '4lmammjz',
|
||||||
"options": {
|
name: 'platform',
|
||||||
"min": null,
|
type: 'text',
|
||||||
"max": null
|
required: true,
|
||||||
}
|
unique: false,
|
||||||
},
|
options: {
|
||||||
{
|
min: null,
|
||||||
"system": false,
|
max: null,
|
||||||
"id": "vdkfqege",
|
pattern: '',
|
||||||
"name": "totalSeconds",
|
},
|
||||||
"type": "number",
|
},
|
||||||
"required": false,
|
{
|
||||||
"unique": false,
|
system: false,
|
||||||
"options": {
|
id: 'fheqxmbj',
|
||||||
"min": null,
|
name: 'version',
|
||||||
"max": null
|
type: 'text',
|
||||||
}
|
required: true,
|
||||||
}
|
unique: false,
|
||||||
],
|
options: {
|
||||||
"indexes": [],
|
min: null,
|
||||||
"listRule": null,
|
max: null,
|
||||||
"viewRule": null,
|
pattern: '',
|
||||||
"createRule": null,
|
},
|
||||||
"updateRule": null,
|
},
|
||||||
"deleteRule": null,
|
{
|
||||||
"options": {}
|
system: false,
|
||||||
},
|
id: 'cinbmdwe',
|
||||||
{
|
name: 'progress',
|
||||||
"id": "v7s41iokt1vizxd",
|
type: 'json',
|
||||||
"created": "2022-11-06 17:23:25.947Z",
|
required: false,
|
||||||
"updated": "2023-06-07 22:41:11.723Z",
|
unique: false,
|
||||||
"name": "rpc",
|
options: {},
|
||||||
"type": "base",
|
},
|
||||||
"system": false,
|
],
|
||||||
"schema": [
|
indexes: [],
|
||||||
{
|
listRule: '@request.auth.id = instanceId.uid',
|
||||||
"system": false,
|
viewRule: null,
|
||||||
"id": "yv38czcf",
|
createRule: null,
|
||||||
"name": "userId",
|
updateRule: null,
|
||||||
"type": "relation",
|
deleteRule: null,
|
||||||
"required": true,
|
options: {},
|
||||||
"unique": false,
|
},
|
||||||
"options": {
|
{
|
||||||
"collectionId": "systemprofiles0",
|
id: 'enp8mrv5ewtrltj',
|
||||||
"cascadeDelete": false,
|
created: '2023-01-06 10:21:51.659Z',
|
||||||
"minSelect": null,
|
updated: '2023-06-07 22:41:11.725Z',
|
||||||
"maxSelect": 1,
|
name: 'rpc_cmds',
|
||||||
"displayFields": null
|
type: 'base',
|
||||||
}
|
system: false,
|
||||||
},
|
schema: [
|
||||||
{
|
{
|
||||||
"system": false,
|
system: false,
|
||||||
"id": "tgvaxwfv",
|
id: 'jbostfhp',
|
||||||
"name": "payload",
|
name: 'name',
|
||||||
"type": "json",
|
type: 'text',
|
||||||
"required": true,
|
required: true,
|
||||||
"unique": false,
|
unique: true,
|
||||||
"options": {}
|
options: {
|
||||||
},
|
min: null,
|
||||||
{
|
max: null,
|
||||||
"system": false,
|
pattern: '',
|
||||||
"id": "zede8pci",
|
},
|
||||||
"name": "status",
|
},
|
||||||
"type": "text",
|
],
|
||||||
"required": false,
|
indexes: [
|
||||||
"unique": false,
|
'CREATE UNIQUE INDEX "idx_unique_jbostfhp" on "rpc_cmds" ("name")',
|
||||||
"options": {
|
],
|
||||||
"min": null,
|
listRule: null,
|
||||||
"max": null,
|
viewRule: null,
|
||||||
"pattern": ""
|
createRule: null,
|
||||||
}
|
updateRule: null,
|
||||||
},
|
deleteRule: null,
|
||||||
{
|
options: {},
|
||||||
"system": false,
|
},
|
||||||
"id": "nd7cwqmn",
|
]
|
||||||
"name": "result",
|
|
||||||
"type": "json",
|
|
||||||
"required": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"system": false,
|
|
||||||
"id": "2hlrcx5j",
|
|
||||||
"name": "cmd",
|
|
||||||
"type": "text",
|
|
||||||
"required": true,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"min": null,
|
|
||||||
"max": null,
|
|
||||||
"pattern": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"indexes": [],
|
|
||||||
"listRule": "userId = @request.auth.id",
|
|
||||||
"viewRule": "userId = @request.auth.id",
|
|
||||||
"createRule": "userId = @request.auth.id && status='' && result='' && cmd ?= @collection.rpc_cmds.name",
|
|
||||||
"updateRule": null,
|
|
||||||
"deleteRule": null,
|
|
||||||
"options": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "72clb6v41bzsay9",
|
|
||||||
"created": "2022-11-09 15:23:20.313Z",
|
|
||||||
"updated": "2023-06-07 22:41:11.723Z",
|
|
||||||
"name": "backups",
|
|
||||||
"type": "base",
|
|
||||||
"system": false,
|
|
||||||
"schema": [
|
|
||||||
{
|
|
||||||
"system": false,
|
|
||||||
"id": "someqtjw",
|
|
||||||
"name": "message",
|
|
||||||
"type": "text",
|
|
||||||
"required": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"min": null,
|
|
||||||
"max": null,
|
|
||||||
"pattern": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"system": false,
|
|
||||||
"id": "jk4zwiaj",
|
|
||||||
"name": "instanceId",
|
|
||||||
"type": "relation",
|
|
||||||
"required": true,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"collectionId": "etae8tuiaxl6xfv",
|
|
||||||
"cascadeDelete": false,
|
|
||||||
"minSelect": null,
|
|
||||||
"maxSelect": 1,
|
|
||||||
"displayFields": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"system": false,
|
|
||||||
"id": "wsy3l5gm",
|
|
||||||
"name": "status",
|
|
||||||
"type": "text",
|
|
||||||
"required": true,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"min": null,
|
|
||||||
"max": null,
|
|
||||||
"pattern": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"system": false,
|
|
||||||
"id": "gmkrc5d9",
|
|
||||||
"name": "bytes",
|
|
||||||
"type": "number",
|
|
||||||
"required": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"min": null,
|
|
||||||
"max": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"system": false,
|
|
||||||
"id": "4lmammjz",
|
|
||||||
"name": "platform",
|
|
||||||
"type": "text",
|
|
||||||
"required": true,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"min": null,
|
|
||||||
"max": null,
|
|
||||||
"pattern": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"system": false,
|
|
||||||
"id": "fheqxmbj",
|
|
||||||
"name": "version",
|
|
||||||
"type": "text",
|
|
||||||
"required": true,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"min": null,
|
|
||||||
"max": null,
|
|
||||||
"pattern": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"system": false,
|
|
||||||
"id": "cinbmdwe",
|
|
||||||
"name": "progress",
|
|
||||||
"type": "json",
|
|
||||||
"required": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"indexes": [],
|
|
||||||
"listRule": "@request.auth.id = instanceId.uid",
|
|
||||||
"viewRule": null,
|
|
||||||
"createRule": null,
|
|
||||||
"updateRule": null,
|
|
||||||
"deleteRule": null,
|
|
||||||
"options": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "enp8mrv5ewtrltj",
|
|
||||||
"created": "2023-01-06 10:21:51.659Z",
|
|
||||||
"updated": "2023-06-07 22:41:11.725Z",
|
|
||||||
"name": "rpc_cmds",
|
|
||||||
"type": "base",
|
|
||||||
"system": false,
|
|
||||||
"schema": [
|
|
||||||
{
|
|
||||||
"system": false,
|
|
||||||
"id": "jbostfhp",
|
|
||||||
"name": "name",
|
|
||||||
"type": "text",
|
|
||||||
"required": true,
|
|
||||||
"unique": true,
|
|
||||||
"options": {
|
|
||||||
"min": null,
|
|
||||||
"max": null,
|
|
||||||
"pattern": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"indexes": [
|
|
||||||
"CREATE UNIQUE INDEX \"idx_unique_jbostfhp\" on \"rpc_cmds\" (\"name\")"
|
|
||||||
],
|
|
||||||
"listRule": null,
|
|
||||||
"viewRule": null,
|
|
||||||
"createRule": null,
|
|
||||||
"updateRule": null,
|
|
||||||
"deleteRule": null,
|
|
||||||
"options": {}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const collections = snapshot.map((item) => new Collection(item));
|
const collections = snapshot.map((item) => new Collection(item))
|
||||||
|
|
||||||
return Dao(db).importCollections(collections, true, null);
|
return Dao(db).importCollections(collections, true, null)
|
||||||
}, (db) => {
|
},
|
||||||
return null;
|
(db) => {
|
||||||
})
|
return null
|
||||||
|
},
|
||||||
|
)
|
||||||
|
@ -1,67 +1,76 @@
|
|||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('etae8tuiaxl6xfv')
|
||||||
|
|
||||||
collection.indexes = [
|
collection.indexes = [
|
||||||
"CREATE UNIQUE INDEX `idx_unique_qdtuuld1` ON `instances` (`subdomain`)"
|
'CREATE UNIQUE INDEX `idx_unique_qdtuuld1` ON `instances` (`subdomain`)',
|
||||||
]
|
]
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
collection.schema.removeField("yxby5r6b")
|
collection.schema.removeField('yxby5r6b')
|
||||||
|
|
||||||
// update
|
// update
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "qdtuuld1",
|
system: false,
|
||||||
"name": "subdomain",
|
id: 'qdtuuld1',
|
||||||
"type": "text",
|
name: 'subdomain',
|
||||||
"required": true,
|
type: 'text',
|
||||||
"unique": false,
|
required: true,
|
||||||
"options": {
|
unique: false,
|
||||||
"min": null,
|
options: {
|
||||||
"max": 50,
|
min: null,
|
||||||
"pattern": "^[a-z][\\-a-z]+$"
|
max: 50,
|
||||||
}
|
pattern: '^[a-z][\\-a-z]+$',
|
||||||
}))
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('etae8tuiaxl6xfv')
|
||||||
|
|
||||||
collection.indexes = [
|
collection.indexes = [
|
||||||
"CREATE UNIQUE INDEX \"idx_unique_qdtuuld1\" on \"instances\" (\"subdomain\")"
|
'CREATE UNIQUE INDEX "idx_unique_qdtuuld1" on "instances" ("subdomain")',
|
||||||
]
|
]
|
||||||
|
|
||||||
// add
|
// add
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "yxby5r6b",
|
system: false,
|
||||||
"name": "platform",
|
id: 'yxby5r6b',
|
||||||
"type": "text",
|
name: 'platform',
|
||||||
"required": true,
|
type: 'text',
|
||||||
"unique": false,
|
required: true,
|
||||||
"options": {
|
unique: false,
|
||||||
"min": null,
|
options: {
|
||||||
"max": null,
|
min: null,
|
||||||
"pattern": ""
|
max: null,
|
||||||
}
|
pattern: '',
|
||||||
}))
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// update
|
// update
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "qdtuuld1",
|
system: false,
|
||||||
"name": "subdomain",
|
id: 'qdtuuld1',
|
||||||
"type": "text",
|
name: 'subdomain',
|
||||||
"required": true,
|
type: 'text',
|
||||||
"unique": true,
|
required: true,
|
||||||
"options": {
|
unique: true,
|
||||||
"min": null,
|
options: {
|
||||||
"max": 50,
|
min: null,
|
||||||
"pattern": "^[a-z][\\-a-z]+$"
|
max: 50,
|
||||||
}
|
pattern: '^[a-z][\\-a-z]+$',
|
||||||
}))
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,29 +1,34 @@
|
|||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("72clb6v41bzsay9")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('72clb6v41bzsay9')
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
collection.schema.removeField("4lmammjz")
|
collection.schema.removeField('4lmammjz')
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("72clb6v41bzsay9")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('72clb6v41bzsay9')
|
||||||
|
|
||||||
// add
|
// add
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "4lmammjz",
|
system: false,
|
||||||
"name": "platform",
|
id: '4lmammjz',
|
||||||
"type": "text",
|
name: 'platform',
|
||||||
"required": true,
|
type: 'text',
|
||||||
"unique": false,
|
required: true,
|
||||||
"options": {
|
unique: false,
|
||||||
"min": null,
|
options: {
|
||||||
"max": null,
|
min: null,
|
||||||
"pattern": ""
|
max: null,
|
||||||
}
|
pattern: '',
|
||||||
}))
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,41 +1,44 @@
|
|||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db);
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("enp8mrv5ewtrltj");
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('enp8mrv5ewtrltj')
|
||||||
|
|
||||||
return dao.deleteCollection(collection);
|
return dao.deleteCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const collection = new Collection({
|
(db) => {
|
||||||
"id": "enp8mrv5ewtrltj",
|
const collection = new Collection({
|
||||||
"created": "2023-01-06 10:21:51.659Z",
|
id: 'enp8mrv5ewtrltj',
|
||||||
"updated": "2023-06-07 22:41:11.725Z",
|
created: '2023-01-06 10:21:51.659Z',
|
||||||
"name": "rpc_cmds",
|
updated: '2023-06-07 22:41:11.725Z',
|
||||||
"type": "base",
|
name: 'rpc_cmds',
|
||||||
"system": false,
|
type: 'base',
|
||||||
"schema": [
|
system: false,
|
||||||
{
|
schema: [
|
||||||
"system": false,
|
{
|
||||||
"id": "jbostfhp",
|
system: false,
|
||||||
"name": "name",
|
id: 'jbostfhp',
|
||||||
"type": "text",
|
name: 'name',
|
||||||
"required": true,
|
type: 'text',
|
||||||
"unique": true,
|
required: true,
|
||||||
"options": {
|
unique: true,
|
||||||
"min": null,
|
options: {
|
||||||
"max": null,
|
min: null,
|
||||||
"pattern": ""
|
max: null,
|
||||||
}
|
pattern: '',
|
||||||
}
|
},
|
||||||
],
|
},
|
||||||
"indexes": [
|
],
|
||||||
"CREATE UNIQUE INDEX \"idx_unique_jbostfhp\" on \"rpc_cmds\" (\"name\")"
|
indexes: [
|
||||||
],
|
'CREATE UNIQUE INDEX "idx_unique_jbostfhp" on "rpc_cmds" ("name")',
|
||||||
"listRule": null,
|
],
|
||||||
"viewRule": null,
|
listRule: null,
|
||||||
"createRule": null,
|
viewRule: null,
|
||||||
"updateRule": null,
|
createRule: null,
|
||||||
"deleteRule": null,
|
updateRule: null,
|
||||||
"options": {}
|
deleteRule: null,
|
||||||
});
|
options: {},
|
||||||
|
})
|
||||||
|
|
||||||
return Dao(db).saveCollection(collection);
|
return Dao(db).saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("v7s41iokt1vizxd")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('v7s41iokt1vizxd')
|
||||||
|
|
||||||
collection.createRule = "userId = @request.auth.id && status='' && result=''"
|
collection.createRule =
|
||||||
|
"userId = @request.auth.id && status='' && result=''"
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("v7s41iokt1vizxd")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('v7s41iokt1vizxd')
|
||||||
|
|
||||||
collection.createRule = null
|
collection.createRule = null
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,101 +1,104 @@
|
|||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db);
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("72clb6v41bzsay9");
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('72clb6v41bzsay9')
|
||||||
|
|
||||||
return dao.deleteCollection(collection);
|
return dao.deleteCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const collection = new Collection({
|
(db) => {
|
||||||
"id": "72clb6v41bzsay9",
|
const collection = new Collection({
|
||||||
"created": "2022-11-09 15:23:20.313Z",
|
id: '72clb6v41bzsay9',
|
||||||
"updated": "2023-06-10 09:12:01.004Z",
|
created: '2022-11-09 15:23:20.313Z',
|
||||||
"name": "backups",
|
updated: '2023-06-10 09:12:01.004Z',
|
||||||
"type": "base",
|
name: 'backups',
|
||||||
"system": false,
|
type: 'base',
|
||||||
"schema": [
|
system: false,
|
||||||
{
|
schema: [
|
||||||
"system": false,
|
{
|
||||||
"id": "someqtjw",
|
system: false,
|
||||||
"name": "message",
|
id: 'someqtjw',
|
||||||
"type": "text",
|
name: 'message',
|
||||||
"required": false,
|
type: 'text',
|
||||||
"unique": false,
|
required: false,
|
||||||
"options": {
|
unique: false,
|
||||||
"min": null,
|
options: {
|
||||||
"max": null,
|
min: null,
|
||||||
"pattern": ""
|
max: null,
|
||||||
}
|
pattern: '',
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
"system": false,
|
{
|
||||||
"id": "jk4zwiaj",
|
system: false,
|
||||||
"name": "instanceId",
|
id: 'jk4zwiaj',
|
||||||
"type": "relation",
|
name: 'instanceId',
|
||||||
"required": true,
|
type: 'relation',
|
||||||
"unique": false,
|
required: true,
|
||||||
"options": {
|
unique: false,
|
||||||
"collectionId": "etae8tuiaxl6xfv",
|
options: {
|
||||||
"cascadeDelete": false,
|
collectionId: 'etae8tuiaxl6xfv',
|
||||||
"minSelect": null,
|
cascadeDelete: false,
|
||||||
"maxSelect": 1,
|
minSelect: null,
|
||||||
"displayFields": null
|
maxSelect: 1,
|
||||||
}
|
displayFields: null,
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
"system": false,
|
{
|
||||||
"id": "wsy3l5gm",
|
system: false,
|
||||||
"name": "status",
|
id: 'wsy3l5gm',
|
||||||
"type": "text",
|
name: 'status',
|
||||||
"required": true,
|
type: 'text',
|
||||||
"unique": false,
|
required: true,
|
||||||
"options": {
|
unique: false,
|
||||||
"min": null,
|
options: {
|
||||||
"max": null,
|
min: null,
|
||||||
"pattern": ""
|
max: null,
|
||||||
}
|
pattern: '',
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
"system": false,
|
{
|
||||||
"id": "gmkrc5d9",
|
system: false,
|
||||||
"name": "bytes",
|
id: 'gmkrc5d9',
|
||||||
"type": "number",
|
name: 'bytes',
|
||||||
"required": false,
|
type: 'number',
|
||||||
"unique": false,
|
required: false,
|
||||||
"options": {
|
unique: false,
|
||||||
"min": null,
|
options: {
|
||||||
"max": null
|
min: null,
|
||||||
}
|
max: null,
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
"system": false,
|
{
|
||||||
"id": "fheqxmbj",
|
system: false,
|
||||||
"name": "version",
|
id: 'fheqxmbj',
|
||||||
"type": "text",
|
name: 'version',
|
||||||
"required": true,
|
type: 'text',
|
||||||
"unique": false,
|
required: true,
|
||||||
"options": {
|
unique: false,
|
||||||
"min": null,
|
options: {
|
||||||
"max": null,
|
min: null,
|
||||||
"pattern": ""
|
max: null,
|
||||||
}
|
pattern: '',
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
"system": false,
|
{
|
||||||
"id": "cinbmdwe",
|
system: false,
|
||||||
"name": "progress",
|
id: 'cinbmdwe',
|
||||||
"type": "json",
|
name: 'progress',
|
||||||
"required": false,
|
type: 'json',
|
||||||
"unique": false,
|
required: false,
|
||||||
"options": {}
|
unique: false,
|
||||||
}
|
options: {},
|
||||||
],
|
},
|
||||||
"indexes": [],
|
],
|
||||||
"listRule": "@request.auth.id = instanceId.uid",
|
indexes: [],
|
||||||
"viewRule": null,
|
listRule: '@request.auth.id = instanceId.uid',
|
||||||
"createRule": null,
|
viewRule: null,
|
||||||
"updateRule": null,
|
createRule: null,
|
||||||
"deleteRule": null,
|
updateRule: null,
|
||||||
"options": {}
|
deleteRule: null,
|
||||||
});
|
options: {},
|
||||||
|
})
|
||||||
|
|
||||||
return Dao(db).saveCollection(collection);
|
return Dao(db).saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,25 +1,30 @@
|
|||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('etae8tuiaxl6xfv')
|
||||||
|
|
||||||
// add
|
// add
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "mexrkb5z",
|
system: false,
|
||||||
"name": "maintenance",
|
id: 'mexrkb5z',
|
||||||
"type": "bool",
|
name: 'maintenance',
|
||||||
"required": false,
|
type: 'bool',
|
||||||
"unique": false,
|
required: false,
|
||||||
"options": {}
|
unique: false,
|
||||||
}))
|
options: {},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('etae8tuiaxl6xfv')
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
collection.schema.removeField("mexrkb5z")
|
collection.schema.removeField('mexrkb5z')
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,25 +1,30 @@
|
|||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('etae8tuiaxl6xfv')
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
collection.schema.removeField("66vjgzcg")
|
collection.schema.removeField('66vjgzcg')
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('etae8tuiaxl6xfv')
|
||||||
|
|
||||||
// add
|
// add
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "66vjgzcg",
|
system: false,
|
||||||
"name": "isBackupAllowed",
|
id: '66vjgzcg',
|
||||||
"type": "bool",
|
name: 'isBackupAllowed',
|
||||||
"required": false,
|
type: 'bool',
|
||||||
"unique": false,
|
required: false,
|
||||||
"options": {}
|
unique: false,
|
||||||
}))
|
options: {},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,29 +1,34 @@
|
|||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('etae8tuiaxl6xfv')
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
collection.schema.removeField("qew2o2d6")
|
collection.schema.removeField('qew2o2d6')
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('etae8tuiaxl6xfv')
|
||||||
|
|
||||||
// add
|
// add
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "qew2o2d6",
|
system: false,
|
||||||
"name": "currentWorkerBundleId",
|
id: 'qew2o2d6',
|
||||||
"type": "text",
|
name: 'currentWorkerBundleId',
|
||||||
"required": false,
|
type: 'text',
|
||||||
"unique": false,
|
required: false,
|
||||||
"options": {
|
unique: false,
|
||||||
"min": null,
|
options: {
|
||||||
"max": null,
|
min: null,
|
||||||
"pattern": ""
|
max: null,
|
||||||
}
|
pattern: '',
|
||||||
}))
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -170,5 +170,5 @@ migrate(
|
|||||||
const collection = dao.findCollectionByNameOrId('se6fljwhhc03k4q')
|
const collection = dao.findCollectionByNameOrId('se6fljwhhc03k4q')
|
||||||
|
|
||||||
return dao.deleteCollection(collection)
|
return dao.deleteCollection(collection)
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
|
@ -22,5 +22,5 @@ migrate(
|
|||||||
collection.indexes = []
|
collection.indexes = []
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
|
@ -17,5 +17,5 @@ migrate(
|
|||||||
collection.indexes = []
|
collection.indexes = []
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
|
@ -1,42 +1,46 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const collection = new Collection({
|
(db) => {
|
||||||
"id": "y7qb3zm8vslkfxj",
|
const collection = new Collection({
|
||||||
"created": "2023-09-15 13:56:42.907Z",
|
id: 'y7qb3zm8vslkfxj',
|
||||||
"updated": "2023-09-15 13:56:42.907Z",
|
created: '2023-09-15 13:56:42.907Z',
|
||||||
"name": "potentialPaidUsersView",
|
updated: '2023-09-15 13:56:42.907Z',
|
||||||
"type": "view",
|
name: 'potentialPaidUsersView',
|
||||||
"system": false,
|
type: 'view',
|
||||||
"schema": [
|
system: false,
|
||||||
{
|
schema: [
|
||||||
"system": false,
|
{
|
||||||
"id": "2gw1y72t",
|
system: false,
|
||||||
"name": "email",
|
id: '2gw1y72t',
|
||||||
"type": "email",
|
name: 'email',
|
||||||
"required": false,
|
type: 'email',
|
||||||
"presentable": false,
|
required: false,
|
||||||
"unique": false,
|
presentable: false,
|
||||||
"options": {
|
unique: false,
|
||||||
"exceptDomains": null,
|
options: {
|
||||||
"onlyDomains": null
|
exceptDomains: null,
|
||||||
}
|
onlyDomains: null,
|
||||||
}
|
},
|
||||||
],
|
},
|
||||||
"indexes": [],
|
],
|
||||||
"listRule": null,
|
indexes: [],
|
||||||
"viewRule": null,
|
listRule: null,
|
||||||
"createRule": null,
|
viewRule: null,
|
||||||
"updateRule": null,
|
createRule: null,
|
||||||
"deleteRule": null,
|
updateRule: null,
|
||||||
"options": {
|
deleteRule: null,
|
||||||
"query": "select id,email from users where id in (select uid from instances where secondsThisMonth>6000)"
|
options: {
|
||||||
}
|
query:
|
||||||
});
|
'select id,email from users where id in (select uid from instances where secondsThisMonth>6000)',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
return Dao(db).saveCollection(collection);
|
return Dao(db).saveCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const dao = new Dao(db);
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj");
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
return dao.deleteCollection(collection);
|
return dao.deleteCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,56 +1,65 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
collection.options = {
|
collection.options = {
|
||||||
"query": "select id,email from users where id in (select uid from instances where secondsThisMonth<=6000)"
|
query:
|
||||||
}
|
'select id,email from users where id in (select uid from instances where secondsThisMonth<=6000)',
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("2gw1y72t")
|
|
||||||
|
|
||||||
// add
|
|
||||||
collection.schema.addField(new SchemaField({
|
|
||||||
"system": false,
|
|
||||||
"id": "mu8wxouc",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// remove
|
||||||
}, (db) => {
|
collection.schema.removeField('2gw1y72t')
|
||||||
const dao = new Dao(db)
|
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
|
||||||
|
|
||||||
collection.options = {
|
// add
|
||||||
"query": "select id,email from users where id in (select uid from instances where secondsThisMonth>6000)"
|
collection.schema.addField(
|
||||||
}
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: 'mu8wxouc',
|
||||||
|
name: 'email',
|
||||||
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// add
|
return dao.saveCollection(collection)
|
||||||
collection.schema.addField(new SchemaField({
|
},
|
||||||
"system": false,
|
(db) => {
|
||||||
"id": "2gw1y72t",
|
const dao = new Dao(db)
|
||||||
"name": "email",
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
collection.options = {
|
||||||
"presentable": false,
|
query:
|
||||||
"unique": false,
|
'select id,email from users where id in (select uid from instances where secondsThisMonth>6000)',
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
// remove
|
// add
|
||||||
collection.schema.removeField("mu8wxouc")
|
collection.schema.addField(
|
||||||
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: '2gw1y72t',
|
||||||
|
name: 'email',
|
||||||
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// remove
|
||||||
})
|
collection.schema.removeField('mu8wxouc')
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
},
|
||||||
|
)
|
||||||
|
@ -1,56 +1,65 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
collection.options = {
|
collection.options = {
|
||||||
"query": "select id,email from users where id in (select uid from instances where secondsThisMonth>6000)"
|
query:
|
||||||
}
|
'select id,email from users where id in (select uid from instances where secondsThisMonth>6000)',
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("mu8wxouc")
|
|
||||||
|
|
||||||
// add
|
|
||||||
collection.schema.addField(new SchemaField({
|
|
||||||
"system": false,
|
|
||||||
"id": "4dwqriso",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// remove
|
||||||
}, (db) => {
|
collection.schema.removeField('mu8wxouc')
|
||||||
const dao = new Dao(db)
|
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
|
||||||
|
|
||||||
collection.options = {
|
// add
|
||||||
"query": "select id,email from users where id in (select uid from instances where secondsThisMonth<=6000)"
|
collection.schema.addField(
|
||||||
}
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: '4dwqriso',
|
||||||
|
name: 'email',
|
||||||
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// add
|
return dao.saveCollection(collection)
|
||||||
collection.schema.addField(new SchemaField({
|
},
|
||||||
"system": false,
|
(db) => {
|
||||||
"id": "mu8wxouc",
|
const dao = new Dao(db)
|
||||||
"name": "email",
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
collection.options = {
|
||||||
"presentable": false,
|
query:
|
||||||
"unique": false,
|
'select id,email from users where id in (select uid from instances where secondsThisMonth<=6000)',
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
// remove
|
// add
|
||||||
collection.schema.removeField("4dwqriso")
|
collection.schema.addField(
|
||||||
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: 'mu8wxouc',
|
||||||
|
name: 'email',
|
||||||
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// remove
|
||||||
})
|
collection.schema.removeField('4dwqriso')
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
},
|
||||||
|
)
|
||||||
|
@ -1,71 +1,82 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
collection.options = {
|
collection.options = {
|
||||||
"query": "select u.id,email,secondsThisMonth from users u join instances i where u.id=i.uid and secondsThisMonth>6000"
|
query:
|
||||||
}
|
'select u.id,email,secondsThisMonth from users u join instances i where u.id=i.uid and secondsThisMonth>6000',
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("4dwqriso")
|
|
||||||
|
|
||||||
// add
|
|
||||||
collection.schema.addField(new SchemaField({
|
|
||||||
"system": false,
|
|
||||||
"id": "jeo2co2y",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('4dwqriso')
|
||||||
"system": false,
|
|
||||||
"id": "pcl2olai",
|
|
||||||
"name": "secondsThisMonth",
|
|
||||||
"type": "json",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {}
|
|
||||||
}))
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// add
|
||||||
}, (db) => {
|
collection.schema.addField(
|
||||||
const dao = new Dao(db)
|
new SchemaField({
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
system: false,
|
||||||
|
id: 'jeo2co2y',
|
||||||
|
name: 'email',
|
||||||
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
collection.options = {
|
// add
|
||||||
"query": "select id,email from users where id in (select uid from instances where secondsThisMonth>6000)"
|
collection.schema.addField(
|
||||||
}
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: 'pcl2olai',
|
||||||
|
name: 'secondsThisMonth',
|
||||||
|
type: 'json',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// add
|
return dao.saveCollection(collection)
|
||||||
collection.schema.addField(new SchemaField({
|
},
|
||||||
"system": false,
|
(db) => {
|
||||||
"id": "4dwqriso",
|
const dao = new Dao(db)
|
||||||
"name": "email",
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
collection.options = {
|
||||||
"presentable": false,
|
query:
|
||||||
"unique": false,
|
'select id,email from users where id in (select uid from instances where secondsThisMonth>6000)',
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
// remove
|
// add
|
||||||
collection.schema.removeField("jeo2co2y")
|
collection.schema.addField(
|
||||||
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: '4dwqriso',
|
||||||
|
name: 'email',
|
||||||
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
collection.schema.removeField("pcl2olai")
|
collection.schema.removeField('jeo2co2y')
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// remove
|
||||||
})
|
collection.schema.removeField('pcl2olai')
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
},
|
||||||
|
)
|
||||||
|
@ -1,86 +1,99 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
collection.options = {
|
collection.options = {
|
||||||
"query": "select u.id,email,secondsThisMonth from users u join instances i where u.id=i.uid and secondsThisMonth/60>500"
|
query:
|
||||||
}
|
'select u.id,email,secondsThisMonth from users u join instances i where u.id=i.uid and secondsThisMonth/60>500',
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("jeo2co2y")
|
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("pcl2olai")
|
|
||||||
|
|
||||||
// add
|
|
||||||
collection.schema.addField(new SchemaField({
|
|
||||||
"system": false,
|
|
||||||
"id": "4nas99bt",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('jeo2co2y')
|
||||||
"system": false,
|
|
||||||
"id": "pmfykpks",
|
|
||||||
"name": "secondsThisMonth",
|
|
||||||
"type": "json",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {}
|
|
||||||
}))
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// remove
|
||||||
}, (db) => {
|
collection.schema.removeField('pcl2olai')
|
||||||
const dao = new Dao(db)
|
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
|
||||||
|
|
||||||
collection.options = {
|
// add
|
||||||
"query": "select u.id,email,secondsThisMonth from users u join instances i where u.id=i.uid and secondsThisMonth>6000"
|
collection.schema.addField(
|
||||||
}
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: '4nas99bt',
|
||||||
|
name: 'email',
|
||||||
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// add
|
// add
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "jeo2co2y",
|
system: false,
|
||||||
"name": "email",
|
id: 'pmfykpks',
|
||||||
"type": "email",
|
name: 'secondsThisMonth',
|
||||||
"required": false,
|
type: 'json',
|
||||||
"presentable": false,
|
required: false,
|
||||||
"unique": false,
|
presentable: false,
|
||||||
"options": {
|
unique: false,
|
||||||
"exceptDomains": null,
|
options: {},
|
||||||
"onlyDomains": null
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
},
|
||||||
|
(db) => {
|
||||||
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
|
collection.options = {
|
||||||
|
query:
|
||||||
|
'select u.id,email,secondsThisMonth from users u join instances i where u.id=i.uid and secondsThisMonth>6000',
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// add
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "pcl2olai",
|
system: false,
|
||||||
"name": "secondsThisMonth",
|
id: 'jeo2co2y',
|
||||||
"type": "json",
|
name: 'email',
|
||||||
"required": false,
|
type: 'email',
|
||||||
"presentable": false,
|
required: false,
|
||||||
"unique": false,
|
presentable: false,
|
||||||
"options": {}
|
unique: false,
|
||||||
}))
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// remove
|
// add
|
||||||
collection.schema.removeField("4nas99bt")
|
collection.schema.addField(
|
||||||
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: 'pcl2olai',
|
||||||
|
name: 'secondsThisMonth',
|
||||||
|
type: 'json',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
collection.schema.removeField("pmfykpks")
|
collection.schema.removeField('4nas99bt')
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// remove
|
||||||
})
|
collection.schema.removeField('pmfykpks')
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
},
|
||||||
|
)
|
||||||
|
@ -1,86 +1,99 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
collection.options = {
|
collection.options = {
|
||||||
"query": "select u.id,email,secondsThisMonth from users u join instances i where u.id=i.uid and secondsThisMonth/60>200"
|
query:
|
||||||
}
|
'select u.id,email,secondsThisMonth from users u join instances i where u.id=i.uid and secondsThisMonth/60>200',
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("4nas99bt")
|
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("pmfykpks")
|
|
||||||
|
|
||||||
// add
|
|
||||||
collection.schema.addField(new SchemaField({
|
|
||||||
"system": false,
|
|
||||||
"id": "c0fjqkvh",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('4nas99bt')
|
||||||
"system": false,
|
|
||||||
"id": "nrzmfvrb",
|
|
||||||
"name": "secondsThisMonth",
|
|
||||||
"type": "json",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {}
|
|
||||||
}))
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// remove
|
||||||
}, (db) => {
|
collection.schema.removeField('pmfykpks')
|
||||||
const dao = new Dao(db)
|
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
|
||||||
|
|
||||||
collection.options = {
|
// add
|
||||||
"query": "select u.id,email,secondsThisMonth from users u join instances i where u.id=i.uid and secondsThisMonth/60>500"
|
collection.schema.addField(
|
||||||
}
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: 'c0fjqkvh',
|
||||||
|
name: 'email',
|
||||||
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// add
|
// add
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "4nas99bt",
|
system: false,
|
||||||
"name": "email",
|
id: 'nrzmfvrb',
|
||||||
"type": "email",
|
name: 'secondsThisMonth',
|
||||||
"required": false,
|
type: 'json',
|
||||||
"presentable": false,
|
required: false,
|
||||||
"unique": false,
|
presentable: false,
|
||||||
"options": {
|
unique: false,
|
||||||
"exceptDomains": null,
|
options: {},
|
||||||
"onlyDomains": null
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
},
|
||||||
|
(db) => {
|
||||||
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
|
collection.options = {
|
||||||
|
query:
|
||||||
|
'select u.id,email,secondsThisMonth from users u join instances i where u.id=i.uid and secondsThisMonth/60>500',
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// add
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "pmfykpks",
|
system: false,
|
||||||
"name": "secondsThisMonth",
|
id: '4nas99bt',
|
||||||
"type": "json",
|
name: 'email',
|
||||||
"required": false,
|
type: 'email',
|
||||||
"presentable": false,
|
required: false,
|
||||||
"unique": false,
|
presentable: false,
|
||||||
"options": {}
|
unique: false,
|
||||||
}))
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// remove
|
// add
|
||||||
collection.schema.removeField("c0fjqkvh")
|
collection.schema.addField(
|
||||||
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: 'pmfykpks',
|
||||||
|
name: 'secondsThisMonth',
|
||||||
|
type: 'json',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
collection.schema.removeField("nrzmfvrb")
|
collection.schema.removeField('c0fjqkvh')
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// remove
|
||||||
})
|
collection.schema.removeField('nrzmfvrb')
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
},
|
||||||
|
)
|
||||||
|
@ -1,54 +1,59 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("aiw8te7y7atklwn")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('aiw8te7y7atklwn')
|
||||||
|
|
||||||
collection.indexes = [
|
collection.indexes = [
|
||||||
"CREATE INDEX `idx_CTV52b6` ON `invocations` (`created`)",
|
'CREATE INDEX `idx_CTV52b6` ON `invocations` (`created`)',
|
||||||
"CREATE INDEX `idx_6rNZeTK` ON `invocations` (`instanceId`)",
|
'CREATE INDEX `idx_6rNZeTK` ON `invocations` (`instanceId`)',
|
||||||
"CREATE INDEX `idx_LTmqfbC` ON `invocations` (`totalSeconds`)",
|
'CREATE INDEX `idx_LTmqfbC` ON `invocations` (`totalSeconds`)',
|
||||||
"CREATE INDEX `idx_7YR9a3g` ON `invocations` (\n `instanceId`,\n `created`\n)",
|
'CREATE INDEX `idx_7YR9a3g` ON `invocations` (\n `instanceId`,\n `created`\n)',
|
||||||
"CREATE INDEX `idx_ntC1d1L` ON `invocations` (\n `totalSeconds`,\n `created`\n)",
|
'CREATE INDEX `idx_ntC1d1L` ON `invocations` (\n `totalSeconds`,\n `created`\n)',
|
||||||
"CREATE INDEX `idx_vViR75E` ON `invocations` (\n `created`,\n `totalSeconds`\n)",
|
'CREATE INDEX `idx_vViR75E` ON `invocations` (\n `created`,\n `totalSeconds`\n)',
|
||||||
"CREATE INDEX `idx_q9LanEj` ON `invocations` (\n `created`,\n `instanceId`\n)",
|
'CREATE INDEX `idx_q9LanEj` ON `invocations` (\n `created`,\n `instanceId`\n)',
|
||||||
"CREATE INDEX `idx_ueUQe1N` ON `invocations` (`uid`)"
|
'CREATE INDEX `idx_ueUQe1N` ON `invocations` (`uid`)',
|
||||||
]
|
]
|
||||||
|
|
||||||
// add
|
// add
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "kmyokg1d",
|
system: false,
|
||||||
"name": "uid",
|
id: 'kmyokg1d',
|
||||||
"type": "relation",
|
name: 'uid',
|
||||||
"required": false,
|
type: 'relation',
|
||||||
"presentable": false,
|
required: false,
|
||||||
"unique": false,
|
presentable: false,
|
||||||
"options": {
|
unique: false,
|
||||||
"collectionId": "systemprofiles0",
|
options: {
|
||||||
"cascadeDelete": false,
|
collectionId: 'systemprofiles0',
|
||||||
"minSelect": null,
|
cascadeDelete: false,
|
||||||
"maxSelect": 1,
|
minSelect: null,
|
||||||
"displayFields": null
|
maxSelect: 1,
|
||||||
}
|
displayFields: null,
|
||||||
}))
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("aiw8te7y7atklwn")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('aiw8te7y7atklwn')
|
||||||
|
|
||||||
collection.indexes = [
|
collection.indexes = [
|
||||||
"CREATE INDEX `idx_CTV52b6` ON `invocations` (`created`)",
|
'CREATE INDEX `idx_CTV52b6` ON `invocations` (`created`)',
|
||||||
"CREATE INDEX `idx_6rNZeTK` ON `invocations` (`instanceId`)",
|
'CREATE INDEX `idx_6rNZeTK` ON `invocations` (`instanceId`)',
|
||||||
"CREATE INDEX `idx_LTmqfbC` ON `invocations` (`totalSeconds`)",
|
'CREATE INDEX `idx_LTmqfbC` ON `invocations` (`totalSeconds`)',
|
||||||
"CREATE INDEX `idx_7YR9a3g` ON `invocations` (\n `instanceId`,\n `created`\n)",
|
'CREATE INDEX `idx_7YR9a3g` ON `invocations` (\n `instanceId`,\n `created`\n)',
|
||||||
"CREATE INDEX `idx_ntC1d1L` ON `invocations` (\n `totalSeconds`,\n `created`\n)",
|
'CREATE INDEX `idx_ntC1d1L` ON `invocations` (\n `totalSeconds`,\n `created`\n)',
|
||||||
"CREATE INDEX `idx_vViR75E` ON `invocations` (\n `created`,\n `totalSeconds`\n)",
|
'CREATE INDEX `idx_vViR75E` ON `invocations` (\n `created`,\n `totalSeconds`\n)',
|
||||||
"CREATE INDEX `idx_q9LanEj` ON `invocations` (\n `created`,\n `instanceId`\n)"
|
'CREATE INDEX `idx_q9LanEj` ON `invocations` (\n `created`,\n `instanceId`\n)',
|
||||||
]
|
]
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
collection.schema.removeField("kmyokg1d")
|
collection.schema.removeField('kmyokg1d')
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,36 +1,39 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("aiw8te7y7atklwn")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('aiw8te7y7atklwn')
|
||||||
|
|
||||||
collection.indexes = [
|
collection.indexes = [
|
||||||
"CREATE INDEX `idx_CTV52b6` ON `invocations` (`created`)",
|
'CREATE INDEX `idx_CTV52b6` ON `invocations` (`created`)',
|
||||||
"CREATE INDEX `idx_6rNZeTK` ON `invocations` (`instanceId`)",
|
'CREATE INDEX `idx_6rNZeTK` ON `invocations` (`instanceId`)',
|
||||||
"CREATE INDEX `idx_LTmqfbC` ON `invocations` (`totalSeconds`)",
|
'CREATE INDEX `idx_LTmqfbC` ON `invocations` (`totalSeconds`)',
|
||||||
"CREATE INDEX `idx_7YR9a3g` ON `invocations` (\n `instanceId`,\n `created`\n)",
|
'CREATE INDEX `idx_7YR9a3g` ON `invocations` (\n `instanceId`,\n `created`\n)',
|
||||||
"CREATE INDEX `idx_ntC1d1L` ON `invocations` (\n `totalSeconds`,\n `created`\n)",
|
'CREATE INDEX `idx_ntC1d1L` ON `invocations` (\n `totalSeconds`,\n `created`\n)',
|
||||||
"CREATE INDEX `idx_vViR75E` ON `invocations` (\n `created`,\n `totalSeconds`\n)",
|
'CREATE INDEX `idx_vViR75E` ON `invocations` (\n `created`,\n `totalSeconds`\n)',
|
||||||
"CREATE INDEX `idx_q9LanEj` ON `invocations` (\n `created`,\n `instanceId`\n)",
|
'CREATE INDEX `idx_q9LanEj` ON `invocations` (\n `created`,\n `instanceId`\n)',
|
||||||
"CREATE INDEX `idx_ueUQe1N` ON `invocations` (`uid`)",
|
'CREATE INDEX `idx_ueUQe1N` ON `invocations` (`uid`)',
|
||||||
"CREATE INDEX `idx_gh6iEUG` ON `invocations` (\n `instanceId`,\n `startedAt`\n)",
|
'CREATE INDEX `idx_gh6iEUG` ON `invocations` (\n `instanceId`,\n `startedAt`\n)',
|
||||||
"CREATE INDEX `idx_CUsNbfu` ON `invocations` (\n `uid`,\n `startedAt`\n)"
|
'CREATE INDEX `idx_CUsNbfu` ON `invocations` (\n `uid`,\n `startedAt`\n)',
|
||||||
]
|
]
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("aiw8te7y7atklwn")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('aiw8te7y7atklwn')
|
||||||
|
|
||||||
collection.indexes = [
|
collection.indexes = [
|
||||||
"CREATE INDEX `idx_CTV52b6` ON `invocations` (`created`)",
|
'CREATE INDEX `idx_CTV52b6` ON `invocations` (`created`)',
|
||||||
"CREATE INDEX `idx_6rNZeTK` ON `invocations` (`instanceId`)",
|
'CREATE INDEX `idx_6rNZeTK` ON `invocations` (`instanceId`)',
|
||||||
"CREATE INDEX `idx_LTmqfbC` ON `invocations` (`totalSeconds`)",
|
'CREATE INDEX `idx_LTmqfbC` ON `invocations` (`totalSeconds`)',
|
||||||
"CREATE INDEX `idx_7YR9a3g` ON `invocations` (\n `instanceId`,\n `created`\n)",
|
'CREATE INDEX `idx_7YR9a3g` ON `invocations` (\n `instanceId`,\n `created`\n)',
|
||||||
"CREATE INDEX `idx_ntC1d1L` ON `invocations` (\n `totalSeconds`,\n `created`\n)",
|
'CREATE INDEX `idx_ntC1d1L` ON `invocations` (\n `totalSeconds`,\n `created`\n)',
|
||||||
"CREATE INDEX `idx_vViR75E` ON `invocations` (\n `created`,\n `totalSeconds`\n)",
|
'CREATE INDEX `idx_vViR75E` ON `invocations` (\n `created`,\n `totalSeconds`\n)',
|
||||||
"CREATE INDEX `idx_q9LanEj` ON `invocations` (\n `created`,\n `instanceId`\n)",
|
'CREATE INDEX `idx_q9LanEj` ON `invocations` (\n `created`,\n `instanceId`\n)',
|
||||||
"CREATE INDEX `idx_ueUQe1N` ON `invocations` (`uid`)"
|
'CREATE INDEX `idx_ueUQe1N` ON `invocations` (`uid`)',
|
||||||
]
|
]
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,31 +1,36 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("systemprofiles0")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('systemprofiles0')
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
collection.schema.removeField("rgwv4xhk")
|
collection.schema.removeField('rgwv4xhk')
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("systemprofiles0")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('systemprofiles0')
|
||||||
|
|
||||||
// add
|
// add
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "rgwv4xhk",
|
system: false,
|
||||||
"name": "totalSecondsThisMonth",
|
id: 'rgwv4xhk',
|
||||||
"type": "number",
|
name: 'totalSecondsThisMonth',
|
||||||
"required": false,
|
type: 'number',
|
||||||
"presentable": false,
|
required: false,
|
||||||
"unique": false,
|
presentable: false,
|
||||||
"options": {
|
unique: false,
|
||||||
"min": null,
|
options: {
|
||||||
"max": null,
|
min: null,
|
||||||
"noDecimal": false
|
max: null,
|
||||||
}
|
noDecimal: false,
|
||||||
}))
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,90 +1,103 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
collection.options = {
|
collection.options = {
|
||||||
"query": "SELECT u.id,\n email,\n i.secondsthismonth\nFROM users u\nJOIN instances i\nwhere u.id=i.uid\nAND secondsthismonth/60>200"
|
query:
|
||||||
}
|
'SELECT u.id,\n email,\n i.secondsthismonth\nFROM users u\nJOIN instances i\nwhere u.id=i.uid\nAND secondsthismonth/60>200',
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("c0fjqkvh")
|
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("nrzmfvrb")
|
|
||||||
|
|
||||||
// add
|
|
||||||
collection.schema.addField(new SchemaField({
|
|
||||||
"system": false,
|
|
||||||
"id": "9xsegduz",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('c0fjqkvh')
|
||||||
"system": false,
|
|
||||||
"id": "4dmlmvan",
|
// remove
|
||||||
"name": "secondsthismonth",
|
collection.schema.removeField('nrzmfvrb')
|
||||||
"type": "number",
|
|
||||||
"required": false,
|
// add
|
||||||
"presentable": false,
|
collection.schema.addField(
|
||||||
"unique": false,
|
new SchemaField({
|
||||||
"options": {
|
system: false,
|
||||||
"min": null,
|
id: '9xsegduz',
|
||||||
"max": null,
|
name: 'email',
|
||||||
"noDecimal": false
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
// add
|
||||||
|
collection.schema.addField(
|
||||||
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: '4dmlmvan',
|
||||||
|
name: 'secondsthismonth',
|
||||||
|
type: 'number',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
noDecimal: false,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
},
|
||||||
|
(db) => {
|
||||||
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
|
collection.options = {
|
||||||
|
query:
|
||||||
|
'select u.id,email,secondsThisMonth from users u join instances i where u.id=i.uid and secondsThisMonth/60>200',
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// add
|
||||||
}, (db) => {
|
collection.schema.addField(
|
||||||
const dao = new Dao(db)
|
new SchemaField({
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
system: false,
|
||||||
|
id: 'c0fjqkvh',
|
||||||
|
name: 'email',
|
||||||
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
collection.options = {
|
// add
|
||||||
"query": "select u.id,email,secondsThisMonth from users u join instances i where u.id=i.uid and secondsThisMonth/60>200"
|
collection.schema.addField(
|
||||||
}
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: 'nrzmfvrb',
|
||||||
|
name: 'secondsThisMonth',
|
||||||
|
type: 'json',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('9xsegduz')
|
||||||
"system": false,
|
|
||||||
"id": "c0fjqkvh",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('4dmlmvan')
|
||||||
"system": false,
|
|
||||||
"id": "nrzmfvrb",
|
|
||||||
"name": "secondsThisMonth",
|
|
||||||
"type": "json",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {}
|
|
||||||
}))
|
|
||||||
|
|
||||||
// remove
|
return dao.saveCollection(collection)
|
||||||
collection.schema.removeField("9xsegduz")
|
},
|
||||||
|
)
|
||||||
// remove
|
|
||||||
collection.schema.removeField("4dmlmvan")
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
|
||||||
})
|
|
||||||
|
@ -1,94 +1,107 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
collection.options = {
|
collection.options = {
|
||||||
"query": "SELECT u.id,\n u.email,\n i.secondsthismonth\nFROM users u\nJOIN instances i\nwhere u.id=i.uid\nAND i.secondsthismonth/60>200"
|
query:
|
||||||
}
|
'SELECT u.id,\n u.email,\n i.secondsthismonth\nFROM users u\nJOIN instances i\nwhere u.id=i.uid\nAND i.secondsthismonth/60>200',
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("9xsegduz")
|
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("4dmlmvan")
|
|
||||||
|
|
||||||
// add
|
|
||||||
collection.schema.addField(new SchemaField({
|
|
||||||
"system": false,
|
|
||||||
"id": "omarcdxd",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('9xsegduz')
|
||||||
"system": false,
|
|
||||||
"id": "c2czszfp",
|
// remove
|
||||||
"name": "secondsthismonth",
|
collection.schema.removeField('4dmlmvan')
|
||||||
"type": "number",
|
|
||||||
"required": false,
|
// add
|
||||||
"presentable": false,
|
collection.schema.addField(
|
||||||
"unique": false,
|
new SchemaField({
|
||||||
"options": {
|
system: false,
|
||||||
"min": null,
|
id: 'omarcdxd',
|
||||||
"max": null,
|
name: 'email',
|
||||||
"noDecimal": false
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
// add
|
||||||
|
collection.schema.addField(
|
||||||
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: 'c2czszfp',
|
||||||
|
name: 'secondsthismonth',
|
||||||
|
type: 'number',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
noDecimal: false,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
},
|
||||||
|
(db) => {
|
||||||
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
|
collection.options = {
|
||||||
|
query:
|
||||||
|
'SELECT u.id,\n email,\n i.secondsthismonth\nFROM users u\nJOIN instances i\nwhere u.id=i.uid\nAND secondsthismonth/60>200',
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// add
|
||||||
}, (db) => {
|
collection.schema.addField(
|
||||||
const dao = new Dao(db)
|
new SchemaField({
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
system: false,
|
||||||
|
id: '9xsegduz',
|
||||||
|
name: 'email',
|
||||||
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
collection.options = {
|
// add
|
||||||
"query": "SELECT u.id,\n email,\n i.secondsthismonth\nFROM users u\nJOIN instances i\nwhere u.id=i.uid\nAND secondsthismonth/60>200"
|
collection.schema.addField(
|
||||||
}
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: '4dmlmvan',
|
||||||
|
name: 'secondsthismonth',
|
||||||
|
type: 'number',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
noDecimal: false,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('omarcdxd')
|
||||||
"system": false,
|
|
||||||
"id": "9xsegduz",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('c2czszfp')
|
||||||
"system": false,
|
|
||||||
"id": "4dmlmvan",
|
|
||||||
"name": "secondsthismonth",
|
|
||||||
"type": "number",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"min": null,
|
|
||||||
"max": null,
|
|
||||||
"noDecimal": false
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
|
|
||||||
// remove
|
return dao.saveCollection(collection)
|
||||||
collection.schema.removeField("omarcdxd")
|
},
|
||||||
|
)
|
||||||
// remove
|
|
||||||
collection.schema.removeField("c2czszfp")
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
|
||||||
})
|
|
||||||
|
@ -1,37 +1,42 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("systemprofiles0")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('systemprofiles0')
|
||||||
|
|
||||||
collection.indexes = [
|
collection.indexes = [
|
||||||
"CREATE INDEX `idx_q4Kji47` ON `users` (`secondsThisMonth`)"
|
'CREATE INDEX `idx_q4Kji47` ON `users` (`secondsThisMonth`)',
|
||||||
]
|
]
|
||||||
|
|
||||||
// add
|
// add
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.addField(
|
||||||
"system": false,
|
new SchemaField({
|
||||||
"id": "qz4cjamg",
|
system: false,
|
||||||
"name": "secondsThisMonth",
|
id: 'qz4cjamg',
|
||||||
"type": "number",
|
name: 'secondsThisMonth',
|
||||||
"required": false,
|
type: 'number',
|
||||||
"presentable": false,
|
required: false,
|
||||||
"unique": false,
|
presentable: false,
|
||||||
"options": {
|
unique: false,
|
||||||
"min": null,
|
options: {
|
||||||
"max": null,
|
min: null,
|
||||||
"noDecimal": false
|
max: null,
|
||||||
}
|
noDecimal: false,
|
||||||
}))
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("systemprofiles0")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('systemprofiles0')
|
||||||
|
|
||||||
collection.indexes = []
|
collection.indexes = []
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
collection.schema.removeField("qz4cjamg")
|
collection.schema.removeField('qz4cjamg')
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,94 +1,107 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
collection.options = {
|
collection.options = {
|
||||||
"query": "SELECT u.id,\n u.email,\n u.secondsthismonth\nFROM users u\nWHERE u.secondsthismonth/60>200"
|
query:
|
||||||
}
|
'SELECT u.id,\n u.email,\n u.secondsthismonth\nFROM users u\nWHERE u.secondsthismonth/60>200',
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("omarcdxd")
|
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("c2czszfp")
|
|
||||||
|
|
||||||
// add
|
|
||||||
collection.schema.addField(new SchemaField({
|
|
||||||
"system": false,
|
|
||||||
"id": "ld24cbna",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('omarcdxd')
|
||||||
"system": false,
|
|
||||||
"id": "g3qvj4tl",
|
// remove
|
||||||
"name": "secondsthismonth",
|
collection.schema.removeField('c2czszfp')
|
||||||
"type": "number",
|
|
||||||
"required": false,
|
// add
|
||||||
"presentable": false,
|
collection.schema.addField(
|
||||||
"unique": false,
|
new SchemaField({
|
||||||
"options": {
|
system: false,
|
||||||
"min": null,
|
id: 'ld24cbna',
|
||||||
"max": null,
|
name: 'email',
|
||||||
"noDecimal": false
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
// add
|
||||||
|
collection.schema.addField(
|
||||||
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: 'g3qvj4tl',
|
||||||
|
name: 'secondsthismonth',
|
||||||
|
type: 'number',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
noDecimal: false,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
},
|
||||||
|
(db) => {
|
||||||
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
|
collection.options = {
|
||||||
|
query:
|
||||||
|
'SELECT u.id,\n u.email,\n i.secondsthismonth\nFROM users u\nJOIN instances i\nwhere u.id=i.uid\nAND i.secondsthismonth/60>200',
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// add
|
||||||
}, (db) => {
|
collection.schema.addField(
|
||||||
const dao = new Dao(db)
|
new SchemaField({
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
system: false,
|
||||||
|
id: 'omarcdxd',
|
||||||
|
name: 'email',
|
||||||
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
collection.options = {
|
// add
|
||||||
"query": "SELECT u.id,\n u.email,\n i.secondsthismonth\nFROM users u\nJOIN instances i\nwhere u.id=i.uid\nAND i.secondsthismonth/60>200"
|
collection.schema.addField(
|
||||||
}
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: 'c2czszfp',
|
||||||
|
name: 'secondsthismonth',
|
||||||
|
type: 'number',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
noDecimal: false,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('ld24cbna')
|
||||||
"system": false,
|
|
||||||
"id": "omarcdxd",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('g3qvj4tl')
|
||||||
"system": false,
|
|
||||||
"id": "c2czszfp",
|
|
||||||
"name": "secondsthismonth",
|
|
||||||
"type": "number",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"min": null,
|
|
||||||
"max": null,
|
|
||||||
"noDecimal": false
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
|
|
||||||
// remove
|
return dao.saveCollection(collection)
|
||||||
collection.schema.removeField("ld24cbna")
|
},
|
||||||
|
)
|
||||||
// remove
|
|
||||||
collection.schema.removeField("g3qvj4tl")
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
|
||||||
})
|
|
||||||
|
@ -1,42 +1,45 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("aiw8te7y7atklwn")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('aiw8te7y7atklwn')
|
||||||
|
|
||||||
collection.indexes = [
|
collection.indexes = [
|
||||||
"CREATE INDEX `idx_CTV52b6` ON `invocations` (`created`)",
|
'CREATE INDEX `idx_CTV52b6` ON `invocations` (`created`)',
|
||||||
"CREATE INDEX `idx_6rNZeTK` ON `invocations` (`instanceId`)",
|
'CREATE INDEX `idx_6rNZeTK` ON `invocations` (`instanceId`)',
|
||||||
"CREATE INDEX `idx_LTmqfbC` ON `invocations` (`totalSeconds`)",
|
'CREATE INDEX `idx_LTmqfbC` ON `invocations` (`totalSeconds`)',
|
||||||
"CREATE INDEX `idx_7YR9a3g` ON `invocations` (\n `instanceId`,\n `created`\n)",
|
'CREATE INDEX `idx_7YR9a3g` ON `invocations` (\n `instanceId`,\n `created`\n)',
|
||||||
"CREATE INDEX `idx_ntC1d1L` ON `invocations` (\n `totalSeconds`,\n `created`\n)",
|
'CREATE INDEX `idx_ntC1d1L` ON `invocations` (\n `totalSeconds`,\n `created`\n)',
|
||||||
"CREATE INDEX `idx_vViR75E` ON `invocations` (\n `created`,\n `totalSeconds`\n)",
|
'CREATE INDEX `idx_vViR75E` ON `invocations` (\n `created`,\n `totalSeconds`\n)',
|
||||||
"CREATE INDEX `idx_q9LanEj` ON `invocations` (\n `created`,\n `instanceId`\n)",
|
'CREATE INDEX `idx_q9LanEj` ON `invocations` (\n `created`,\n `instanceId`\n)',
|
||||||
"CREATE INDEX `idx_ueUQe1N` ON `invocations` (`uid`)",
|
'CREATE INDEX `idx_ueUQe1N` ON `invocations` (`uid`)',
|
||||||
"CREATE INDEX `idx_gh6iEUG` ON `invocations` (\n `instanceId`,\n `startedAt`\n)",
|
'CREATE INDEX `idx_gh6iEUG` ON `invocations` (\n `instanceId`,\n `startedAt`\n)',
|
||||||
"CREATE INDEX `idx_CUsNbfu` ON `invocations` (\n `uid`,\n `startedAt`\n)",
|
'CREATE INDEX `idx_CUsNbfu` ON `invocations` (\n `uid`,\n `startedAt`\n)',
|
||||||
"CREATE INDEX `idx_O3bEfl0` ON `invocations` (`updated`)",
|
'CREATE INDEX `idx_O3bEfl0` ON `invocations` (`updated`)',
|
||||||
"CREATE INDEX `idx_qOyDhVG` ON `invocations` (`created`)",
|
'CREATE INDEX `idx_qOyDhVG` ON `invocations` (`created`)',
|
||||||
"CREATE INDEX `idx_UM6cwSA` ON `invocations` (`instanceId`)",
|
'CREATE INDEX `idx_UM6cwSA` ON `invocations` (`instanceId`)',
|
||||||
"CREATE INDEX `idx_nMr318s` ON `invocations` (`totalSeconds`)"
|
'CREATE INDEX `idx_nMr318s` ON `invocations` (`totalSeconds`)',
|
||||||
]
|
]
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
}, (db) => {
|
},
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("aiw8te7y7atklwn")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('aiw8te7y7atklwn')
|
||||||
|
|
||||||
collection.indexes = [
|
collection.indexes = [
|
||||||
"CREATE INDEX `idx_CTV52b6` ON `invocations` (`created`)",
|
'CREATE INDEX `idx_CTV52b6` ON `invocations` (`created`)',
|
||||||
"CREATE INDEX `idx_6rNZeTK` ON `invocations` (`instanceId`)",
|
'CREATE INDEX `idx_6rNZeTK` ON `invocations` (`instanceId`)',
|
||||||
"CREATE INDEX `idx_LTmqfbC` ON `invocations` (`totalSeconds`)",
|
'CREATE INDEX `idx_LTmqfbC` ON `invocations` (`totalSeconds`)',
|
||||||
"CREATE INDEX `idx_7YR9a3g` ON `invocations` (\n `instanceId`,\n `created`\n)",
|
'CREATE INDEX `idx_7YR9a3g` ON `invocations` (\n `instanceId`,\n `created`\n)',
|
||||||
"CREATE INDEX `idx_ntC1d1L` ON `invocations` (\n `totalSeconds`,\n `created`\n)",
|
'CREATE INDEX `idx_ntC1d1L` ON `invocations` (\n `totalSeconds`,\n `created`\n)',
|
||||||
"CREATE INDEX `idx_vViR75E` ON `invocations` (\n `created`,\n `totalSeconds`\n)",
|
'CREATE INDEX `idx_vViR75E` ON `invocations` (\n `created`,\n `totalSeconds`\n)',
|
||||||
"CREATE INDEX `idx_q9LanEj` ON `invocations` (\n `created`,\n `instanceId`\n)",
|
'CREATE INDEX `idx_q9LanEj` ON `invocations` (\n `created`,\n `instanceId`\n)',
|
||||||
"CREATE INDEX `idx_ueUQe1N` ON `invocations` (`uid`)",
|
'CREATE INDEX `idx_ueUQe1N` ON `invocations` (`uid`)',
|
||||||
"CREATE INDEX `idx_gh6iEUG` ON `invocations` (\n `instanceId`,\n `startedAt`\n)",
|
'CREATE INDEX `idx_gh6iEUG` ON `invocations` (\n `instanceId`,\n `startedAt`\n)',
|
||||||
"CREATE INDEX `idx_CUsNbfu` ON `invocations` (\n `uid`,\n `startedAt`\n)"
|
'CREATE INDEX `idx_CUsNbfu` ON `invocations` (\n `uid`,\n `startedAt`\n)',
|
||||||
]
|
]
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
return dao.saveCollection(collection)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
@ -1,94 +1,107 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
migrate((db) => {
|
migrate(
|
||||||
const dao = new Dao(db)
|
(db) => {
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
collection.options = {
|
collection.options = {
|
||||||
"query": "SELECT u.id,\n u.email,\n u.secondsthismonth\nFROM users u\nWHERE u.verified=1 and u.secondsthismonth/60>200"
|
query:
|
||||||
}
|
'SELECT u.id,\n u.email,\n u.secondsthismonth\nFROM users u\nWHERE u.verified=1 and u.secondsthismonth/60>200',
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("ld24cbna")
|
|
||||||
|
|
||||||
// remove
|
|
||||||
collection.schema.removeField("g3qvj4tl")
|
|
||||||
|
|
||||||
// add
|
|
||||||
collection.schema.addField(new SchemaField({
|
|
||||||
"system": false,
|
|
||||||
"id": "mkmeisox",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('ld24cbna')
|
||||||
"system": false,
|
|
||||||
"id": "wqw6fejd",
|
// remove
|
||||||
"name": "secondsthismonth",
|
collection.schema.removeField('g3qvj4tl')
|
||||||
"type": "number",
|
|
||||||
"required": false,
|
// add
|
||||||
"presentable": false,
|
collection.schema.addField(
|
||||||
"unique": false,
|
new SchemaField({
|
||||||
"options": {
|
system: false,
|
||||||
"min": null,
|
id: 'mkmeisox',
|
||||||
"max": null,
|
name: 'email',
|
||||||
"noDecimal": false
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
// add
|
||||||
|
collection.schema.addField(
|
||||||
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: 'wqw6fejd',
|
||||||
|
name: 'secondsthismonth',
|
||||||
|
type: 'number',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
noDecimal: false,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
},
|
||||||
|
(db) => {
|
||||||
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId('y7qb3zm8vslkfxj')
|
||||||
|
|
||||||
|
collection.options = {
|
||||||
|
query:
|
||||||
|
'SELECT u.id,\n u.email,\n u.secondsthismonth\nFROM users u\nWHERE u.secondsthismonth/60>200',
|
||||||
}
|
}
|
||||||
}))
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
// add
|
||||||
}, (db) => {
|
collection.schema.addField(
|
||||||
const dao = new Dao(db)
|
new SchemaField({
|
||||||
const collection = dao.findCollectionByNameOrId("y7qb3zm8vslkfxj")
|
system: false,
|
||||||
|
id: 'ld24cbna',
|
||||||
|
name: 'email',
|
||||||
|
type: 'email',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
exceptDomains: null,
|
||||||
|
onlyDomains: null,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
collection.options = {
|
// add
|
||||||
"query": "SELECT u.id,\n u.email,\n u.secondsthismonth\nFROM users u\nWHERE u.secondsthismonth/60>200"
|
collection.schema.addField(
|
||||||
}
|
new SchemaField({
|
||||||
|
system: false,
|
||||||
|
id: 'g3qvj4tl',
|
||||||
|
name: 'secondsthismonth',
|
||||||
|
type: 'number',
|
||||||
|
required: false,
|
||||||
|
presentable: false,
|
||||||
|
unique: false,
|
||||||
|
options: {
|
||||||
|
min: null,
|
||||||
|
max: null,
|
||||||
|
noDecimal: false,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('mkmeisox')
|
||||||
"system": false,
|
|
||||||
"id": "ld24cbna",
|
|
||||||
"name": "email",
|
|
||||||
"type": "email",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"exceptDomains": null,
|
|
||||||
"onlyDomains": null
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
|
|
||||||
// add
|
// remove
|
||||||
collection.schema.addField(new SchemaField({
|
collection.schema.removeField('wqw6fejd')
|
||||||
"system": false,
|
|
||||||
"id": "g3qvj4tl",
|
|
||||||
"name": "secondsthismonth",
|
|
||||||
"type": "number",
|
|
||||||
"required": false,
|
|
||||||
"presentable": false,
|
|
||||||
"unique": false,
|
|
||||||
"options": {
|
|
||||||
"min": null,
|
|
||||||
"max": null,
|
|
||||||
"noDecimal": false
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
|
|
||||||
// remove
|
return dao.saveCollection(collection)
|
||||||
collection.schema.removeField("mkmeisox")
|
},
|
||||||
|
)
|
||||||
// remove
|
|
||||||
collection.schema.removeField("wqw6fejd")
|
|
||||||
|
|
||||||
return dao.saveCollection(collection)
|
|
||||||
})
|
|
||||||
|
@ -1,174 +1,195 @@
|
|||||||
"use strict";
|
'use strict'
|
||||||
var __defProp = Object.defineProperty;
|
var __defProp = Object.defineProperty
|
||||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor
|
||||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
var __getOwnPropNames = Object.getOwnPropertyNames
|
||||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
var __hasOwnProp = Object.prototype.hasOwnProperty
|
||||||
var __export = function(target, all) {
|
var __export = function (target, all) {
|
||||||
for(var name in all)__defProp(target, name, {
|
for (var name in all)
|
||||||
get: all[name],
|
__defProp(target, name, {
|
||||||
enumerable: true
|
get: all[name],
|
||||||
});
|
enumerable: true,
|
||||||
};
|
})
|
||||||
var __copyProps = function(to, from, except, desc) {
|
}
|
||||||
if (from && typeof from === "object" || typeof from === "function") {
|
var __copyProps = function (to, from, except, desc) {
|
||||||
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
if ((from && typeof from === 'object') || typeof from === 'function') {
|
||||||
try {
|
var _iteratorNormalCompletion = true,
|
||||||
var _loop = function() {
|
_didIteratorError = false,
|
||||||
var key = _step.value;
|
_iteratorError = undefined
|
||||||
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
try {
|
||||||
get: function() {
|
var _loop = function () {
|
||||||
return from[key];
|
var key = _step.value
|
||||||
},
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||||
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
__defProp(to, key, {
|
||||||
});
|
get: function () {
|
||||||
};
|
return from[key]
|
||||||
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
},
|
||||||
} catch (err) {
|
enumerable:
|
||||||
_didIteratorError = true;
|
!(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
||||||
_iteratorError = err;
|
})
|
||||||
} finally{
|
}
|
||||||
try {
|
for (
|
||||||
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step;
|
||||||
_iterator.return();
|
!(_iteratorNormalCompletion = (_step = _iterator.next()).done);
|
||||||
}
|
_iteratorNormalCompletion = true
|
||||||
} finally{
|
)
|
||||||
if (_didIteratorError) {
|
_loop()
|
||||||
throw _iteratorError;
|
} catch (err) {
|
||||||
}
|
_didIteratorError = true
|
||||||
}
|
_iteratorError = err
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
||||||
|
_iterator.return()
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
if (_didIteratorError) {
|
||||||
|
throw _iteratorError
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return to;
|
}
|
||||||
};
|
return to
|
||||||
var __toCommonJS = function(mod) {
|
}
|
||||||
return __copyProps(__defProp({}, "__esModule", {
|
var __toCommonJS = function (mod) {
|
||||||
value: true
|
return __copyProps(
|
||||||
}), mod);
|
__defProp({}, '__esModule', {
|
||||||
};
|
value: true,
|
||||||
|
}),
|
||||||
|
mod,
|
||||||
|
)
|
||||||
|
}
|
||||||
// src/hooks/src/lib.ts
|
// src/hooks/src/lib.ts
|
||||||
var lib_exports = {};
|
var lib_exports = {}
|
||||||
__export(lib_exports, {
|
__export(lib_exports, {
|
||||||
_getRecord: function() {
|
_getRecord: function () {
|
||||||
return _getRecord;
|
return _getRecord
|
||||||
},
|
},
|
||||||
_unsafe_assert: function() {
|
_unsafe_assert: function () {
|
||||||
return assert;
|
return assert
|
||||||
},
|
},
|
||||||
endOfMonth: function() {
|
endOfMonth: function () {
|
||||||
return endOfMonth;
|
return endOfMonth
|
||||||
},
|
},
|
||||||
forEach: function() {
|
forEach: function () {
|
||||||
return forEach;
|
return forEach
|
||||||
},
|
},
|
||||||
getInstance: function() {
|
getInstance: function () {
|
||||||
return getInstance;
|
return getInstance
|
||||||
},
|
},
|
||||||
getUser: function() {
|
getUser: function () {
|
||||||
return getUser;
|
return getUser
|
||||||
},
|
},
|
||||||
newModel: function() {
|
newModel: function () {
|
||||||
return newModel;
|
return newModel
|
||||||
},
|
},
|
||||||
queryOne: function() {
|
queryOne: function () {
|
||||||
return queryOne;
|
return queryOne
|
||||||
},
|
},
|
||||||
startOfMonth: function() {
|
startOfMonth: function () {
|
||||||
return startOfMonth;
|
return startOfMonth
|
||||||
},
|
},
|
||||||
updateInstance: function() {
|
updateInstance: function () {
|
||||||
return updateInstance;
|
return updateInstance
|
||||||
},
|
},
|
||||||
updateUser: function() {
|
updateUser: function () {
|
||||||
return updateUser;
|
return updateUser
|
||||||
}
|
},
|
||||||
});
|
})
|
||||||
module.exports = __toCommonJS(lib_exports);
|
module.exports = __toCommonJS(lib_exports)
|
||||||
// src/util/assert.ts
|
// src/util/assert.ts
|
||||||
function assert(v, msg) {
|
function assert(v, msg) {
|
||||||
if (!v) {
|
if (!v) {
|
||||||
throw new Error(msg || "Assertion failure");
|
throw new Error(msg || 'Assertion failure')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ../../node_modules/@s-libs/micro-dash/fesm2015/micro-dash.mjs
|
// ../../node_modules/@s-libs/micro-dash/fesm2015/micro-dash.mjs
|
||||||
function forEach(collection, iteratee) {
|
function forEach(collection, iteratee) {
|
||||||
if (Array.isArray(collection)) {
|
if (Array.isArray(collection)) {
|
||||||
forEachOfArray(collection, iteratee);
|
forEachOfArray(collection, iteratee)
|
||||||
} else {
|
} else {
|
||||||
forOwnOfNonArray(collection, iteratee);
|
forOwnOfNonArray(collection, iteratee)
|
||||||
}
|
}
|
||||||
return collection;
|
return collection
|
||||||
}
|
}
|
||||||
function forEachOfArray(array, iteratee) {
|
function forEachOfArray(array, iteratee) {
|
||||||
for(var i = 0, len = array.length; i < len; ++i){
|
for (var i = 0, len = array.length; i < len; ++i) {
|
||||||
if (iteratee(array[i], i) === false) {
|
if (iteratee(array[i], i) === false) {
|
||||||
break;
|
break
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function keysOfNonArray(object) {
|
function keysOfNonArray(object) {
|
||||||
return object ? Object.getOwnPropertyNames(object) : [];
|
return object ? Object.getOwnPropertyNames(object) : []
|
||||||
}
|
}
|
||||||
function forOwnOfNonArray(object, iteratee) {
|
function forOwnOfNonArray(object, iteratee) {
|
||||||
forEachOfArray(keysOfNonArray(object), function(key) {
|
forEachOfArray(keysOfNonArray(object), function (key) {
|
||||||
return iteratee(object[key], key);
|
return iteratee(object[key], key)
|
||||||
});
|
})
|
||||||
return object;
|
return object
|
||||||
}
|
}
|
||||||
// src/hooks/src/lib.ts
|
// src/hooks/src/lib.ts
|
||||||
var newModel = function(schema) {
|
var newModel = function (schema) {
|
||||||
return new DynamicModel(schema);
|
return new DynamicModel(schema)
|
||||||
};
|
}
|
||||||
function endOfMonth(now) {
|
function endOfMonth(now) {
|
||||||
return new Date(now.getFullYear(), now.getMonth() + 1, 0).toISOString();
|
return new Date(now.getFullYear(), now.getMonth() + 1, 0).toISOString()
|
||||||
}
|
}
|
||||||
function startOfMonth(now) {
|
function startOfMonth(now) {
|
||||||
return new Date(now.getFullYear(), now.getMonth(), 1).toISOString();
|
return new Date(now.getFullYear(), now.getMonth(), 1).toISOString()
|
||||||
|
}
|
||||||
|
var dao = function () {
|
||||||
|
var _dao = $app.dao()
|
||||||
|
assert(_dao)
|
||||||
|
return _dao
|
||||||
|
}
|
||||||
|
var queryOne = function (sql, bindings, defaultResult) {
|
||||||
|
var _dao_db_newQuery_bind, _dao_db_newQuery
|
||||||
|
var result = newModel(defaultResult)
|
||||||
|
;(_dao_db_newQuery = dao().db().newQuery(sql)) === null ||
|
||||||
|
_dao_db_newQuery === void 0
|
||||||
|
? void 0
|
||||||
|
: (_dao_db_newQuery_bind = _dao_db_newQuery.bind(bindings)) === null ||
|
||||||
|
_dao_db_newQuery_bind === void 0
|
||||||
|
? void 0
|
||||||
|
: _dao_db_newQuery_bind.one(result)
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
var _getRecord = function (name, id) {
|
||||||
|
var record = dao().findRecordById(name, id)
|
||||||
|
return record
|
||||||
|
}
|
||||||
|
var getInstance = function (instanceId) {
|
||||||
|
return _getRecord('instances', instanceId)
|
||||||
|
}
|
||||||
|
var getUser = function (userId) {
|
||||||
|
return _getRecord('users', userId)
|
||||||
}
|
}
|
||||||
var dao = function() {
|
|
||||||
var _dao = $app.dao();
|
|
||||||
assert(_dao);
|
|
||||||
return _dao;
|
|
||||||
};
|
|
||||||
var queryOne = function(sql, bindings, defaultResult) {
|
|
||||||
var _dao_db_newQuery_bind, _dao_db_newQuery;
|
|
||||||
var result = newModel(defaultResult);
|
|
||||||
(_dao_db_newQuery = dao().db().newQuery(sql)) === null || _dao_db_newQuery === void 0 ? void 0 : (_dao_db_newQuery_bind = _dao_db_newQuery.bind(bindings)) === null || _dao_db_newQuery_bind === void 0 ? void 0 : _dao_db_newQuery_bind.one(result);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
var _getRecord = function(name, id) {
|
|
||||||
var record = dao().findRecordById(name, id);
|
|
||||||
return record;
|
|
||||||
};
|
|
||||||
var getInstance = function(instanceId) {
|
|
||||||
return _getRecord("instances", instanceId);
|
|
||||||
};
|
|
||||||
var getUser = function(userId) {
|
|
||||||
return _getRecord("users", userId);
|
|
||||||
};
|
|
||||||
function _updateRecord(record, fields) {
|
function _updateRecord(record, fields) {
|
||||||
forEach(fields, function(v, k) {
|
forEach(fields, function (v, k) {
|
||||||
record.set(k, v);
|
record.set(k, v)
|
||||||
});
|
})
|
||||||
dao().saveRecord(record);
|
dao().saveRecord(record)
|
||||||
}
|
}
|
||||||
function _getRecordByIdOrRecord(recordOrInstanceId, name) {
|
function _getRecordByIdOrRecord(recordOrInstanceId, name) {
|
||||||
var record = function() {
|
var record = (function () {
|
||||||
if (typeof recordOrInstanceId === "string") return _getRecord(name, recordOrInstanceId);
|
if (typeof recordOrInstanceId === 'string')
|
||||||
return recordOrInstanceId;
|
return _getRecord(name, recordOrInstanceId)
|
||||||
}();
|
return recordOrInstanceId
|
||||||
assert(record);
|
})()
|
||||||
return record;
|
assert(record)
|
||||||
|
return record
|
||||||
}
|
}
|
||||||
function updateInstance(recordOrInstanceId, fields) {
|
function updateInstance(recordOrInstanceId, fields) {
|
||||||
var record = _getRecordByIdOrRecord(recordOrInstanceId, "instances");
|
var record = _getRecordByIdOrRecord(recordOrInstanceId, 'instances')
|
||||||
_updateRecord(record, fields);
|
_updateRecord(record, fields)
|
||||||
}
|
}
|
||||||
function updateUser(recordOrUserId, fields) {
|
function updateUser(recordOrUserId, fields) {
|
||||||
var record = _getRecordByIdOrRecord(recordOrUserId, "users");
|
var record = _getRecordByIdOrRecord(recordOrUserId, 'users')
|
||||||
_updateRecord(record, fields);
|
_updateRecord(record, fields)
|
||||||
}
|
}
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
// Annotate the CommonJS export names for ESM import in node:
|
||||||
0 && (module.exports = {
|
0 &&
|
||||||
|
(module.exports = {
|
||||||
_getRecord: _getRecord,
|
_getRecord: _getRecord,
|
||||||
_unsafe_assert: _unsafe_assert,
|
_unsafe_assert: _unsafe_assert,
|
||||||
endOfMonth: endOfMonth,
|
endOfMonth: endOfMonth,
|
||||||
@ -179,5 +200,5 @@ function updateUser(recordOrUserId, fields) {
|
|||||||
queryOne: queryOne,
|
queryOne: queryOne,
|
||||||
startOfMonth: startOfMonth,
|
startOfMonth: startOfMonth,
|
||||||
updateInstance: updateInstance,
|
updateInstance: updateInstance,
|
||||||
updateUser: updateUser
|
updateUser: updateUser,
|
||||||
});
|
})
|
||||||
|
@ -1,45 +1,60 @@
|
|||||||
"use strict";
|
'use strict'
|
||||||
// src/hooks/src/update-usage.pb.ts
|
// src/hooks/src/update-usage.pb.ts
|
||||||
console.log("update-usage");
|
console.log('update-usage')
|
||||||
onRecordAfterUpdateRequest(function(e) {
|
onRecordAfterUpdateRequest(function (e) {
|
||||||
var _require = require("".concat(__hooks, "/lib.js")), _unsafe_assert = _require._unsafe_assert, startOfMonth = _require.startOfMonth, endOfMonth = _require.endOfMonth, queryOne = _require.queryOne, updateInstance = _require.updateInstance, getInstance = _require.getInstance, updateUser = _require.updateUser;
|
var _require = require(''.concat(__hooks, '/lib.js')),
|
||||||
var assert = _unsafe_assert;
|
_unsafe_assert = _require._unsafe_assert,
|
||||||
var record = e.record;
|
startOfMonth = _require.startOfMonth,
|
||||||
assert(record, "Expected record here");
|
endOfMonth = _require.endOfMonth,
|
||||||
var instanceId = record.getString("instanceId");
|
queryOne = _require.queryOne,
|
||||||
var instance = getInstance(instanceId);
|
updateInstance = _require.updateInstance,
|
||||||
assert(instance);
|
getInstance = _require.getInstance,
|
||||||
var uid = instance.getString("uid");
|
updateUser = _require.updateUser
|
||||||
assert(uid);
|
var assert = _unsafe_assert
|
||||||
var now = /* @__PURE__ */ new Date();
|
var record = e.record
|
||||||
var startIso = startOfMonth(now);
|
assert(record, 'Expected record here')
|
||||||
var endIso = endOfMonth(now);
|
var instanceId = record.getString('instanceId')
|
||||||
{
|
var instance = getInstance(instanceId)
|
||||||
var result = queryOne("SELECT cast(sum(totalSeconds) as int) as t FROM invocations WHERE instanceId={:instanceId} and startedAt>={:startIso} and startedAt<={:endIso}", {
|
assert(instance)
|
||||||
instanceId: instanceId,
|
var uid = instance.getString('uid')
|
||||||
startIso: startIso,
|
assert(uid)
|
||||||
endIso: endIso
|
var now = /* @__PURE__ */ new Date()
|
||||||
}, {
|
var startIso = startOfMonth(now)
|
||||||
t: 0
|
var endIso = endOfMonth(now)
|
||||||
});
|
{
|
||||||
var secondsThisMonth = result.t;
|
var result = queryOne(
|
||||||
console.log("Instance seconds, ".concat(secondsThisMonth));
|
'SELECT cast(sum(totalSeconds) as int) as t FROM invocations WHERE instanceId={:instanceId} and startedAt>={:startIso} and startedAt<={:endIso}',
|
||||||
updateInstance(instance, {
|
{
|
||||||
secondsThisMonth: secondsThisMonth
|
instanceId: instanceId,
|
||||||
});
|
startIso: startIso,
|
||||||
}
|
endIso: endIso,
|
||||||
{
|
},
|
||||||
var result1 = queryOne("SELECT cast(sum(totalSeconds) as int) as t FROM invocations WHERE uid={:uid} and startedAt>={:startIso} and startedAt<={:endIso}", {
|
{
|
||||||
uid: uid,
|
t: 0,
|
||||||
startIso: startIso,
|
},
|
||||||
endIso: endIso
|
)
|
||||||
}, {
|
var secondsThisMonth = result.t
|
||||||
t: 0
|
console.log('Instance seconds, '.concat(secondsThisMonth))
|
||||||
});
|
updateInstance(instance, {
|
||||||
var secondsThisMonth1 = result1.t;
|
secondsThisMonth: secondsThisMonth,
|
||||||
console.log("User seconds, ".concat(secondsThisMonth1));
|
})
|
||||||
updateUser(uid, {
|
}
|
||||||
secondsThisMonth: secondsThisMonth1
|
{
|
||||||
});
|
var result1 = queryOne(
|
||||||
}
|
'SELECT cast(sum(totalSeconds) as int) as t FROM invocations WHERE uid={:uid} and startedAt>={:startIso} and startedAt<={:endIso}',
|
||||||
}, "invocations");
|
{
|
||||||
|
uid: uid,
|
||||||
|
startIso: startIso,
|
||||||
|
endIso: endIso,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
t: 0,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
var secondsThisMonth1 = result1.t
|
||||||
|
console.log('User seconds, '.concat(secondsThisMonth1))
|
||||||
|
updateUser(uid, {
|
||||||
|
secondsThisMonth: secondsThisMonth1,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, 'invocations')
|
||||||
|
@ -7,7 +7,10 @@
|
|||||||
export let alertType: AlertTypes = AlertTypes.Warning
|
export let alertType: AlertTypes = AlertTypes.Warning
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="alert alert-{alertType} d-flex gap-3 align-items-center" role="alert">
|
<div
|
||||||
|
class="alert alert-{alertType} d-flex gap-3 align-items-center"
|
||||||
|
role="alert"
|
||||||
|
>
|
||||||
{#if icon}
|
{#if icon}
|
||||||
<i class={icon} />
|
<i class={icon} />
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -14,13 +14,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{#if title}<h5 class="card-title {!subtitle && 'mb-0'}">{title}</h5>{/if}
|
{#if title}<h5 class="card-title {!subtitle && 'mb-0'}">
|
||||||
{#if subtitle}<h6 class="card-subtitle mb-0 text-muted">{subtitle}</h6>{/if}
|
{title}
|
||||||
|
</h5>{/if}
|
||||||
|
{#if subtitle}<h6 class="card-subtitle mb-0 text-muted">
|
||||||
|
{subtitle}
|
||||||
|
</h6>{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
{#if title}<h5 class="card-title">{title}</h5>{/if}
|
{#if title}<h5 class="card-title">{title}</h5>{/if}
|
||||||
{#if subtitle}<h6 class="card-subtitle mb-2 text-muted">{subtitle}</h6>{/if}
|
{#if subtitle}<h6 class="card-subtitle mb-2 text-muted">
|
||||||
|
{subtitle}
|
||||||
|
</h6>{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<slot />
|
<slot />
|
||||||
|
@ -13,7 +13,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Array of Questions, if the boolean <collapsed> is set to false, the answer is displayed
|
// Array of Questions, if the boolean <collapsed> is set to false, the answer is displayed
|
||||||
const questions: Question[] = faq.outline.map((q: rawQ) => ({ ...q, collapsed: true }))
|
const questions: Question[] = faq.outline.map((q: rawQ) => ({
|
||||||
|
...q,
|
||||||
|
collapsed: true,
|
||||||
|
}))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="accordion w-100">
|
<div class="accordion w-100">
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
// https://getbootstrap.com/docs/5.2/components/tooltips/#enable-tooltips
|
// https://getbootstrap.com/docs/5.2/components/tooltips/#enable-tooltips
|
||||||
afterNavigate(() => {
|
afterNavigate(() => {
|
||||||
if (browser) {
|
if (browser) {
|
||||||
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
|
const tooltipTriggerList = document.querySelectorAll(
|
||||||
|
'[data-bs-toggle="tooltip"]',
|
||||||
|
)
|
||||||
const tooltipList = [...tooltipTriggerList].map(
|
const tooltipList = [...tooltipTriggerList].map(
|
||||||
(tooltipTriggerEl) => new bootstrap.Tooltip(tooltipTriggerEl)
|
(tooltipTriggerEl) => new bootstrap.Tooltip(tooltipTriggerEl),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -13,13 +13,14 @@
|
|||||||
let formError: string = ''
|
let formError: string = ''
|
||||||
|
|
||||||
let isFormButtonDisabled: boolean = true
|
let isFormButtonDisabled: boolean = true
|
||||||
$: isFormButtonDisabled = email.length === 0 || password.length === 0 || instanceName.length === 0
|
$: isFormButtonDisabled =
|
||||||
|
email.length === 0 || password.length === 0 || instanceName.length === 0
|
||||||
|
|
||||||
let isProcessing: boolean = false
|
let isProcessing: boolean = false
|
||||||
|
|
||||||
// Fun quotes when waiting for the instance to load. This could take up to 10 seconds
|
// Fun quotes when waiting for the instance to load. This could take up to 10 seconds
|
||||||
let processingQuotesArray = [
|
let processingQuotesArray = [
|
||||||
'Did you know it takes fourteen sentient robots to create each instance on PocketHost?'
|
'Did you know it takes fourteen sentient robots to create each instance on PocketHost?',
|
||||||
]
|
]
|
||||||
|
|
||||||
let processingQuote = getRandomElementFromArray(processingQuotesArray)
|
let processingQuote = getRandomElementFromArray(processingQuotesArray)
|
||||||
@ -34,9 +35,14 @@
|
|||||||
isFormButtonDisabled = true
|
isFormButtonDisabled = true
|
||||||
isProcessing = true
|
isProcessing = true
|
||||||
|
|
||||||
await handleInstanceGeneratorWidget(email, password, instanceName, (error) => {
|
await handleInstanceGeneratorWidget(
|
||||||
formError = error
|
email,
|
||||||
})
|
password,
|
||||||
|
instanceName,
|
||||||
|
(error) => {
|
||||||
|
formError = error
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
isFormButtonDisabled = false
|
isFormButtonDisabled = false
|
||||||
|
|
||||||
@ -116,7 +122,11 @@
|
|||||||
|
|
||||||
<div class="col-lg-6 col-12">
|
<div class="col-lg-6 col-12">
|
||||||
<div class="mb-3 mb-lg-3 text-lg-start text-center">
|
<div class="mb-3 mb-lg-3 text-lg-start text-center">
|
||||||
<button type="submit" class="btn btn-primary" disabled={isFormButtonDisabled}>
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="btn btn-primary"
|
||||||
|
disabled={isFormButtonDisabled}
|
||||||
|
>
|
||||||
Create <i class="bi bi-arrow-right-short" />
|
Create <i class="bi bi-arrow-right-short" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,7 +10,11 @@
|
|||||||
<header class="container-fluid">
|
<header class="container-fluid">
|
||||||
<nav class="navbar navbar-expand-md">
|
<nav class="navbar navbar-expand-md">
|
||||||
<a href="/" class="logo text-decoration-none d-flex align-items-center">
|
<a href="/" class="logo text-decoration-none d-flex align-items-center">
|
||||||
<img src="/images/logo-square.png" alt="PocketHost Logo" class="img-fluid" />
|
<img
|
||||||
|
src="/images/logo-square.png"
|
||||||
|
alt="PocketHost Logo"
|
||||||
|
class="img-fluid"
|
||||||
|
/>
|
||||||
<h1>Pocket<span>Host</span></h1>
|
<h1>Pocket<span>Host</span></h1>
|
||||||
<sup class="">{PUBLIC_POCKETHOST_VERSION}</sup>
|
<sup class="">{PUBLIC_POCKETHOST_VERSION}</sup>
|
||||||
</a>
|
</a>
|
||||||
@ -51,8 +55,10 @@
|
|||||||
|
|
||||||
<ul class="dropdown-menu dropdown-menu-end">
|
<ul class="dropdown-menu dropdown-menu-end">
|
||||||
<li>
|
<li>
|
||||||
<button class="dropdown-item" type="button" on:click={handleLogoutAndRedirect}
|
<button
|
||||||
>Logout</button
|
class="dropdown-item"
|
||||||
|
type="button"
|
||||||
|
on:click={handleLogoutAndRedirect}>Logout</button
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -71,11 +77,15 @@
|
|||||||
|
|
||||||
{#if !$isUserLoggedIn}
|
{#if !$isUserLoggedIn}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link text-md-start text-center" href="/signup">Sign up</a>
|
<a class="nav-link text-md-start text-center" href="/signup"
|
||||||
|
>Sign up</a
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link text-md-start text-center" href="/login">Log in</a>
|
<a class="nav-link text-md-start text-center" href="/login"
|
||||||
|
>Log in</a
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
</AuthStateGuard>
|
</AuthStateGuard>
|
||||||
@ -114,7 +124,8 @@
|
|||||||
title="Link to our Github Project"
|
title="Link to our Github Project"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
>
|
>
|
||||||
<i class="bi bi-github" /><span class="nav-github-link">Github</span>
|
<i class="bi bi-github" /><span class="nav-github-link">Github</span
|
||||||
|
>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -41,7 +41,9 @@
|
|||||||
$: if (status) handleBadgeColor()
|
$: if (status) handleBadgeColor()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class={`badge ${badgeColor} ${status === 'running' && 'pulse'}`}>{status}</div>
|
<div class={`badge ${badgeColor} ${status === 'running' && 'pulse'}`}>
|
||||||
|
{status}
|
||||||
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.pulse {
|
.pulse {
|
||||||
|
@ -12,10 +12,15 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.homepage-hero-animation {
|
.homepage-hero-animation {
|
||||||
box-shadow: var(--bs-primary) 0 0 0 3px inset, var(--bs-body-bg) 10px -10px 0px -3px,
|
box-shadow:
|
||||||
var(--bs-success) 10px -10px, var(--bs-body-bg) 20px -20px 0px -3px,
|
var(--bs-primary) 0 0 0 3px inset,
|
||||||
var(--bs-warning) 20px -20px, var(--bs-body-bg) 30px -30px 0px -3px,
|
var(--bs-body-bg) 10px -10px 0px -3px,
|
||||||
var(--bs-orange) 30px -30px, var(--bs-body-bg) 40px -40px 0px -3px,
|
var(--bs-success) 10px -10px,
|
||||||
|
var(--bs-body-bg) 20px -20px 0px -3px,
|
||||||
|
var(--bs-warning) 20px -20px,
|
||||||
|
var(--bs-body-bg) 30px -30px 0px -3px,
|
||||||
|
var(--bs-orange) 30px -30px,
|
||||||
|
var(--bs-body-bg) 40px -40px 0px -3px,
|
||||||
var(--bs-danger) 40px -40px;
|
var(--bs-danger) 40px -40px;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
ThemeNames,
|
ThemeNames,
|
||||||
currentIcon,
|
currentIcon,
|
||||||
getCurrentTheme,
|
getCurrentTheme,
|
||||||
setCurrentTheme
|
setCurrentTheme,
|
||||||
} from './helpers/theme'
|
} from './helpers/theme'
|
||||||
|
|
||||||
// This can change the CSS a bit depending on where the theme toggle is rendered
|
// This can change the CSS a bit depending on where the theme toggle is rendered
|
||||||
@ -22,7 +22,10 @@
|
|||||||
|
|
||||||
// Alternate the theme values on toggle click
|
// Alternate the theme values on toggle click
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
const newTheme = getCurrentTheme() === ThemeNames.Light ? ThemeNames.Dark : ThemeNames.Light
|
const newTheme =
|
||||||
|
getCurrentTheme() === ThemeNames.Light
|
||||||
|
? ThemeNames.Dark
|
||||||
|
: ThemeNames.Light
|
||||||
updateTheme(newTheme)
|
updateTheme(newTheme)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,9 @@
|
|||||||
{#if $isUserLoggedIn && !$isUserVerified}
|
{#if $isUserLoggedIn && !$isUserVerified}
|
||||||
<div class="container py-3">
|
<div class="container py-3">
|
||||||
<AlertBar alertType={defaultAlertBarType}>
|
<AlertBar alertType={defaultAlertBarType}>
|
||||||
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3">
|
<div
|
||||||
|
class="d-flex flex-wrap align-items-center justify-content-center gap-3"
|
||||||
|
>
|
||||||
<i class="bi bi-envelope-exclamation" />
|
<i class="bi bi-envelope-exclamation" />
|
||||||
|
|
||||||
<div>Please verify your account by clicking the link in your email</div>
|
<div>Please verify your account by clicking the link in your email</div>
|
||||||
@ -43,8 +45,10 @@
|
|||||||
Sent!
|
Sent!
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<button type="button" class="btn btn-outline-secondary" on:click={handleClick}
|
<button
|
||||||
>Resend Email</button
|
type="button"
|
||||||
|
class="btn btn-outline-secondary"
|
||||||
|
on:click={handleClick}>Resend Email</button
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,7 +11,9 @@
|
|||||||
.find((row) => row.startsWith('theme='))
|
.find((row) => row.startsWith('theme='))
|
||||||
?.split('=')?.[1] || 'light'
|
?.split('=')?.[1] || 'light'
|
||||||
|
|
||||||
document.querySelector('html')?.setAttribute(THEME_ATTRIBUTE, currentTheme)
|
document
|
||||||
|
.querySelector('html')
|
||||||
|
?.setAttribute(THEME_ATTRIBUTE, currentTheme)
|
||||||
const theme = document.querySelector('#hljs-link')
|
const theme = document.querySelector('#hljs-link')
|
||||||
if (currentTheme === 'light') {
|
if (currentTheme === 'light') {
|
||||||
theme.href =
|
theme.href =
|
||||||
|
@ -17,7 +17,9 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="/" class="btn btn-light"><i class="bi bi-arrow-left-short" /> Back to Home</a>
|
<a href="/" class="btn btn-light"
|
||||||
|
><i class="bi bi-arrow-left-short" /> Back to Home</a
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
<h2>Deploy <span>PocketBase</span> in 30 seconds</h2>
|
<h2>Deploy <span>PocketBase</span> in 30 seconds</h2>
|
||||||
|
|
||||||
<p class="mb-5">
|
<p class="mb-5">
|
||||||
Spend less time on configuring your backend, and more time building new features for your
|
Spend less time on configuring your backend, and more time building new
|
||||||
web app.
|
features for your web app.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<AuthStateGuard>
|
<AuthStateGuard>
|
||||||
@ -48,10 +48,15 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 col-lg-4 mb-4">
|
<div class="col-12 col-md-6 col-lg-4 mb-4">
|
||||||
<FeatureCard title="Up in 30 seconds" icon="bi bi-stopwatch" fullHeight={true}>
|
<FeatureCard
|
||||||
|
title="Up in 30 seconds"
|
||||||
|
icon="bi bi-stopwatch"
|
||||||
|
fullHeight={true}
|
||||||
|
>
|
||||||
<p>
|
<p>
|
||||||
A backend for your next app is as fast as signing up. No provisioning servers, no Docker
|
A backend for your next app is as fast as signing up. No
|
||||||
fiddling, just B(ad)aaS productivity.
|
provisioning servers, no Docker fiddling, just B(ad)aaS
|
||||||
|
productivity.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -63,10 +68,15 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-md-6 col-lg-4 mb-4">
|
<div class="col-12 col-md-6 col-lg-4 mb-4">
|
||||||
<FeatureCard title="Zero Config" icon="bi bi-check-lg" fullHeight={true}>
|
<FeatureCard
|
||||||
|
title="Zero Config"
|
||||||
|
icon="bi bi-check-lg"
|
||||||
|
fullHeight={true}
|
||||||
|
>
|
||||||
<p>
|
<p>
|
||||||
With PocketHost, batteries are included. You get a database, outgoing email, SSL,
|
With PocketHost, batteries are included. You get a database,
|
||||||
authentication, cloud functions, and high concurrency all in one stop.
|
outgoing email, SSL, authentication, cloud functions, and high
|
||||||
|
concurrency all in one stop.
|
||||||
</p>
|
</p>
|
||||||
</FeatureCard>
|
</FeatureCard>
|
||||||
</div>
|
</div>
|
||||||
@ -74,7 +84,8 @@
|
|||||||
<div class="col-12 col-md-6 col-lg-4 mb-4">
|
<div class="col-12 col-md-6 col-lg-4 mb-4">
|
||||||
<FeatureCard title="Database" icon="bi bi-hdd-stack" fullHeight={true}>
|
<FeatureCard title="Database" icon="bi bi-hdd-stack" fullHeight={true}>
|
||||||
<p>
|
<p>
|
||||||
Your PocketHost instance is powered by its own internal SQLite instance. SQLite is <a
|
Your PocketHost instance is powered by its own internal SQLite
|
||||||
|
instance. SQLite is <a
|
||||||
href="https://pocketbase.io/faq/"
|
href="https://pocketbase.io/faq/"
|
||||||
target="_blank">more performant than mySQL or Postgres</a
|
target="_blank">more performant than mySQL or Postgres</a
|
||||||
>
|
>
|
||||||
@ -89,10 +100,9 @@
|
|||||||
<div class="col-12 col-md-6 col-lg-3 mb-4">
|
<div class="col-12 col-md-6 col-lg-3 mb-4">
|
||||||
<FeatureCard title="Auth" icon="bi bi-shield-lock" fullHeight={true}>
|
<FeatureCard title="Auth" icon="bi bi-shield-lock" fullHeight={true}>
|
||||||
<p>
|
<p>
|
||||||
Email and oAuth authentication options work out of the box. Send transactional email to
|
Email and oAuth authentication options work out of the box. Send
|
||||||
your users from our verified domain and your custom address <code
|
transactional email to your users from our verified domain and your
|
||||||
>yoursubdomain@{PUBLIC_APP_DOMAIN}</code
|
custom address <code>yoursubdomain@{PUBLIC_APP_DOMAIN}</code>.
|
||||||
>.
|
|
||||||
</p>
|
</p>
|
||||||
</FeatureCard>
|
</FeatureCard>
|
||||||
</div>
|
</div>
|
||||||
@ -100,42 +110,63 @@
|
|||||||
<div class="col-12 col-md-6 col-lg-3 mb-4">
|
<div class="col-12 col-md-6 col-lg-3 mb-4">
|
||||||
<FeatureCard title="Storage" icon="bi bi-archive" fullHeight={true}>
|
<FeatureCard title="Storage" icon="bi bi-archive" fullHeight={true}>
|
||||||
<p>
|
<p>
|
||||||
PocketHost securely stores your files on Amazon S3, or you can use your own key to
|
PocketHost securely stores your files on Amazon S3, or you can use
|
||||||
manage your own storage.
|
your own key to manage your own storage.
|
||||||
</p>
|
</p>
|
||||||
</FeatureCard>
|
</FeatureCard>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-md-6 col-lg-3 mb-4">
|
<div class="col-12 col-md-6 col-lg-3 mb-4">
|
||||||
<FeatureCard title="Room to Grow" icon="bi bi-cloud-arrow-up" fullHeight={true}>
|
<FeatureCard
|
||||||
<p>PocketHost is perfect for hobbist, low, and medium volume sites and apps.</p>
|
title="Room to Grow"
|
||||||
|
icon="bi bi-cloud-arrow-up"
|
||||||
|
fullHeight={true}
|
||||||
|
>
|
||||||
<p>
|
<p>
|
||||||
PocketHost, and the underlying PocketBase, can scale to well over 10,000 simultaneous
|
PocketHost is perfect for hobbist, low, and medium volume sites and
|
||||||
connections.
|
apps.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
PocketHost, and the underlying PocketBase, can scale to well over
|
||||||
|
10,000 simultaneous connections.
|
||||||
</p>
|
</p>
|
||||||
</FeatureCard>
|
</FeatureCard>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-md-6 col-lg-3 mb-4">
|
<div class="col-12 col-md-6 col-lg-3 mb-4">
|
||||||
<FeatureCard title="Self-host" icon="bi bi-house-door" fullHeight={true}>
|
<FeatureCard
|
||||||
|
title="Self-host"
|
||||||
|
icon="bi bi-house-door"
|
||||||
|
fullHeight={true}
|
||||||
|
>
|
||||||
<p>
|
<p>
|
||||||
When you're ready to take your project in-house, we have you covered. You can export
|
When you're ready to take your project in-house, we have you
|
||||||
your entire PocketHost environment along with a Dockerfile to run it.
|
covered. You can export your entire PocketHost environment along
|
||||||
|
with a Dockerfile to run it.
|
||||||
</p>
|
</p>
|
||||||
</FeatureCard>
|
</FeatureCard>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-md-6 col-lg-6 mb-4">
|
<div class="col-12 col-md-6 col-lg-6 mb-4">
|
||||||
<FeatureCard title="Open Source Stack" icon="bi bi-code-slash" fullHeight={true}>
|
<FeatureCard
|
||||||
|
title="Open Source Stack"
|
||||||
|
icon="bi bi-code-slash"
|
||||||
|
fullHeight={true}
|
||||||
|
>
|
||||||
<p>
|
<p>
|
||||||
PocketHost is powered by Svelte, Vite, Typescript, PocketBase, and SQLite. Because the
|
PocketHost is powered by Svelte, Vite, Typescript, PocketBase, and
|
||||||
entire stack is open source, you'll never be locked into the whims of a vendor.
|
SQLite. Because the entire stack is open source, you'll never be
|
||||||
|
locked into the whims of a vendor.
|
||||||
</p>
|
</p>
|
||||||
</FeatureCard>
|
</FeatureCard>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-md-6 col-lg-6 mb-4">
|
<div class="col-12 col-md-6 col-lg-6 mb-4">
|
||||||
<FeatureCard title="Coming Soon" icon="bi bi-card-checklist" fullHeight={true}>
|
<FeatureCard
|
||||||
|
title="Coming Soon"
|
||||||
|
icon="bi bi-card-checklist"
|
||||||
|
fullHeight={true}
|
||||||
|
>
|
||||||
<ul>
|
<ul>
|
||||||
<li>JS/TS cloud functions</li>
|
<li>JS/TS cloud functions</li>
|
||||||
<li>Deploy to Fly.io</li>
|
<li>Deploy to Fly.io</li>
|
||||||
@ -170,7 +201,7 @@
|
|||||||
background-image: var(--gradient-white-lime);
|
background-image: var(--gradient-white-lime);
|
||||||
}
|
}
|
||||||
|
|
||||||
.section{
|
.section {
|
||||||
padding: 120px 0;
|
padding: 120px 0;
|
||||||
}
|
}
|
||||||
.section h2 {
|
.section h2 {
|
||||||
|
@ -14,10 +14,13 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3>Maintenance Mode</h3>
|
<h3>Maintenance Mode</h3>
|
||||||
<p class="text-danger">
|
<p class="text-danger">
|
||||||
Your PocketHost instance will not be accessible while in maintenance mode. Use this when you are
|
Your PocketHost instance will not be accessible while in maintenance mode.
|
||||||
upgrading, downgrading, or backing up your data. See <a
|
Use this when you are upgrading, downgrading, or backing up your data. See <a
|
||||||
href="https://pockethost.gitbook.io/manual/daily-usage/maintenance">Maintenance Mode</a
|
href="https://pockethost.gitbook.io/manual/daily-usage/maintenance"
|
||||||
|
>Maintenance Mode</a
|
||||||
> for more information.
|
> for more information.
|
||||||
</p>
|
</p>
|
||||||
<MiniToggle value={maintenance} save={onMaintenance}>Maintenance Mode</MiniToggle>
|
<MiniToggle value={maintenance} save={onMaintenance}
|
||||||
|
>Maintenance Mode</MiniToggle
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3>Rename Instance</h3>
|
<h3>Rename Instance</h3>
|
||||||
<p class="text-danger">
|
<p class="text-danger">
|
||||||
Warning - renaming your instance will cause it to become inaccessible by the old instance name.
|
Warning - renaming your instance will cause it to become inaccessible by the
|
||||||
You also may not be able to change it back if someone else choose it. See <a
|
old instance name. You also may not be able to change it back if someone
|
||||||
href="https://pockethost.gitbook.io/manual/daily-usage/rename-instance">renaming</a
|
else choose it. See <a
|
||||||
|
href="https://pockethost.gitbook.io/manual/daily-usage/rename-instance"
|
||||||
|
>renaming</a
|
||||||
> for more information.
|
> for more information.
|
||||||
</p>
|
</p>
|
||||||
<MiniEdit value={subdomain} save={onRename} />
|
<MiniEdit value={subdomain} save={onRename} />
|
||||||
|
@ -1,40 +1,67 @@
|
|||||||
<!-- describe the graphics included throughout the project -->
|
<!-- describe the graphics included throughout the project -->
|
||||||
<svg viewBox="0 0 100 100" width="40" height="40" style="display: none;">
|
<svg viewBox="0 0 100 100" width="40" height="40" style="display: none;">
|
||||||
<symbol id="add">
|
<symbol id="add">
|
||||||
<g fill="none" stroke="currentColor" stroke-width="7" stroke-linecap="round">
|
<g
|
||||||
<path d="M 50 35 v 30 m -15 -15 h 30"></path>
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="7"
|
||||||
|
stroke-linecap="round"
|
||||||
|
>
|
||||||
|
<path d="M 50 35 v 30 m -15 -15 h 30"></path>
|
||||||
|
</g>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="create">
|
||||||
|
<g
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="7"
|
||||||
|
stroke-linecap="round"
|
||||||
|
>
|
||||||
|
<g transform="translate(76 24)">
|
||||||
|
<path
|
||||||
|
d="M -20 0 h -37.5 a 15 15 0 0 0 -15 15 v 42.5 a 15 15 0 0 0 15 15 h 42.5 a 15 15 0 0 0 15 -15 v -37.5"
|
||||||
|
></path>
|
||||||
|
<circle cx="0" cy="0" r="20"></circle>
|
||||||
|
<path stroke-width="5" d="M 0 -7 v 14 m -7 -7 h 14"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="list">
|
||||||
|
<g
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="7"
|
||||||
|
stroke-linecap="round"
|
||||||
|
>
|
||||||
|
<path d="M 50 35 h 20"></path>
|
||||||
|
<path d="M 30 50 h 40"></path>
|
||||||
|
<path d="M 30 65 h 20"></path>
|
||||||
|
</g>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="delete">
|
||||||
|
<g transform="translate(50 50)">
|
||||||
|
<g transform="rotate(45)">
|
||||||
|
<g
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="10"
|
||||||
|
stroke-linecap="round"
|
||||||
|
>
|
||||||
|
<path d="M 0 -20 v 40 m -20 -20 h 40"></path>
|
||||||
</g>
|
</g>
|
||||||
</symbol>
|
</g>
|
||||||
<symbol id="create">
|
</g>
|
||||||
<g fill="none" stroke="currentColor" stroke-width="7" stroke-linecap="round">
|
</symbol>
|
||||||
<g transform="translate(76 24)">
|
<symbol id="highlight">
|
||||||
<path d="M -20 0 h -37.5 a 15 15 0 0 0 -15 15 v 42.5 a 15 15 0 0 0 15 15 h 42.5 a 15 15 0 0 0 15 -15 v -37.5"></path>
|
<g
|
||||||
<circle cx="0" cy="0" r="20"></circle>
|
fill="none"
|
||||||
<path stroke-width="5" d="M 0 -7 v 14 m -7 -7 h 14"></path>
|
stroke="currentColor"
|
||||||
</g>
|
stroke-width="7"
|
||||||
</g>
|
stroke-linecap="round"
|
||||||
</symbol>
|
>
|
||||||
<symbol id="list">
|
<path d="M 35 65 v -7.5"></path>
|
||||||
<g fill="none" stroke="currentColor" stroke-width="7" stroke-linecap="round">
|
<path d="M 50 65 v -15"></path>
|
||||||
<path d="M 50 35 h 20"></path>
|
<path d="M 65 65 v -30"></path>
|
||||||
<path d="M 30 50 h 40"></path>
|
</g>
|
||||||
<path d="M 30 65 h 20"></path>
|
</symbol>
|
||||||
</g>
|
|
||||||
</symbol>
|
|
||||||
<symbol id="delete">
|
|
||||||
<g transform="translate(50 50)">
|
|
||||||
<g transform="rotate(45)">
|
|
||||||
<g fill="none" stroke="currentColor" stroke-width="10" stroke-linecap="round">
|
|
||||||
<path d="M 0 -20 v 40 m -20 -20 h 40"></path>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</symbol>
|
|
||||||
<symbol id="highlight">
|
|
||||||
<g fill="none" stroke="currentColor" stroke-width="7" stroke-linecap="round">
|
|
||||||
<path d="M 35 65 v -7.5"></path>
|
|
||||||
<path d="M 50 65 v -15"></path>
|
|
||||||
<path d="M 65 65 v -30"></path>
|
|
||||||
</g>
|
|
||||||
</symbol>
|
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@ -19,11 +19,13 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3>Version Lock</h3>
|
<h3>Version Lock</h3>
|
||||||
<p class="text-danger">
|
<p class="text-danger">
|
||||||
Warning - changing your version number should only be done when the instance is in maintenance
|
Warning - changing your version number should only be done when the instance
|
||||||
mode and you have already done a fresh backup. Depending on the upgrade/downgrade you are
|
is in maintenance mode and you have already done a fresh backup. Depending
|
||||||
performing, your instance may become inoperable. If that happens, you may need to manually
|
on the upgrade/downgrade you are performing, your instance may become
|
||||||
upgrade your database locally. See <a
|
inoperable. If that happens, you may need to manually upgrade your database
|
||||||
href="https://pockethost.gitbook.io/manual/daily-usage/upgrading">upgrading</a
|
locally. See <a
|
||||||
|
href="https://pockethost.gitbook.io/manual/daily-usage/upgrading"
|
||||||
|
>upgrading</a
|
||||||
> for more information. name.
|
> for more information. name.
|
||||||
</p>
|
</p>
|
||||||
Version <MiniEdit value={_version} save={saveEdit} disabled={!maintenance} />
|
Version <MiniEdit value={_version} save={saveEdit} disabled={!maintenance} />
|
||||||
|
@ -47,7 +47,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-auto pe-1 position-relative">
|
<div class="col-auto pe-1 position-relative">
|
||||||
<input type="text" id="instance-name" class="form-control" bind:value={instanceName} />
|
<input
|
||||||
|
type="text"
|
||||||
|
id="instance-name"
|
||||||
|
class="form-control"
|
||||||
|
bind:value={instanceName}
|
||||||
|
/>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
aria-label="Regenerate Instance Name"
|
aria-label="Regenerate Instance Name"
|
||||||
@ -70,9 +75,15 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<a href="/dashboard" class="btn btn-light" disabled={isFormButtonDisabled}>Cancel</a>
|
<a href="/dashboard" class="btn btn-light" disabled={isFormButtonDisabled}
|
||||||
|
>Cancel</a
|
||||||
|
>
|
||||||
|
|
||||||
<button class="btn btn-primary" disabled={isFormButtonDisabled} on:click={handleSubmit}>
|
<button
|
||||||
|
class="btn btn-primary"
|
||||||
|
disabled={isFormButtonDisabled}
|
||||||
|
on:click={handleSubmit}
|
||||||
|
>
|
||||||
Create <i class="bi bi-arrow-right-short" />
|
Create <i class="bi bi-arrow-right-short" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
logger,
|
logger,
|
||||||
type InstanceFields,
|
type InstanceFields,
|
||||||
type InstanceId,
|
type InstanceId,
|
||||||
type InstanceRecordsById
|
type InstanceRecordsById,
|
||||||
} from '@pockethost/common'
|
} from '@pockethost/common'
|
||||||
import { values } from '@s-libs/micro-dash'
|
import { values } from '@s-libs/micro-dash'
|
||||||
import { onDestroy, onMount } from 'svelte'
|
import { onDestroy, onMount } from 'svelte'
|
||||||
@ -64,7 +64,9 @@
|
|||||||
{#each values($instancesStore) as app}
|
{#each values($instancesStore) as app}
|
||||||
<div class="col-xl-4 col-md-6 col-12 mb-5">
|
<div class="col-xl-4 col-md-6 col-12 mb-5">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="server-status d-flex align-items-center justify-content-between">
|
<div
|
||||||
|
class="server-status d-flex align-items-center justify-content-between"
|
||||||
|
>
|
||||||
<div class="server-status-minutes">
|
<div class="server-status-minutes">
|
||||||
Usage: {Math.ceil(app.secondsThisMonth / 60)} mins
|
Usage: {Math.ceil(app.secondsThisMonth / 60)} mins
|
||||||
{#if app.maintenance}
|
{#if app.maintenance}
|
||||||
@ -72,7 +74,9 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex align-items-center gap-3 server-status-minutes">
|
<div
|
||||||
|
class="d-flex align-items-center gap-3 server-status-minutes"
|
||||||
|
>
|
||||||
{app.version}
|
{app.version}
|
||||||
<ProvisioningStatus status={app.status} />
|
<ProvisioningStatus status={app.status} />
|
||||||
</div>
|
</div>
|
||||||
@ -91,7 +95,11 @@
|
|||||||
href={`https://${app.subdomain}.${PUBLIC_APP_DOMAIN}/_`}
|
href={`https://${app.subdomain}.${PUBLIC_APP_DOMAIN}/_`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
<img src="/images/pocketbase-logo.svg" alt="PocketBase Logo" class="img-fluid" />
|
<img
|
||||||
|
src="/images/pocketbase-logo.svg"
|
||||||
|
alt="PocketBase Logo"
|
||||||
|
class="img-fluid"
|
||||||
|
/>
|
||||||
<span>Admin</span>
|
<span>Admin</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -104,8 +112,12 @@
|
|||||||
<div class="first-app-screen">
|
<div class="first-app-screen">
|
||||||
<RetroBoxContainer minHeight={isFirstApplication ? 500 : 0}>
|
<RetroBoxContainer minHeight={isFirstApplication ? 500 : 0}>
|
||||||
<div class="px-lg-5">
|
<div class="px-lg-5">
|
||||||
<h2 class="mb-4">Create Your {isFirstApplication ? 'First' : 'Next'} App</h2>
|
<h2 class="mb-4">
|
||||||
<a href="/app/new" class="btn btn-primary btn-lg"><i class="bi bi-plus" /> New App</a>
|
Create Your {isFirstApplication ? 'First' : 'Next'} App
|
||||||
|
</h2>
|
||||||
|
<a href="/app/new" class="btn btn-primary btn-lg"
|
||||||
|
><i class="bi bi-plus" /> New App</a
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</RetroBoxContainer>
|
</RetroBoxContainer>
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,7 +65,11 @@
|
|||||||
<AlertBar icon="bi bi-exclamation-triangle-fill" text={formError} />
|
<AlertBar icon="bi bi-exclamation-triangle-fill" text={formError} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary w-100" disabled={isFormButtonDisabled}>
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="btn btn-primary w-100"
|
||||||
|
disabled={isFormButtonDisabled}
|
||||||
|
>
|
||||||
Log In <i class="bi bi-arrow-right-short" />
|
Log In <i class="bi bi-arrow-right-short" />
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -33,7 +33,9 @@
|
|||||||
{#if userShouldCheckTheirEmail}
|
{#if userShouldCheckTheirEmail}
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h2 class="mb-4">Check Your Email</h2>
|
<h2 class="mb-4">Check Your Email</h2>
|
||||||
<p>A verification link has been sent to <br /><strong>{email}</strong></p>
|
<p>
|
||||||
|
A verification link has been sent to <br /><strong>{email}</strong>
|
||||||
|
</p>
|
||||||
|
|
||||||
<div class="display-1">
|
<div class="display-1">
|
||||||
<i class="bi bi-envelope-check" />
|
<i class="bi bi-envelope-check" />
|
||||||
@ -60,7 +62,11 @@
|
|||||||
<AlertBar icon="bi bi-exclamation-triangle-fill" text={formError} />
|
<AlertBar icon="bi bi-exclamation-triangle-fill" text={formError} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary w-100" disabled={isFormButtonDisabled}>
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="btn btn-primary w-100"
|
||||||
|
disabled={isFormButtonDisabled}
|
||||||
|
>
|
||||||
Send Verification Email <i class="bi bi-arrow-right-short" />
|
Send Verification Email <i class="bi bi-arrow-right-short" />
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -19,9 +19,13 @@
|
|||||||
isFormButtonDisabled = true
|
isFormButtonDisabled = true
|
||||||
if (!token) return
|
if (!token) return
|
||||||
|
|
||||||
await handleUnauthenticatedPasswordResetConfirm(token, password, (error) => {
|
await handleUnauthenticatedPasswordResetConfirm(
|
||||||
formError = error
|
token,
|
||||||
})
|
password,
|
||||||
|
(error) => {
|
||||||
|
formError = error
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
isFormButtonDisabled = false
|
isFormButtonDisabled = false
|
||||||
}
|
}
|
||||||
@ -53,7 +57,11 @@
|
|||||||
<AlertBar icon="bi bi-exclamation-triangle-fill" text={formError} />
|
<AlertBar icon="bi bi-exclamation-triangle-fill" text={formError} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary w-100" disabled={isFormButtonDisabled}>
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="btn btn-primary w-100"
|
||||||
|
disabled={isFormButtonDisabled}
|
||||||
|
>
|
||||||
Save <i class="bi bi-arrow-right-short" />
|
Save <i class="bi bi-arrow-right-short" />
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import AlertBar from '$components/AlertBar.svelte'
|
import AlertBar from '$components/AlertBar.svelte'
|
||||||
import { handleFormError, handleLogin, handleRegistration } from '$util/database'
|
import {
|
||||||
|
handleFormError,
|
||||||
|
handleLogin,
|
||||||
|
handleRegistration,
|
||||||
|
} from '$util/database'
|
||||||
|
|
||||||
let email: string = ''
|
let email: string = ''
|
||||||
let password: string = ''
|
let password: string = ''
|
||||||
@ -68,7 +72,11 @@
|
|||||||
<AlertBar icon="bi bi-exclamation-triangle-fill" text={formError} />
|
<AlertBar icon="bi bi-exclamation-triangle-fill" text={formError} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary w-100" disabled={isFormButtonDisabled}>
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="btn btn-primary w-100"
|
||||||
|
disabled={isFormButtonDisabled}
|
||||||
|
>
|
||||||
Sign Up <i class="bi bi-arrow-right-short" />
|
Sign Up <i class="bi bi-arrow-right-short" />
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
title: "PocketHost",
|
title: 'PocketHost',
|
||||||
url: "https://pockethost.io/",
|
url: 'https://pockethost.io/',
|
||||||
language: "en",
|
language: 'en',
|
||||||
description: "Get a PocketBase backend for your next app in under 10 seconds."
|
description:
|
||||||
|
'Get a PocketBase backend for your next app in under 10 seconds.',
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
tags: [
|
tags: ['posts'],
|
||||||
"posts"
|
layout: 'layouts/post.njk',
|
||||||
],
|
}
|
||||||
"layout": "layouts/post.njk",
|
|
||||||
};
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
tags: [
|
tags: ['docs'],
|
||||||
"docs"
|
layout: 'layouts/docs.njk',
|
||||||
],
|
}
|
||||||
"layout": "layouts/docs.njk",
|
|
||||||
};
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
eleventyExcludeFromCollections: true
|
eleventyExcludeFromCollections: true,
|
||||||
}
|
}
|
||||||
|
@ -1,50 +1,57 @@
|
|||||||
function eleventyComputedPermalink() {
|
function eleventyComputedPermalink() {
|
||||||
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
|
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
|
||||||
// `addGlobalData` acts like a global data file and runs the top level function it receives.
|
// `addGlobalData` acts like a global data file and runs the top level function it receives.
|
||||||
return (data) => {
|
return (data) => {
|
||||||
// Always skip during non-watch/serve builds
|
// Always skip during non-watch/serve builds
|
||||||
if(data.draft && !process.env.BUILD_DRAFTS) {
|
if (data.draft && !process.env.BUILD_DRAFTS) {
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return data.permalink;
|
return data.permalink
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
function eleventyComputedExcludeFromCollections() {
|
function eleventyComputedExcludeFromCollections() {
|
||||||
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
|
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
|
||||||
// `addGlobalData` acts like a global data file and runs the top level function it receives.
|
// `addGlobalData` acts like a global data file and runs the top level function it receives.
|
||||||
return (data) => {
|
return (data) => {
|
||||||
// Always exclude from non-watch/serve builds
|
// Always exclude from non-watch/serve builds
|
||||||
if(data.draft && !process.env.BUILD_DRAFTS) {
|
if (data.draft && !process.env.BUILD_DRAFTS) {
|
||||||
return true;
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
return data.eleventyExcludeFromCollections;
|
return data.eleventyExcludeFromCollections
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports.eleventyComputedPermalink = eleventyComputedPermalink;
|
module.exports.eleventyComputedPermalink = eleventyComputedPermalink
|
||||||
module.exports.eleventyComputedExcludeFromCollections = eleventyComputedExcludeFromCollections;
|
module.exports.eleventyComputedExcludeFromCollections =
|
||||||
|
eleventyComputedExcludeFromCollections
|
||||||
module.exports = eleventyConfig => {
|
|
||||||
eleventyConfig.addGlobalData("eleventyComputed.permalink", eleventyComputedPermalink);
|
module.exports = (eleventyConfig) => {
|
||||||
eleventyConfig.addGlobalData("eleventyComputed.eleventyExcludeFromCollections", eleventyComputedExcludeFromCollections);
|
eleventyConfig.addGlobalData(
|
||||||
|
'eleventyComputed.permalink',
|
||||||
let logged = false;
|
eleventyComputedPermalink,
|
||||||
eleventyConfig.on("eleventy.before", ({runMode}) => {
|
)
|
||||||
let text = "Excluding";
|
eleventyConfig.addGlobalData(
|
||||||
// Only show drafts in serve/watch modes
|
'eleventyComputed.eleventyExcludeFromCollections',
|
||||||
if(runMode === "serve" || runMode === "watch") {
|
eleventyComputedExcludeFromCollections,
|
||||||
process.env.BUILD_DRAFTS = true;
|
)
|
||||||
text = "Including";
|
|
||||||
}
|
let logged = false
|
||||||
|
eleventyConfig.on('eleventy.before', ({ runMode }) => {
|
||||||
// Only log once.
|
let text = 'Excluding'
|
||||||
if(!logged) {
|
// Only show drafts in serve/watch modes
|
||||||
console.log( `[11ty/eleventy-base-blog] ${text} drafts.` );
|
if (runMode === 'serve' || runMode === 'watch') {
|
||||||
}
|
process.env.BUILD_DRAFTS = true
|
||||||
|
text = 'Including'
|
||||||
logged = true;
|
}
|
||||||
});
|
|
||||||
|
// Only log once.
|
||||||
|
if (!logged) {
|
||||||
|
console.log(`[11ty/eleventy-base-blog] ${text} drafts.`)
|
||||||
|
}
|
||||||
|
|
||||||
|
logged = true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,34 +1,37 @@
|
|||||||
const path = require("path");
|
const path = require('path')
|
||||||
const eleventyImage = require("@11ty/eleventy-img");
|
const eleventyImage = require('@11ty/eleventy-img')
|
||||||
|
|
||||||
module.exports = eleventyConfig => {
|
module.exports = (eleventyConfig) => {
|
||||||
function relativeToInputPath(inputPath, relativeFilePath) {
|
function relativeToInputPath(inputPath, relativeFilePath) {
|
||||||
let split = inputPath.split("/");
|
let split = inputPath.split('/')
|
||||||
split.pop();
|
split.pop()
|
||||||
|
|
||||||
return path.resolve(split.join(path.sep), relativeFilePath);
|
return path.resolve(split.join(path.sep), relativeFilePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Eleventy Image shortcode
|
// Eleventy Image shortcode
|
||||||
// https://www.11ty.dev/docs/plugins/image/
|
// https://www.11ty.dev/docs/plugins/image/
|
||||||
eleventyConfig.addAsyncShortcode("image", async function imageShortcode(src, alt, widths, sizes) {
|
eleventyConfig.addAsyncShortcode(
|
||||||
// Full list of formats here: https://www.11ty.dev/docs/plugins/image/#output-formats
|
'image',
|
||||||
// Warning: Avif can be resource-intensive so take care!
|
async function imageShortcode(src, alt, widths, sizes) {
|
||||||
let formats = ["avif", "webp", "auto"];
|
// Full list of formats here: https://www.11ty.dev/docs/plugins/image/#output-formats
|
||||||
let file = relativeToInputPath(this.page.inputPath, src);
|
// Warning: Avif can be resource-intensive so take care!
|
||||||
let metadata = await eleventyImage(file, {
|
let formats = ['avif', 'webp', 'auto']
|
||||||
widths: widths || ["auto"],
|
let file = relativeToInputPath(this.page.inputPath, src)
|
||||||
formats,
|
let metadata = await eleventyImage(file, {
|
||||||
outputDir: path.join(eleventyConfig.dir.output, "img"), // Advanced usage note: `eleventyConfig.dir` works here because we’re using addPlugin.
|
widths: widths || ['auto'],
|
||||||
});
|
formats,
|
||||||
|
outputDir: path.join(eleventyConfig.dir.output, 'img'), // Advanced usage note: `eleventyConfig.dir` works here because we’re using addPlugin.
|
||||||
|
})
|
||||||
|
|
||||||
// TODO loading=eager and fetchpriority=high
|
// TODO loading=eager and fetchpriority=high
|
||||||
let imageAttributes = {
|
let imageAttributes = {
|
||||||
alt,
|
alt,
|
||||||
sizes,
|
sizes,
|
||||||
loading: "lazy",
|
loading: 'lazy',
|
||||||
decoding: "async",
|
decoding: 'async',
|
||||||
};
|
}
|
||||||
return eleventyImage.generateHTML(metadata, imageAttributes);
|
return eleventyImage.generateHTML(metadata, imageAttributes)
|
||||||
});
|
},
|
||||||
};
|
)
|
||||||
|
}
|
||||||
|
@ -1,159 +1,157 @@
|
|||||||
const { DateTime } = require("luxon");
|
const { DateTime } = require('luxon')
|
||||||
const markdownItAnchor = require("markdown-it-anchor");
|
const markdownItAnchor = require('markdown-it-anchor')
|
||||||
const postcss = require('postcss');
|
const postcss = require('postcss')
|
||||||
const tailwindcss = require('tailwindcss');
|
const tailwindcss = require('tailwindcss')
|
||||||
const autoprefixer = require('autoprefixer');
|
const autoprefixer = require('autoprefixer')
|
||||||
const util = require('util');
|
const util = require('util')
|
||||||
|
|
||||||
|
const pluginRss = require('@11ty/eleventy-plugin-rss')
|
||||||
|
const pluginSyntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight')
|
||||||
|
const pluginBundle = require('@11ty/eleventy-plugin-bundle')
|
||||||
|
const pluginNavigation = require('@11ty/eleventy-navigation')
|
||||||
|
const { EleventyHtmlBasePlugin } = require('@11ty/eleventy')
|
||||||
|
|
||||||
const pluginRss = require("@11ty/eleventy-plugin-rss");
|
const pluginDrafts = require('./eleventy.config.drafts.js')
|
||||||
const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
|
const pluginImages = require('./eleventy.config.images.js')
|
||||||
const pluginBundle = require("@11ty/eleventy-plugin-bundle");
|
|
||||||
const pluginNavigation = require("@11ty/eleventy-navigation");
|
|
||||||
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
|
|
||||||
|
|
||||||
const pluginDrafts = require("./eleventy.config.drafts.js");
|
module.exports = function (eleventyConfig) {
|
||||||
const pluginImages = require("./eleventy.config.images.js");
|
// Copy the contents of the `public` folder to the output folder
|
||||||
|
// For example, `./public/css/` ends up in `_site/css/`
|
||||||
|
eleventyConfig.addPassthroughCopy({
|
||||||
|
'./public/': '/',
|
||||||
|
})
|
||||||
|
|
||||||
module.exports = function(eleventyConfig) {
|
eleventyConfig.addNunjucksAsyncFilter('postcss', (cssCode, done) => {
|
||||||
// Copy the contents of the `public` folder to the output folder
|
postcss([tailwindcss(require('./tailwind.config.js')), autoprefixer()])
|
||||||
// For example, `./public/css/` ends up in `_site/css/`
|
.process(cssCode)
|
||||||
eleventyConfig.addPassthroughCopy({
|
.then(
|
||||||
"./public/": "/",
|
(r) => done(null, r.css),
|
||||||
});
|
(e) => done(e, null),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
eleventyConfig.addNunjucksAsyncFilter('postcss', (cssCode, done) => {
|
eleventyConfig.addWatchTarget('styles/**/*.css')
|
||||||
postcss([tailwindcss(require('./tailwind.config.js')), autoprefixer()])
|
|
||||||
.process(cssCode)
|
|
||||||
.then(
|
|
||||||
(r) => done(null, r.css),
|
|
||||||
(e) => done(e, null)
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
eleventyConfig.addWatchTarget('styles/**/*.css');
|
// Run Eleventy when these files change:
|
||||||
|
// https://www.11ty.dev/docs/watch-serve/#add-your-own-watch-targets
|
||||||
|
|
||||||
// Run Eleventy when these files change:
|
// Watch content images for the image pipeline.
|
||||||
// https://www.11ty.dev/docs/watch-serve/#add-your-own-watch-targets
|
eleventyConfig.addWatchTarget('content/**/*.{svg,webp,png,jpeg}')
|
||||||
|
|
||||||
// Watch content images for the image pipeline.
|
// App plugins
|
||||||
eleventyConfig.addWatchTarget("content/**/*.{svg,webp,png,jpeg}");
|
eleventyConfig.addPlugin(pluginDrafts)
|
||||||
|
eleventyConfig.addPlugin(pluginImages)
|
||||||
|
|
||||||
// App plugins
|
// Official plugins
|
||||||
eleventyConfig.addPlugin(pluginDrafts);
|
eleventyConfig.addPlugin(pluginRss)
|
||||||
eleventyConfig.addPlugin(pluginImages);
|
eleventyConfig.addPlugin(pluginSyntaxHighlight, {
|
||||||
|
preAttributes: { tabindex: 0 },
|
||||||
|
})
|
||||||
|
eleventyConfig.addPlugin(pluginNavigation)
|
||||||
|
eleventyConfig.addPlugin(EleventyHtmlBasePlugin)
|
||||||
|
eleventyConfig.addPlugin(pluginBundle)
|
||||||
|
|
||||||
// Official plugins
|
// Filters
|
||||||
eleventyConfig.addPlugin(pluginRss);
|
eleventyConfig.addFilter('readableDate', (dateObj, format, zone) => {
|
||||||
eleventyConfig.addPlugin(pluginSyntaxHighlight, {
|
// Formatting tokens for Luxon: https://moment.github.io/luxon/#/formatting?id=table-of-tokens
|
||||||
preAttributes: { tabindex: 0 }
|
return DateTime.fromJSDate(dateObj, { zone: zone || 'utc' }).toFormat(
|
||||||
});
|
format || 'dd LLLL yyyy',
|
||||||
eleventyConfig.addPlugin(pluginNavigation);
|
)
|
||||||
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
|
})
|
||||||
eleventyConfig.addPlugin(pluginBundle);
|
|
||||||
|
|
||||||
// Filters
|
eleventyConfig.addFilter('htmlDateString', (dateObj) => {
|
||||||
eleventyConfig.addFilter("readableDate", (dateObj, format, zone) => {
|
// dateObj input: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string
|
||||||
// Formatting tokens for Luxon: https://moment.github.io/luxon/#/formatting?id=table-of-tokens
|
return DateTime.fromJSDate(dateObj, { zone: 'utc' }).toFormat('yyyy-LL-dd')
|
||||||
return DateTime.fromJSDate(dateObj, { zone: zone || "utc" }).toFormat(format || "dd LLLL yyyy");
|
})
|
||||||
});
|
|
||||||
|
|
||||||
eleventyConfig.addFilter('htmlDateString', (dateObj) => {
|
// Get the first `n` elements of a collection.
|
||||||
// dateObj input: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string
|
eleventyConfig.addFilter('head', (array, n) => {
|
||||||
return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toFormat('yyyy-LL-dd');
|
if (!Array.isArray(array) || array.length === 0) {
|
||||||
});
|
return []
|
||||||
|
}
|
||||||
|
if (n < 0) {
|
||||||
|
return array.slice(n)
|
||||||
|
}
|
||||||
|
|
||||||
// Get the first `n` elements of a collection.
|
return array.slice(0, n)
|
||||||
eleventyConfig.addFilter("head", (array, n) => {
|
})
|
||||||
if(!Array.isArray(array) || array.length === 0) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
if( n < 0 ) {
|
|
||||||
return array.slice(n);
|
|
||||||
}
|
|
||||||
|
|
||||||
return array.slice(0, n);
|
// Return the smallest number argument
|
||||||
});
|
eleventyConfig.addFilter('min', (...numbers) => {
|
||||||
|
return Math.min.apply(null, numbers)
|
||||||
|
})
|
||||||
|
|
||||||
// Return the smallest number argument
|
// Return all the tags used in a collection
|
||||||
eleventyConfig.addFilter("min", (...numbers) => {
|
eleventyConfig.addFilter('getAllTags', (collection) => {
|
||||||
return Math.min.apply(null, numbers);
|
let tagSet = new Set()
|
||||||
});
|
for (let item of collection) {
|
||||||
|
;(item.data.tags || []).forEach((tag) => tagSet.add(tag))
|
||||||
|
}
|
||||||
|
return Array.from(tagSet)
|
||||||
|
})
|
||||||
|
|
||||||
// Return all the tags used in a collection
|
eleventyConfig.addFilter('filterTagList', function filterTagList(tags) {
|
||||||
eleventyConfig.addFilter("getAllTags", collection => {
|
return (tags || []).filter(
|
||||||
let tagSet = new Set();
|
(tag) => ['all', 'nav', 'post', 'posts'].indexOf(tag) === -1,
|
||||||
for(let item of collection) {
|
)
|
||||||
(item.data.tags || []).forEach(tag => tagSet.add(tag));
|
})
|
||||||
}
|
|
||||||
return Array.from(tagSet);
|
|
||||||
});
|
|
||||||
|
|
||||||
eleventyConfig.addFilter("filterTagList", function filterTagList(tags) {
|
eleventyConfig.addFilter('console', function (value) {
|
||||||
return (tags || []).filter(tag => ["all", "nav", "post", "posts"].indexOf(tag) === -1);
|
const str = util.inspect(value)
|
||||||
});
|
return `<div style="white-space: pre-wrap;">${unescape(str)}</div>;`
|
||||||
|
})
|
||||||
|
|
||||||
eleventyConfig.addFilter('console', function(value) {
|
// Customize Markdown library settings:
|
||||||
const str = util.inspect(value);
|
eleventyConfig.amendLibrary('md', (mdLib) => {
|
||||||
return `<div style="white-space: pre-wrap;">${unescape(str)}</div>;`
|
mdLib.use(markdownItAnchor, {
|
||||||
});
|
permalink: markdownItAnchor.permalink.ariaHidden({
|
||||||
|
placement: 'after',
|
||||||
|
class: 'header-anchor',
|
||||||
|
symbol: '#',
|
||||||
|
ariaHidden: false,
|
||||||
|
}),
|
||||||
|
level: [1, 2, 3, 4],
|
||||||
|
slugify: eleventyConfig.getFilter('slugify'),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
// Customize Markdown library settings:
|
// Features to make your build faster (when you need them)
|
||||||
eleventyConfig.amendLibrary("md", mdLib => {
|
|
||||||
mdLib.use(markdownItAnchor, {
|
|
||||||
permalink: markdownItAnchor.permalink.ariaHidden({
|
|
||||||
placement: "after",
|
|
||||||
class: "header-anchor",
|
|
||||||
symbol: "#",
|
|
||||||
ariaHidden: false,
|
|
||||||
}),
|
|
||||||
level: [1,2,3,4],
|
|
||||||
slugify: eleventyConfig.getFilter("slugify")
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Features to make your build faster (when you need them)
|
// If your passthrough copy gets heavy and cumbersome, add this line
|
||||||
|
// to emulate the file copy on the dev server. Learn more:
|
||||||
|
// https://www.11ty.dev/docs/copy/#emulate-passthrough-copy-during-serve
|
||||||
|
|
||||||
// If your passthrough copy gets heavy and cumbersome, add this line
|
// eleventyConfig.setServerPassthroughCopyBehavior("passthrough");
|
||||||
// to emulate the file copy on the dev server. Learn more:
|
|
||||||
// https://www.11ty.dev/docs/copy/#emulate-passthrough-copy-during-serve
|
|
||||||
|
|
||||||
// eleventyConfig.setServerPassthroughCopyBehavior("passthrough");
|
return {
|
||||||
|
// Control which files Eleventy will process
|
||||||
|
// e.g.: *.md, *.njk, *.html, *.liquid
|
||||||
|
templateFormats: ['md', 'njk', 'html', 'liquid'],
|
||||||
|
|
||||||
return {
|
// Pre-process *.md files with: (default: `liquid`)
|
||||||
// Control which files Eleventy will process
|
markdownTemplateEngine: 'njk',
|
||||||
// e.g.: *.md, *.njk, *.html, *.liquid
|
|
||||||
templateFormats: [
|
|
||||||
"md",
|
|
||||||
"njk",
|
|
||||||
"html",
|
|
||||||
"liquid",
|
|
||||||
],
|
|
||||||
|
|
||||||
// Pre-process *.md files with: (default: `liquid`)
|
// Pre-process *.html files with: (default: `liquid`)
|
||||||
markdownTemplateEngine: "njk",
|
htmlTemplateEngine: 'njk',
|
||||||
|
|
||||||
// Pre-process *.html files with: (default: `liquid`)
|
// These are all optional:
|
||||||
htmlTemplateEngine: "njk",
|
dir: {
|
||||||
|
input: 'content', // default: "."
|
||||||
|
includes: '../_includes', // default: "_includes"
|
||||||
|
data: '../_data', // default: "_data"
|
||||||
|
output: '_site',
|
||||||
|
},
|
||||||
|
|
||||||
// These are all optional:
|
// -----------------------------------------------------------------
|
||||||
dir: {
|
// Optional items:
|
||||||
input: "content", // default: "."
|
// -----------------------------------------------------------------
|
||||||
includes: "../_includes", // default: "_includes"
|
|
||||||
data: "../_data", // default: "_data"
|
|
||||||
output: "_site"
|
|
||||||
},
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------
|
// If your site deploys to a subdirectory, change `pathPrefix`.
|
||||||
// Optional items:
|
// Read more: https://www.11ty.dev/docs/config/#deploy-to-a-subdirectory-with-a-path-prefix
|
||||||
// -----------------------------------------------------------------
|
|
||||||
|
|
||||||
// If your site deploys to a subdirectory, change `pathPrefix`.
|
// When paired with the HTML <base> plugin https://www.11ty.dev/docs/plugins/html-base/
|
||||||
// Read more: https://www.11ty.dev/docs/config/#deploy-to-a-subdirectory-with-a-path-prefix
|
// it will transform any absolute URLs in your HTML to include this
|
||||||
|
// folder name and does **not** affect where things go in the output folder.
|
||||||
// When paired with the HTML <base> plugin https://www.11ty.dev/docs/plugins/html-base/
|
pathPrefix: '/',
|
||||||
// it will transform any absolute URLs in your HTML to include this
|
}
|
||||||
// folder name and does **not** affect where things go in the output folder.
|
}
|
||||||
pathPrefix: "/",
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
@ -1,20 +1,11 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
content: [
|
content: ['./_includes/**/*.{html,njk,md}', './content/**/*.{html,njk,md}'],
|
||||||
"./_includes/**/*.{html,njk,md}",
|
|
||||||
"./content/**/*.{html,njk,md}",
|
|
||||||
],
|
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {},
|
||||||
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
daisyui: {
|
daisyui: {
|
||||||
themes: ["light", "dark"],
|
themes: ['light', 'dark'],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [require('@tailwindcss/typography'), require('daisyui')],
|
||||||
require("@tailwindcss/typography"),
|
|
||||||
require("daisyui"),
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user