1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
function throwNotImplemented(feature, issue) {
throw hideFromStack(throwNotImplemented), new NotImplementedError(feature, issue);
}
function hideFromStack(...fns) {
for (let fn of fns)
Object.defineProperty(fn, "name", {
value: "::bunternal::"
});
}
class NotImplementedError extends Error {
code;
constructor(feature, issue) {
super(feature + " is not yet implemented in Bun." + (issue ? " Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/" + issue : ""));
this.name = "NotImplementedError", this.code = "ERR_NOT_IMPLEMENTED", hideFromStack(NotImplementedError);
}
}
// src/js/node/v8.ts
var notimpl = function(message) {
throwNotImplemented("node:v8 " + message);
}, cachedDataVersionTag = function() {
notimpl("cachedDataVersionTag");
}, getHeapSnapshot = function() {
notimpl("getHeapSnapshot");
}, getHeapStatistics = function() {
notimpl("getHeapStatistics");
}, getHeapSpaceStatistics = function() {
notimpl("getHeapSpaceStatistics");
}, getHeapCodeStatistics = function() {
notimpl("getHeapCodeStatistics");
}, setFlagsFromString = function() {
notimpl("setFlagsFromString");
}, deserialize = function() {
notimpl("deserialize");
}, takeCoverage = function() {
notimpl("takeCoverage");
}, stopCoverage = function() {
notimpl("stopCoverage");
}, serialize = function() {
notimpl("serialize");
}, writeHeapSnapshot = function() {
notimpl("writeHeapSnapshot");
}, setHeapSnapshotNearHeapLimit = function() {
notimpl("setHeapSnapshotNearHeapLimit");
};
class Deserializer {
constructor() {
notimpl("Deserializer");
}
}
class Serializer {
constructor() {
notimpl("Serializer");
}
}
class DefaultDeserializer extends Deserializer {
constructor() {
super(...arguments);
}
}
class DefaultSerializer extends Serializer {
constructor() {
super(...arguments);
}
}
class GCProfiler {
constructor() {
notimpl("GCProfiler");
}
}
var promiseHooks = {
createHook: () => {
notimpl("createHook");
},
onInit: () => {
notimpl("onInit");
},
onBefore: () => {
notimpl("onBefore");
},
onAfter: () => {
notimpl("onAfter");
},
onSettled: () => {
notimpl("onSettled");
}
}, startupSnapshot = {
addDeserializeCallback: () => notimpl("addDeserializeCallback"),
addSerializeCallback: () => notimpl("addSerializeCallback"),
setDeserializeMainFunction: () => notimpl("setDeserializeMainFunction"),
isBuildingSnapshot: () => notimpl("isBuildingSnapshot")
}, defaultObject = {
cachedDataVersionTag,
getHeapSnapshot,
getHeapStatistics,
getHeapSpaceStatistics,
getHeapCodeStatistics,
setFlagsFromString,
deserialize,
takeCoverage,
stopCoverage,
serialize,
writeHeapSnapshot,
setHeapSnapshotNearHeapLimit,
promiseHooks,
startupSnapshot,
Deserializer,
Serializer,
[Symbol.for("CommonJS")]: 0
};
hideFromStack(notimpl, cachedDataVersionTag, getHeapSnapshot, getHeapStatistics, getHeapSpaceStatistics, getHeapCodeStatistics, setFlagsFromString, deserialize, takeCoverage, stopCoverage, serialize, writeHeapSnapshot, setHeapSnapshotNearHeapLimit, Deserializer, Serializer, DefaultDeserializer, DefaultSerializer, GCProfiler);
export {
writeHeapSnapshot,
takeCoverage,
stopCoverage,
startupSnapshot,
setHeapSnapshotNearHeapLimit,
setFlagsFromString,
serialize,
promiseHooks,
getHeapStatistics,
getHeapSpaceStatistics,
getHeapSnapshot,
getHeapCodeStatistics,
deserialize,
defaultObject as default,
cachedDataVersionTag,
Serializer,
GCProfiler,
Deserializer,
DefaultSerializer,
DefaultDeserializer
};
|