Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function onPath(path) {
// Write the symlink
if (path !== row.path) {
row.call(fs.deleteEntry);
}
return row.call(path, fs.writeEntry, {
mode: modes.sym,
hash: hash
});
}
}
return repo.loadAs("text", entry.hash, function (err, link) {
if (err) return callback(err);
mode = modes.sym;
hash = entry.hash + "-" + match.value;
return onSym(null, link.replace(match.variable, match.value));
});
}
return callback();
}
mode = entry.mode;
hash = entry.hash;
if (mode === modes.tree) {
path += "/" + name;
return repo.loadAs("tree", hash, onTree);
}
if (entry.mode === modes.sym) {
return repo.loadAs("text", entry.hash, onSym);
}
if (entry.mode === modes.commit) {
path += "/" + name;
return loadConfig(path, entry.hash, function (err, pair) {
if (err) return callback(err);
// Start over with this repo as the new root.
rootPath = path;
repo = pair.repo;
var config = pair.config;
return repo.loadAs("commit", config.current, onCommit);
});
}
return done({});
}
rules.push({
path: newPath,
root: root,
hash: ruleEntry.hash
});
}
if (!entry) {
// If you get here, the entry didn't match
// In raw-mode this is a no-find.
if (!bake) break;
// In bake mode, look for rule that may serve this path.
return searchRules();
}
if (bake && (entry.mode === modes.sym)) {
if (!check("blob", entry.hash)) return;
var blob = storage.get(entry.hash);
var link = binary.toUnicode(blob);
var rest = parts.slice(index + 1).join("/");
var linkPath = pathJoin(partial, link, rest);
return resolvePath(linkPath, bake, callback);
}
// We're good, move on!
mode = entry.mode;
hash = entry.hash;
partial = newPath;
if (mode === modes.commit) root = partial;
index++;
} else {
break;
if (!meta) return;
// If the path was a file or tree, attach the repo and return it.
if (meta.mode === modes.tree || modes.isFile(meta.mode)) {
meta.repo = repo;
return meta;
}
// Normalize partial paths and final paths
var subPath = path;
var subRest = "";
if (meta.last) {
meta = meta.last;
subPath = meta.path;
subRest = meta.rest;
}
if (meta.mode === modes.sym) {
var target = yield repo.loadAs("text", meta.hash);
target = pathJoin(base, subPath, '..', target, subRest);
return yield* pathToEntry(target);
}
// Check for .gitmodules file
var modMeta = yield repo.pathToEntry(root, ".gitmodules");
if (!(modMeta && modes.isFile(modMeta.mode))) {
throw new Error("Missing .gitmodules file");
}
// Load and parse the .gitmodules file.
// TODO: cache this in memory by path and hash
var config = configCodec.decode(yield repo.loadAs("text", modMeta.hash));
config = config.submodule[subPath];
if (!config) {
function* render(pathToEntry, url, runtimes) {
// Strip of query string from url to get pathname.
var pathname = getPathname(url);
var meta = yield* pathToEntry(pathname);
if (!meta) return;
var repo = meta.repo;
// Send redirects for symlinks
if (meta.mode === modes.sym) {
var target = yield repo.loadAs("blob", meta.hash);
target = bodec.toUnicode(target);
if (target[0] !== "/") target = pathJoin(url, "..", target);
return [302, {Location: target}];
}
// Special rules for tree requests.
if (meta.mode === modes.tree) {
// Make sure requests for trees end in trailing slashes.
if (pathname[pathname.length - 1] !== "/") {
return [301, { Location: pathname + "/" }];
}
// Load the actual tree listing, this should be cached by mem-cache.
var tree = yield repo.loadAs("tree", meta.hash);
// Look for a index file
if (tree["index.html"] && modes.isFile(tree["index.html"].mode)) {
doc.code = code;
doc.session.setTabSize(2);
whitespace.detectIndentation(doc.session);
doc.mode = 0;
}
else if (doc.code !== code) {
doc.session.setValue(code, 1);
doc.code = code;
whitespace.detectIndentation(doc.session);
}
if (doc.mode !== row.mode) {
var aceMode =
/\.rule/.test(row.path) ? "ace/mode/jack" :
/\.gitmodules/.test(row.path) ? "ace/mode/ini" :
/\.webapp/.test(row.path) ? "ace/mode/json" :
row.mode === modes.sym ? "ace/mode/text" :
modelist.getModeForPath(row.path).mode;
doc.session.setMode(aceMode, function () {
if (aceMode !== "ace/mode/javascript") return;
doc.session.$worker.call("setOptions", hintOptions);
});
doc.mode = row.mode;
}
}
doc.hash = row.hash;
current = doc;
reset();
editor.setDoc(doc);
function save(text) {
return repo.loadAs("text", entry.hash, function (err, link) {
if (err) return callback(err);
mode = modes.sym;
hash = entry.hash + "-" + match.value;
return onSym(null, link.replace(match.variable, match.value));
});
}
'>': '>',
'"': '"',
};
function escapeHtml(string, quotes) {
return String(string).replace(quotes ? /[&<>"]/g : /[&<>]/g, function (char) {
return escapeMap[char];
});
}
var typeNames = {};
typeNames[modes.commit] = "Submodule";
typeNames[modes.tree] = "Directory";
typeNames[modes.blob] = "File";
typeNames[modes.exec] = "Executable File";
typeNames[modes.sym] = "Symbolic Link";
var iconNames = {};
iconNames[modes.commit] = "icon-box";
iconNames[modes.tree] = "icon-folder-open";
iconNames[modes.blob] = "icon-doc";
iconNames[modes.exec] = "icon-cog";
iconNames[modes.sym] = "icon-link";
function formatTree(tree, path) {
return "<style>\n" +
" @font-face {\n" +
" font-family: 'fontello';\n" +
" src: url('data:application/octet-stream;base64,d09GRgABAAAAABHAAA4AAAAAH0AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABRAAAAEQAAABWPihJImNtYXAAAAGIAAAAOgAAAUrQGxm3Y3Z0IAAAAcQAAAAUAAAAHAbX/wZmcGdtAAAB2AAABPkAAAmRigp4O2dhc3AAAAbUAAAACAAAAAgAAAAQZ2x5ZgAABtwAAAf+AAAObFhdsmBoZWFkAAAO3AAAADQAAAA2AyfQJWhoZWEAAA8QAAAAIAAAACQHyQOlaG10eAAADzAAAAAYAAAAMCpnAABsb2NhAAAPSAAAABoAAAAaFwoTmm1heHAAAA9kAAAAIAAAACABTAozbmFtZQAAD4QAAAF3AAACzcydGhxwb3N0AAAQ/AAAAGwAAACaPJ7wo3ByZXAAABFoAAAAVgAAAFaSoZr/eJxjYGTuZJzAwMrAwVTFtIeBgaEHQjM+YDBkZGJgYGJgZWbACgLSXFMYHF4wvOBiDvqfxRDFHMQwDSjMCJIDAO63C8h4nGNgYGBmgGAZBkYGEHAB8hjBfBYGDSDNBqQZGZgYGF5w/f8PUvCCAURLMELVAwEjG8OIBwBu6Qa4AAB4nGNgQANGDEbMQf+zQBgAEdAD4XicnVXZdtNWFJU8ZHASOmSgoA7X3DhQ68qEKRgwaSrFdiEdHAitBB2kDHTkncc+62uOQrtWH/m07n09JLR0rbYsls++R1tn2DrnRh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AAeJxjYGRgYABix12T+uL5bb4ycDO/AIownP+RlAShtZT+//+fxSLJHATkcjAwgUQBdCwNNHicY2BkYGAO+p/FEMWiz8Dw/z+LFANQBAXwAABwJgR2eJxjfsHAwAzCkXjwAgjNos/AAACg/QWNAAAAAABeAWgCGgKgA0ADkgQSBTQGCgbMBzYAAAABAAAADABpAAkAAAAAAAIAKgA3AG4AAACeCZEAAAAAeJx1kMtqwkAUhv/x0otCW1rotrMqSmm8YDeCIFh0026kuC0xxiQSMzIZBV+j79CH6Uv0WfqbjKUoTZjMd745c+ZkAFzjGwL588SRs8AZo5wLOEXPcpH+2XKJ/GK5jCreLJ/Qv1uu4AGB5Spu8MEKonTOaIFPywJX4tJyARfiznKR/tFyidyzXMateLV8Qu9ZrmAiUstV3IuvgVptdRSERtYGddlutjpyupWKKkrcWLprEyqdyr6cq8T4cawcTy33PPaDdezqfbifJ75OI5XIltPcq5Gf+No1/mxXPd0EbWPmcq7VUg5thlxptfA944TGrLqNxt/zMIDCCltoRLyqEAYSNdo65zaaaKFDmjJDMjPPipDARUzjYs0dYbaSMu5zzBkltD4zYrIDj9/lkR+TAu6PWUUfrR7GE9LujCjzkn057O4wa0RKskw3s7Pf3lNseFqb1nDXrkuddSUxPKgheR+7tQWNR+9kt2Jou2jw/ef/fgDdX4RLAHicbYtRDoMwDMXyKGNQepUeCprAonUEIUAcn2n9nb8sS6aKCp7+E4hQwaHGAw2eaNHBo0dwo11+0ixxOFit+2kylhJPZbGWLcVdrt19pXT9DLOE8m3ppafUWZe3Szb3k2WWLdoqC9ENdp4hV0u4AMhSWLEBAY5ZuQgACABjILABI0SwAyNwsgQoCUVSRLIKAgcqsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAA=') format('woff'),\n" +
" url('data:application/octet-stream;base64,AAEAAAAOAIAAAwBgT1MvMj4oSSIAAADsAAAAVmNtYXDQGxm3AAABRAAAAUpjdnQgBtf/BgAAFTgA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DywBCNCIzixJgEUK7AEQy6wJistsD8ssAAVIEewACNCsgABARUUEy6wLCotsEAssAAVIEewACNCsgABARUUEy6wLCotsEEssQABFBOwLSotsEIssC8qLbBDLLAAFkUjIC4gRoojYTixJgEUKy2wRCywCCNCsEMrLbBFLLIAADwrLbBGLLIAATwrLbBHLLIBADwrLbBILLIBATwrLbBJLLIAAD0rLbBKLLIAAT0rLbBLLLIBAD0rLbBMLLIBAT0rLbBNLLIAADkrLbBOLLIAATkrLbBPLLIBADkrLbBQLLIBATkrLbBRLLIAADsrLbBSLLIAATsrLbBTLLIBADsrLbBULLIBATsrLbBVLLIAAD4rLbBWLLIAAT4rLbBXLLIBAD4rLbBYLLIBAT4rLbBZLLIAADorLbBaLLIAATorLbBbLLIBADorLbBcLLIBATorLbBdLLAyKy6xJgEUKy2wXiywMiuwNistsF8ssDIrsDcrLbBgLLAAFrAyK7A4Ky2wYSywMysusSYBFCstsGIssDMrsDYrLbBjLLAzK7A3Ky2wZCywMyuwOCstsGUssDQrLrEmARQrLbBmLLA0K7A2Ky2wZyywNCuwNystsGgssDQrsDgrLbBpLLA1Ky6xJgEUKy2waiywNSuwNistsGsssDUrsDcrLbBsLLA1K7A4Ky2wbSwrsAhlsAMkUHiwARUwLQAAAEu4AMhSWLEBAY5ZuQgACABjILABI0SwAyNwsgQoCUVSRLIKAgcqsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAA=') format('truetype');\n" +
" }\n" +
' [class^="icon-"]:before, [class*=" icon-"]:before {\n' +</style>
function makeMenu(row) {
row = row || rootRow;
var actions = [];
var type = row.mode === modes.tree ? "Folder" :
modes.isFile(row.mode) ? "File" :
row.mode === modes.sym ? "SymLink" :
row.path.indexOf("/") < 0 ? "Repo" : "Submodule";
if (row.mode === modes.tree || row.mode === modes.commit) {
if (openPaths[row.path]) {
actions.push(
{icon:"doc", label:"Create File", action: createFile},
{icon:"folder", label:"Create Folder", action: createFolder},
{icon:"link", label:"Create SymLink", action: createSymLink},
{sep:true},
{icon:"folder", label:"Import Folder", action: importFolder},
{icon:"fork", label: "Clone Remote Repo", action: addSubmodule},
{icon:"github", label: "Live Mount Github Repo", action: addGithubMount}
);
if (!row.path) {
actions.push({icon:"ccw", label: "Remove All", action: removeAll});
}
}