remove internal scripts
This commit is contained in:
@@ -6,7 +6,6 @@ var miniz = use('miniz')
|
||||
var time = use('time')
|
||||
var js = use('js')
|
||||
var crypto = use('crypto')
|
||||
var utf8 = use('utf8')
|
||||
var blob = use('blob')
|
||||
var pkg_tools = use('package')
|
||||
var os = use('os')
|
||||
@@ -277,7 +276,7 @@ Shop.load_lock = function() {
|
||||
// Save lock.toml configuration (to global shop)
|
||||
Shop.save_lock = function(lock) {
|
||||
var path = global_shop_path + '/lock.toml'
|
||||
fd.slurpwrite(path, utf8.encode(toml.encode(lock)));
|
||||
fd.slurpwrite(path, stone(new blob(toml.encode(lock))));
|
||||
}
|
||||
|
||||
|
||||
@@ -415,7 +414,7 @@ function resolve_mod_fn(path, pkg) {
|
||||
var content = text(fd.slurp(path))
|
||||
var script = script_form(path, content, file_pkg, inject);
|
||||
|
||||
var obj = pull_from_cache(utf8.encode(script))
|
||||
var obj = pull_from_cache(stone(new blob(script)))
|
||||
if (obj) {
|
||||
var fn = js.compile_unblob(obj)
|
||||
return js.eval_compile(fn)
|
||||
@@ -427,7 +426,7 @@ function resolve_mod_fn(path, pkg) {
|
||||
|
||||
var fn = js.compile(compile_name, script)
|
||||
|
||||
put_into_cache(utf8.encode(script), js.compile_blob(fn))
|
||||
put_into_cache(stone(new blob(script)), js.compile_blob(fn))
|
||||
|
||||
return js.eval_compile(fn)
|
||||
}
|
||||
@@ -608,7 +607,8 @@ Shop.open_package_dylib = function(pkg) {
|
||||
}
|
||||
|
||||
// If no package context, only check core internal symbols
|
||||
if (!package_context) {
|
||||
if (!package_context || package_context == 'core') {
|
||||
path = path.replace('/', '_')
|
||||
var core_sym = `js_${path}_use`
|
||||
if (os.internal_exists(core_sym)) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user