-
-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathDevFlags.h
More file actions
28 lines (19 loc) · 922 Bytes
/
DevFlags.h
File metadata and controls
28 lines (19 loc) · 922 Bytes
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
#pragma once
#include <string>
// Centralized development/runtime flags helpers usable across runtime sources.
// These read from app package.json via Runtime::GetAppConfigValue and other
// runtime configuration to determine behavior of dev features.
namespace tns {
// Returns true when verbose script/module loading logs should be emitted.
// Controlled by package.json setting: "logScriptLoading": true|false
bool IsScriptLoadingLogEnabled();
// Security config
// In debug mode (RuntimeConfig.IsDebug): always returns true.
// checks "security.allowRemoteModules" from nativescript.config.
bool IsRemoteModulesAllowed();
// "security.remoteModuleAllowlist" array from nativescript.config.
// If no allowlist is configured but allowRemoteModules is true, all URLs are allowed.
bool IsRemoteUrlAllowed(const std::string& url);
// Init security configuration
void InitializeSecurityConfig();
} // namespace tns