sleep in hook and cors in config
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Sebastian Frank 2024-08-23 14:01:15 +00:00
parent 1b48015c98
commit 2b0edd2c9f
Signed by: apairon
SSH Key Fingerprint: SHA256:lYVOnGlR42QHj7wuqfFgGw8cKbfyZUpzeRDGVBBAHQU
3 changed files with 105 additions and 4 deletions

15
index.d.ts vendored
View File

@ -111,7 +111,7 @@ declare global {
/**
* get current project object
*
*
*/
project(): {
[key: string]: any
@ -119,7 +119,7 @@ declare global {
/**
* get server config object
*
*
*/
server(): {
api: {
@ -344,6 +344,13 @@ declare global {
* get Sentry trace id
*/
sentryTraceId(): string
/**
* sleep
*
* @param ms sleep time in milliseconds
*/
sleep(ms: number): void
}
interface ResponsePackage {
@ -640,7 +647,7 @@ declare global {
*
* @returns hex hash
*/
md5(data:string): string
md5(data: string): string
}
interface JsonPackage {
@ -680,7 +687,7 @@ declare global {
}
api(): {
[key: string]: any
[key: string]: any
}
project(): {

View File

@ -125,6 +125,53 @@
}
}
]
},
"cors": {
"type": "object",
"description": "cors configuration",
"additionalProperties": false,
"properties": {
"merge": {
"type": "boolean",
"description": "merge with global and project cors configuration"
},
"allowOrigins": {
"type": "array",
"description": "list of allowed origins",
"items": {
"type": "string"
}
},
"allowMethods": {
"type": "array",
"description": "list of allowed methods",
"items": {
"type": "string"
}
},
"allowHeaders": {
"type": "array",
"description": "list of allowed headers",
"items": {
"type": "string"
}
},
"allowCredentials": {
"type": "boolean",
"description": "allow credentials"
},
"exposeHeaders": {
"type": "array",
"description": "list of exposed headers",
"items": {
"type": "string"
}
},
"maxAge": {
"type": "integer",
"description": "max age in seconds"
}
}
}
},
"required": ["name", "permissions"]

View File

@ -77,6 +77,53 @@
}
]
}
},
"cors": {
"type": "object",
"description": "cors configuration",
"additionalProperties": false,
"properties": {
"merge": {
"type": "boolean",
"description": "merge with global cors configuration"
},
"allowOrigins": {
"type": "array",
"description": "list of allowed origins",
"items": {
"type": "string"
}
},
"allowMethods": {
"type": "array",
"description": "list of allowed methods",
"items": {
"type": "string"
}
},
"allowHeaders": {
"type": "array",
"description": "list of allowed headers",
"items": {
"type": "string"
}
},
"allowCredentials": {
"type": "boolean",
"description": "allow credentials"
},
"exposeHeaders": {
"type": "array",
"description": "list of exposed headers",
"items": {
"type": "string"
}
},
"maxAge": {
"type": "integer",
"description": "max age in seconds"
}
}
}
},
"required": ["namespace"]