1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-30 09:10:42 +02:00

add missing interface in build

This commit is contained in:
Thomas Wilkerling
2025-03-08 09:12:13 +01:00
parent 7c064696ee
commit 499027160b
4 changed files with 96 additions and 0 deletions

47
dist/module-debug/db/interface.js vendored Normal file
View File

@@ -0,0 +1,47 @@
/**
* @interface
*/
export default function StorageInterface() {}
// Mandatory Initializer
// ------------------------------
// assign store to an index
StorageInterface.prototype.mount = async function () {};
// open connection
StorageInterface.prototype.open = async function () {};
// close connection
StorageInterface.prototype.close = function () {};
// drop the database (drop tables)
StorageInterface.prototype.destroy = async function () {};
// Mandatory Query Tasks
// ------------------------------
// transfer all changes of an index to the database
StorageInterface.prototype.commit = async function () {};
// get results of a term "key" with optional context "ctx"
StorageInterface.prototype.get = async function () {};
// get documents stored in index (enrich result)
StorageInterface.prototype.enrich = async function () {};
// check if id exists on a specific index
StorageInterface.prototype.has = async function () {};
// delete one id or multiple ids on a specific index
StorageInterface.prototype.remove = async function () {};
// clear all data (truncate)
StorageInterface.prototype.clear = async function () {};
// Optional Methods
// ------------------------------
/**
* Perform the query intersection on database side
* @type {Function|null}
*/
StorageInterface.prototype.search = async function () {};
/**
* Give some information about the storage
* @type {Function|null}
*/
StorageInterface.prototype.info = async function () {};

1
dist/module-min/db/interface.js vendored Normal file
View File

@@ -0,0 +1 @@
export default function StorageInterface(){}StorageInterface.prototype.mount=async function(){},StorageInterface.prototype.open=async function(){},StorageInterface.prototype.close=function(){},StorageInterface.prototype.destroy=async function(){},StorageInterface.prototype.commit=async function(){},StorageInterface.prototype.get=async function(){},StorageInterface.prototype.enrich=async function(){},StorageInterface.prototype.has=async function(){},StorageInterface.prototype.remove=async function(){},StorageInterface.prototype.clear=async function(){},StorageInterface.prototype.search=async function(){},StorageInterface.prototype.info=async function(){};

47
dist/module/db/interface.js vendored Normal file
View File

@@ -0,0 +1,47 @@
/**
* @interface
*/
export default function StorageInterface() {}
// Mandatory Initializer
// ------------------------------
// assign store to an index
StorageInterface.prototype.mount = async function () {};
// open connection
StorageInterface.prototype.open = async function () {};
// close connection
StorageInterface.prototype.close = function () {};
// drop the database (drop tables)
StorageInterface.prototype.destroy = async function () {};
// Mandatory Query Tasks
// ------------------------------
// transfer all changes of an index to the database
StorageInterface.prototype.commit = async function () {};
// get results of a term "key" with optional context "ctx"
StorageInterface.prototype.get = async function () {};
// get documents stored in index (enrich result)
StorageInterface.prototype.enrich = async function () {};
// check if id exists on a specific index
StorageInterface.prototype.has = async function () {};
// delete one id or multiple ids on a specific index
StorageInterface.prototype.remove = async function () {};
// clear all data (truncate)
StorageInterface.prototype.clear = async function () {};
// Optional Methods
// ------------------------------
/**
* Perform the query intersection on database side
* @type {Function|null}
*/
StorageInterface.prototype.search = async function () {};
/**
* Give some information about the storage
* @type {Function|null}
*/
StorageInterface.prototype.info = async function () {};

View File

@@ -50,6 +50,7 @@ fs.existsSync("dist") || fs.mkdirSync("dist");
});
});
fs.copyFileSync("src/db/interface.js", "tmp/db/interface.js");
fs.copyFileSync("task/babel." + (debug ? "debug": (minify ? "min" : "bundle")) + ".json", "tmp/.babelrc");
fs.rmSync("dist/module" + (debug ? "-debug" : (minify ? "-min" : "")), { recursive: true });
fs.mkdirSync("dist/module" + (debug ? "-debug" : (minify ? "-min" : "")));