opencode-graphiti 0.2.2 → 0.2.3-canary.c44aab0.20260406075813
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/esm/_dnt.polyfills.d.ts +0 -99
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +1 -127
- package/esm/src/config.d.ts.map +1 -1
- package/esm/src/config.js +2 -1
- package/esm/src/services/connection-manager.d.ts.map +1 -1
- package/esm/src/services/connection-manager.js +3 -1
- package/esm/src/services/runtime-teardown.d.ts +1 -0
- package/esm/src/services/runtime-teardown.d.ts.map +1 -1
- package/esm/src/services/runtime-teardown.js +10 -5
- package/package.json +1 -1
- package/script/_dnt.polyfills.d.ts +0 -99
- package/script/_dnt.polyfills.d.ts.map +1 -1
- package/script/_dnt.polyfills.js +0 -128
- package/script/src/config.d.ts.map +1 -1
- package/script/src/config.js +2 -1
- package/script/src/services/connection-manager.d.ts.map +1 -1
- package/script/src/services/connection-manager.js +3 -1
- package/script/src/services/runtime-teardown.d.ts +1 -0
- package/script/src/services/runtime-teardown.d.ts.map +1 -1
- package/script/src/services/runtime-teardown.js +10 -5
package/esm/_dnt.polyfills.d.ts
CHANGED
|
@@ -64,103 +64,4 @@ declare global {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
export {};
|
|
67
|
-
/**
|
|
68
|
-
* Based on [import-meta-ponyfill](https://github.com/gaubee/import-meta-ponyfill),
|
|
69
|
-
* but instead of using npm to install additional dependencies,
|
|
70
|
-
* this approach manually consolidates cjs/mjs/d.ts into a single file.
|
|
71
|
-
*
|
|
72
|
-
* Note that this code might be imported multiple times
|
|
73
|
-
* (for example, both dnt.test.polyfills.ts and dnt.polyfills.ts contain this code;
|
|
74
|
-
* or Node.js might dynamically clear the cache and then force a require).
|
|
75
|
-
* Therefore, it's important to avoid redundant writes to global objects.
|
|
76
|
-
* Additionally, consider that commonjs is used alongside esm,
|
|
77
|
-
* so the two ponyfill functions are stored independently in two separate global objects.
|
|
78
|
-
*/
|
|
79
|
-
import { createRequire } from "node:module";
|
|
80
|
-
import { type URL } from "node:url";
|
|
81
|
-
declare global {
|
|
82
|
-
interface ImportMeta {
|
|
83
|
-
/** A string representation of the fully qualified module URL. When the
|
|
84
|
-
* module is loaded locally, the value will be a file URL (e.g.
|
|
85
|
-
* `file:///path/module.ts`).
|
|
86
|
-
*
|
|
87
|
-
* You can also parse the string as a URL to determine more information about
|
|
88
|
-
* how the current module was loaded. For example to determine if a module was
|
|
89
|
-
* local or not:
|
|
90
|
-
*
|
|
91
|
-
* ```ts
|
|
92
|
-
* const url = new URL(import.meta.url);
|
|
93
|
-
* if (url.protocol === "file:") {
|
|
94
|
-
* console.log("this module was loaded locally");
|
|
95
|
-
* }
|
|
96
|
-
* ```
|
|
97
|
-
*/
|
|
98
|
-
url: string;
|
|
99
|
-
/**
|
|
100
|
-
* A function that returns resolved specifier as if it would be imported
|
|
101
|
-
* using `import(specifier)`.
|
|
102
|
-
*
|
|
103
|
-
* ```ts
|
|
104
|
-
* console.log(import.meta.resolve("./foo.js"));
|
|
105
|
-
* // file:///dev/foo.js
|
|
106
|
-
* ```
|
|
107
|
-
*
|
|
108
|
-
* @param specifier The module specifier to resolve relative to `parent`.
|
|
109
|
-
* @param parent The absolute parent module URL to resolve from.
|
|
110
|
-
* @returns The absolute (`file:`) URL string for the resolved module.
|
|
111
|
-
*/
|
|
112
|
-
resolve(specifier: string, parent?: string | URL | undefined): string;
|
|
113
|
-
/** A flag that indicates if the current module is the main module that was
|
|
114
|
-
* called when starting the program under Deno.
|
|
115
|
-
*
|
|
116
|
-
* ```ts
|
|
117
|
-
* if (import.meta.main) {
|
|
118
|
-
* // this was loaded as the main module, maybe do some bootstrapping
|
|
119
|
-
* }
|
|
120
|
-
* ```
|
|
121
|
-
*/
|
|
122
|
-
main: boolean;
|
|
123
|
-
/** The absolute path of the current module.
|
|
124
|
-
*
|
|
125
|
-
* This property is only provided for local modules (ie. using `file://` URLs).
|
|
126
|
-
*
|
|
127
|
-
* Example:
|
|
128
|
-
* ```
|
|
129
|
-
* // Unix
|
|
130
|
-
* console.log(import.meta.filename); // /home/alice/my_module.ts
|
|
131
|
-
*
|
|
132
|
-
* // Windows
|
|
133
|
-
* console.log(import.meta.filename); // C:\alice\my_module.ts
|
|
134
|
-
* ```
|
|
135
|
-
*/
|
|
136
|
-
filename: string;
|
|
137
|
-
/** The absolute path of the directory containing the current module.
|
|
138
|
-
*
|
|
139
|
-
* This property is only provided for local modules (ie. using `file://` URLs).
|
|
140
|
-
*
|
|
141
|
-
* * Example:
|
|
142
|
-
* ```
|
|
143
|
-
* // Unix
|
|
144
|
-
* console.log(import.meta.dirname); // /home/alice
|
|
145
|
-
*
|
|
146
|
-
* // Windows
|
|
147
|
-
* console.log(import.meta.dirname); // C:\alice
|
|
148
|
-
* ```
|
|
149
|
-
*/
|
|
150
|
-
dirname: string;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
type NodeRequest = ReturnType<typeof createRequire>;
|
|
154
|
-
type NodeModule = NonNullable<NodeRequest["main"]>;
|
|
155
|
-
interface ImportMetaPonyfillCommonjs {
|
|
156
|
-
(require: NodeRequest, module: NodeModule): ImportMeta;
|
|
157
|
-
}
|
|
158
|
-
interface ImportMetaPonyfillEsmodule {
|
|
159
|
-
(importMeta: ImportMeta): ImportMeta;
|
|
160
|
-
}
|
|
161
|
-
interface ImportMetaPonyfill extends ImportMetaPonyfillCommonjs, ImportMetaPonyfillEsmodule {
|
|
162
|
-
}
|
|
163
|
-
export declare let import_meta_ponyfill_commonjs: ImportMetaPonyfillCommonjs;
|
|
164
|
-
export declare let import_meta_ponyfill_esmodule: ImportMetaPonyfillEsmodule;
|
|
165
|
-
export declare let import_meta_ponyfill: ImportMetaPonyfill;
|
|
166
67
|
//# sourceMappingURL=_dnt.polyfills.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.polyfills.d.ts","sour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,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,OAAO,EACzD,OAAO,CAAC,EAAE,GAAG,GACZ,MAAM,CAAC;KACX;IACD,UAAU,UAAU;QAClB;;;;;;;;WAQG;QACH,QAAQ,CAAC,CAAC,SAAS,MAAM,EACvB,SAAS,EAAE,CACP,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,UAAU,KAChB,KAAK,IAAI,CAAC,EACf,OAAO,CAAC,EAAE,GAAG,GACZ,CAAC,GAAG,SAAS,CAAC;QACjB,QAAQ,CACJ,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,OAAO,EACvE,OAAO,CAAC,EAAE,GAAG,GACd,MAAM,GAAG,SAAS,CAAC;QAEtB;;;;;;;;WAQG;QACH,aAAa,CACT,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,OAAO,EACvE,OAAO,CAAC,EAAE,GAAG,GACd,MAAM,CAAC;KACX;CACF;AA4CD,OAAO,EAAE,CAAC;AAgBV,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;;;WAIG;QACH,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;KAC5C;CACF;AAED,OAAO,EAAE,CAAC"}
|
package/esm/_dnt.polyfills.js
CHANGED
|
@@ -48,130 +48,4 @@ if (!Object.hasOwn) {
|
|
|
48
48
|
writable: true,
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
* Based on [import-meta-ponyfill](https://github.com/gaubee/import-meta-ponyfill),
|
|
53
|
-
* but instead of using npm to install additional dependencies,
|
|
54
|
-
* this approach manually consolidates cjs/mjs/d.ts into a single file.
|
|
55
|
-
*
|
|
56
|
-
* Note that this code might be imported multiple times
|
|
57
|
-
* (for example, both dnt.test.polyfills.ts and dnt.polyfills.ts contain this code;
|
|
58
|
-
* or Node.js might dynamically clear the cache and then force a require).
|
|
59
|
-
* Therefore, it's important to avoid redundant writes to global objects.
|
|
60
|
-
* Additionally, consider that commonjs is used alongside esm,
|
|
61
|
-
* so the two ponyfill functions are stored independently in two separate global objects.
|
|
62
|
-
*/
|
|
63
|
-
//@ts-ignore
|
|
64
|
-
import { createRequire } from "node:module";
|
|
65
|
-
//@ts-ignore
|
|
66
|
-
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
67
|
-
//@ts-ignore
|
|
68
|
-
import { dirname } from "node:path";
|
|
69
|
-
const defineGlobalPonyfill = (symbolFor, fn) => {
|
|
70
|
-
if (!Reflect.has(globalThis, Symbol.for(symbolFor))) {
|
|
71
|
-
Object.defineProperty(globalThis, Symbol.for(symbolFor), {
|
|
72
|
-
configurable: true,
|
|
73
|
-
get() {
|
|
74
|
-
return fn;
|
|
75
|
-
},
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
export let import_meta_ponyfill_commonjs = (Reflect.get(globalThis, Symbol.for("import-meta-ponyfill-commonjs")) ??
|
|
80
|
-
(() => {
|
|
81
|
-
const moduleImportMetaWM = new WeakMap();
|
|
82
|
-
return (require, module) => {
|
|
83
|
-
let importMetaCache = moduleImportMetaWM.get(module);
|
|
84
|
-
if (importMetaCache == null) {
|
|
85
|
-
const importMeta = Object.assign(Object.create(null), {
|
|
86
|
-
url: pathToFileURL(module.filename).href,
|
|
87
|
-
main: require.main == module,
|
|
88
|
-
resolve: (specifier, parentURL = importMeta.url) => {
|
|
89
|
-
return pathToFileURL((importMeta.url === parentURL
|
|
90
|
-
? require
|
|
91
|
-
: createRequire(parentURL))
|
|
92
|
-
.resolve(specifier)).href;
|
|
93
|
-
},
|
|
94
|
-
filename: module.filename,
|
|
95
|
-
dirname: module.path,
|
|
96
|
-
});
|
|
97
|
-
moduleImportMetaWM.set(module, importMeta);
|
|
98
|
-
importMetaCache = importMeta;
|
|
99
|
-
}
|
|
100
|
-
return importMetaCache;
|
|
101
|
-
};
|
|
102
|
-
})());
|
|
103
|
-
defineGlobalPonyfill("import-meta-ponyfill-commonjs", import_meta_ponyfill_commonjs);
|
|
104
|
-
export let import_meta_ponyfill_esmodule = (Reflect.get(globalThis, Symbol.for("import-meta-ponyfill-esmodule")) ??
|
|
105
|
-
((importMeta) => {
|
|
106
|
-
const resolveFunStr = String(importMeta.resolve);
|
|
107
|
-
const shimWs = new WeakSet();
|
|
108
|
-
//@ts-ignore
|
|
109
|
-
const mainUrl = ("file:///" + process.argv[1].replace(/\\/g, "/"))
|
|
110
|
-
.replace(/\/{3,}/, "///");
|
|
111
|
-
const commonShim = (importMeta) => {
|
|
112
|
-
if (typeof importMeta.main !== "boolean") {
|
|
113
|
-
importMeta.main = importMeta.url === mainUrl;
|
|
114
|
-
}
|
|
115
|
-
if (typeof importMeta.filename !== "string") {
|
|
116
|
-
importMeta.filename = fileURLToPath(importMeta.url);
|
|
117
|
-
importMeta.dirname = dirname(importMeta.filename);
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
if (
|
|
121
|
-
// v16.2.0+, v14.18.0+: Add support for WHATWG URL object to parentURL parameter.
|
|
122
|
-
resolveFunStr === "undefined" ||
|
|
123
|
-
// v20.0.0+, v18.19.0+"" This API now returns a string synchronously instead of a Promise.
|
|
124
|
-
resolveFunStr.startsWith("async")
|
|
125
|
-
// enable by --experimental-import-meta-resolve flag
|
|
126
|
-
) {
|
|
127
|
-
import_meta_ponyfill_esmodule = (importMeta) => {
|
|
128
|
-
if (!shimWs.has(importMeta)) {
|
|
129
|
-
shimWs.add(importMeta);
|
|
130
|
-
const importMetaUrlRequire = {
|
|
131
|
-
url: importMeta.url,
|
|
132
|
-
require: createRequire(importMeta.url),
|
|
133
|
-
};
|
|
134
|
-
importMeta.resolve = function resolve(specifier, parentURL = importMeta.url) {
|
|
135
|
-
return pathToFileURL((importMetaUrlRequire.url === parentURL
|
|
136
|
-
? importMetaUrlRequire.require
|
|
137
|
-
: createRequire(parentURL)).resolve(specifier)).href;
|
|
138
|
-
};
|
|
139
|
-
commonShim(importMeta);
|
|
140
|
-
}
|
|
141
|
-
return importMeta;
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
/// native support
|
|
146
|
-
import_meta_ponyfill_esmodule = (importMeta) => {
|
|
147
|
-
if (!shimWs.has(importMeta)) {
|
|
148
|
-
shimWs.add(importMeta);
|
|
149
|
-
commonShim(importMeta);
|
|
150
|
-
}
|
|
151
|
-
return importMeta;
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
return import_meta_ponyfill_esmodule(importMeta);
|
|
155
|
-
}));
|
|
156
|
-
defineGlobalPonyfill("import-meta-ponyfill-esmodule", import_meta_ponyfill_esmodule);
|
|
157
|
-
export let import_meta_ponyfill = ((...args) => {
|
|
158
|
-
const _MODULE = (() => {
|
|
159
|
-
if (typeof require === "function" && typeof module === "object") {
|
|
160
|
-
return "commonjs";
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
// eval("typeof import.meta");
|
|
164
|
-
return "esmodule";
|
|
165
|
-
}
|
|
166
|
-
})();
|
|
167
|
-
if (_MODULE === "commonjs") {
|
|
168
|
-
//@ts-ignore
|
|
169
|
-
import_meta_ponyfill = (r, m) => import_meta_ponyfill_commonjs(r, m);
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
//@ts-ignore
|
|
173
|
-
import_meta_ponyfill = (im) => import_meta_ponyfill_esmodule(im);
|
|
174
|
-
}
|
|
175
|
-
//@ts-ignore
|
|
176
|
-
return import_meta_ponyfill(...args);
|
|
177
|
-
});
|
|
51
|
+
export {};
|
package/esm/src/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/src/config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,kBAAkB,CAAC;AAkB1E,KAAK,gBAAgB,GAAG;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAC;AAEnD,KAAK,mBAAmB,GACpB,uBAAuB,GACvB,yBAAyB,GACzB,kBAAkB,GAClB,gBAAgB,CAAC;AAErB,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;gBAGjC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,mBAAmB,CAAA;KAAE;CAiB1D;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;IACxC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAAC;CAC1C;AAED,KAAK,qBAAqB,GAAG,MAAM,qBAAqB,CAAC;AAoSzD,eAAO,MAAM,kCAAkC,GAC7C,SAAS,qBAAqB,KAC7B,IAEF,CAAC;AAEF,eAAO,MAAM,oCAAoC,QAAO,IAEvD,CAAC;AAEF,eAAO,MAAM,kCAAkC,GAC7C,UAAU,OAAO,mBAAmB,KACnC,IAEF,CAAC;AAEF,eAAO,MAAM,oCAAoC,QAAO,IAEvD,CAAC;AA4FF,wBAAgB,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,CAoD7D"}
|
package/esm/src/config.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import os from "node:os";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
+
import process from "node:process";
|
|
4
5
|
import { redactEndpointUserInfo } from "./services/endpoint-redaction.js";
|
|
5
6
|
import { notifyPluginWarning } from "./services/opencode-warning.js";
|
|
6
7
|
const DEFAULT_CONFIG = {
|
|
@@ -42,7 +43,7 @@ export class ConfigLoadError extends Error {
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
const nodeRequire = createRequire(
|
|
46
|
+
const nodeRequire = createRequire(join(process.cwd(), "graphiti.config.runtime.cjs"));
|
|
46
47
|
const isRecord = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
47
48
|
const readString = (value, key) => typeof value[key] === "string" ? value[key] : undefined;
|
|
48
49
|
const readTrimmedString = (value, key) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-manager.d.ts","sourceRoot":"","sources":["../../../src/src/services/connection-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connection-manager.d.ts","sourceRoot":"","sources":["../../../src/src/services/connection-manager.ts"],"names":[],"mappings":"AA6DA,MAAM,MAAM,uBAAuB,GAC/B,YAAY,GACZ,WAAW,GACX,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEd,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,MAAM,CAAC;AAE1D,qBAAa,oBAAqB,SAAQ,KAAK;IAI3C,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS;IAHnD,QAAQ,CAAC,IAAI,aAAa;gBAGf,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,EACjD,OAAO,CAAC,EAAE,MAAM;CAYnB;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,IAAI,mBAAmB;gBAG9B,OAAO,SAA4D;CAKtE;AAED,qBAAa,2BAA4B,SAAQ,KAAK;IACpD,QAAQ,CAAC,IAAI,qBAAqB;gBAEtB,OAAO,SAA+B;CAInD;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,IAAI,uBAAuB;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from "node:process";
|
|
3
5
|
import manifest from "../../deno.js";
|
|
4
6
|
import { isAbortError } from "../utils.js";
|
|
5
7
|
import { redactEndpointUserInfo } from "./endpoint-redaction.js";
|
|
6
8
|
import { logger } from "./logger.js";
|
|
7
|
-
const nodeRequire = createRequire(
|
|
9
|
+
const nodeRequire = createRequire(pathToFileURL(join(process.cwd(), "graphiti.runtime.cjs")).href);
|
|
8
10
|
let mcpRuntimeModulesPromise = null;
|
|
9
11
|
const importResolvedModule = async (specifier) => {
|
|
10
12
|
const resolvedPath = nodeRequire.resolve(specifier);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-teardown.d.ts","sourceRoot":"","sources":["../../../src/src/services/runtime-teardown.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,OAAO,IAAI,IAAI,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"runtime-teardown.d.ts","sourceRoot":"","sources":["../../../src/src/services/runtime-teardown.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,OAAO,IAAI,IAAI,CAAC;CACjB;AAUD,KAAK,2BAA2B,GAAG;IACjC,gBAAgB,CAAC,EAAE,CACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,EACjC,OAAO,CAAC,EAAE,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,KACtD,IAAI,CAAC;IACV,mBAAmB,CAAC,EAAE,CACpB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,EACjC,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,KACrC,IAAI,CAAC;IACV,IAAI,CAAC,EAAE;QACL,iBAAiB,CAAC,EAAE,CAClB,MAAM,EAAE,QAAQ,GAAG,SAAS,EAC5B,OAAO,EAAE,MAAM,IAAI,KAChB,IAAI,CAAC;QACV,oBAAoB,CAAC,EAAE,CACrB,MAAM,EAAE,QAAQ,GAAG,SAAS,EAC5B,OAAO,EAAE,MAAM,IAAI,KAChB,IAAI,CAAC;QACV,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,KAAK,CAAC;KACjC,CAAC;IACF,OAAO,CAAC,EAAE;QACR,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;QAClD,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;QACnD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,KAAK,CAAC;QAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAwBF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,mBAAmB,EAAE,EAC5B,OAAO,GAAE,2BAC6C,GACrD,2BAA2B,CA0K7B"}
|
|
@@ -73,14 +73,17 @@ export function registerRuntimeTeardown(tasks, runtime = dntShim.dntGlobalThis)
|
|
|
73
73
|
}
|
|
74
74
|
if (runtime.process) {
|
|
75
75
|
runtime.process.exitCode = exitCode;
|
|
76
|
+
runtime.process.exit?.(exitCode);
|
|
76
77
|
}
|
|
77
78
|
};
|
|
78
|
-
const run = () => {
|
|
79
|
+
const run = (options = {}) => {
|
|
79
80
|
if (teardownPromise)
|
|
80
81
|
return teardownPromise;
|
|
81
82
|
teardownPromise = (async () => {
|
|
82
83
|
disposeEventListeners();
|
|
83
|
-
|
|
84
|
+
if (!options.preserveSignalListeners) {
|
|
85
|
+
disposeSignalListeners();
|
|
86
|
+
}
|
|
84
87
|
releaseRegistration();
|
|
85
88
|
try {
|
|
86
89
|
for (const task of tasks) {
|
|
@@ -96,7 +99,9 @@ export function registerRuntimeTeardown(tasks, runtime = dntShim.dntGlobalThis)
|
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
101
|
finally {
|
|
99
|
-
|
|
102
|
+
if (!options.preserveSignalListeners) {
|
|
103
|
+
disposeSignalListeners();
|
|
104
|
+
}
|
|
100
105
|
}
|
|
101
106
|
})();
|
|
102
107
|
return teardownPromise;
|
|
@@ -106,17 +111,17 @@ export function registerRuntimeTeardown(tasks, runtime = dntShim.dntGlobalThis)
|
|
|
106
111
|
return;
|
|
107
112
|
gracefulShutdownStarted = true;
|
|
108
113
|
disposeEventListeners();
|
|
109
|
-
disposeSignalListeners();
|
|
110
114
|
if (trigger.kind === "signal") {
|
|
111
115
|
shutdownSignal = trigger.signal;
|
|
112
116
|
logger.warn(getShutdownNotice(trigger.signal), {
|
|
113
117
|
signal: trigger.signal,
|
|
114
118
|
});
|
|
115
|
-
void run().finally(() => {
|
|
119
|
+
void run({ preserveSignalListeners: true }).finally(() => {
|
|
116
120
|
requestExit(trigger.signal);
|
|
117
121
|
});
|
|
118
122
|
return;
|
|
119
123
|
}
|
|
124
|
+
disposeSignalListeners();
|
|
120
125
|
void run();
|
|
121
126
|
};
|
|
122
127
|
for (const eventType of SHUTDOWN_EVENTS) {
|
package/package.json
CHANGED
|
@@ -64,103 +64,4 @@ declare global {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
export {};
|
|
67
|
-
/**
|
|
68
|
-
* Based on [import-meta-ponyfill](https://github.com/gaubee/import-meta-ponyfill),
|
|
69
|
-
* but instead of using npm to install additional dependencies,
|
|
70
|
-
* this approach manually consolidates cjs/mjs/d.ts into a single file.
|
|
71
|
-
*
|
|
72
|
-
* Note that this code might be imported multiple times
|
|
73
|
-
* (for example, both dnt.test.polyfills.ts and dnt.polyfills.ts contain this code;
|
|
74
|
-
* or Node.js might dynamically clear the cache and then force a require).
|
|
75
|
-
* Therefore, it's important to avoid redundant writes to global objects.
|
|
76
|
-
* Additionally, consider that commonjs is used alongside esm,
|
|
77
|
-
* so the two ponyfill functions are stored independently in two separate global objects.
|
|
78
|
-
*/
|
|
79
|
-
import { createRequire } from "node:module";
|
|
80
|
-
import { type URL } from "node:url";
|
|
81
|
-
declare global {
|
|
82
|
-
interface ImportMeta {
|
|
83
|
-
/** A string representation of the fully qualified module URL. When the
|
|
84
|
-
* module is loaded locally, the value will be a file URL (e.g.
|
|
85
|
-
* `file:///path/module.ts`).
|
|
86
|
-
*
|
|
87
|
-
* You can also parse the string as a URL to determine more information about
|
|
88
|
-
* how the current module was loaded. For example to determine if a module was
|
|
89
|
-
* local or not:
|
|
90
|
-
*
|
|
91
|
-
* ```ts
|
|
92
|
-
* const url = new URL(import.meta.url);
|
|
93
|
-
* if (url.protocol === "file:") {
|
|
94
|
-
* console.log("this module was loaded locally");
|
|
95
|
-
* }
|
|
96
|
-
* ```
|
|
97
|
-
*/
|
|
98
|
-
url: string;
|
|
99
|
-
/**
|
|
100
|
-
* A function that returns resolved specifier as if it would be imported
|
|
101
|
-
* using `import(specifier)`.
|
|
102
|
-
*
|
|
103
|
-
* ```ts
|
|
104
|
-
* console.log(import.meta.resolve("./foo.js"));
|
|
105
|
-
* // file:///dev/foo.js
|
|
106
|
-
* ```
|
|
107
|
-
*
|
|
108
|
-
* @param specifier The module specifier to resolve relative to `parent`.
|
|
109
|
-
* @param parent The absolute parent module URL to resolve from.
|
|
110
|
-
* @returns The absolute (`file:`) URL string for the resolved module.
|
|
111
|
-
*/
|
|
112
|
-
resolve(specifier: string, parent?: string | URL | undefined): string;
|
|
113
|
-
/** A flag that indicates if the current module is the main module that was
|
|
114
|
-
* called when starting the program under Deno.
|
|
115
|
-
*
|
|
116
|
-
* ```ts
|
|
117
|
-
* if (import.meta.main) {
|
|
118
|
-
* // this was loaded as the main module, maybe do some bootstrapping
|
|
119
|
-
* }
|
|
120
|
-
* ```
|
|
121
|
-
*/
|
|
122
|
-
main: boolean;
|
|
123
|
-
/** The absolute path of the current module.
|
|
124
|
-
*
|
|
125
|
-
* This property is only provided for local modules (ie. using `file://` URLs).
|
|
126
|
-
*
|
|
127
|
-
* Example:
|
|
128
|
-
* ```
|
|
129
|
-
* // Unix
|
|
130
|
-
* console.log(import.meta.filename); // /home/alice/my_module.ts
|
|
131
|
-
*
|
|
132
|
-
* // Windows
|
|
133
|
-
* console.log(import.meta.filename); // C:\alice\my_module.ts
|
|
134
|
-
* ```
|
|
135
|
-
*/
|
|
136
|
-
filename: string;
|
|
137
|
-
/** The absolute path of the directory containing the current module.
|
|
138
|
-
*
|
|
139
|
-
* This property is only provided for local modules (ie. using `file://` URLs).
|
|
140
|
-
*
|
|
141
|
-
* * Example:
|
|
142
|
-
* ```
|
|
143
|
-
* // Unix
|
|
144
|
-
* console.log(import.meta.dirname); // /home/alice
|
|
145
|
-
*
|
|
146
|
-
* // Windows
|
|
147
|
-
* console.log(import.meta.dirname); // C:\alice
|
|
148
|
-
* ```
|
|
149
|
-
*/
|
|
150
|
-
dirname: string;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
type NodeRequest = ReturnType<typeof createRequire>;
|
|
154
|
-
type NodeModule = NonNullable<NodeRequest["main"]>;
|
|
155
|
-
interface ImportMetaPonyfillCommonjs {
|
|
156
|
-
(require: NodeRequest, module: NodeModule): ImportMeta;
|
|
157
|
-
}
|
|
158
|
-
interface ImportMetaPonyfillEsmodule {
|
|
159
|
-
(importMeta: ImportMeta): ImportMeta;
|
|
160
|
-
}
|
|
161
|
-
interface ImportMetaPonyfill extends ImportMetaPonyfillCommonjs, ImportMetaPonyfillEsmodule {
|
|
162
|
-
}
|
|
163
|
-
export declare let import_meta_ponyfill_commonjs: ImportMetaPonyfillCommonjs;
|
|
164
|
-
export declare let import_meta_ponyfill_esmodule: ImportMetaPonyfillEsmodule;
|
|
165
|
-
export declare let import_meta_ponyfill: ImportMetaPonyfill;
|
|
166
67
|
//# sourceMappingURL=_dnt.polyfills.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK;QACb,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CACF;AAED,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC,CAAC;QACf;;;;;;;;WAQG;QACH,QAAQ,CAAC,CAAC,SAAS,CAAC,EAClB,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC,EACxE,OAAO,CAAC,EAAE,GAAG,GACZ,CAAC,GAAG,SAAS,CAAC;QACjB,QAAQ,CACN,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,OAAO,EACzD,OAAO,CAAC,EAAE,GAAG,GACZ,CAAC,GAAG,SAAS,CAAC;QAEjB;;;;;;;;WAQG;QACH,aAAa,CACX,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,OAAO,EACzD,OAAO,CAAC,EAAE,GAAG,GACZ,MAAM,CAAC;KACX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AG,OAAO,CAAC;KAC5C;CACF;AAED,OAAO,EAAE,CAAC"}
|
package/script/_dnt.polyfills.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.import_meta_ponyfill = exports.import_meta_ponyfill_esmodule = exports.import_meta_ponyfill_commonjs = void 0;
|
|
4
3
|
function findLastIndex(self, callbackfn, that) {
|
|
5
4
|
const boundFunc = that === undefined ? callbackfn : callbackfn.bind(that);
|
|
6
5
|
let index = self.length - 1;
|
|
@@ -51,130 +50,3 @@ if (!Object.hasOwn) {
|
|
|
51
50
|
writable: true,
|
|
52
51
|
});
|
|
53
52
|
}
|
|
54
|
-
/**
|
|
55
|
-
* Based on [import-meta-ponyfill](https://github.com/gaubee/import-meta-ponyfill),
|
|
56
|
-
* but instead of using npm to install additional dependencies,
|
|
57
|
-
* this approach manually consolidates cjs/mjs/d.ts into a single file.
|
|
58
|
-
*
|
|
59
|
-
* Note that this code might be imported multiple times
|
|
60
|
-
* (for example, both dnt.test.polyfills.ts and dnt.polyfills.ts contain this code;
|
|
61
|
-
* or Node.js might dynamically clear the cache and then force a require).
|
|
62
|
-
* Therefore, it's important to avoid redundant writes to global objects.
|
|
63
|
-
* Additionally, consider that commonjs is used alongside esm,
|
|
64
|
-
* so the two ponyfill functions are stored independently in two separate global objects.
|
|
65
|
-
*/
|
|
66
|
-
//@ts-ignore
|
|
67
|
-
const node_module_1 = require("node:module");
|
|
68
|
-
//@ts-ignore
|
|
69
|
-
const node_url_1 = require("node:url");
|
|
70
|
-
//@ts-ignore
|
|
71
|
-
const node_path_1 = require("node:path");
|
|
72
|
-
const defineGlobalPonyfill = (symbolFor, fn) => {
|
|
73
|
-
if (!Reflect.has(globalThis, Symbol.for(symbolFor))) {
|
|
74
|
-
Object.defineProperty(globalThis, Symbol.for(symbolFor), {
|
|
75
|
-
configurable: true,
|
|
76
|
-
get() {
|
|
77
|
-
return fn;
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
exports.import_meta_ponyfill_commonjs = (Reflect.get(globalThis, Symbol.for("import-meta-ponyfill-commonjs")) ??
|
|
83
|
-
(() => {
|
|
84
|
-
const moduleImportMetaWM = new WeakMap();
|
|
85
|
-
return (require, module) => {
|
|
86
|
-
let importMetaCache = moduleImportMetaWM.get(module);
|
|
87
|
-
if (importMetaCache == null) {
|
|
88
|
-
const importMeta = Object.assign(Object.create(null), {
|
|
89
|
-
url: (0, node_url_1.pathToFileURL)(module.filename).href,
|
|
90
|
-
main: require.main == module,
|
|
91
|
-
resolve: (specifier, parentURL = importMeta.url) => {
|
|
92
|
-
return (0, node_url_1.pathToFileURL)((importMeta.url === parentURL
|
|
93
|
-
? require
|
|
94
|
-
: (0, node_module_1.createRequire)(parentURL))
|
|
95
|
-
.resolve(specifier)).href;
|
|
96
|
-
},
|
|
97
|
-
filename: module.filename,
|
|
98
|
-
dirname: module.path,
|
|
99
|
-
});
|
|
100
|
-
moduleImportMetaWM.set(module, importMeta);
|
|
101
|
-
importMetaCache = importMeta;
|
|
102
|
-
}
|
|
103
|
-
return importMetaCache;
|
|
104
|
-
};
|
|
105
|
-
})());
|
|
106
|
-
defineGlobalPonyfill("import-meta-ponyfill-commonjs", exports.import_meta_ponyfill_commonjs);
|
|
107
|
-
exports.import_meta_ponyfill_esmodule = (Reflect.get(globalThis, Symbol.for("import-meta-ponyfill-esmodule")) ??
|
|
108
|
-
((importMeta) => {
|
|
109
|
-
const resolveFunStr = String(importMeta.resolve);
|
|
110
|
-
const shimWs = new WeakSet();
|
|
111
|
-
//@ts-ignore
|
|
112
|
-
const mainUrl = ("file:///" + process.argv[1].replace(/\\/g, "/"))
|
|
113
|
-
.replace(/\/{3,}/, "///");
|
|
114
|
-
const commonShim = (importMeta) => {
|
|
115
|
-
if (typeof importMeta.main !== "boolean") {
|
|
116
|
-
importMeta.main = importMeta.url === mainUrl;
|
|
117
|
-
}
|
|
118
|
-
if (typeof importMeta.filename !== "string") {
|
|
119
|
-
importMeta.filename = (0, node_url_1.fileURLToPath)(importMeta.url);
|
|
120
|
-
importMeta.dirname = (0, node_path_1.dirname)(importMeta.filename);
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
if (
|
|
124
|
-
// v16.2.0+, v14.18.0+: Add support for WHATWG URL object to parentURL parameter.
|
|
125
|
-
resolveFunStr === "undefined" ||
|
|
126
|
-
// v20.0.0+, v18.19.0+"" This API now returns a string synchronously instead of a Promise.
|
|
127
|
-
resolveFunStr.startsWith("async")
|
|
128
|
-
// enable by --experimental-import-meta-resolve flag
|
|
129
|
-
) {
|
|
130
|
-
exports.import_meta_ponyfill_esmodule = (importMeta) => {
|
|
131
|
-
if (!shimWs.has(importMeta)) {
|
|
132
|
-
shimWs.add(importMeta);
|
|
133
|
-
const importMetaUrlRequire = {
|
|
134
|
-
url: importMeta.url,
|
|
135
|
-
require: (0, node_module_1.createRequire)(importMeta.url),
|
|
136
|
-
};
|
|
137
|
-
importMeta.resolve = function resolve(specifier, parentURL = importMeta.url) {
|
|
138
|
-
return (0, node_url_1.pathToFileURL)((importMetaUrlRequire.url === parentURL
|
|
139
|
-
? importMetaUrlRequire.require
|
|
140
|
-
: (0, node_module_1.createRequire)(parentURL)).resolve(specifier)).href;
|
|
141
|
-
};
|
|
142
|
-
commonShim(importMeta);
|
|
143
|
-
}
|
|
144
|
-
return importMeta;
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
/// native support
|
|
149
|
-
exports.import_meta_ponyfill_esmodule = (importMeta) => {
|
|
150
|
-
if (!shimWs.has(importMeta)) {
|
|
151
|
-
shimWs.add(importMeta);
|
|
152
|
-
commonShim(importMeta);
|
|
153
|
-
}
|
|
154
|
-
return importMeta;
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
return (0, exports.import_meta_ponyfill_esmodule)(importMeta);
|
|
158
|
-
}));
|
|
159
|
-
defineGlobalPonyfill("import-meta-ponyfill-esmodule", exports.import_meta_ponyfill_esmodule);
|
|
160
|
-
exports.import_meta_ponyfill = ((...args) => {
|
|
161
|
-
const _MODULE = (() => {
|
|
162
|
-
if (typeof require === "function" && typeof module === "object") {
|
|
163
|
-
return "commonjs";
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
// eval("typeof import.meta");
|
|
167
|
-
return "esmodule";
|
|
168
|
-
}
|
|
169
|
-
})();
|
|
170
|
-
if (_MODULE === "commonjs") {
|
|
171
|
-
//@ts-ignore
|
|
172
|
-
exports.import_meta_ponyfill = (r, m) => (0, exports.import_meta_ponyfill_commonjs)(r, m);
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
//@ts-ignore
|
|
176
|
-
exports.import_meta_ponyfill = (im) => (0, exports.import_meta_ponyfill_esmodule)(im);
|
|
177
|
-
}
|
|
178
|
-
//@ts-ignore
|
|
179
|
-
return (0, exports.import_meta_ponyfill)(...args);
|
|
180
|
-
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/src/config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,kBAAkB,CAAC;AAkB1E,KAAK,gBAAgB,GAAG;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAC;AAEnD,KAAK,mBAAmB,GACpB,uBAAuB,GACvB,yBAAyB,GACzB,kBAAkB,GAClB,gBAAgB,CAAC;AAErB,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;gBAGjC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,mBAAmB,CAAA;KAAE;CAiB1D;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;IACxC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAAC;CAC1C;AAED,KAAK,qBAAqB,GAAG,MAAM,qBAAqB,CAAC;AAoSzD,eAAO,MAAM,kCAAkC,GAC7C,SAAS,qBAAqB,KAC7B,IAEF,CAAC;AAEF,eAAO,MAAM,oCAAoC,QAAO,IAEvD,CAAC;AAEF,eAAO,MAAM,kCAAkC,GAC7C,UAAU,OAAO,mBAAmB,KACnC,IAEF,CAAC;AAEF,eAAO,MAAM,oCAAoC,QAAO,IAEvD,CAAC;AA4FF,wBAAgB,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,CAoD7D"}
|
package/script/src/config.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.loadConfig = loadConfig;
|
|
|
8
8
|
const node_os_1 = __importDefault(require("node:os"));
|
|
9
9
|
const node_module_1 = require("node:module");
|
|
10
10
|
const node_path_1 = require("node:path");
|
|
11
|
+
const node_process_1 = __importDefault(require("node:process"));
|
|
11
12
|
const endpoint_redaction_js_1 = require("./services/endpoint-redaction.js");
|
|
12
13
|
const opencode_warning_js_1 = require("./services/opencode-warning.js");
|
|
13
14
|
const DEFAULT_CONFIG = {
|
|
@@ -50,7 +51,7 @@ class ConfigLoadError extends Error {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
exports.ConfigLoadError = ConfigLoadError;
|
|
53
|
-
const nodeRequire = (0, node_module_1.createRequire)(
|
|
54
|
+
const nodeRequire = (0, node_module_1.createRequire)((0, node_path_1.join)(node_process_1.default.cwd(), "graphiti.config.runtime.cjs"));
|
|
54
55
|
const isRecord = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
55
56
|
const readString = (value, key) => typeof value[key] === "string" ? value[key] : undefined;
|
|
56
57
|
const readTrimmedString = (value, key) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-manager.d.ts","sourceRoot":"","sources":["../../../src/src/services/connection-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connection-manager.d.ts","sourceRoot":"","sources":["../../../src/src/services/connection-manager.ts"],"names":[],"mappings":"AA6DA,MAAM,MAAM,uBAAuB,GAC/B,YAAY,GACZ,WAAW,GACX,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEd,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,MAAM,CAAC;AAE1D,qBAAa,oBAAqB,SAAQ,KAAK;IAI3C,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS;IAHnD,QAAQ,CAAC,IAAI,aAAa;gBAGf,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,EACjD,OAAO,CAAC,EAAE,MAAM;CAYnB;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,IAAI,mBAAmB;gBAG9B,OAAO,SAA4D;CAKtE;AAED,qBAAa,2BAA4B,SAAQ,KAAK;IACpD,QAAQ,CAAC,IAAI,qBAAqB;gBAEtB,OAAO,SAA+B;CAInD;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,IAAI,uBAAuB;gBAExB,OAAO,SAA+B;CAInD;AAED,qBAAa,2BAA4B,SAAQ,KAAK;IACpD,QAAQ,CAAC,IAAI,qBAAqB;gBAEtB,OAAO,SAA6B;CAIjD;AAED,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,GACX,GAAG,IAAI,oBAAoB,CAE7B;AAED,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,GACX,GAAG,IAAI,yBAAyB,GAAG,2BAA2B,CAGhE;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MA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AAwB,CAA8B;gBAElD,OAAO,EAAE,gCAAgC;IAoBrD,QAAQ,IAAI,uBAAuB;IAInC,KAAK,IAAI,IAAI;IAcP,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAgDrB,KAAK,CAAC,SAAS,SAAwB,GAAG,OAAO,CAAC,OAAO,CAAC;IAwB1D,QAAQ,CACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,UAAU,SAAyB,GAClC,OAAO,CAAC,OAAO,CAAC;IA0Bb,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;YAerB,gBAAgB;YAoDhB,kCAAkC;YA0ElC,uCAAuC;IAyBrD,OAAO,CAAC,sBAAsB;YAIhB,uBAAuB;IASrC,OAAO,CAAC,sBAAsB;IAwC9B,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,cAAc;YAyCR,iBAAiB;IAgC/B,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,iBAAiB;IA6BzB,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,mBAAmB;CAO5B"}
|
|
@@ -40,12 +40,14 @@ exports.GraphitiConnectionManager = exports.GraphitiSessionExpiredError = export
|
|
|
40
40
|
exports.isGraphitiOfflineError = isGraphitiOfflineError;
|
|
41
41
|
exports.isGraphitiTimeoutError = isGraphitiTimeoutError;
|
|
42
42
|
const node_module_1 = require("node:module");
|
|
43
|
+
const node_path_1 = require("node:path");
|
|
43
44
|
const node_url_1 = require("node:url");
|
|
45
|
+
const node_process_1 = __importDefault(require("node:process"));
|
|
44
46
|
const deno_js_1 = __importDefault(require("../../deno.js"));
|
|
45
47
|
const utils_js_1 = require("../utils.js");
|
|
46
48
|
const endpoint_redaction_js_1 = require("./endpoint-redaction.js");
|
|
47
49
|
const logger_js_1 = require("./logger.js");
|
|
48
|
-
const nodeRequire = (0, node_module_1.createRequire)(
|
|
50
|
+
const nodeRequire = (0, node_module_1.createRequire)((0, node_url_1.pathToFileURL)((0, node_path_1.join)(node_process_1.default.cwd(), "graphiti.runtime.cjs")).href);
|
|
49
51
|
let mcpRuntimeModulesPromise = null;
|
|
50
52
|
const importResolvedModule = async (specifier) => {
|
|
51
53
|
const resolvedPath = nodeRequire.resolve(specifier);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-teardown.d.ts","sourceRoot":"","sources":["../../../src/src/services/runtime-teardown.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,OAAO,IAAI,IAAI,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"runtime-teardown.d.ts","sourceRoot":"","sources":["../../../src/src/services/runtime-teardown.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,OAAO,IAAI,IAAI,CAAC;CACjB;AAUD,KAAK,2BAA2B,GAAG;IACjC,gBAAgB,CAAC,EAAE,CACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,EACjC,OAAO,CAAC,EAAE,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,KACtD,IAAI,CAAC;IACV,mBAAmB,CAAC,EAAE,CACpB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,EACjC,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,KACrC,IAAI,CAAC;IACV,IAAI,CAAC,EAAE;QACL,iBAAiB,CAAC,EAAE,CAClB,MAAM,EAAE,QAAQ,GAAG,SAAS,EAC5B,OAAO,EAAE,MAAM,IAAI,KAChB,IAAI,CAAC;QACV,oBAAoB,CAAC,EAAE,CACrB,MAAM,EAAE,QAAQ,GAAG,SAAS,EAC5B,OAAO,EAAE,MAAM,IAAI,KAChB,IAAI,CAAC;QACV,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,KAAK,CAAC;KACjC,CAAC;IACF,OAAO,CAAC,EAAE;QACR,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;QAClD,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;QACnD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,KAAK,CAAC;QAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAwBF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,mBAAmB,EAAE,EAC5B,OAAO,GAAE,2BAC6C,GACrD,2BAA2B,CA0K7B"}
|
|
@@ -109,14 +109,17 @@ function registerRuntimeTeardown(tasks, runtime = dntShim.dntGlobalThis) {
|
|
|
109
109
|
}
|
|
110
110
|
if (runtime.process) {
|
|
111
111
|
runtime.process.exitCode = exitCode;
|
|
112
|
+
runtime.process.exit?.(exitCode);
|
|
112
113
|
}
|
|
113
114
|
};
|
|
114
|
-
const run = () => {
|
|
115
|
+
const run = (options = {}) => {
|
|
115
116
|
if (teardownPromise)
|
|
116
117
|
return teardownPromise;
|
|
117
118
|
teardownPromise = (async () => {
|
|
118
119
|
disposeEventListeners();
|
|
119
|
-
|
|
120
|
+
if (!options.preserveSignalListeners) {
|
|
121
|
+
disposeSignalListeners();
|
|
122
|
+
}
|
|
120
123
|
releaseRegistration();
|
|
121
124
|
try {
|
|
122
125
|
for (const task of tasks) {
|
|
@@ -132,7 +135,9 @@ function registerRuntimeTeardown(tasks, runtime = dntShim.dntGlobalThis) {
|
|
|
132
135
|
}
|
|
133
136
|
}
|
|
134
137
|
finally {
|
|
135
|
-
|
|
138
|
+
if (!options.preserveSignalListeners) {
|
|
139
|
+
disposeSignalListeners();
|
|
140
|
+
}
|
|
136
141
|
}
|
|
137
142
|
})();
|
|
138
143
|
return teardownPromise;
|
|
@@ -142,17 +147,17 @@ function registerRuntimeTeardown(tasks, runtime = dntShim.dntGlobalThis) {
|
|
|
142
147
|
return;
|
|
143
148
|
gracefulShutdownStarted = true;
|
|
144
149
|
disposeEventListeners();
|
|
145
|
-
disposeSignalListeners();
|
|
146
150
|
if (trigger.kind === "signal") {
|
|
147
151
|
shutdownSignal = trigger.signal;
|
|
148
152
|
logger_js_1.logger.warn(getShutdownNotice(trigger.signal), {
|
|
149
153
|
signal: trigger.signal,
|
|
150
154
|
});
|
|
151
|
-
void run().finally(() => {
|
|
155
|
+
void run({ preserveSignalListeners: true }).finally(() => {
|
|
152
156
|
requestExit(trigger.signal);
|
|
153
157
|
});
|
|
154
158
|
return;
|
|
155
159
|
}
|
|
160
|
+
disposeSignalListeners();
|
|
156
161
|
void run();
|
|
157
162
|
};
|
|
158
163
|
for (const eventType of SHUTDOWN_EVENTS) {
|