GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ios/NativeScript/runtime/NsBuiltinModules.h at main · NativeScript/ios

Expand file tree

/

NsBuiltinModules.h

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
54 lines (42 loc) · 2.32 KB
/

NsBuiltinModules.h

Copy path

File metadata and controls

54 lines (42 loc) · 2.32 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#ifndef NsBuiltinModules_h
#define NsBuiltinModules_h
#include <string>
#include "Common.h"
namespace tns {
// The `ns:` builtin modules and their `node:` compatibility shims, as
// specified by docs/ns-builtin-modules.md. Every module is a per-realm
// singleton built from a RuntimeBuiltins source, so a specifier always yields
// the same frozen exports object and the same synthetic ES module.
class NsBuiltinModules {
public:
// Any `ns:`/`node:` specifier, registered or not. The CommonJS resolver
// claims all of them so a prefixed name can never reach the filesystem;
// bare specifiers (`util`) keep resolving through npm untouched.
static bool IsBuiltinScheme(const std::string& specifier);
// The `ns:` half of the scheme, whose unknown names must fail rather than
// fall through to any legacy handling.
static bool IsNsScheme(const std::string& specifier);
// Whether a module of that name exists.
// Whether the specifier names a registered builtin module. Internal-tier
// rows (see kRegistry) only count when includeInternal is set, which is the
// builtin require's privilege; every app-facing caller keeps the default.
static bool IsRegistered(const std::string& specifier,
bool includeInternal = false);
// Frozen exports object of a registered specifier. Empty when the specifier
// is not registered (nothing thrown) or when the module failed to build (an
// exception is pending).
static v8::MaybeLocal<v8::Object> GetExports(v8::Local<v8::Context> context,
const std::string& specifier);
// Evaluated synthetic module exporting the same values as GetExports under
// their own names plus `default` (the exports object itself).
static v8::MaybeLocal<v8::Module> GetModule(v8::Local<v8::Context> context,
const std::string& specifier);
// What every resolver reports for a specifier in the scheme that names no
// module.
static std::string NotFoundMessage(const std::string& specifier);
// `ns:util`'s format, used by console.* for %-substitution. Empty when the
// module could not be built; callers degrade instead of failing the log.
static v8::Local<v8::Function> GetFormatFunc(v8::Local<v8::Context> context);
};
} // namespace tns
#endif /* NsBuiltinModules_h */
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.