MCPcopy Create free account
hub / github.com/totaljs/framework / app

Function app

debug.js:109–482  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107 }
108
109 function app() {
110
111 if (!watchercallback) {
112 global.OBSOLETE = NOOP;
113 F.config.allow_ssc_validation = true;
114 F.$configure_configs();
115 }
116
117 F.directory = directory;
118
119 const fork = require('child_process').fork;
120 const directories = [
121 U.combine(CONF.directory_components),
122 U.combine(CONF.directory_controllers),
123 U.combine(CONF.directory_definitions),
124 U.combine(CONF.directory_operations),
125 U.combine(CONF.directory_isomorphic),
126 U.combine(CONF.directory_modules),
127 U.combine(CONF.directory_models),
128 U.combine(CONF.directory_schemas),
129 U.combine(CONF.directory_tasks),
130 U.combine(CONF.directory_resources),
131 U.combine(CONF.directory_source),
132 U.combine(CONF.directory_workers),
133 U.combine(CONF.directory_packages),
134 U.combine(CONF.directory_themes),
135 U.combine(CONF.directory_configs),
136 U.combine(CONF.directory_bundles),
137 U.combine('/startup/'),
138 U.combine('/plugins/')
139 ];
140
141 if (global.THREAD)
142 directories.push(U.combine('/threads/' + global.THREAD + '/'));
143
144 const SRC = U.combine(CONF.directory_src);
145 const prefix = '--------> ';
146
147 options.watch && options.watch.forEach(function(item) {
148 if (item[0] === '/')
149 item = item.substring(1);
150 if (item[item.length - 1] === '/')
151 item = item.substring(0, item.length - 1);
152 directories.push(U.combine(item));
153 });
154
155 var files = {};
156 var force = false;
157 var changes = [];
158 var app = null;
159 var status = watchercallback ? 1 : 0;
160 var pid = '';
161 var isLoaded = false;
162 var isSkip = false;
163 var isBUNDLE = false;
164 var blacklist = {};
165 var counter = 0;
166 var WS = null;

Callers 1

runwatchingFunction · 0.85

Calls 2

restartFunction · 0.85
refresh_directoryFunction · 0.85

Tested by

no test coverage detected