diff --git a/GNUmakefile b/GNUmakefile
index 1debd83a..3d92906f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -959,8 +959,7 @@ PACKAGE_DIRS := \
core \
deps/codemirror \
deps/prettier \
- deps/lit \
- deps/speedscope
+ deps/lit
RAW_FILES := $(sort $(filter-out apps/blog% apps/issues% apps/welcome% apps/journal% %.map, $(shell find $(PACKAGE_DIRS) -type f -not -name '.*')))
@@ -1260,7 +1259,6 @@ tarball: ## Build an all-inclusive source tarball (.tar.xz).
--exclude=deps/libsodium/test \
--exclude=deps/libuv/docs \
--exclude=deps/libuv/test \
- --exclude=deps/speedscope/*.map \
--exclude=deps/sqlite/shell.c \
--exclude=deps/zlib/contrib/vstudio \
--exclude=deps/zlib/doc \
diff --git a/apps/trace.json b/apps/trace.json
new file mode 100644
index 00000000..c69cbc64
--- /dev/null
+++ b/apps/trace.json
@@ -0,0 +1,5 @@
+{
+ "type": "tildefriends-app",
+ "emoji": "📦",
+ "previous": "&mhBOscDHiJ4VNnod27NOdRVC+4cXYZXIdYjsQBfmTYg=.sha256"
+}
diff --git a/apps/trace/app.js b/apps/trace/app.js
new file mode 100644
index 00000000..724ae34c
--- /dev/null
+++ b/apps/trace/app.js
@@ -0,0 +1,25 @@
+async function main() {
+ let speedscope_js = await utf8Decode(getFile('speedscope/speedscope-432XE7GS.js'));
+ speedscope_js = speedscope_js.replace(/alert\(`Cannot load.*?return/, '');
+ app.setDocument(`
+
+
+
+
+
+
+ speedscope
+
+
+
+
+
+
+
+ `);
+}
+
+main();
\ No newline at end of file
diff --git a/deps/speedscope/LICENSE b/apps/trace/speedscope/LICENSE
similarity index 100%
rename from deps/speedscope/LICENSE
rename to apps/trace/speedscope/LICENSE
diff --git a/deps/speedscope/README b/apps/trace/speedscope/README
similarity index 100%
rename from deps/speedscope/README
rename to apps/trace/speedscope/README
diff --git a/deps/speedscope/SourceCodePro-Regular.ttf-ILST5JV6.woff2 b/apps/trace/speedscope/SourceCodePro-Regular.ttf-ILST5JV6.woff2
similarity index 100%
rename from deps/speedscope/SourceCodePro-Regular.ttf-ILST5JV6.woff2
rename to apps/trace/speedscope/SourceCodePro-Regular.ttf-ILST5JV6.woff2
diff --git a/deps/speedscope/favicon-16x16-V2DMIAZS.js b/apps/trace/speedscope/favicon-16x16-V2DMIAZS.js
similarity index 100%
rename from deps/speedscope/favicon-16x16-V2DMIAZS.js
rename to apps/trace/speedscope/favicon-16x16-V2DMIAZS.js
diff --git a/deps/speedscope/favicon-16x16-VSI62OPJ.png b/apps/trace/speedscope/favicon-16x16-VSI62OPJ.png
similarity index 100%
rename from deps/speedscope/favicon-16x16-VSI62OPJ.png
rename to apps/trace/speedscope/favicon-16x16-VSI62OPJ.png
diff --git a/deps/speedscope/favicon-32x32-3EB2YCUY.png b/apps/trace/speedscope/favicon-32x32-3EB2YCUY.png
similarity index 100%
rename from deps/speedscope/favicon-32x32-3EB2YCUY.png
rename to apps/trace/speedscope/favicon-32x32-3EB2YCUY.png
diff --git a/deps/speedscope/favicon-32x32-THY3JDJL.js b/apps/trace/speedscope/favicon-32x32-THY3JDJL.js
similarity index 100%
rename from deps/speedscope/favicon-32x32-THY3JDJL.js
rename to apps/trace/speedscope/favicon-32x32-THY3JDJL.js
diff --git a/deps/speedscope/favicon-FOKUP5Y5.ico b/apps/trace/speedscope/favicon-FOKUP5Y5.ico
similarity index 100%
rename from deps/speedscope/favicon-FOKUP5Y5.ico
rename to apps/trace/speedscope/favicon-FOKUP5Y5.ico
diff --git a/deps/speedscope/favicon-M34RF7BI.js b/apps/trace/speedscope/favicon-M34RF7BI.js
similarity index 100%
rename from deps/speedscope/favicon-M34RF7BI.js
rename to apps/trace/speedscope/favicon-M34RF7BI.js
diff --git a/deps/speedscope/file-format-schema.json b/apps/trace/speedscope/file-format-schema.json
similarity index 100%
rename from deps/speedscope/file-format-schema.json
rename to apps/trace/speedscope/file-format-schema.json
diff --git a/deps/speedscope/index.html b/apps/trace/speedscope/index.html
similarity index 100%
rename from deps/speedscope/index.html
rename to apps/trace/speedscope/index.html
diff --git a/deps/speedscope/perf-vertx-stacks-01-collapsed-all-ZNUIGAJL.txt b/apps/trace/speedscope/perf-vertx-stacks-01-collapsed-all-ZNUIGAJL.txt
similarity index 100%
rename from deps/speedscope/perf-vertx-stacks-01-collapsed-all-ZNUIGAJL.txt
rename to apps/trace/speedscope/perf-vertx-stacks-01-collapsed-all-ZNUIGAJL.txt
diff --git a/deps/speedscope/release.txt b/apps/trace/speedscope/release.txt
similarity index 100%
rename from deps/speedscope/release.txt
rename to apps/trace/speedscope/release.txt
diff --git a/deps/speedscope/source-code-pro.LICENSE.md b/apps/trace/speedscope/source-code-pro.LICENSE.md
similarity index 100%
rename from deps/speedscope/source-code-pro.LICENSE.md
rename to apps/trace/speedscope/source-code-pro.LICENSE.md
diff --git a/deps/speedscope/speedscope-432XE7GS.js b/apps/trace/speedscope/speedscope-432XE7GS.js
similarity index 100%
rename from deps/speedscope/speedscope-432XE7GS.js
rename to apps/trace/speedscope/speedscope-432XE7GS.js
diff --git a/deps/speedscope/speedscope-GHPHNKXC.css b/apps/trace/speedscope/speedscope-GHPHNKXC.css
similarity index 100%
rename from deps/speedscope/speedscope-GHPHNKXC.css
rename to apps/trace/speedscope/speedscope-GHPHNKXC.css
diff --git a/core/client.js b/core/client.js
index 124f4a4e..9c52b2c9 100644
--- a/core/client.js
+++ b/core/client.js
@@ -912,7 +912,7 @@ async function edit() {
* Open a performance trace.
*/
function trace() {
- window.open(`/speedscope/#profileURL=${encodeURIComponent('/trace')}`);
+ window.open(`/~core/trace/`);
}
/**
diff --git a/src/httpd.js.c b/src/httpd.js.c
index c3aac152..b1a938fa 100644
--- a/src/httpd.js.c
+++ b/src/httpd.js.c
@@ -965,7 +965,6 @@ tf_http_t* tf_httpd_create(JSContext* context)
tf_http_add_handler(http, "/codemirror/*", tf_httpd_endpoint_static, NULL, task);
tf_http_add_handler(http, "/lit/*", tf_httpd_endpoint_static, NULL, task);
tf_http_add_handler(http, "/prettier/*", tf_httpd_endpoint_static, NULL, task);
- tf_http_add_handler(http, "/speedscope/*", tf_httpd_endpoint_static, NULL, task);
tf_http_add_handler(http, "/static/*", tf_httpd_endpoint_static, NULL, task);
tf_http_add_handler(http, "/.well-known/*", tf_httpd_endpoint_static, NULL, task);
tf_http_add_handler(http, "/&*.sha256", _httpd_endpoint_add_slash, NULL, task);
diff --git a/src/httpd.static.c b/src/httpd.static.c
index 08796f97..b1ecc554 100644
--- a/src/httpd.static.c
+++ b/src/httpd.static.c
@@ -138,7 +138,6 @@ void tf_httpd_endpoint_static(tf_http_request_t* request)
{ "/lit/", "deps/lit/" },
{ "/codemirror/", "deps/codemirror/" },
{ "/prettier/", "deps/prettier/" },
- { "/speedscope/", "deps/speedscope/" },
{ "/.well-known/", "data/global/.well-known/" },
};
diff --git a/src/ssb.import.c b/src/ssb.import.c
index 83378292..281b4149 100644
--- a/src/ssb.import.c
+++ b/src/ssb.import.c
@@ -151,6 +151,14 @@ static void _tf_ssb_import_recursive_add_files(tf_ssb_t* ssb, uv_loop_t* loop, J
tf_free(blob);
tf_free(full_path);
}
+ else if (ent.type == UV_DIRENT_DIR)
+ {
+ size_t len = strlen(path) + strlen(ent.name) + 2;
+ char* full_path = tf_malloc(len);
+ snprintf(full_path, len, "%s/%s", path, ent.name);
+ _tf_ssb_import_recursive_add_files(ssb, loop, context, files, root, full_path);
+ tf_free(full_path);
+ }
}
}
else