aboutsummaryrefslogtreecommitdiff
path: root/src/js/out/SyntheticModuleType.h
blob: 0990be0cb8db2c1a3f9b6778b1d543ac2713ff9d (plain) (blame)
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
enum SyntheticModuleType : uint32_t {
    JavaScript = 0,
    PackageJSONTypeModule = 1,
    Wasm = 2,
    ObjectModule = 3,
    File = 4,
    ESM = 5,
    JSONForObjectLoader = 6,

    // Built in modules are loaded through InternalModuleRegistry by numerical ID.
    // In this enum are represented as `(1 << 9) & id`
    InternalModuleRegistryFlag = 1 << 9,
    BunFFI = 512,
    BunSqlite = 513,
    InternalDebugger = 514,
    InternalFSCpSync = 515,
    InternalFSCp = 516,
    InternalPrimordials = 517,
    InternalShared = 518,
    InternalUtilInspect = 519,
    NodeAssert = 520,
    NodeAssertStrict = 521,
    NodeAsyncHooks = 522,
    NodeChildProcess = 523,
    NodeCluster = 524,
    NodeConsole = 525,
    NodeCrypto = 526,
    NodeDgram = 527,
    NodeDiagnosticsChannel = 528,
    NodeDNS = 529,
    NodeDNSPromises = 530,
    NodeDomain = 531,
    NodeEvents = 532,
    NodeFS = 533,
    NodeFSPromises = 534,
    NodeHttp = 535,
    NodeHttp2 = 536,
    NodeHttps = 537,
    NodeInspector = 538,
    NodeNet = 539,
    NodeOS = 540,
    NodePathPosix = 541,
    NodePath = 542,
    NodePathWin32 = 543,
    NodePerfHooks = 544,
    NodePunycode = 545,
    NodeQuerystring = 546,
    NodeReadline = 547,
    NodeReadlinePromises = 548,
    NodeRepl = 549,
    NodeStreamConsumers = 550,
    NodeStream = 551,
    NodeStreamPromises = 552,
    NodeStreamWeb = 553,
    NodeTimers = 554,
    NodeTimersPromises = 555,
    NodeTLS = 556,
    NodeTraceEvents = 557,
    NodeTty = 558,
    NodeUrl = 559,
    NodeUtil = 560,
    NodeV8 = 561,
    NodeVM = 562,
    NodeWasi = 563,
    NodeWorkerThreads = 564,
    NodeZlib = 565,
    ThirdpartyDepd = 566,
    ThirdpartyDetectLibc = 567,
    ThirdpartyDetectLibcLinux = 568,
    ThirdpartyIsomorphicFetch = 569,
    ThirdpartyNodeFetch = 570,
    ThirdpartyUndici = 571,
    ThirdpartyVercelFetch = 572,
    ThirdpartyWS = 573,
    
    // Native modules run through the same system, but with different underlying initializers.
    // They also have bit 10 set to differentiate them from JS builtins.
    NativeModuleFlag = (1 << 10) | (1 << 9),
    BunObject = 1024,
    BunJSC = 1025,
    NodeBuffer = 1026,
    NodeConstants = 1027,
    NodeModule = 1028,
    NodeProcess = 1029,
    NodeStringDecoder = 1030,
    NodeUtilTypes = 1031,
    UTF8Validate = 1032,
};