Compare commits
11 commits
c124997a58
...
71c803107c
Author | SHA1 | Date | |
---|---|---|---|
71c803107c | |||
a990286cbd | |||
8ecd0bd63e | |||
9893e60bf3 | |||
2948b9c023 | |||
0219d9ffe2 | |||
0531331f0b | |||
e85cec8db3 | |||
f69cf019fc | |||
20278692df | |||
dddd839789 |
11 changed files with 458 additions and 873 deletions
6
lib/node/node_modules/.package-lock.json
generated
vendored
6
lib/node/node_modules/.package-lock.json
generated
vendored
|
@ -1017,9 +1017,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/pg": {
|
||||
"version": "8.11.5",
|
||||
"resolved": "https://registry.npmjs.org/pg/-/pg-8.11.5.tgz",
|
||||
"integrity": "sha512-jqgNHSKL5cbDjFlHyYsCXmQDrfIX/3RsNwYqpd4N0Kt8niLuNoRNH+aazv6cOd43gPh9Y4DjQCtb+X0MH0Hvnw==",
|
||||
"version": "8.12.0",
|
||||
"resolved": "https://registry.npmjs.org/pg/-/pg-8.12.0.tgz",
|
||||
"integrity": "sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ==",
|
||||
"dependencies": {
|
||||
"pg-connection-string": "^2.6.4",
|
||||
"pg-pool": "^3.6.2",
|
||||
|
|
3
lib/node/node_modules/pg/lib/native/query.js
generated
vendored
3
lib/node/node_modules/pg/lib/native/query.js
generated
vendored
|
@ -10,6 +10,7 @@ var NativeQuery = (module.exports = function (config, values, callback) {
|
|||
this.text = config.text
|
||||
this.values = config.values
|
||||
this.name = config.name
|
||||
this.queryMode = config.queryMode
|
||||
this.callback = config.callback
|
||||
this.state = 'new'
|
||||
this._arrayMode = config.rowMode === 'array'
|
||||
|
@ -159,6 +160,8 @@ NativeQuery.prototype.submit = function (client) {
|
|||
}
|
||||
var vals = this.values.map(utils.prepareValue)
|
||||
client.native.query(this.text, vals, after)
|
||||
} else if (this.queryMode === 'extended') {
|
||||
client.native.query(this.text, [], after)
|
||||
} else {
|
||||
client.native.query(this.text, after)
|
||||
}
|
||||
|
|
5
lib/node/node_modules/pg/lib/query.js
generated
vendored
5
lib/node/node_modules/pg/lib/query.js
generated
vendored
|
@ -16,6 +16,7 @@ class Query extends EventEmitter {
|
|||
this.rows = config.rows
|
||||
this.types = config.types
|
||||
this.name = config.name
|
||||
this.queryMode = config.queryMode
|
||||
this.binary = config.binary
|
||||
// use unique portal name each time
|
||||
this.portal = config.portal || ''
|
||||
|
@ -32,6 +33,10 @@ class Query extends EventEmitter {
|
|||
}
|
||||
|
||||
requiresPreparation() {
|
||||
if (this.queryMode === 'extended') {
|
||||
return true
|
||||
}
|
||||
|
||||
// named queries must always be prepared
|
||||
if (this.name) {
|
||||
return true
|
||||
|
|
6
lib/node/node_modules/pg/package.json
generated
vendored
6
lib/node/node_modules/pg/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "pg",
|
||||
"version": "8.11.5",
|
||||
"version": "8.12.0",
|
||||
"description": "PostgreSQL client - pure javascript & libpq with the same API",
|
||||
"keywords": [
|
||||
"database",
|
||||
|
@ -34,7 +34,7 @@
|
|||
"pg-copy-streams": "0.3.0",
|
||||
"typescript": "^4.0.3",
|
||||
"workerd": "^1.20230419.0",
|
||||
"wrangler": "^2.16.0"
|
||||
"wrangler": "3.58.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"pg-cloudflare": "^1.1.1"
|
||||
|
@ -58,5 +58,5 @@
|
|||
"engines": {
|
||||
"node": ">= 8.0.0"
|
||||
},
|
||||
"gitHead": "a37a93bf7990220517a40cf16b8e72d4c3e6cef5"
|
||||
"gitHead": "0f42880861951970e193d31359508d460a67d25a"
|
||||
}
|
||||
|
|
8
lib/node/package-lock.json
generated
8
lib/node/package-lock.json
generated
|
@ -5,7 +5,7 @@
|
|||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"pg": "^8.11.5",
|
||||
"pg": "^8.12.0",
|
||||
"sqlite3": "^5.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -1029,9 +1029,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/pg": {
|
||||
"version": "8.11.5",
|
||||
"resolved": "https://registry.npmjs.org/pg/-/pg-8.11.5.tgz",
|
||||
"integrity": "sha512-jqgNHSKL5cbDjFlHyYsCXmQDrfIX/3RsNwYqpd4N0Kt8niLuNoRNH+aazv6cOd43gPh9Y4DjQCtb+X0MH0Hvnw==",
|
||||
"version": "8.12.0",
|
||||
"resolved": "https://registry.npmjs.org/pg/-/pg-8.12.0.tgz",
|
||||
"integrity": "sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ==",
|
||||
"dependencies": {
|
||||
"pg-connection-string": "^2.6.4",
|
||||
"pg-pool": "^3.6.2",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"yaml": "^2.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"pg": "^8.11.5",
|
||||
"pg": "^8.12.0",
|
||||
"sqlite3": "^5.1.7"
|
||||
}
|
||||
}
|
||||
|
|
51
lib/plankton/plankton.d.ts
vendored
51
lib/plankton/plankton.d.ts
vendored
|
@ -1,15 +1,15 @@
|
|||
/**
|
||||
* @author fenris
|
||||
*/
|
||||
declare type int = number;
|
||||
type int = number;
|
||||
/**
|
||||
* @author fenris
|
||||
*/
|
||||
declare type float = number;
|
||||
type float = number;
|
||||
/**
|
||||
* @author fenris
|
||||
*/
|
||||
declare type type_date = {
|
||||
type type_date = {
|
||||
year: int;
|
||||
month: int;
|
||||
day: int;
|
||||
|
@ -17,7 +17,7 @@ declare type type_date = {
|
|||
/**
|
||||
* @author fenris
|
||||
*/
|
||||
declare type type_time = {
|
||||
type type_time = {
|
||||
hour: int;
|
||||
minute: int;
|
||||
second: int;
|
||||
|
@ -25,7 +25,7 @@ declare type type_time = {
|
|||
/**
|
||||
* @author fenris
|
||||
*/
|
||||
declare type type_datetimeobject = {
|
||||
type type_datetimeobject = {
|
||||
date: type_date;
|
||||
time: type_time;
|
||||
};
|
||||
|
@ -44,7 +44,7 @@ declare namespace lib_plankton.base {
|
|||
/**
|
||||
* @author fenris
|
||||
*/
|
||||
declare type type_pseudopointer<type_value> = {
|
||||
type type_pseudopointer<type_value> = {
|
||||
value: type_value;
|
||||
};
|
||||
/**
|
||||
|
@ -1988,6 +1988,7 @@ declare namespace lib_plankton.database {
|
|||
type type_description_insert = {
|
||||
table_name: string;
|
||||
values: Record<string, any>;
|
||||
returning?: (null | string);
|
||||
};
|
||||
/**
|
||||
*/
|
||||
|
@ -2032,6 +2033,7 @@ declare namespace lib_plankton.database {
|
|||
* @author fenris
|
||||
*/
|
||||
type type_database = {
|
||||
wrap_name: ((name: string) => string);
|
||||
query_free_get: ((query: type_query) => Promise<type_result_get>);
|
||||
query_free_put: ((query: type_query) => Promise<type_result_put>);
|
||||
query_free_set: ((query: type_query) => Promise<type_result_set>);
|
||||
|
@ -2053,30 +2055,32 @@ declare namespace lib_plankton.database {
|
|||
/**
|
||||
*/
|
||||
function sql_common_formulation_create_table(description_create_table: type_description_create_table, options?: {
|
||||
auto_increment_keyword?: string;
|
||||
auto_increment_keyword?: (null | string);
|
||||
auto_increment_special?: (null | string);
|
||||
omit_comments?: boolean;
|
||||
type_map?: Record<enum_type, string>;
|
||||
wrap_names?: boolean;
|
||||
wrap_name?: ((name: string) => string);
|
||||
}): type_query;
|
||||
/**
|
||||
*/
|
||||
function sql_common_formulation_insert(description_insert: type_description_insert, options?: {
|
||||
wrap_names?: boolean;
|
||||
wrap_name?: ((name: string) => string);
|
||||
set_returning?: boolean;
|
||||
}): type_query;
|
||||
/**
|
||||
*/
|
||||
function sql_common_formulation_update(description_update: type_description_update, options?: {
|
||||
wrap_names?: boolean;
|
||||
wrap_name?: ((name: string) => string);
|
||||
}): type_query;
|
||||
/**
|
||||
*/
|
||||
function sql_common_formulation_delete(description_delete: type_description_delete, options?: {
|
||||
wrap_names?: boolean;
|
||||
wrap_name?: ((name: string) => string);
|
||||
}): type_query;
|
||||
/**
|
||||
*/
|
||||
function sql_common_formulation_select(description_select: type_description_select, options?: {
|
||||
wrap_names?: boolean;
|
||||
wrap_name?: ((name: string) => string);
|
||||
}): type_query;
|
||||
}
|
||||
declare namespace lib_plankton.database {
|
||||
|
@ -2094,6 +2098,9 @@ declare namespace lib_plankton.database {
|
|||
/**
|
||||
*/
|
||||
function sqlite_make(parameters: type_sqlite_parameters): type_sqlite_subject;
|
||||
/**
|
||||
*/
|
||||
function sqlite_wrap_name(name: string): string;
|
||||
/**
|
||||
* @author fenris
|
||||
*/
|
||||
|
@ -2147,6 +2154,7 @@ declare namespace lib_plankton.database {
|
|||
class class_sqlite implements interface_database {
|
||||
private subject;
|
||||
constructor(parameters: type_sqlite_parameters);
|
||||
wrap_name(name: any): string;
|
||||
query_free_get(query: any): Promise<type_result_get>;
|
||||
query_free_put(query: any): Promise<number>;
|
||||
query_free_set(query: any): Promise<number>;
|
||||
|
@ -2167,7 +2175,7 @@ declare namespace lib_plankton.database {
|
|||
username: string;
|
||||
password: string;
|
||||
schema: string;
|
||||
client: any;
|
||||
pool: (null | any);
|
||||
};
|
||||
/**
|
||||
* @todo
|
||||
|
@ -2180,22 +2188,24 @@ declare namespace lib_plankton.database {
|
|||
schema: string;
|
||||
};
|
||||
/**
|
||||
* @see https://node-postgres.com/apis/client#new-client
|
||||
*/
|
||||
function postgresql_make(parameters: type_postgresql_parameters): type_postgresql_subject;
|
||||
/**
|
||||
*/
|
||||
function postgresql_wrap_name(name: string): string;
|
||||
/**
|
||||
* @author fenris
|
||||
* @see https://node-postgres.com/apis/client#clientquery
|
||||
* @see https://node-postgres.com/apis/pool#poolquery
|
||||
*/
|
||||
function postgresql_query_free_get(subject: type_postgresql_subject, query: type_query): Promise<type_result_get>;
|
||||
/**
|
||||
* @author fenris
|
||||
* @see https://node-postgres.com/apis/client#clientquery
|
||||
* @see https://node-postgres.com/apis/pool#poolquery
|
||||
*/
|
||||
function postgresql_query_free_put(subject: type_postgresql_subject, query: type_query): Promise<type_result_put>;
|
||||
/**
|
||||
* @author fenris
|
||||
* @see https://node-postgres.com/apis/client#clientquery
|
||||
* @see https://node-postgres.com/apis/pool#poolquery
|
||||
*/
|
||||
function postgresql_query_free_set(subject: type_postgresql_subject, query: type_query): Promise<type_result_set>;
|
||||
/**
|
||||
|
@ -2239,6 +2249,7 @@ declare namespace lib_plankton.database {
|
|||
class class_postgresql implements interface_database {
|
||||
private subject;
|
||||
constructor(parameters: type_postgresql_parameters);
|
||||
wrap_name(name: any): string;
|
||||
query_free_get(query: any): Promise<type_result_get>;
|
||||
query_free_put(query: any): Promise<number>;
|
||||
query_free_set(query: any): Promise<number>;
|
||||
|
@ -2265,6 +2276,9 @@ declare namespace lib_plankton.database {
|
|||
/**
|
||||
*/
|
||||
function mysql_make(parameters: type_mysql_parameters): type_mysql_subject;
|
||||
/**
|
||||
*/
|
||||
function mysql_wrap_name(name: string): string;
|
||||
/**
|
||||
* @author fenris
|
||||
*/
|
||||
|
@ -2318,6 +2332,7 @@ declare namespace lib_plankton.database {
|
|||
class class_mysql implements interface_database {
|
||||
private subject;
|
||||
constructor(parameters: type_mysql_parameters);
|
||||
wrap_name(name: any): string;
|
||||
query_free_get(query: any): Promise<type_result_get>;
|
||||
query_free_put(query: any): Promise<number>;
|
||||
query_free_set(query: any): Promise<number>;
|
||||
|
@ -2487,7 +2502,7 @@ declare namespace lib_plankton.storage.memory {
|
|||
clear(): Promise<void>;
|
||||
write(key: any, value: any): Promise<boolean>;
|
||||
delete(key: any): Promise<void>;
|
||||
read(key: any): Promise<type_item>;
|
||||
read(key: any): Promise<Awaited<type_item>>;
|
||||
search(term: any): Promise<{
|
||||
key: string;
|
||||
preview: string;
|
||||
|
|
|
@ -2207,7 +2207,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
|
@ -6790,22 +6790,13 @@ var lib_plankton;
|
|||
}
|
||||
}
|
||||
database.sql_common_value_format = sql_common_value_format;
|
||||
/**
|
||||
*/
|
||||
function wrap_name(name, options = {}) {
|
||||
options = Object.assign({
|
||||
"active": true,
|
||||
}, options);
|
||||
return (options.active
|
||||
? ("`" + name + "`")
|
||||
: name);
|
||||
}
|
||||
/**
|
||||
*/
|
||||
function sql_common_formulation_create_table(description_create_table, options = {}) {
|
||||
var _a, _b, _c, _d, _e;
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
options = Object.assign({
|
||||
"auto_increment_keyword": "AUTO INCREMENT",
|
||||
"auto_increment_special": null,
|
||||
"omit_comments": false,
|
||||
"type_map": {
|
||||
"boolean": "BOOLEAN",
|
||||
|
@ -6815,11 +6806,11 @@ var lib_plankton;
|
|||
"string_long": "TEXT",
|
||||
"float": "REAL",
|
||||
},
|
||||
"wrap_names": true,
|
||||
"wrap_name": (x => x),
|
||||
}, options);
|
||||
return {
|
||||
"template": lib_plankton.string.coin("CREATE TABLE\n\t{{name}}(\n{{entries}}\n\t){{comment}}\n;", {
|
||||
"name": wrap_name(description_create_table.name, { "active": options.wrap_names }),
|
||||
"template": lib_plankton.string.coin("CREATE TABLE IF NOT EXISTS\n\t{{name}}(\n{{entries}}\n\t){{comment}}\n;", {
|
||||
"name": options.wrap_name(description_create_table.name),
|
||||
"comment": ((options.omit_comments
|
||||
||
|
||||
(((_a = description_create_table.description) !== null && _a !== void 0 ? _a : null) === null))
|
||||
|
@ -6832,34 +6823,42 @@ var lib_plankton;
|
|||
.concat((((_b = description_create_table.key_field) !== null && _b !== void 0 ? _b : null) === null)
|
||||
? []
|
||||
: lib_plankton.string.coin("{{name}} {{parameters}}", {
|
||||
"name": wrap_name(description_create_table.key_field.name, { "active": options.wrap_names }),
|
||||
"parameters": (([]
|
||||
/*
|
||||
"name": options.wrap_name(description_create_table.key_field.name),
|
||||
"parameters": (((options.auto_increment_special === null)
|
||||
?
|
||||
([]
|
||||
// type
|
||||
.concat(
|
||||
[
|
||||
options.type_map[description_create_table.key_field.type ?? "integer"],
|
||||
]
|
||||
)
|
||||
*/
|
||||
// auto increment
|
||||
.concat((((_c = description_create_table.key_field.auto_increment) !== null && _c !== void 0 ? _c : true) === null)
|
||||
? []
|
||||
: [
|
||||
options.auto_increment_keyword,
|
||||
.concat([
|
||||
options.type_map[(_c = description_create_table.key_field.type) !== null && _c !== void 0 ? _c : "integer"],
|
||||
])
|
||||
// nullability
|
||||
.concat([
|
||||
"NOT NULL",
|
||||
])
|
||||
// primary key
|
||||
.concat([
|
||||
"PRIMARY KEY",
|
||||
])
|
||||
// auto increment
|
||||
.concat((((_d = description_create_table.key_field.auto_increment) !== null && _d !== void 0 ? _d : true) === null)
|
||||
?
|
||||
[]
|
||||
:
|
||||
[
|
||||
options.auto_increment_keyword,
|
||||
]))
|
||||
:
|
||||
[
|
||||
options.auto_increment_special
|
||||
])
|
||||
.join(" ")),
|
||||
}))
|
||||
// data fields
|
||||
.concat(((_d = description_create_table.data_fields) !== null && _d !== void 0 ? _d : [])
|
||||
.concat(((_e = description_create_table.data_fields) !== null && _e !== void 0 ? _e : [])
|
||||
.map((data_field) => {
|
||||
var _a, _b;
|
||||
return lib_plankton.string.coin("{{name}} {{parameters}}", {
|
||||
"name": wrap_name(data_field.name, { "active": options.wrap_names }),
|
||||
"name": options.wrap_name(data_field.name),
|
||||
"parameters": (([]
|
||||
// type
|
||||
.concat([
|
||||
|
@ -6891,7 +6890,7 @@ var lib_plankton;
|
|||
});
|
||||
}))
|
||||
// constraints
|
||||
.concat(((_e = description_create_table.constraints) !== null && _e !== void 0 ? _e : [])
|
||||
.concat(((_f = description_create_table.constraints) !== null && _f !== void 0 ? _f : [])
|
||||
.map((constraint) => {
|
||||
switch (constraint.kind) {
|
||||
default: {
|
||||
|
@ -6901,11 +6900,11 @@ var lib_plankton;
|
|||
case "foreign_key": {
|
||||
return lib_plankton.string.coin("FOREIGN KEY ({{fields}}) REFERENCES {{reference_name}}({{reference_fields}})", {
|
||||
"fields": (constraint.parameters["fields"]
|
||||
.map(x => wrap_name(x, { "active": options.wrap_names }))
|
||||
.map(x => options.wrap_name(x))
|
||||
.join(",")),
|
||||
"reference_name": wrap_name(constraint.parameters["reference"]["name"], { "active": options.wrap_names }),
|
||||
"reference_name": options.wrap_name(constraint.parameters["reference"]["name"]),
|
||||
"reference_fields": (constraint.parameters["reference"]["fields"]
|
||||
.map(x => wrap_name(x, { "active": options.wrap_names }))
|
||||
.map(x => options.wrap_name(x))
|
||||
.join(",")),
|
||||
});
|
||||
break;
|
||||
|
@ -6913,7 +6912,7 @@ var lib_plankton;
|
|||
case "unique": {
|
||||
return lib_plankton.string.coin("UNIQUE ({{fields}})", {
|
||||
"fields": (constraint.parameters["fields"]
|
||||
.map(x => wrap_name(x, { "active": options.wrap_names }))
|
||||
.map(x => options.wrap_name(x))
|
||||
.join(",")),
|
||||
});
|
||||
break;
|
||||
|
@ -6931,15 +6930,16 @@ var lib_plankton;
|
|||
*/
|
||||
function sql_common_formulation_insert(description_insert, options = {}) {
|
||||
options = Object.assign({
|
||||
"wrap_names": true,
|
||||
"wrap_name": (x => x),
|
||||
"set_returning": false,
|
||||
}, options);
|
||||
const field_names = Object.keys(description_insert.values);
|
||||
return {
|
||||
"template": lib_plankton.string.coin("INSERT INTO {{table_name}}({{schema}}) VALUES ({{values}});", {
|
||||
"table_name": wrap_name(description_insert.table_name, { "active": options.wrap_names }),
|
||||
"template": lib_plankton.string.coin("INSERT INTO {{table_name}}({{schema}}) VALUES ({{values}}){{returning}};", {
|
||||
"table_name": options.wrap_name(description_insert.table_name),
|
||||
"schema": (field_names
|
||||
.map((field_name) => lib_plankton.string.coin("{{name}}", {
|
||||
"name": wrap_name(field_name, { "active": options.wrap_names }),
|
||||
"name": options.wrap_name(field_name),
|
||||
}))
|
||||
.join(",")),
|
||||
"values": (field_names
|
||||
|
@ -6947,6 +6947,15 @@ var lib_plankton;
|
|||
"name": field_name,
|
||||
}))
|
||||
.join(",")),
|
||||
"returning": ((options.set_returning
|
||||
&&
|
||||
((description_insert.returning !== undefined)
|
||||
&&
|
||||
(description_insert.returning !== null)))
|
||||
?
|
||||
(" RETURNING " + description_insert.returning)
|
||||
:
|
||||
""),
|
||||
}),
|
||||
"arguments": Object.fromEntries(Object.entries(description_insert.values)
|
||||
.map(([name, value]) => ([
|
||||
|
@ -6963,15 +6972,15 @@ var lib_plankton;
|
|||
function sql_common_formulation_update(description_update, options = {}) {
|
||||
var _a, _b;
|
||||
options = Object.assign({
|
||||
"wrap_names": true,
|
||||
"wrap_name": (x => x),
|
||||
}, options);
|
||||
const field_names = Object.keys(description_update.values);
|
||||
return {
|
||||
"template": lib_plankton.string.coin("UPDATE {{table_name}} SET {{assignments}}{{macro_where}};", {
|
||||
"table_name": wrap_name(description_update.table_name, { "active": options.wrap_names }),
|
||||
"table_name": options.wrap_name(description_update.table_name),
|
||||
"assignments": (field_names
|
||||
.map((field_name) => lib_plankton.string.coin("{{name}} = $value_{{suffix}}", {
|
||||
"name": wrap_name(field_name, { "active": options.wrap_names }),
|
||||
"name": options.wrap_name(field_name),
|
||||
"suffix": field_name,
|
||||
}))
|
||||
.join(", ")),
|
||||
|
@ -6996,11 +7005,11 @@ var lib_plankton;
|
|||
function sql_common_formulation_delete(description_delete, options = {}) {
|
||||
var _a, _b;
|
||||
options = Object.assign({
|
||||
"wrap_names": true,
|
||||
"wrap_name": (x => x),
|
||||
}, options);
|
||||
return {
|
||||
"template": lib_plankton.string.coin("DELETE FROM {{table_name}}{{macro_where}};", {
|
||||
"table_name": wrap_name(description_delete.table_name, { "active": options.wrap_names }),
|
||||
"table_name": options.wrap_name(description_delete.table_name),
|
||||
"macro_where": ((((_a = description_delete.condition) !== null && _a !== void 0 ? _a : null) === null)
|
||||
? ""
|
||||
: lib_plankton.string.coin(" WHERE {{expression}}", {
|
||||
|
@ -7016,15 +7025,15 @@ var lib_plankton;
|
|||
function sql_common_formulation_select(description_select, options = {}) {
|
||||
var _a, _b, _c, _d, _e, _f, _g;
|
||||
options = Object.assign({
|
||||
"wrap_names": true,
|
||||
"wrap_name": (x => x),
|
||||
}, options);
|
||||
return {
|
||||
"template": lib_plankton.string.coin("SELECT {{fields}} FROM {{source}}{{macro_where}}{{macro_group_by}}{{macro_having}}{{macro_order_by}}{{macro_limit}};", {
|
||||
"source": wrap_name(description_select.source, { "active": options.wrap_names }),
|
||||
"source": options.wrap_name(description_select.source),
|
||||
"fields": ((((_a = description_select.fields) !== null && _a !== void 0 ? _a : null) === null)
|
||||
? "*"
|
||||
: (description_select.fields
|
||||
.map(field_name => lib_plankton.string.coin("{{name}}", { "name": wrap_name(field_name, { "active": options.wrap_names }) }))
|
||||
.map(field_name => lib_plankton.string.coin("{{name}}", { "name": options.wrap_name(field_name) }))
|
||||
.join(","))),
|
||||
"macro_where": ((((_b = description_select.condition) !== null && _b !== void 0 ? _b : null) === null)
|
||||
? ""
|
||||
|
@ -7090,6 +7099,12 @@ var lib_plankton;
|
|||
};
|
||||
}
|
||||
database.sqlite_make = sqlite_make;
|
||||
/**
|
||||
*/
|
||||
function sqlite_wrap_name(name) {
|
||||
return ("`" + name + "`");
|
||||
}
|
||||
database.sqlite_wrap_name = sqlite_wrap_name;
|
||||
/**
|
||||
*/
|
||||
function sqlite_init(subject) {
|
||||
|
@ -7198,7 +7213,8 @@ var lib_plankton;
|
|||
*/
|
||||
function sqlite_formulation_create_table(description_create_table) {
|
||||
return database.sql_common_formulation_create_table(description_create_table, {
|
||||
"auto_increment_keyword": "INTEGER NOT NULL AUTOINCREMENT",
|
||||
"auto_increment_keyword": "AUTOINCREMENT",
|
||||
"auto_increment_special": null,
|
||||
"omit_comments": true,
|
||||
"type_map": {
|
||||
"boolean": "INTEGER",
|
||||
|
@ -7208,6 +7224,7 @@ var lib_plankton;
|
|||
"string_long": "TEXT",
|
||||
"float": "REAL",
|
||||
},
|
||||
"wrap_name": sqlite_wrap_name,
|
||||
});
|
||||
}
|
||||
database.sqlite_formulation_create_table = sqlite_formulation_create_table;
|
||||
|
@ -7221,7 +7238,9 @@ var lib_plankton;
|
|||
/**
|
||||
*/
|
||||
function sqlite_formulation_insert(description_insert) {
|
||||
return database.sql_common_formulation_insert(description_insert);
|
||||
return database.sql_common_formulation_insert(description_insert, {
|
||||
"wrap_name": sqlite_wrap_name,
|
||||
});
|
||||
}
|
||||
database.sqlite_formulation_insert = sqlite_formulation_insert;
|
||||
/**
|
||||
|
@ -7233,7 +7252,9 @@ var lib_plankton;
|
|||
/**
|
||||
*/
|
||||
function sqlite_formulation_update(description_update) {
|
||||
return database.sql_common_formulation_update(description_update);
|
||||
return database.sql_common_formulation_update(description_update, {
|
||||
"wrap_name": sqlite_wrap_name,
|
||||
});
|
||||
}
|
||||
database.sqlite_formulation_update = sqlite_formulation_update;
|
||||
/**
|
||||
|
@ -7245,7 +7266,9 @@ var lib_plankton;
|
|||
/**
|
||||
*/
|
||||
function sqlite_formulation_delete(description_delete) {
|
||||
return database.sql_common_formulation_delete(description_delete);
|
||||
return database.sql_common_formulation_delete(description_delete, {
|
||||
"wrap_name": sqlite_wrap_name,
|
||||
});
|
||||
}
|
||||
database.sqlite_formulation_delete = sqlite_formulation_delete;
|
||||
/**
|
||||
|
@ -7257,7 +7280,9 @@ var lib_plankton;
|
|||
/**
|
||||
*/
|
||||
function sqlite_formulation_select(description_select) {
|
||||
return database.sql_common_formulation_select(description_select);
|
||||
return database.sql_common_formulation_select(description_select, {
|
||||
"wrap_name": sqlite_wrap_name,
|
||||
});
|
||||
}
|
||||
database.sqlite_formulation_select = sqlite_formulation_select;
|
||||
/**
|
||||
|
@ -7271,6 +7296,7 @@ var lib_plankton;
|
|||
function sqlite_database(parameters) {
|
||||
const subject = sqlite_make(parameters);
|
||||
return {
|
||||
"wrap_name": (name) => sqlite_wrap_name(name),
|
||||
"query_free_get": (query) => sqlite_query_free_get(subject, query),
|
||||
"query_free_put": (query) => sqlite_query_free_put(subject, query),
|
||||
"query_free_set": (query) => sqlite_query_free_set(subject, query),
|
||||
|
@ -7312,6 +7338,7 @@ var lib_plankton;
|
|||
*/
|
||||
class class_sqlite {
|
||||
constructor(parameters) { this.subject = database.sqlite_make(parameters); }
|
||||
wrap_name(name) { return database.sqlite_wrap_name(name); }
|
||||
query_free_get(query) { return database.sqlite_query_free_get(this.subject, query); }
|
||||
query_free_put(query) { return database.sqlite_query_free_put(this.subject, query); }
|
||||
query_free_set(query) { return database.sqlite_query_free_set(this.subject, query); }
|
||||
|
@ -7348,7 +7375,6 @@ var lib_plankton;
|
|||
var database;
|
||||
(function (database) {
|
||||
/**
|
||||
* @see https://node-postgres.com/apis/client#new-client
|
||||
*/
|
||||
function postgresql_make(parameters) {
|
||||
var _a;
|
||||
|
@ -7358,17 +7384,24 @@ var lib_plankton;
|
|||
"username": parameters.username,
|
||||
"password": parameters.password,
|
||||
"schema": parameters.schema,
|
||||
"client": null,
|
||||
"pool": null,
|
||||
};
|
||||
}
|
||||
database.postgresql_make = postgresql_make;
|
||||
/**
|
||||
*/
|
||||
function postgresql_wrap_name(name) {
|
||||
return ("" + name + "");
|
||||
}
|
||||
database.postgresql_wrap_name = postgresql_wrap_name;
|
||||
/**
|
||||
* https://node-postgres.com/apis/pool
|
||||
*/
|
||||
function postgresql_init(subject) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (subject.client === null) {
|
||||
if (subject.pool === null) {
|
||||
const nm_pg = require("pg");
|
||||
subject.client = (new nm_pg.Client({
|
||||
subject.pool = (new nm_pg.Pool({
|
||||
"host": subject.host,
|
||||
"port": subject.port,
|
||||
"database": subject.schema,
|
||||
|
@ -7417,58 +7450,54 @@ var lib_plankton;
|
|||
}
|
||||
/**
|
||||
* @author fenris
|
||||
* @see https://node-postgres.com/apis/client#clientquery
|
||||
* @see https://node-postgres.com/apis/pool#poolquery
|
||||
*/
|
||||
function postgresql_query_free_get(subject, query) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield postgresql_init(subject);
|
||||
const query_adjusted = postgresql_adjust_query(subject, query);
|
||||
yield subject.client.connect();
|
||||
const result = yield subject.client.query({
|
||||
const result = yield subject.pool.query({
|
||||
"text": query_adjusted.template,
|
||||
"values": query_adjusted.arguments,
|
||||
});
|
||||
yield subject.client.end();
|
||||
return result["rows"];
|
||||
});
|
||||
}
|
||||
database.postgresql_query_free_get = postgresql_query_free_get;
|
||||
/**
|
||||
* @author fenris
|
||||
* @see https://node-postgres.com/apis/client#clientquery
|
||||
* @see https://node-postgres.com/apis/pool#poolquery
|
||||
*/
|
||||
function postgresql_query_free_put(subject, query) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield postgresql_init(subject);
|
||||
const query_adjusted = postgresql_adjust_query(subject, query);
|
||||
yield subject.client.connect();
|
||||
const result1 = yield subject.client.query({
|
||||
"text": query_adjusted.template,
|
||||
"values": query_adjusted.arguments,
|
||||
});
|
||||
const result2 = yield subject.client.query({
|
||||
"text": "LASTVAL();",
|
||||
"values": {},
|
||||
});
|
||||
yield subject.client.end();
|
||||
return result2["rows"][0]["LASTVAL"];
|
||||
const result = yield subject.pool.query(query_adjusted.template, query_adjusted.arguments);
|
||||
if (result["rows"].length <= 0) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
const x = result["rows"][0];
|
||||
const keys = Object.keys(x);
|
||||
if (keys.length <= 0) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
return x[Object.keys(x)[0]];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
database.postgresql_query_free_put = postgresql_query_free_put;
|
||||
/**
|
||||
* @author fenris
|
||||
* @see https://node-postgres.com/apis/client#clientquery
|
||||
* @see https://node-postgres.com/apis/pool#poolquery
|
||||
*/
|
||||
function postgresql_query_free_set(subject, query) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield postgresql_init(subject);
|
||||
const query_adjusted = postgresql_adjust_query(subject, query);
|
||||
yield subject.client.connect();
|
||||
const result = yield subject.client.query({
|
||||
"text": query_adjusted.template,
|
||||
"values": query_adjusted.arguments,
|
||||
});
|
||||
yield subject.client.end();
|
||||
const result = yield subject.pool.query(query_adjusted.template, query_adjusted.arguments);
|
||||
return result["rowCount"];
|
||||
});
|
||||
}
|
||||
|
@ -7477,7 +7506,8 @@ var lib_plankton;
|
|||
*/
|
||||
function postgresql_formulation_create_table(description_create_table) {
|
||||
return database.sql_common_formulation_create_table(description_create_table, {
|
||||
"auto_increment_keyword": "SERIAL",
|
||||
"auto_increment_keyword": "",
|
||||
"auto_increment_special": "SERIAL",
|
||||
"omit_comments": false,
|
||||
"type_map": {
|
||||
"boolean": "BOOLEAN",
|
||||
|
@ -7487,7 +7517,7 @@ var lib_plankton;
|
|||
"string_long": "TEXT",
|
||||
"float": "REAL",
|
||||
},
|
||||
"wrap_names": false,
|
||||
"wrap_name": postgresql_wrap_name,
|
||||
});
|
||||
}
|
||||
database.postgresql_formulation_create_table = postgresql_formulation_create_table;
|
||||
|
@ -7501,7 +7531,10 @@ var lib_plankton;
|
|||
/**
|
||||
*/
|
||||
function postgresql_formulation_insert(description_insert) {
|
||||
return database.sql_common_formulation_insert(description_insert, { "wrap_names": false });
|
||||
return database.sql_common_formulation_insert(description_insert, {
|
||||
"wrap_name": postgresql_wrap_name,
|
||||
"set_returning": true
|
||||
});
|
||||
}
|
||||
database.postgresql_formulation_insert = postgresql_formulation_insert;
|
||||
/**
|
||||
|
@ -7513,7 +7546,9 @@ var lib_plankton;
|
|||
/**
|
||||
*/
|
||||
function postgresql_formulation_update(description_update) {
|
||||
return database.sql_common_formulation_update(description_update, { "wrap_names": false });
|
||||
return database.sql_common_formulation_update(description_update, {
|
||||
"wrap_name": postgresql_wrap_name,
|
||||
});
|
||||
}
|
||||
database.postgresql_formulation_update = postgresql_formulation_update;
|
||||
/**
|
||||
|
@ -7525,7 +7560,9 @@ var lib_plankton;
|
|||
/**
|
||||
*/
|
||||
function postgresql_formulation_delete(description_delete) {
|
||||
return database.sql_common_formulation_delete(description_delete, { "wrap_names": false });
|
||||
return database.sql_common_formulation_delete(description_delete, {
|
||||
"wrap_name": postgresql_wrap_name,
|
||||
});
|
||||
}
|
||||
database.postgresql_formulation_delete = postgresql_formulation_delete;
|
||||
/**
|
||||
|
@ -7537,7 +7574,9 @@ var lib_plankton;
|
|||
/**
|
||||
*/
|
||||
function postgresql_formulation_select(description_select) {
|
||||
return database.sql_common_formulation_select(description_select, { "wrap_names": false });
|
||||
return database.sql_common_formulation_select(description_select, {
|
||||
"wrap_name": postgresql_wrap_name,
|
||||
});
|
||||
}
|
||||
database.postgresql_formulation_select = postgresql_formulation_select;
|
||||
/**
|
||||
|
@ -7551,6 +7590,7 @@ var lib_plankton;
|
|||
function postgresql_database(parameters) {
|
||||
const subject = postgresql_make(parameters);
|
||||
return {
|
||||
"wrap_name": (name) => postgresql_wrap_name(name),
|
||||
"query_free_get": (query) => postgresql_query_free_get(subject, query),
|
||||
"query_free_put": (query) => postgresql_query_free_put(subject, query),
|
||||
"query_free_set": (query) => postgresql_query_free_set(subject, query),
|
||||
|
@ -7592,6 +7632,7 @@ var lib_plankton;
|
|||
*/
|
||||
class class_postgresql {
|
||||
constructor(parameters) { this.subject = database.postgresql_make(parameters); }
|
||||
wrap_name(name) { return database.postgresql_wrap_name(name); }
|
||||
query_free_get(query) { return database.postgresql_query_free_get(this.subject, query); }
|
||||
query_free_put(query) { return database.postgresql_query_free_put(this.subject, query); }
|
||||
query_free_set(query) { return database.postgresql_query_free_set(this.subject, query); }
|
||||
|
@ -7633,6 +7674,12 @@ var lib_plankton;
|
|||
throw (new Error("not implemented"));
|
||||
}
|
||||
database.mysql_make = mysql_make;
|
||||
/**
|
||||
*/
|
||||
function mysql_wrap_name(name) {
|
||||
return ("`" + name + "`");
|
||||
}
|
||||
database.mysql_wrap_name = mysql_wrap_name;
|
||||
/**
|
||||
*/
|
||||
function mysql_init(subject) {
|
||||
|
@ -7690,6 +7737,7 @@ var lib_plankton;
|
|||
"string_long": "TEXT",
|
||||
"float": "REAL",
|
||||
},
|
||||
"wrap_name": mysql_wrap_name,
|
||||
});
|
||||
}
|
||||
database.mysql_formulation_create_table = mysql_formulation_create_table;
|
||||
|
@ -7703,7 +7751,9 @@ var lib_plankton;
|
|||
/**
|
||||
*/
|
||||
function mysql_formulation_insert(description_insert) {
|
||||
return database.sql_common_formulation_insert(description_insert);
|
||||
return database.sql_common_formulation_insert(description_insert, {
|
||||
"wrap_name": mysql_wrap_name,
|
||||
});
|
||||
}
|
||||
database.mysql_formulation_insert = mysql_formulation_insert;
|
||||
/**
|
||||
|
@ -7715,7 +7765,9 @@ var lib_plankton;
|
|||
/**
|
||||
*/
|
||||
function mysql_formulation_update(description_update) {
|
||||
return database.sql_common_formulation_update(description_update);
|
||||
return database.sql_common_formulation_update(description_update, {
|
||||
"wrap_name": mysql_wrap_name,
|
||||
});
|
||||
}
|
||||
database.mysql_formulation_update = mysql_formulation_update;
|
||||
/**
|
||||
|
@ -7727,7 +7779,9 @@ var lib_plankton;
|
|||
/**
|
||||
*/
|
||||
function mysql_formulation_delete(description_delete) {
|
||||
return database.sql_common_formulation_delete(description_delete);
|
||||
return database.sql_common_formulation_delete(description_delete, {
|
||||
"wrap_name": mysql_wrap_name,
|
||||
});
|
||||
}
|
||||
database.mysql_formulation_delete = mysql_formulation_delete;
|
||||
/**
|
||||
|
@ -7739,7 +7793,9 @@ var lib_plankton;
|
|||
/**
|
||||
*/
|
||||
function mysql_formulation_select(description_select) {
|
||||
return database.sql_common_formulation_select(description_select);
|
||||
return database.sql_common_formulation_select(description_select, {
|
||||
"wrap_name": mysql_wrap_name,
|
||||
});
|
||||
}
|
||||
database.mysql_formulation_select = mysql_formulation_select;
|
||||
/**
|
||||
|
@ -7753,6 +7809,7 @@ var lib_plankton;
|
|||
function mysql_database(parameters) {
|
||||
const subject = mysql_make(parameters);
|
||||
return {
|
||||
"wrap_name": (name) => mysql_wrap_name(name),
|
||||
"query_free_get": (query) => mysql_query_free_get(subject, query),
|
||||
"query_free_put": (query) => mysql_query_free_put(subject, query),
|
||||
"query_free_set": (query) => mysql_query_free_set(subject, query),
|
||||
|
@ -7794,6 +7851,7 @@ var lib_plankton;
|
|||
*/
|
||||
class class_mysql {
|
||||
constructor(parameters) { this.subject = database.mysql_make(parameters); }
|
||||
wrap_name(name) { return database.mysql_wrap_name(name); }
|
||||
query_free_get(query) { return database.mysql_query_free_get(this.subject, query); }
|
||||
query_free_put(query) { return database.mysql_query_free_put(this.subject, query); }
|
||||
query_free_set(query) { return database.mysql_query_free_set(this.subject, query); }
|
||||
|
@ -7821,7 +7879,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
|
@ -8234,7 +8292,8 @@ var lib_plankton;
|
|||
return __generator(this, function (_a) {
|
||||
return [2 /*return*/, subject.database_implementation.query_insert({
|
||||
"table_name": subject.table_name,
|
||||
"values": value
|
||||
"values": value,
|
||||
"returning": subject.key_name
|
||||
})];
|
||||
});
|
||||
});
|
||||
|
@ -8248,8 +8307,8 @@ var lib_plankton;
|
|||
return [2 /*return*/, (subject.database_implementation.query_update({
|
||||
"table_name": subject.table_name,
|
||||
"values": value,
|
||||
"condition": lib_plankton.string.coin("`{{key_name}}` = $key", {
|
||||
"key_name": subject.key_name
|
||||
"condition": lib_plankton.string.coin("{{key_name}} = $key", {
|
||||
"key_name": subject.database_implementation.wrap_name(subject.key_name)
|
||||
}),
|
||||
"arguments": {
|
||||
"key": key
|
||||
|
@ -8268,8 +8327,8 @@ var lib_plankton;
|
|||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, subject.database_implementation.query_delete({
|
||||
"table_name": subject.table_name,
|
||||
"condition": lib_plankton.string.coin("`{{key_name}}` = $key", {
|
||||
"key_name": subject.key_name
|
||||
"condition": lib_plankton.string.coin("{{key_name}} = $key", {
|
||||
"key_name": subject.database_implementation.wrap_name(subject.key_name)
|
||||
}),
|
||||
"arguments": {
|
||||
"key": key
|
||||
|
@ -8293,8 +8352,8 @@ var lib_plankton;
|
|||
case 0: return [4 /*yield*/, subject.database_implementation.query_select({
|
||||
"source": subject.table_name,
|
||||
"fields": null,
|
||||
"condition": lib_plankton.string.coin("`{{key_name}}` = $key", {
|
||||
"key_name": subject.key_name
|
||||
"condition": lib_plankton.string.coin("{{key_name}} = $key", {
|
||||
"key_name": subject.database_implementation.wrap_name(subject.key_name)
|
||||
}),
|
||||
"arguments": {
|
||||
"key": key
|
||||
|
@ -8442,8 +8501,9 @@ var lib_plankton;
|
|||
return {
|
||||
"condition": lib_string.coin("({{clauses}})", {
|
||||
"clauses": (subject.key_names
|
||||
.map(function (key_name) { return lib_plankton.string.coin("(`{{name}}` = $key_{{name}})", {
|
||||
"name": key_name
|
||||
.map(function (key_name) { return lib_plankton.string.coin("({{name1}} = $key_{{name2}})", {
|
||||
"name1": subject.database_implementation.wrap_name(key_name),
|
||||
"name2": key_name
|
||||
}); })
|
||||
.join(" AND "))
|
||||
}),
|
||||
|
@ -8692,7 +8752,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
|
@ -10002,7 +10062,8 @@ var lib_plankton;
|
|||
}
|
||||
}
|
||||
const body = ([http.enum_method.post, http.enum_method.put, http.enum_method.patch].includes(method)
|
||||
? Buffer["from"](lines.join(linebreak))
|
||||
// @ts-ignore
|
||||
? Buffer.from(lines.join(linebreak))
|
||||
: null);
|
||||
const request = {
|
||||
// TODO
|
||||
|
@ -10063,7 +10124,8 @@ var lib_plankton;
|
|||
headers[key.toLowerCase()] = value;
|
||||
}
|
||||
}
|
||||
const body = Buffer["from"](lines.join(linebreak));
|
||||
// @ts-ignore
|
||||
const body = Buffer.from(lines.join(linebreak));
|
||||
const response = {
|
||||
// TODO
|
||||
"version": version,
|
||||
|
|
634
source/conf.ts
634
source/conf.ts
|
@ -221,8 +221,7 @@ namespace _espe.conf
|
|||
conf_raw : any
|
||||
) : void
|
||||
{
|
||||
switch (conf_raw["version"]) {
|
||||
case 1: {
|
||||
const version : int = (conf_raw["version"] ?? 4);
|
||||
_data = {
|
||||
"general": (
|
||||
((node_general) => ({
|
||||
|
@ -230,188 +229,36 @@ namespace _espe.conf
|
|||
"verification_secret": (node_general["verification_secret"] ?? null),
|
||||
})) (conf_raw["general"] ?? {})
|
||||
),
|
||||
"log": [
|
||||
"log": (
|
||||
(() => {
|
||||
switch (version) {
|
||||
case 1: {
|
||||
return [
|
||||
{
|
||||
"kind": "stdout",
|
||||
"data": {
|
||||
"threshold": ((conf_raw["general"] ?? {})["verbosity"] ?? "notice"),
|
||||
}
|
||||
},
|
||||
],
|
||||
"server": (
|
||||
((node_server) => ({
|
||||
"host": "::",
|
||||
"port": (node_server["port"] ?? 4916),
|
||||
"path_base": (node_server["path_base"] ?? ""),
|
||||
})) (conf_raw["server"] ?? {})
|
||||
),
|
||||
"database": (
|
||||
((node_database) => {
|
||||
const kind : string = (node_database["kind"] ?? "sqlite");
|
||||
const node_database_data_raw = (node_database["data"] ?? {});
|
||||
switch (kind) {
|
||||
case "sqlite": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
"path": (node_database_data_raw["path"] ?? "data.sqlite"),
|
||||
}
|
||||
};
|
||||
];
|
||||
break;
|
||||
}
|
||||
case "postgresql": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": node_database_data_raw,
|
||||
};
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw (new Error("unhandled"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}) (conf_raw["database"] ?? {})
|
||||
),
|
||||
"email_sending": (
|
||||
((node_email_sending) => {
|
||||
const kind : string = (node_email_sending["kind"] ?? "console");
|
||||
const data_raw = (node_email_sending["data"] ?? {});
|
||||
switch (kind) {
|
||||
case "regular": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
"smtp_credentials": (data_raw["smtp_credentials"] ?? null),
|
||||
"sender": data_raw["sender"],
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "redirect": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
"smtp_credentials": (data_raw["smtp_credentials"] ?? null),
|
||||
"sender": data_raw["sender"],
|
||||
"target": data_raw["target"],
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "console": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "drop": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw (new Error("unhandled"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}) (conf_raw["email_sending"] ?? {})
|
||||
),
|
||||
"session_management": (
|
||||
((node_session_management) => ({
|
||||
"in_memory": (node_session_management["in_memory"] ?? true),
|
||||
"drop_all_at_start": (node_session_management["drop_all_at_start"] ?? true),
|
||||
"lifetime": (node_session_management["lifetime"] ?? 900),
|
||||
})) (conf_raw["session_management"] ?? {})
|
||||
),
|
||||
"settings": (
|
||||
((node_settings) => ({
|
||||
"organisation": {
|
||||
"name": ((node_settings["organisation"] ?? {})["name"] ?? "Example Orginsation"), // TODO: mandatory?
|
||||
"domain": ((node_settings["organisation"] ?? {})["domain"] ?? "example.org"), // TODO: mandatory?
|
||||
},
|
||||
"misc": (
|
||||
((node_settings_misc) => ({
|
||||
"prefix_for_veiled_email_addresses": (node_settings_misc["prefix_for_veiled_email_addresses"] ?? "member-"),
|
||||
"facultative_membership_number": (node_settings_misc["facultative_membership_number"] ?? false),
|
||||
"auto_register": (node_settings_misc["auto_register"] ?? false),
|
||||
})) (node_settings["misc"] ?? {})
|
||||
),
|
||||
"summon_email": (
|
||||
((node_settings_summon_email) => ({
|
||||
"remark": (node_settings_summon_email["remark"] ?? null),
|
||||
})) (node_settings["summon_email"] ?? {})
|
||||
),
|
||||
"password_policy": (
|
||||
((node_settings_password_policy) => ({
|
||||
"minimum_length": (
|
||||
("minimum_length" in node_settings_password_policy)
|
||||
? node_settings_password_policy["minimum_length"]
|
||||
: 8
|
||||
),
|
||||
"maximum_length": (
|
||||
("maximum_length" in node_settings_password_policy)
|
||||
? node_settings_password_policy["maximum_length"]
|
||||
: 240
|
||||
),
|
||||
"must_contain_letter": (node_settings_password_policy["must_contain_letter"] ?? true),
|
||||
"must_contain_number": (node_settings_password_policy["must_contain_number"] ?? true),
|
||||
"must_contain_special_character": (node_settings_password_policy["must_contain_special_character"] ?? true),
|
||||
})) (node_settings["password_policy"] ?? {})
|
||||
),
|
||||
"password_change": (
|
||||
((node_settings_password_change) => ({
|
||||
"cooldown_time": (node_settings_password_change["cooldown_time"] ?? 86400),
|
||||
})) (node_settings["password_change"] ?? {})
|
||||
),
|
||||
"name_index": (
|
||||
((node_settings_password_policy) => ({
|
||||
"veil": (node_settings_password_policy["veil"] ?? true),
|
||||
"salt": (node_settings_password_policy["salt"] ?? ""),
|
||||
})) (node_settings["name_index"] ?? {})
|
||||
),
|
||||
"connections": (
|
||||
((node_settings_connections) => ({
|
||||
"frontend_url_base": (node_settings_connections["frontend_url_base"] ?? null),
|
||||
"login_url": (node_settings_connections["login_url"] ?? null),
|
||||
})) (node_settings["connections"] ?? {})
|
||||
),
|
||||
})) (conf_raw["settings"] ?? {})
|
||||
),
|
||||
"admins": (conf_raw["admins"] ?? []),
|
||||
"outputs": (
|
||||
((node_output) => (
|
||||
("authelia" in node_output)
|
||||
? [
|
||||
case 2:
|
||||
case 3:
|
||||
case 4: {
|
||||
const node_log = (
|
||||
conf_raw["log"]
|
||||
??
|
||||
[
|
||||
{
|
||||
"kind": "authelia_file",
|
||||
"kind": "stdout",
|
||||
"data": {
|
||||
"path": node_output["authelia"],
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
: [
|
||||
]
|
||||
)) (conf_raw["output"] ?? {})
|
||||
),
|
||||
};
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
_data = {
|
||||
"general": (
|
||||
((node_general) => ({
|
||||
"language": (node_general["language"] ?? null),
|
||||
"verification_secret": (node_general["verification_secret"] ?? null),
|
||||
})) (conf_raw["general"] ?? {})
|
||||
),
|
||||
"log": (
|
||||
((node_log) => node_log.map(
|
||||
);
|
||||
return (
|
||||
node_log.map(
|
||||
(node_log_entry : any) => ({
|
||||
"kind": node_log_entry["kind"],
|
||||
"data": Object.assign(
|
||||
|
@ -422,399 +269,29 @@ namespace _espe.conf
|
|||
(node_log_entry["data"] ?? {})
|
||||
)
|
||||
})
|
||||
)) (
|
||||
conf_raw["log"]
|
||||
??
|
||||
[
|
||||
{
|
||||
"kind": "console",
|
||||
"data": {
|
||||
}
|
||||
},
|
||||
]
|
||||
)
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}) ()
|
||||
),
|
||||
"server": (
|
||||
((node_server) => ({
|
||||
"host": "::",
|
||||
"port": (node_server["port"] ?? 4916),
|
||||
"path_base": (node_server["path_base"] ?? ""),
|
||||
})) (conf_raw["server"] ?? {})
|
||||
),
|
||||
"database": (
|
||||
((node_database) => {
|
||||
const kind : string = (node_database["kind"] ?? "sqlite");
|
||||
const node_database_data_raw = (node_database["data"] ?? {});
|
||||
switch (kind) {
|
||||
case "sqlite": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
"path": (node_database_data_raw["path"] ?? "data.sqlite"),
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "postgresql": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": node_database_data_raw,
|
||||
};
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw (new Error("unhandled"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}) (conf_raw["database"] ?? {})
|
||||
),
|
||||
"email_sending": (
|
||||
((node_email_sending) => {
|
||||
const kind : string = (node_email_sending["kind"] ?? "console");
|
||||
const data_raw = (node_email_sending["data"] ?? {});
|
||||
switch (kind) {
|
||||
case "regular": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
"smtp_credentials": (data_raw["smtp_credentials"] ?? null),
|
||||
"sender": data_raw["sender"],
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "redirect": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
"smtp_credentials": (data_raw["smtp_credentials"] ?? null),
|
||||
"sender": data_raw["sender"],
|
||||
"target": data_raw["target"],
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "console": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "drop": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw (new Error("unhandled"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}) (conf_raw["email_sending"] ?? {})
|
||||
),
|
||||
"session_management": (
|
||||
((node_session_management) => ({
|
||||
"in_memory": (node_session_management["in_memory"] ?? true),
|
||||
"drop_all_at_start": (node_session_management["drop_all_at_start"] ?? true),
|
||||
"lifetime": (node_session_management["lifetime"] ?? 900),
|
||||
})) (conf_raw["session_management"] ?? {})
|
||||
),
|
||||
"settings": (
|
||||
((node_settings) => ({
|
||||
"organisation": {
|
||||
"name": ((node_settings["organisation"] ?? {})["name"] ?? "Example Orginsation"), // TODO: mandatory?
|
||||
"domain": ((node_settings["organisation"] ?? {})["domain"] ?? "example.org"), // TODO: mandatory?
|
||||
},
|
||||
"misc": (
|
||||
((node_settings_misc) => ({
|
||||
"prefix_for_veiled_email_addresses": (node_settings_misc["prefix_for_veiled_email_addresses"] ?? "member-"),
|
||||
"facultative_membership_number": (node_settings_misc["facultative_membership_number"] ?? false),
|
||||
"auto_register": (node_settings_misc["auto_register"] ?? false),
|
||||
})) (node_settings["misc"] ?? {})
|
||||
),
|
||||
"summon_email": (
|
||||
((node_settings_summon_email) => ({
|
||||
"remark": (node_settings_summon_email["remark"] ?? null),
|
||||
})) (node_settings["summon_email"] ?? {})
|
||||
),
|
||||
"password_policy": (
|
||||
((node_settings_password_policy) => ({
|
||||
"minimum_length": (
|
||||
("minimum_length" in node_settings_password_policy)
|
||||
? node_settings_password_policy["minimum_length"]
|
||||
: 8
|
||||
),
|
||||
"maximum_length": (
|
||||
("maximum_length" in node_settings_password_policy)
|
||||
? node_settings_password_policy["maximum_length"]
|
||||
: 240
|
||||
),
|
||||
"must_contain_letter": (node_settings_password_policy["must_contain_letter"] ?? true),
|
||||
"must_contain_number": (node_settings_password_policy["must_contain_number"] ?? true),
|
||||
"must_contain_special_character": (node_settings_password_policy["must_contain_special_character"] ?? true),
|
||||
})) (node_settings["password_policy"] ?? {})
|
||||
),
|
||||
"password_change": (
|
||||
((node_settings_password_change) => ({
|
||||
"cooldown_time": (node_settings_password_change["cooldown_time"] ?? 86400),
|
||||
})) (node_settings["password_change"] ?? {})
|
||||
),
|
||||
"name_index": (
|
||||
((node_settings_password_policy) => ({
|
||||
"veil": (node_settings_password_policy["veil"] ?? true),
|
||||
"salt": (node_settings_password_policy["salt"] ?? ""),
|
||||
})) (node_settings["name_index"] ?? {})
|
||||
),
|
||||
"connections": (
|
||||
((node_settings_connections) => ({
|
||||
"frontend_url_base": (node_settings_connections["frontend_url_base"] ?? null),
|
||||
"login_url": (node_settings_connections["login_url"] ?? null),
|
||||
})) (node_settings["connections"] ?? {})
|
||||
),
|
||||
})) (conf_raw["settings"] ?? {})
|
||||
),
|
||||
"admins": (conf_raw["admins"] ?? []),
|
||||
"outputs": (
|
||||
((node_output) => (
|
||||
("authelia" in node_output)
|
||||
? [
|
||||
{
|
||||
"kind": "authelia_file",
|
||||
"data": {
|
||||
"path": node_output["authelia"],
|
||||
}
|
||||
}
|
||||
]
|
||||
: [
|
||||
]
|
||||
)) (conf_raw["output"] ?? {})
|
||||
),
|
||||
};
|
||||
break;
|
||||
}
|
||||
"host": (() => {
|
||||
switch (version) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3: {
|
||||
_data = {
|
||||
"general": (
|
||||
((node_general) => ({
|
||||
"language": (node_general["language"] ?? null),
|
||||
"verification_secret": (node_general["verification_secret"] ?? null),
|
||||
})) (conf_raw["general"] ?? {})
|
||||
),
|
||||
"log": (
|
||||
((node_log) => node_log.map(
|
||||
(node_log_entry : any) => ({
|
||||
"kind": node_log_entry["kind"],
|
||||
"data": Object.assign(
|
||||
{
|
||||
"format": "human_readable",
|
||||
"threshold": "notice",
|
||||
},
|
||||
(node_log_entry["data"] ?? {})
|
||||
)
|
||||
})
|
||||
)) (
|
||||
conf_raw["log"]
|
||||
??
|
||||
[
|
||||
{
|
||||
"kind": "console",
|
||||
"data": {
|
||||
}
|
||||
},
|
||||
]
|
||||
)
|
||||
),
|
||||
"server": (
|
||||
((node_server) => ({
|
||||
"host": "::",
|
||||
"port": (node_server["port"] ?? 4916),
|
||||
"path_base": (node_server["path_base"] ?? ""),
|
||||
})) (conf_raw["server"] ?? {})
|
||||
),
|
||||
"database": (
|
||||
((node_database) => {
|
||||
const kind : string = (node_database["kind"] ?? "sqlite");
|
||||
const node_database_data_raw = (node_database["data"] ?? {});
|
||||
switch (kind) {
|
||||
case "sqlite": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
"path": (node_database_data_raw["path"] ?? "data.sqlite"),
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "postgresql": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": node_database_data_raw,
|
||||
};
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw (new Error("unhandled"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}) (conf_raw["database"] ?? {})
|
||||
),
|
||||
"email_sending": (
|
||||
((node_email_sending) => {
|
||||
const kind : string = (node_email_sending["kind"] ?? "console");
|
||||
const data_raw = (node_email_sending["data"] ?? {});
|
||||
switch (kind) {
|
||||
case "regular": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
"smtp_credentials": (data_raw["smtp_credentials"] ?? null),
|
||||
"sender": data_raw["sender"],
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "redirect": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
"smtp_credentials": (data_raw["smtp_credentials"] ?? null),
|
||||
"sender": data_raw["sender"],
|
||||
"target": data_raw["target"],
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "console": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "drop": {
|
||||
return {
|
||||
"kind": kind,
|
||||
"data": {
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw (new Error("unhandled"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}) (conf_raw["email_sending"] ?? {})
|
||||
),
|
||||
"session_management": (
|
||||
((node_session_management) => ({
|
||||
"in_memory": (node_session_management["in_memory"] ?? true),
|
||||
"drop_all_at_start": (node_session_management["drop_all_at_start"] ?? true),
|
||||
"lifetime": (node_session_management["lifetime"] ?? 900),
|
||||
})) (conf_raw["session_management"] ?? {})
|
||||
),
|
||||
"settings": (
|
||||
((node_settings) => ({
|
||||
"organisation": {
|
||||
"name": ((node_settings["organisation"] ?? {})["name"] ?? "Example Orginsation"), // TODO: mandatory?
|
||||
"domain": ((node_settings["organisation"] ?? {})["domain"] ?? "example.org"), // TODO: mandatory?
|
||||
},
|
||||
"misc": (
|
||||
((node_settings_misc) => ({
|
||||
"prefix_for_veiled_email_addresses": (node_settings_misc["prefix_for_veiled_email_addresses"] ?? "member-"),
|
||||
"facultative_membership_number": (node_settings_misc["facultative_membership_number"] ?? false),
|
||||
"auto_register": (node_settings_misc["auto_register"] ?? false),
|
||||
})) (node_settings["misc"] ?? {})
|
||||
),
|
||||
"summon_email": (
|
||||
((node_settings_summon_email) => ({
|
||||
"remark": (node_settings_summon_email["remark"] ?? null),
|
||||
})) (node_settings["summon_email"] ?? {})
|
||||
),
|
||||
"password_policy": (
|
||||
((node_settings_password_policy) => ({
|
||||
"minimum_length": (
|
||||
("minimum_length" in node_settings_password_policy)
|
||||
? node_settings_password_policy["minimum_length"]
|
||||
: 8
|
||||
),
|
||||
"maximum_length": (
|
||||
("maximum_length" in node_settings_password_policy)
|
||||
? node_settings_password_policy["maximum_length"]
|
||||
: 240
|
||||
),
|
||||
"must_contain_letter": (node_settings_password_policy["must_contain_letter"] ?? true),
|
||||
"must_contain_number": (node_settings_password_policy["must_contain_number"] ?? true),
|
||||
"must_contain_special_character": (node_settings_password_policy["must_contain_special_character"] ?? true),
|
||||
})) (node_settings["password_policy"] ?? {})
|
||||
),
|
||||
"password_change": (
|
||||
((node_settings_password_change) => ({
|
||||
"cooldown_time": (node_settings_password_change["cooldown_time"] ?? 86400),
|
||||
})) (node_settings["password_change"] ?? {})
|
||||
),
|
||||
"name_index": (
|
||||
((node_settings_password_policy) => ({
|
||||
"veil": (node_settings_password_policy["veil"] ?? true),
|
||||
"salt": (node_settings_password_policy["salt"] ?? ""),
|
||||
})) (node_settings["name_index"] ?? {})
|
||||
),
|
||||
"connections": (
|
||||
((node_settings_connections) => ({
|
||||
"frontend_url_base": (node_settings_connections["frontend_url_base"] ?? null),
|
||||
"login_url": (node_settings_connections["login_url"] ?? null),
|
||||
})) (node_settings["connections"] ?? {})
|
||||
),
|
||||
})) (conf_raw["settings"] ?? {})
|
||||
),
|
||||
"admins": (conf_raw["admins"] ?? []),
|
||||
"outputs": (conf_raw["outputs"] ?? []),
|
||||
};
|
||||
return "::";
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
_data = {
|
||||
"general": (
|
||||
((node_general) => ({
|
||||
"language": (node_general["language"] ?? null),
|
||||
"verification_secret": (node_general["verification_secret"] ?? null),
|
||||
})) (conf_raw["general"] ?? {})
|
||||
),
|
||||
"log": (
|
||||
((node_log) => node_log.map(
|
||||
(node_log_entry : any) => ({
|
||||
"kind": node_log_entry["kind"],
|
||||
"data": Object.assign(
|
||||
{
|
||||
"format": "human_readable",
|
||||
"threshold": "notice",
|
||||
},
|
||||
(node_log_entry["data"] ?? {})
|
||||
)
|
||||
})
|
||||
)) (
|
||||
conf_raw["log"]
|
||||
??
|
||||
[
|
||||
{
|
||||
"kind": "console",
|
||||
"data": {
|
||||
return (node_server["host"] ?? "::");
|
||||
break
|
||||
}
|
||||
},
|
||||
]
|
||||
)
|
||||
),
|
||||
"server": (
|
||||
((node_server) => ({
|
||||
"host": (node_server["host"] ?? "::"),
|
||||
}
|
||||
}) (),
|
||||
"port": (node_server["port"] ?? 4916),
|
||||
"path_base": (node_server["path_base"] ?? ""),
|
||||
})) (conf_raw["server"] ?? {})
|
||||
|
@ -958,8 +435,35 @@ namespace _espe.conf
|
|||
})) (conf_raw["settings"] ?? {})
|
||||
),
|
||||
"admins": (conf_raw["admins"] ?? []),
|
||||
"outputs": (
|
||||
((node_outputs) => node_outputs.map(
|
||||
"outputs": (() => {
|
||||
switch (version) {
|
||||
case 1:
|
||||
case 2: {
|
||||
const node_output = (conf_raw["output"] ?? {});
|
||||
return (
|
||||
("authelia" in node_output)
|
||||
?
|
||||
[
|
||||
{
|
||||
"kind": "authelia_file",
|
||||
"data": {
|
||||
"path": node_output["authelia"],
|
||||
}
|
||||
}
|
||||
]
|
||||
:
|
||||
[
|
||||
]
|
||||
);
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
return (conf_raw["outputs"] ?? []);
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
const node_outputs = (conf_raw["outputs"] ?? []);
|
||||
return node_outputs.map(
|
||||
(output_description : {kind : string; data : any;}) => {
|
||||
const kind : string = output_description["kind"];
|
||||
const node_options_data_raw = (output_description["data"] ?? {});
|
||||
|
@ -1005,16 +509,12 @@ namespace _espe.conf
|
|||
}
|
||||
}
|
||||
}
|
||||
)) (conf_raw["outputs"] ?? [])
|
||||
),
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}) (),
|
||||
};
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw (new Error("invalid conf version: " + conf_raw["version"]));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ async function main(
|
|||
break;
|
||||
}
|
||||
case "arc": {
|
||||
return (() => _espe.service.member.output_authelia_call(output_description.data));
|
||||
return (() => _espe.service.member.output_arc(output_description.data));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -937,7 +937,7 @@ namespace _espe.service.member
|
|||
|
||||
/**
|
||||
*/
|
||||
export async function output_authelia_call(
|
||||
export async function output_arc(
|
||||
output_parameters : {
|
||||
http_scheme : ("http" | "https");
|
||||
http_host : string;
|
||||
|
@ -987,7 +987,7 @@ namespace _espe.service.member
|
|||
);
|
||||
if (http_response.status_code !== 200) {
|
||||
lib_plankton.log.warning(
|
||||
"output_authelia_callback_failed",
|
||||
"output_arcback_failed",
|
||||
{
|
||||
"http_response_status_code": http_response.status_code,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue