infamous-test 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +44 -0
- package/index.html +4 -4
- package/package.json +1 -1
- package/uv/uv.config.js +14 -3
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Infamous Unpkg Project - Claude Instructions
|
|
2
|
+
|
|
3
|
+
## CRITICAL: Version Bump Rule
|
|
4
|
+
|
|
5
|
+
**Every time you make ANY changes to the proxy code, UV configuration, or any files in the unpkg folder, you MUST:**
|
|
6
|
+
|
|
7
|
+
1. Increment the version number in `package.json`
|
|
8
|
+
2. Update the version in `index.html` version-tag element
|
|
9
|
+
3. Update the version in `index.html` infamousattr element
|
|
10
|
+
|
|
11
|
+
### Version Locations to Update:
|
|
12
|
+
- `unpkg/package.json` - line with `"version": "x.x.x"`
|
|
13
|
+
- `unpkg/index.html` - `<p class="version-tag">infamous <a href="#">unpkg vX.X.X</a></p>`
|
|
14
|
+
- `unpkg/index.html` - `<infamousattr version="sX.X.X-unpkg"></infamousattr>`
|
|
15
|
+
|
|
16
|
+
### Why This Matters:
|
|
17
|
+
NPM/unpkg will reject publishing if the version already exists. Every change requires a new version number to successfully publish.
|
|
18
|
+
|
|
19
|
+
### Version Format:
|
|
20
|
+
- Use semantic versioning: `MAJOR.MINOR.PATCH`
|
|
21
|
+
- For bug fixes/small changes: increment PATCH (1.0.0 -> 1.0.1)
|
|
22
|
+
- For new features: increment MINOR (1.0.1 -> 1.1.0)
|
|
23
|
+
- For breaking changes: increment MAJOR (1.1.0 -> 2.0.0)
|
|
24
|
+
|
|
25
|
+
## Project Structure
|
|
26
|
+
|
|
27
|
+
- `unpkg/` - Main project folder for npm publishing
|
|
28
|
+
- `index.html` - Single-file application with all CSS/JS embedded
|
|
29
|
+
- `package.json` - NPM package configuration
|
|
30
|
+
- `uv/` - Ultraviolet proxy files
|
|
31
|
+
- `baremux/` - BareMux transport files
|
|
32
|
+
- `libcurl/` - Libcurl transport files
|
|
33
|
+
|
|
34
|
+
## Wisp Server Configuration
|
|
35
|
+
|
|
36
|
+
Default wisp server: `wss://wisp-server-167340080388.us-central1.run.app/`
|
|
37
|
+
Named as "Infamous" in the UI.
|
|
38
|
+
|
|
39
|
+
## Key Technical Notes
|
|
40
|
+
|
|
41
|
+
- Base path detection uses `INFAMOUS_BASE` variable for unpkg compatibility
|
|
42
|
+
- UV config dynamically detects base path from URL patterns like `/package@version/`
|
|
43
|
+
- Service worker scope must match `INFAMOUS_BASE`
|
|
44
|
+
- Icons use RemixIcon (ri-*) classes, not Font Awesome
|
package/index.html
CHANGED
|
@@ -399,7 +399,7 @@ button.button:hover { background: var(--bg-3); }
|
|
|
399
399
|
<p>A state of the art unblocked games website. Clean, customizable, and powerful.</p>
|
|
400
400
|
</div>
|
|
401
401
|
</div>
|
|
402
|
-
<p class="version-tag">infamous <a href="#" target="_blank">unpkg v1.0.
|
|
402
|
+
<p class="version-tag">infamous <a href="#" target="_blank">unpkg v1.0.1</a></p>
|
|
403
403
|
</div>
|
|
404
404
|
</div>
|
|
405
405
|
|
|
@@ -445,7 +445,7 @@ button.button:hover { background: var(--bg-3); }
|
|
|
445
445
|
</div>
|
|
446
446
|
|
|
447
447
|
<button id="reset-theme" onclick="resetTheme()">CLICK HERE TO RESET YOUR THEME!</button>
|
|
448
|
-
<infamousattr version="s1.0.
|
|
448
|
+
<infamousattr version="s1.0.1-unpkg"></infamousattr>
|
|
449
449
|
|
|
450
450
|
<!-- Three.js and Vanta -->
|
|
451
451
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
|
|
@@ -1031,8 +1031,8 @@ function navTo(l) {
|
|
|
1031
1031
|
async function registerSW() {
|
|
1032
1032
|
if ("serviceWorker" in navigator) {
|
|
1033
1033
|
try {
|
|
1034
|
-
await navigator.serviceWorker.register(INFAMOUS_BASE + "uv/sw.js");
|
|
1035
|
-
console.log("UV service worker registered");
|
|
1034
|
+
await navigator.serviceWorker.register(INFAMOUS_BASE + "uv/sw.js", { scope: INFAMOUS_BASE });
|
|
1035
|
+
console.log("UV service worker registered with scope:", INFAMOUS_BASE);
|
|
1036
1036
|
setTimeout(() => {
|
|
1037
1037
|
showToast("success", "Ultraviolet ready!", "ri-check-line");
|
|
1038
1038
|
document.querySelector(".ri-loader-4-line").style.opacity = 0;
|
package/package.json
CHANGED
package/uv/uv.config.js
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
// Dynamically detect base path for unpkg compatibility
|
|
3
|
-
// This works for paths like /package-name@version/uv/ or /uv/
|
|
4
3
|
const currentPath = self.location.pathname;
|
|
5
|
-
|
|
6
|
-
// Find the base path by looking for the uv directory
|
|
7
4
|
let basePath = '';
|
|
5
|
+
|
|
6
|
+
// Method 1: If we're in a service worker or uv/ path, extract from there
|
|
8
7
|
const uvIndex = currentPath.indexOf('/uv/');
|
|
9
8
|
if (uvIndex > 0) {
|
|
10
9
|
basePath = currentPath.substring(0, uvIndex);
|
|
11
10
|
}
|
|
11
|
+
// Method 2: If loaded from main page, check for package@version pattern
|
|
12
|
+
else {
|
|
13
|
+
const match = currentPath.match(/^(\/[^\/]+@[^\/]+)/);
|
|
14
|
+
if (match) {
|
|
15
|
+
basePath = match[1];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Method 3: Use window.INFAMOUS_BASE if available (set by index.html)
|
|
20
|
+
if (!basePath && typeof window !== 'undefined' && window.INFAMOUS_BASE) {
|
|
21
|
+
basePath = window.INFAMOUS_BASE.replace(/\/$/, '');
|
|
22
|
+
}
|
|
12
23
|
|
|
13
24
|
let uvPfx = basePath + "/uv/";
|
|
14
25
|
|