Skip to content

Commit

Permalink
Update to 24.04 (Noble Numbat)
Browse files Browse the repository at this point in the history
  • Loading branch information
btidor committed Jul 7, 2024
1 parent 41e8689 commit 17b86a0
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN npm install -g npm yo generator-code

# Install development packages
ADD --apt graphviz linux-tools-generic google-perftools libgoogle-perftools-dev \
llvm gnuplot-nox musl-tools universal-ctags postgresql-client lftp
llvm gnuplot-nox musl-tools universal-ctags dpkg-dev postgresql-client lftp

RUN curl -L https://fly.io/install.sh | FLYCTL_INSTALL=/usr/local sh

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 btidor
Copyright (c) 2021-2024 Benjamin Tidor

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 13 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# src.codes
# src.codes

src.codes is an online code browser for the Ubuntu package archive.

* Browse the source code for all 2,390 packages in `main`.

* Navigate the entire repository with standard VS Code tools:

- fuzzy-find files by path (`Ctrl-P`)
- full regex search (`Ctrl-Shift-F`)
- cross-package go-to-definition (`Ctrl-F12`; C only)

~> https://src.codes
6 changes: 3 additions & 3 deletions distributions.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[mantic]
[noble]
mirror = "http://us.archive.ubuntu.com/ubuntu/"
areas = ["security", "updates", ""]
components = ["main", "multiverse"]
areas = [""]
components = ["main"]
2 changes: 1 addition & 1 deletion extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import GrepClient from './clients/grep';
export function activate(context: vscode.ExtensionContext) {
const config = {
scheme: 'srccodes',
distribution: 'mantic',
distribution: 'noble',

meta: vscode.Uri.parse('https://meta.src.codes'),
ls: vscode.Uri.parse('https://ls.src.codes'),
Expand Down
2 changes: 1 addition & 1 deletion fzf/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::str::FromStr;
use tiny_http::Header;
use tiny_http::Response;

const DISTRO: &str = "mantic";
const DISTRO: &str = "noble";
const MAX_RESULTS: usize = 100;
const META_BASE: &str = "https://meta.src.codes/";
const NUM_ITERATIONS: usize = 50;
Expand Down
3 changes: 3 additions & 0 deletions infra/bunny.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ Bucket Headers
Index File -> index.html
404 File -> 404.html
Robots File -> robots.txt

lftp sftp://BUCKET@storage.bunnycdn.com
> mirror -R -P 50 --no-symlinks _build/out-vscode-web-min/
9 changes: 5 additions & 4 deletions vscode/build
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ for patch in "$PROJECT_BASE"/vscode/*.patch; do
fi
done

# Copy in the Explorer extension (built above)
rm -rf "$BUILD_DIR/extensions/distro-source-explorer"
cp -r "$PROJECT_BASE/extension" "$BUILD_DIR/extensions/distro-source-explorer"

# Insert product.json & extensions.json
export PRODUCT_TS="$BUILD_DIR/src/vs/platform/product/common/product.ts"
if [ ! -f "$PRODUCT_TS.orig" ]; then
Expand Down Expand Up @@ -66,14 +70,11 @@ find "$PROJECT_BASE/vscode/" -name '*.svg' -exec cp {} "$BUILD_DIR/src/vs/workbe
sudo npm install -g yarn
yarn install

# Copy in the Explorer extension (built above)
rm -rf "$BUILD_DIR/extensions/distro-source-explorer"
cp -r "$PROJECT_BASE/extension" "$BUILD_DIR/extensions/distro-source-explorer"

# Build VS Code; output is in $BUILD_DIR/out-vscode-web-min/
yarn gulp vscode-web
yarn gulp minify-vscode-web

cp "$PROJECT_BASE/vscode/index.html" "$BUILD_DIR/out-vscode-web-min/"
cp "$PROJECT_BASE/infra/404.html" "$BUILD_DIR/out-vscode-web-min/"
cp -r "$BUILD_DIR/extensions" "$BUILD_DIR/out-vscode-web-min/"
cp -r "$BUILD_DIR/remote/web/node_modules" "$BUILD_DIR/out-vscode-web-min/remote"
39 changes: 36 additions & 3 deletions vscode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<title>src.codes</title>

<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<link data-name="vs/workbench/workbench.web.main" rel="stylesheet" href="./vs/workbench/workbench.web.main.css" />
<meta name="description" content="An online code browser for the Ubuntu package archive. Browse the source code for all 2,390 packages in `main`." />
</head>

<body aria-label="" style="background-color: #1e1e1e">
Expand All @@ -17,7 +18,7 @@
config.dataset.settings = JSON.stringify({
folderUri: {
scheme: "srccodes",
path: "/mantic",
path: "/noble",
},
configurationDefaults: {
"initialColorTheme": {
Expand Down Expand Up @@ -50,7 +51,7 @@
},
windowIndicator: {
label: "$(terminal-ubuntu)",
tooltip: "Ubuntu 22.10",
tooltip: "Ubuntu 24.04",
command: null,
},
});
Expand All @@ -72,6 +73,38 @@
'jschardet': `${window.location.origin}/remote/jschardet/dist/jschardet.min.js`,
},
};


(function() {
function warn(reason) {
console.warn("Ignoring Event: " + reason);
}

const location = window.location;
if (
/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(
location.hostname
) ||
location.protocol === "file:"
)
return warn("localhost");

const w = window;
if (w._phantom || w.__nightmare || w.navigator.webdriver || w.Cypress) return;

const request = new XMLHttpRequest();
request.open("POST", "https://count.src.codes/api/event", true);
request.setRequestHeader("Content-Type", "text/plain");
request.send(
JSON.stringify({
n: "pageview",
u: location.origin + "/", // report all URLs as `/`
d: location.host,
r: window.document.referrer || null,
w: window.innerWidth,
})
);
})();
</script>
<script src="./vs/loader.js"></script>

Expand Down
2 changes: 1 addition & 1 deletion vscode/product.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.72.2-src.codes",
"version": "1.91.0-src.codes",
"commit": "{{COMMIT}}",
"date": "{{DATE}}",
"nameShort": "src.codes",
Expand Down

0 comments on commit 17b86a0

Please sign in to comment.