cvm-server 0.1.0
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/LICENSE +202 -0
- package/README.md +83 -0
- package/apps/cvm-server/src/config.d.ts +18 -0
- package/apps/cvm-server/src/config.d.ts.map +1 -0
- package/apps/cvm-server/src/config.js +73 -0
- package/apps/cvm-server/src/logger.d.ts +13 -0
- package/apps/cvm-server/src/logger.d.ts.map +1 -0
- package/apps/cvm-server/src/logger.js +77 -0
- package/apps/cvm-server/src/main.d.ts +2 -0
- package/apps/cvm-server/src/main.d.ts.map +1 -0
- package/apps/cvm-server/src/main.js +57 -0
- package/bin/cvm-server.js +17 -0
- package/main.js +44 -0
- package/package.json +94 -0
- package/packages/mcp-server/src/index.js +28 -0
- package/packages/mcp-server/src/lib/mcp-server.js +233 -0
- package/packages/mongodb/src/index.js +28 -0
- package/packages/mongodb/src/lib/mongodb.js +94 -0
- package/packages/mongodb/src/lib/types.js +16 -0
- package/packages/parser/src/index.js +26 -0
- package/packages/parser/src/lib/bytecode.js +42 -0
- package/packages/parser/src/lib/compiler.js +104 -0
- package/packages/parser/src/lib/parser.js +91 -0
- package/packages/storage/src/index.js +28 -0
- package/packages/storage/src/lib/file-adapter.js +113 -0
- package/packages/storage/src/lib/mongodb-adapter.js +94 -0
- package/packages/storage/src/lib/storage-factory.js +58 -0
- package/packages/storage/src/lib/storage.js +16 -0
- package/packages/types/src/index.js +22 -0
- package/packages/types/src/lib/types.js +16 -0
- package/packages/vm/src/index.js +24 -0
- package/packages/vm/src/lib/vm-manager.js +231 -0
- package/packages/vm/src/lib/vm.js +97 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var parser_exports = {};
|
|
30
|
+
__export(parser_exports, {
|
|
31
|
+
parseProgram: () => parseProgram
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(parser_exports);
|
|
34
|
+
var ts = __toESM(require("typescript"), 1);
|
|
35
|
+
var import_bytecode = require("./bytecode.js");
|
|
36
|
+
function parseProgram(source) {
|
|
37
|
+
const errors = [];
|
|
38
|
+
const bytecode = [];
|
|
39
|
+
let hasMain = false;
|
|
40
|
+
let mainCalled = false;
|
|
41
|
+
const sourceFile = ts.createSourceFile(
|
|
42
|
+
"program.ts",
|
|
43
|
+
source,
|
|
44
|
+
ts.ScriptTarget.Latest,
|
|
45
|
+
true
|
|
46
|
+
);
|
|
47
|
+
function visit(node) {
|
|
48
|
+
if (ts.isFunctionDeclaration(node) && node.name) {
|
|
49
|
+
const funcName = node.name.text;
|
|
50
|
+
if (funcName === "main") {
|
|
51
|
+
hasMain = true;
|
|
52
|
+
if (node.parameters.length > 0) {
|
|
53
|
+
errors.push("main() must not have parameters");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (ts.isExpressionStatement(node) && node.parent === sourceFile) {
|
|
58
|
+
const expr = node.expression;
|
|
59
|
+
if (ts.isCallExpression(expr) && ts.isIdentifier(expr.expression) && expr.expression.text === "main") {
|
|
60
|
+
mainCalled = true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (ts.isCallExpression(node) && ts.isIdentifier(node.expression)) {
|
|
64
|
+
const funcName = node.expression.text;
|
|
65
|
+
const unsupported = ["setTimeout", "fetch", "require", "import"];
|
|
66
|
+
if (unsupported.includes(funcName)) {
|
|
67
|
+
errors.push(`Unsupported function: ${funcName}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
ts.forEachChild(node, visit);
|
|
71
|
+
}
|
|
72
|
+
visit(sourceFile);
|
|
73
|
+
if (!hasMain) {
|
|
74
|
+
errors.push("Program must have a main() function");
|
|
75
|
+
}
|
|
76
|
+
if (hasMain && !mainCalled) {
|
|
77
|
+
errors.push("main() must be called at the top level");
|
|
78
|
+
}
|
|
79
|
+
if (errors.length === 0) {
|
|
80
|
+
bytecode.push({ op: import_bytecode.OpCode.HALT });
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
bytecode,
|
|
84
|
+
errors,
|
|
85
|
+
hasMain
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
89
|
+
0 && (module.exports = {
|
|
90
|
+
parseProgram
|
|
91
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var src_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(src_exports);
|
|
18
|
+
__reExport(src_exports, require("./lib/storage.js"), module.exports);
|
|
19
|
+
__reExport(src_exports, require("./lib/file-adapter.js"), module.exports);
|
|
20
|
+
__reExport(src_exports, require("./lib/mongodb-adapter.js"), module.exports);
|
|
21
|
+
__reExport(src_exports, require("./lib/storage-factory.js"), module.exports);
|
|
22
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
+
0 && (module.exports = {
|
|
24
|
+
...require("./lib/storage.js"),
|
|
25
|
+
...require("./lib/file-adapter.js"),
|
|
26
|
+
...require("./lib/mongodb-adapter.js"),
|
|
27
|
+
...require("./lib/storage-factory.js")
|
|
28
|
+
});
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var file_adapter_exports = {};
|
|
30
|
+
__export(file_adapter_exports, {
|
|
31
|
+
FileStorageAdapter: () => FileStorageAdapter
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(file_adapter_exports);
|
|
34
|
+
var import_fs = require("fs");
|
|
35
|
+
var path = __toESM(require("path"), 1);
|
|
36
|
+
class FileStorageAdapter {
|
|
37
|
+
constructor(dataDir) {
|
|
38
|
+
this.dataDir = dataDir;
|
|
39
|
+
this.programsDir = path.join(dataDir, "programs");
|
|
40
|
+
this.executionsDir = path.join(dataDir, "executions");
|
|
41
|
+
}
|
|
42
|
+
connected = false;
|
|
43
|
+
programsDir;
|
|
44
|
+
executionsDir;
|
|
45
|
+
async connect() {
|
|
46
|
+
await import_fs.promises.mkdir(this.dataDir, { recursive: true });
|
|
47
|
+
await import_fs.promises.mkdir(this.programsDir, { recursive: true });
|
|
48
|
+
await import_fs.promises.mkdir(this.executionsDir, { recursive: true });
|
|
49
|
+
this.connected = true;
|
|
50
|
+
}
|
|
51
|
+
async disconnect() {
|
|
52
|
+
this.connected = false;
|
|
53
|
+
}
|
|
54
|
+
isConnected() {
|
|
55
|
+
return this.connected;
|
|
56
|
+
}
|
|
57
|
+
async saveProgram(program) {
|
|
58
|
+
if (!this.connected)
|
|
59
|
+
throw new Error("Not connected");
|
|
60
|
+
const filePath = path.join(this.programsDir, `${program.id}.json`);
|
|
61
|
+
const data = JSON.stringify(program, null, 2);
|
|
62
|
+
await import_fs.promises.writeFile(filePath, data, "utf-8");
|
|
63
|
+
}
|
|
64
|
+
async getProgram(id) {
|
|
65
|
+
if (!this.connected)
|
|
66
|
+
throw new Error("Not connected");
|
|
67
|
+
const filePath = path.join(this.programsDir, `${id}.json`);
|
|
68
|
+
try {
|
|
69
|
+
const data = await import_fs.promises.readFile(filePath, "utf-8");
|
|
70
|
+
const program = JSON.parse(data);
|
|
71
|
+
program.created = new Date(program.created);
|
|
72
|
+
if (program.updated) {
|
|
73
|
+
program.updated = new Date(program.updated);
|
|
74
|
+
}
|
|
75
|
+
return program;
|
|
76
|
+
} catch (error) {
|
|
77
|
+
if (error.code === "ENOENT") {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async saveExecution(execution) {
|
|
84
|
+
if (!this.connected)
|
|
85
|
+
throw new Error("Not connected");
|
|
86
|
+
const filePath = path.join(this.executionsDir, `${execution.id}.json`);
|
|
87
|
+
const data = JSON.stringify(execution, null, 2);
|
|
88
|
+
await import_fs.promises.writeFile(filePath, data, "utf-8");
|
|
89
|
+
}
|
|
90
|
+
async getExecution(id) {
|
|
91
|
+
if (!this.connected)
|
|
92
|
+
throw new Error("Not connected");
|
|
93
|
+
const filePath = path.join(this.executionsDir, `${id}.json`);
|
|
94
|
+
try {
|
|
95
|
+
const data = await import_fs.promises.readFile(filePath, "utf-8");
|
|
96
|
+
const execution = JSON.parse(data);
|
|
97
|
+
execution.created = new Date(execution.created);
|
|
98
|
+
if (execution.updated) {
|
|
99
|
+
execution.updated = new Date(execution.updated);
|
|
100
|
+
}
|
|
101
|
+
return execution;
|
|
102
|
+
} catch (error) {
|
|
103
|
+
if (error.code === "ENOENT") {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
111
|
+
0 && (module.exports = {
|
|
112
|
+
FileStorageAdapter
|
|
113
|
+
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var mongodb_adapter_exports = {};
|
|
20
|
+
__export(mongodb_adapter_exports, {
|
|
21
|
+
MongoDBAdapter: () => MongoDBAdapter
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(mongodb_adapter_exports);
|
|
24
|
+
var import_mongodb = require("mongodb");
|
|
25
|
+
class MongoDBAdapter {
|
|
26
|
+
constructor(connectionString) {
|
|
27
|
+
this.connectionString = connectionString;
|
|
28
|
+
this.client = new import_mongodb.MongoClient(connectionString);
|
|
29
|
+
}
|
|
30
|
+
client;
|
|
31
|
+
db = null;
|
|
32
|
+
connected = false;
|
|
33
|
+
async connect() {
|
|
34
|
+
await this.client.connect();
|
|
35
|
+
const dbName = this.connectionString.split("/").pop()?.split("?")[0] || "cvm";
|
|
36
|
+
this.db = this.client.db(dbName);
|
|
37
|
+
this.connected = true;
|
|
38
|
+
const collections = await this.db.listCollections().toArray();
|
|
39
|
+
const collectionNames = collections.map((c) => c.name);
|
|
40
|
+
if (!collectionNames.includes("programs")) {
|
|
41
|
+
await this.db.createCollection("programs");
|
|
42
|
+
}
|
|
43
|
+
if (!collectionNames.includes("executions")) {
|
|
44
|
+
await this.db.createCollection("executions");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async disconnect() {
|
|
48
|
+
await this.client.close();
|
|
49
|
+
this.connected = false;
|
|
50
|
+
this.db = null;
|
|
51
|
+
}
|
|
52
|
+
isConnected() {
|
|
53
|
+
return this.connected;
|
|
54
|
+
}
|
|
55
|
+
async getCollections() {
|
|
56
|
+
if (!this.db)
|
|
57
|
+
throw new Error("Not connected to database");
|
|
58
|
+
const collections = await this.db.listCollections().toArray();
|
|
59
|
+
return collections.map((c) => c.name);
|
|
60
|
+
}
|
|
61
|
+
getCollection(name) {
|
|
62
|
+
if (!this.db)
|
|
63
|
+
throw new Error("Not connected to database");
|
|
64
|
+
return this.db.collection(name);
|
|
65
|
+
}
|
|
66
|
+
async saveProgram(program) {
|
|
67
|
+
const collection = this.getCollection("programs");
|
|
68
|
+
await collection.replaceOne(
|
|
69
|
+
{ id: program.id },
|
|
70
|
+
program,
|
|
71
|
+
{ upsert: true }
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
async getProgram(id) {
|
|
75
|
+
const collection = this.getCollection("programs");
|
|
76
|
+
return await collection.findOne({ id });
|
|
77
|
+
}
|
|
78
|
+
async saveExecution(execution) {
|
|
79
|
+
const collection = this.getCollection("executions");
|
|
80
|
+
await collection.replaceOne(
|
|
81
|
+
{ id: execution.id },
|
|
82
|
+
execution,
|
|
83
|
+
{ upsert: true }
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
async getExecution(id) {
|
|
87
|
+
const collection = this.getCollection("executions");
|
|
88
|
+
return await collection.findOne({ id });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
92
|
+
0 && (module.exports = {
|
|
93
|
+
MongoDBAdapter
|
|
94
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var storage_factory_exports = {};
|
|
30
|
+
__export(storage_factory_exports, {
|
|
31
|
+
StorageFactory: () => StorageFactory
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(storage_factory_exports);
|
|
34
|
+
var import_file_adapter = require("./file-adapter.js");
|
|
35
|
+
var import_mongodb_adapter = require("./mongodb-adapter.js");
|
|
36
|
+
var os = __toESM(require("os"), 1);
|
|
37
|
+
var path = __toESM(require("path"), 1);
|
|
38
|
+
class StorageFactory {
|
|
39
|
+
static create(config) {
|
|
40
|
+
const type = config?.type || process.env.CVM_STORAGE_TYPE || "file";
|
|
41
|
+
switch (type) {
|
|
42
|
+
case "file": {
|
|
43
|
+
const dataDir = config?.dataDir || process.env.CVM_DATA_DIR || path.join(os.homedir(), ".cvm");
|
|
44
|
+
return new import_file_adapter.FileStorageAdapter(dataDir);
|
|
45
|
+
}
|
|
46
|
+
case "mongodb": {
|
|
47
|
+
const mongoUri = config?.mongoUri || process.env.MONGODB_URI || "mongodb://localhost:27017/cvm";
|
|
48
|
+
return new import_mongodb_adapter.MongoDBAdapter(mongoUri);
|
|
49
|
+
}
|
|
50
|
+
default:
|
|
51
|
+
throw new Error(`Unsupported storage type: ${type}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
StorageFactory
|
|
58
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var storage_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(storage_exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var src_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(src_exports);
|
|
18
|
+
__reExport(src_exports, require("./lib/types.js"), module.exports);
|
|
19
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
20
|
+
0 && (module.exports = {
|
|
21
|
+
...require("./lib/types.js")
|
|
22
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var types_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var src_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(src_exports);
|
|
18
|
+
__reExport(src_exports, require("./lib/vm.js"), module.exports);
|
|
19
|
+
__reExport(src_exports, require("./lib/vm-manager.js"), module.exports);
|
|
20
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
21
|
+
0 && (module.exports = {
|
|
22
|
+
...require("./lib/vm.js"),
|
|
23
|
+
...require("./lib/vm-manager.js")
|
|
24
|
+
});
|