docs-i18n 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/app/lib/auth-client.ts +21 -0
- package/admin/app/lib/auth.server.ts +62 -0
- package/admin/app/routeTree.gen.ts +21 -3
- package/admin/app/routes/index.tsx +68 -8
- package/admin/app/routes/login.tsx +207 -0
- package/admin/app/server.ts +23 -0
- package/admin/app/styles.css +146 -0
- package/admin/app/worker.ts +61 -0
- package/admin/dist/client/assets/auth-client-DqJZaFZR.js +3 -0
- package/admin/dist/client/assets/login-CQjkiBAF.js +1 -0
- package/admin/dist/client/assets/main-bc5tcdGg.js +18 -0
- package/admin/dist/client/assets/routes-CTPOG_v1.js +3 -0
- package/admin/dist/client/assets/{styles-DJ6QEJmN.css → styles-zS0BbO7e.css} +1 -1
- package/admin/dist/client/assets/useNavigate-CEOVvMjz.js +1 -0
- package/admin/dist/server/assets/{react-dom-CpO9xk_L.js → __tanstack-start-server-fn-resolver-N1N5mZVv.js} +83 -507
- package/admin/dist/server/assets/_tanstack-start-manifest_v-BgMVPPt2.js +21 -0
- package/admin/dist/server/assets/adapter-DjXlUL1J.js +2253 -0
- package/admin/dist/server/assets/auth-client-CoUpyQIM.js +807 -0
- package/admin/dist/server/assets/auth-dSAIPjBw.js +72 -0
- package/admin/dist/server/assets/auth.server-BLVDnTCZ.js +31352 -0
- package/admin/dist/server/assets/bun-sqlite-dialect-C8OaCWSL-BNNY-FoT.js +154 -0
- package/admin/dist/server/assets/compiled-query-CnFG_BVV.js +6967 -0
- package/admin/dist/server/assets/d1-sqlite-dialect-sYHNqBte-Bjz-cybU.js +115 -0
- package/admin/dist/server/assets/dist-C3-e8E2B.js +215 -0
- package/admin/dist/server/assets/dist-CUzFWZag.js +6039 -0
- package/admin/dist/server/assets/{init-DJr2glb3.js → dist-DBv71kqn.js} +21 -381
- package/admin/dist/server/assets/error-CASJ5tIm.js +457 -0
- package/admin/dist/server/assets/error-codes-BhMTGvV6.js +1153 -0
- package/admin/dist/server/assets/init-CJJUsPDL.js +49 -0
- package/admin/dist/server/assets/job-manager-D9Ab9hgu.js +179 -0
- package/admin/dist/server/assets/{jobs-bQfYqSk7.js → jobs-DrEe9YOj.js} +18 -5
- package/admin/dist/server/assets/kysely-adapter-YC8RFPyc.js +2 -0
- package/admin/dist/server/assets/login-SqzTMYOZ.js +228 -0
- package/admin/dist/server/assets/migrator-ZpVZslbq.js +2926 -0
- package/admin/dist/server/assets/{misc-DOk3t9vs.js → misc-BSoYldBT.js} +22 -9
- package/admin/dist/server/assets/{models-CBb8Owe5.js → models-CoviNHUP.js} +1 -1
- package/admin/dist/server/assets/node-sqlite-dialect-BJIaP6lL.js +154 -0
- package/admin/dist/server/assets/{router-DlU_fGDK.js → router-Cxm33tn3.js} +23 -11
- package/admin/dist/server/assets/{routes-pIM0fgUO.js → routes-CxGhew8Z.js} +56 -22
- package/admin/dist/server/assets/{routes-BcfX6iub.js → routes-DtWFPDUc.js} +43 -29
- package/admin/dist/server/assets/sqlite-adapter-CL2EidjD.js +69 -0
- package/admin/dist/server/assets/{start-BS52hm79.js → start-BiybVoR2.js} +1 -1
- package/admin/dist/server/assets/status-B1AGLvHn.js +162 -0
- package/admin/dist/server/assets/status-D7PU72hm.js +262 -0
- package/admin/dist/server/assets/string-B4XlckmJ.js +6 -0
- package/admin/dist/server/assets/useNavigate-0H08s_Q2.js +29 -0
- package/admin/dist/server/assets/useRouter-BXJvr8to.js +508 -0
- package/admin/dist/server/server.js +70 -90
- package/admin/package.json +6 -1
- package/admin/server/functions/auth.ts +89 -0
- package/admin/server/functions/jobs.ts +30 -2
- package/admin/server/functions/misc.ts +25 -5
- package/admin/server/functions/status.ts +52 -3
- package/admin/server/index.ts +1 -1
- package/admin/server/init.ts +21 -9
- package/admin/server/services/d1-status.ts +282 -0
- package/admin/vite.config.ts +29 -15
- package/admin/wrangler.jsonc +16 -0
- package/package.json +1 -1
- package/template/content/docs-i18n/en/cli.md +9 -5
- package/template/content/docs-i18n/en/deployment.md +85 -68
- package/admin/dist/client/assets/main-CSFhgz4p.js +0 -17
- package/admin/dist/client/assets/routes-C6bCOSX-.js +0 -3
- package/admin/dist/server/assets/_tanstack-start-manifest_v-BE5XHVZ2.js +0 -17
- package/admin/dist/server/assets/redirect-DtfSYi2g.js +0 -51
- package/admin/dist/server/assets/status-CZz8Rs_7.js +0 -81
- /package/admin/dist/server/assets/{createServerRpc-DJq9yo-B.js → createServerRpc-Cyyxq9HQ.js} +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { n as DEFAULT_MIGRATION_TABLE, t as DEFAULT_MIGRATION_LOCK_TABLE } from "./migrator-ZpVZslbq.js";
|
|
2
|
+
import { n as SqliteQueryCompiler, t as SqliteAdapter } from "./sqlite-adapter-CL2EidjD.js";
|
|
3
|
+
//#region ../../node_modules/.bun/@better-auth+kysely-adapter@1.5.6+1c6fac3656b8abd5/node_modules/@better-auth/kysely-adapter/dist/d1-sqlite-dialect-sYHNqBte.mjs
|
|
4
|
+
var D1SqliteAdapter = class extends SqliteAdapter {};
|
|
5
|
+
var D1SqliteDriver = class {
|
|
6
|
+
#config;
|
|
7
|
+
#connection;
|
|
8
|
+
constructor(config) {
|
|
9
|
+
this.#config = { ...config };
|
|
10
|
+
}
|
|
11
|
+
async init() {
|
|
12
|
+
this.#connection = new D1SqliteConnection(this.#config.database);
|
|
13
|
+
if (this.#config.onCreateConnection) await this.#config.onCreateConnection(this.#connection);
|
|
14
|
+
}
|
|
15
|
+
async acquireConnection() {
|
|
16
|
+
return this.#connection;
|
|
17
|
+
}
|
|
18
|
+
async beginTransaction() {
|
|
19
|
+
throw new Error("D1 does not support interactive transactions. Use the D1 batch() API instead.");
|
|
20
|
+
}
|
|
21
|
+
async commitTransaction() {
|
|
22
|
+
throw new Error("D1 does not support interactive transactions. Use the D1 batch() API instead.");
|
|
23
|
+
}
|
|
24
|
+
async rollbackTransaction() {
|
|
25
|
+
throw new Error("D1 does not support interactive transactions. Use the D1 batch() API instead.");
|
|
26
|
+
}
|
|
27
|
+
async releaseConnection() {}
|
|
28
|
+
async destroy() {}
|
|
29
|
+
};
|
|
30
|
+
var D1SqliteConnection = class {
|
|
31
|
+
#db;
|
|
32
|
+
constructor(db) {
|
|
33
|
+
this.#db = db;
|
|
34
|
+
}
|
|
35
|
+
async executeQuery(compiledQuery) {
|
|
36
|
+
const results = await this.#db.prepare(compiledQuery.sql).bind(...compiledQuery.parameters).all();
|
|
37
|
+
const numAffectedRows = results.meta.changes != null ? BigInt(results.meta.changes) : void 0;
|
|
38
|
+
return {
|
|
39
|
+
insertId: results.meta.last_row_id === void 0 || results.meta.last_row_id === null ? void 0 : BigInt(results.meta.last_row_id),
|
|
40
|
+
rows: results?.results || [],
|
|
41
|
+
numAffectedRows,
|
|
42
|
+
numUpdatedOrDeletedRows: numAffectedRows
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
async *streamQuery() {
|
|
46
|
+
throw new Error("D1 does not support streaming queries.");
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var D1SqliteIntrospector = class {
|
|
50
|
+
#db;
|
|
51
|
+
#d1;
|
|
52
|
+
constructor(db, d1) {
|
|
53
|
+
this.#db = db;
|
|
54
|
+
this.#d1 = d1;
|
|
55
|
+
}
|
|
56
|
+
async getSchemas() {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
async getTables(options = { withInternalKyselyTables: false }) {
|
|
60
|
+
let query = this.#db.selectFrom("sqlite_master").where("type", "in", ["table", "view"]).where("name", "not like", "sqlite_%").where("name", "not like", "_cf_%").select([
|
|
61
|
+
"name",
|
|
62
|
+
"type",
|
|
63
|
+
"sql"
|
|
64
|
+
]).$castTo();
|
|
65
|
+
if (!options.withInternalKyselyTables) query = query.where("name", "!=", DEFAULT_MIGRATION_TABLE).where("name", "!=", DEFAULT_MIGRATION_LOCK_TABLE);
|
|
66
|
+
const tables = await query.execute();
|
|
67
|
+
if (tables.length === 0) return [];
|
|
68
|
+
const statements = tables.map((table) => this.#d1.prepare("SELECT * FROM pragma_table_info(?)").bind(table.name));
|
|
69
|
+
const batchResults = await this.#d1.batch(statements);
|
|
70
|
+
return tables.map((table, index) => {
|
|
71
|
+
const columnInfo = batchResults[index]?.results ?? [];
|
|
72
|
+
let autoIncrementCol = table.sql?.split(/[(),]/)?.find((it) => it.toLowerCase().includes("autoincrement"))?.split(/\s+/)?.filter(Boolean)?.[0]?.replace(/["`]/g, "");
|
|
73
|
+
if (!autoIncrementCol) {
|
|
74
|
+
const pkCols = columnInfo.filter((r) => r.pk > 0);
|
|
75
|
+
const singlePk = pkCols.length === 1 ? pkCols[0] : void 0;
|
|
76
|
+
if (singlePk && singlePk.type.toLowerCase() === "integer") autoIncrementCol = singlePk.name;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
name: table.name,
|
|
80
|
+
isView: table.type === "view",
|
|
81
|
+
columns: columnInfo.map((col) => ({
|
|
82
|
+
name: col.name,
|
|
83
|
+
dataType: col.type,
|
|
84
|
+
isNullable: !col.notnull,
|
|
85
|
+
isAutoIncrementing: col.name === autoIncrementCol,
|
|
86
|
+
hasDefaultValue: col.dflt_value != null
|
|
87
|
+
}))
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
async getMetadata(options) {
|
|
92
|
+
return { tables: await this.getTables(options) };
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
var D1SqliteQueryCompiler = class extends SqliteQueryCompiler {};
|
|
96
|
+
var D1SqliteDialect = class {
|
|
97
|
+
#config;
|
|
98
|
+
constructor(config) {
|
|
99
|
+
this.#config = { ...config };
|
|
100
|
+
}
|
|
101
|
+
createDriver() {
|
|
102
|
+
return new D1SqliteDriver(this.#config);
|
|
103
|
+
}
|
|
104
|
+
createQueryCompiler() {
|
|
105
|
+
return new D1SqliteQueryCompiler();
|
|
106
|
+
}
|
|
107
|
+
createAdapter() {
|
|
108
|
+
return new D1SqliteAdapter();
|
|
109
|
+
}
|
|
110
|
+
createIntrospector(db) {
|
|
111
|
+
return new D1SqliteIntrospector(db, this.#config.database);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
//#endregion
|
|
115
|
+
export { D1SqliteDialect };
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { d as logger } from "./error-CASJ5tIm.js";
|
|
2
|
+
import { n as createAdapterFactory } from "./adapter-DjXlUL1J.js";
|
|
3
|
+
//#region ../../node_modules/.bun/@better-auth+memory-adapter@1.5.6+1c6fac3656b8abd5/node_modules/@better-auth/memory-adapter/dist/index.mjs
|
|
4
|
+
var memoryAdapter = (db, config) => {
|
|
5
|
+
let lazyOptions = null;
|
|
6
|
+
const adapterCreator = createAdapterFactory({
|
|
7
|
+
config: {
|
|
8
|
+
adapterId: "memory",
|
|
9
|
+
adapterName: "Memory Adapter",
|
|
10
|
+
usePlural: false,
|
|
11
|
+
debugLogs: config?.debugLogs || false,
|
|
12
|
+
supportsArrays: true,
|
|
13
|
+
customTransformInput(props) {
|
|
14
|
+
if (props.options.advanced?.database?.generateId === "serial" && props.field === "id" && props.action === "create") return db[props.model].length + 1;
|
|
15
|
+
return props.data;
|
|
16
|
+
},
|
|
17
|
+
transaction: async (cb) => {
|
|
18
|
+
const clone = structuredClone(db);
|
|
19
|
+
try {
|
|
20
|
+
return await cb(adapterCreator(lazyOptions));
|
|
21
|
+
} catch (error) {
|
|
22
|
+
Object.keys(db).forEach((key) => {
|
|
23
|
+
db[key] = clone[key];
|
|
24
|
+
});
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
adapter: ({ getFieldName, getDefaultFieldName, options, getModelName }) => {
|
|
30
|
+
const applySortToRecords = (records, sortBy, model) => {
|
|
31
|
+
if (!sortBy) return records;
|
|
32
|
+
return records.sort((a, b) => {
|
|
33
|
+
const field = getFieldName({
|
|
34
|
+
model,
|
|
35
|
+
field: sortBy.field
|
|
36
|
+
});
|
|
37
|
+
const aValue = a[field];
|
|
38
|
+
const bValue = b[field];
|
|
39
|
+
let comparison = 0;
|
|
40
|
+
if (aValue == null && bValue == null) comparison = 0;
|
|
41
|
+
else if (aValue == null) comparison = -1;
|
|
42
|
+
else if (bValue == null) comparison = 1;
|
|
43
|
+
else if (typeof aValue === "string" && typeof bValue === "string") comparison = aValue.localeCompare(bValue);
|
|
44
|
+
else if (aValue instanceof Date && bValue instanceof Date) comparison = aValue.getTime() - bValue.getTime();
|
|
45
|
+
else if (typeof aValue === "number" && typeof bValue === "number") comparison = aValue - bValue;
|
|
46
|
+
else if (typeof aValue === "boolean" && typeof bValue === "boolean") comparison = aValue === bValue ? 0 : aValue ? 1 : -1;
|
|
47
|
+
else comparison = String(aValue).localeCompare(String(bValue));
|
|
48
|
+
return sortBy.direction === "asc" ? comparison : -comparison;
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
function convertWhereClause(where, model, join, select) {
|
|
52
|
+
const baseRecords = (() => {
|
|
53
|
+
const table = db[model];
|
|
54
|
+
if (!table) {
|
|
55
|
+
logger.error(`[MemoryAdapter] Model ${model} not found in the DB`, Object.keys(db));
|
|
56
|
+
throw new Error(`Model ${model} not found`);
|
|
57
|
+
}
|
|
58
|
+
const evalClause = (record, clause) => {
|
|
59
|
+
const { field, value, operator } = clause;
|
|
60
|
+
switch (operator) {
|
|
61
|
+
case "in":
|
|
62
|
+
if (!Array.isArray(value)) throw new Error("Value must be an array");
|
|
63
|
+
return value.includes(record[field]);
|
|
64
|
+
case "not_in":
|
|
65
|
+
if (!Array.isArray(value)) throw new Error("Value must be an array");
|
|
66
|
+
return !value.includes(record[field]);
|
|
67
|
+
case "contains": return record[field].includes(value);
|
|
68
|
+
case "starts_with": return record[field].startsWith(value);
|
|
69
|
+
case "ends_with": return record[field].endsWith(value);
|
|
70
|
+
case "ne": return record[field] !== value;
|
|
71
|
+
case "gt": return value != null && Boolean(record[field] > value);
|
|
72
|
+
case "gte": return value != null && Boolean(record[field] >= value);
|
|
73
|
+
case "lt": return value != null && Boolean(record[field] < value);
|
|
74
|
+
case "lte": return value != null && Boolean(record[field] <= value);
|
|
75
|
+
default: return record[field] === value;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
let records = table.filter((record) => {
|
|
79
|
+
if (!where.length || where.length === 0) return true;
|
|
80
|
+
let result = evalClause(record, where[0]);
|
|
81
|
+
for (const clause of where) {
|
|
82
|
+
const clauseResult = evalClause(record, clause);
|
|
83
|
+
if (clause.connector === "OR") result = result || clauseResult;
|
|
84
|
+
else result = result && clauseResult;
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
});
|
|
88
|
+
if (select?.length && select.length > 0) records = records.map((record) => Object.fromEntries(Object.entries(record).filter(([key]) => select.includes(getDefaultFieldName({
|
|
89
|
+
model,
|
|
90
|
+
field: key
|
|
91
|
+
})))));
|
|
92
|
+
return records;
|
|
93
|
+
})();
|
|
94
|
+
if (!join) return baseRecords;
|
|
95
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
96
|
+
const seenIds = /* @__PURE__ */ new Map();
|
|
97
|
+
for (const baseRecord of baseRecords) {
|
|
98
|
+
const baseId = String(baseRecord.id);
|
|
99
|
+
if (!grouped.has(baseId)) {
|
|
100
|
+
const nested = { ...baseRecord };
|
|
101
|
+
for (const [joinModel, joinAttr] of Object.entries(join)) {
|
|
102
|
+
const joinModelName = getModelName(joinModel);
|
|
103
|
+
if (joinAttr.relation === "one-to-one") nested[joinModelName] = null;
|
|
104
|
+
else {
|
|
105
|
+
nested[joinModelName] = [];
|
|
106
|
+
seenIds.set(`${baseId}-${joinModel}`, /* @__PURE__ */ new Set());
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
grouped.set(baseId, nested);
|
|
110
|
+
}
|
|
111
|
+
const nestedEntry = grouped.get(baseId);
|
|
112
|
+
for (const [joinModel, joinAttr] of Object.entries(join)) {
|
|
113
|
+
const joinModelName = getModelName(joinModel);
|
|
114
|
+
const joinTable = db[joinModelName];
|
|
115
|
+
if (!joinTable) {
|
|
116
|
+
logger.error(`[MemoryAdapter] JoinOption model ${joinModelName} not found in the DB`, Object.keys(db));
|
|
117
|
+
throw new Error(`JoinOption model ${joinModelName} not found`);
|
|
118
|
+
}
|
|
119
|
+
const matchingRecords = joinTable.filter((joinRecord) => joinRecord[joinAttr.on.to] === baseRecord[joinAttr.on.from]);
|
|
120
|
+
if (joinAttr.relation === "one-to-one") nestedEntry[joinModelName] = matchingRecords[0] || null;
|
|
121
|
+
else {
|
|
122
|
+
const seenSet = seenIds.get(`${baseId}-${joinModel}`);
|
|
123
|
+
const limit = joinAttr.limit ?? 100;
|
|
124
|
+
let count = 0;
|
|
125
|
+
for (const matchingRecord of matchingRecords) {
|
|
126
|
+
if (count >= limit) break;
|
|
127
|
+
if (!seenSet.has(matchingRecord.id)) {
|
|
128
|
+
nestedEntry[joinModelName].push(matchingRecord);
|
|
129
|
+
seenSet.add(matchingRecord.id);
|
|
130
|
+
count++;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return Array.from(grouped.values());
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
create: async ({ model, data }) => {
|
|
140
|
+
if (options.advanced?.database?.generateId === "serial") data.id = db[getModelName(model)].length + 1;
|
|
141
|
+
if (!db[model]) db[model] = [];
|
|
142
|
+
db[model].push(data);
|
|
143
|
+
return data;
|
|
144
|
+
},
|
|
145
|
+
findOne: async ({ model, where, select, join }) => {
|
|
146
|
+
const res = convertWhereClause(where, model, join, select);
|
|
147
|
+
if (join) {
|
|
148
|
+
const resArray = res;
|
|
149
|
+
if (!resArray.length) return null;
|
|
150
|
+
return resArray[0];
|
|
151
|
+
}
|
|
152
|
+
return res[0] || null;
|
|
153
|
+
},
|
|
154
|
+
findMany: async ({ model, where, sortBy, limit, select, offset, join }) => {
|
|
155
|
+
const res = convertWhereClause(where || [], model, join, select);
|
|
156
|
+
if (join) {
|
|
157
|
+
const resArray = res;
|
|
158
|
+
if (!resArray.length) return [];
|
|
159
|
+
applySortToRecords(resArray, sortBy, model);
|
|
160
|
+
let paginatedRecords = resArray;
|
|
161
|
+
if (offset !== void 0) paginatedRecords = paginatedRecords.slice(offset);
|
|
162
|
+
if (limit !== void 0) paginatedRecords = paginatedRecords.slice(0, limit);
|
|
163
|
+
return paginatedRecords;
|
|
164
|
+
}
|
|
165
|
+
let table = applySortToRecords(res, sortBy, model);
|
|
166
|
+
if (offset !== void 0) table = table.slice(offset);
|
|
167
|
+
if (limit !== void 0) table = table.slice(0, limit);
|
|
168
|
+
return table || [];
|
|
169
|
+
},
|
|
170
|
+
count: async ({ model, where }) => {
|
|
171
|
+
if (where) return convertWhereClause(where, model).length;
|
|
172
|
+
return db[model].length;
|
|
173
|
+
},
|
|
174
|
+
update: async ({ model, where, update }) => {
|
|
175
|
+
const res = convertWhereClause(where, model);
|
|
176
|
+
res.forEach((record) => {
|
|
177
|
+
Object.assign(record, update);
|
|
178
|
+
});
|
|
179
|
+
return res[0] || null;
|
|
180
|
+
},
|
|
181
|
+
delete: async ({ model, where }) => {
|
|
182
|
+
const table = db[model];
|
|
183
|
+
const res = convertWhereClause(where, model);
|
|
184
|
+
db[model] = table.filter((record) => !res.includes(record));
|
|
185
|
+
},
|
|
186
|
+
deleteMany: async ({ model, where }) => {
|
|
187
|
+
const table = db[model];
|
|
188
|
+
const res = convertWhereClause(where, model);
|
|
189
|
+
let count = 0;
|
|
190
|
+
db[model] = table.filter((record) => {
|
|
191
|
+
if (res.includes(record)) {
|
|
192
|
+
count++;
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
return !res.includes(record);
|
|
196
|
+
});
|
|
197
|
+
return count;
|
|
198
|
+
},
|
|
199
|
+
updateMany({ model, where, update }) {
|
|
200
|
+
const res = convertWhereClause(where, model);
|
|
201
|
+
res.forEach((record) => {
|
|
202
|
+
Object.assign(record, update);
|
|
203
|
+
});
|
|
204
|
+
return res[0] || null;
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
return (options) => {
|
|
210
|
+
lazyOptions = options;
|
|
211
|
+
return adapterCreator(options);
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
//#endregion
|
|
215
|
+
export { memoryAdapter };
|