@leadertechie/personal-site-kit 0.1.0-alpha.3 → 0.1.0-alpha.5
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/dist/api/handlers/auth-handler.d.ts +2 -0
- package/dist/api/handlers/auth-handler.d.ts.map +1 -0
- package/dist/api/handlers/auth.d.ts +23 -0
- package/dist/api/handlers/auth.d.ts.map +1 -0
- package/dist/api/handlers/content.d.ts.map +1 -1
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/website-api.d.ts +1 -1
- package/dist/api/website-api.d.ts.map +1 -1
- package/dist/api.js +17 -2
- package/dist/assets/logo-placeholder.svg +21 -0
- package/dist/chunks/index-VimKeB5W.js +1927 -0
- package/dist/chunks/{template-gGTkeOcA.js → template-MawmknFQ.js} +13 -4
- package/dist/chunks/{website-api-CVsi-OLc.js → website-api-DI3muo2s.js} +335 -23
- package/dist/index.js +29 -13
- package/dist/shared/router.d.ts.map +1 -1
- package/dist/shared.js +1 -1
- package/dist/ui/about-me/styles.d.ts.map +1 -1
- package/dist/ui/admin/styles.d.ts.map +1 -1
- package/dist/ui/banner/styles.d.ts.map +1 -1
- package/dist/ui/blog-viewer/__tests__/blogviewer.test.d.ts +2 -0
- package/dist/ui/blog-viewer/__tests__/blogviewer.test.d.ts.map +1 -0
- package/dist/ui/blog-viewer/index.d.ts +25 -0
- package/dist/ui/blog-viewer/index.d.ts.map +1 -0
- package/dist/ui/blog-viewer/styles.d.ts +2 -0
- package/dist/ui/blog-viewer/styles.d.ts.map +1 -0
- package/dist/ui/footer/styles.d.ts.map +1 -1
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/story-viewer/__tests__/storyviewer.test.d.ts +2 -0
- package/dist/ui/story-viewer/__tests__/storyviewer.test.d.ts.map +1 -0
- package/dist/ui/story-viewer/index.d.ts +25 -0
- package/dist/ui/story-viewer/index.d.ts.map +1 -0
- package/dist/ui/story-viewer/styles.d.ts +2 -0
- package/dist/ui/story-viewer/styles.d.ts.map +1 -0
- package/dist/ui.js +4 -2
- package/package.json +3 -2
- package/public/assets/logo-placeholder.svg +21 -0
- package/src/api/handlers/auth-handler.ts +181 -0
- package/src/api/handlers/auth.ts +157 -0
- package/src/api/handlers/content.ts +81 -14
- package/src/api/index.ts +2 -0
- package/src/api/website-api.ts +22 -16
- package/src/shared/config/index.ts +1 -1
- package/src/shared/router.ts +12 -3
- package/src/ui/about-me/styles.ts +81 -6
- package/src/ui/admin/styles.ts +0 -47
- package/src/ui/banner/styles.ts +89 -4
- package/src/ui/blog-viewer/__tests__/blogviewer.test.ts +7 -0
- package/src/ui/blog-viewer/index.ts +124 -0
- package/src/ui/blog-viewer/styles.ts +23 -0
- package/src/ui/footer/index.ts +1 -1
- package/src/ui/footer/styles.ts +43 -2
- package/src/ui/index.ts +2 -0
- package/src/ui/story-viewer/__tests__/storyviewer.test.ts +7 -0
- package/src/ui/story-viewer/index.ts +120 -0
- package/src/ui/story-viewer/styles.ts +54 -0
- package/dist/chunks/index-BqixlS-2.js +0 -1157
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-handler.d.ts","sourceRoot":"","sources":["../../../src/api/handlers/auth-handler.ts"],"names":[],"mappings":"AAkBA,wBAAsB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAkC/F"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const AUTH_KV = "auth_store";
|
|
2
|
+
declare const RATE_LIMIT_KV = "rate_limit";
|
|
3
|
+
declare const MAX_ATTEMPTS = 5;
|
|
4
|
+
declare const BASE_DELAY_MS = 1000;
|
|
5
|
+
interface AuthStore {
|
|
6
|
+
username: string;
|
|
7
|
+
passwordHash: string;
|
|
8
|
+
salt: string;
|
|
9
|
+
}
|
|
10
|
+
declare function hashPassword(password: string, salt: string): Promise<string>;
|
|
11
|
+
declare function generateSalt(): Promise<string>;
|
|
12
|
+
declare function checkRateLimit(env: any, ip: string): Promise<{
|
|
13
|
+
allowed: boolean;
|
|
14
|
+
delayMs: number;
|
|
15
|
+
}>;
|
|
16
|
+
declare function recordFailedAttempt(env: any, ip: string): Promise<void>;
|
|
17
|
+
declare function clearRateLimit(env: any, ip: string): Promise<void>;
|
|
18
|
+
declare function getAuthStore(env: any): Promise<AuthStore | null>;
|
|
19
|
+
declare function setupAuth(env: any, username: string, password: string): Promise<void>;
|
|
20
|
+
declare function verifyCredentials(env: any, username: string, password: string): Promise<boolean>;
|
|
21
|
+
declare function getClientIP(request: Request): string;
|
|
22
|
+
export { hashPassword, generateSalt, checkRateLimit, recordFailedAttempt, clearRateLimit, getAuthStore, setupAuth, verifyCredentials, getClientIP, AUTH_KV, RATE_LIMIT_KV, MAX_ATTEMPTS, BASE_DELAY_MS };
|
|
23
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/api/handlers/auth.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,OAAO,eAAe,CAAC;AAC7B,QAAA,MAAM,aAAa,eAAe,CAAC;AACnC,QAAA,MAAM,YAAY,IAAI,CAAC;AACvB,QAAA,MAAM,aAAa,OAAO,CAAC;AAG3B,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAQD,iBAAe,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAuB3E;AAED,iBAAe,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAG7C;AAED,iBAAe,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CA2BlG;AAED,iBAAe,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBtE;AAED,iBAAe,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGjE;AAED,iBAAe,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAG/D;AAED,iBAAe,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CASpF;AAED,iBAAe,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAa/F;AAED,iBAAS,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAI7C;AAED,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,aAAa,EACb,YAAY,EACZ,aAAa,EACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/api/handlers/content.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/api/handlers/content.ts"],"names":[],"mappings":"AAkBA,wBAAsB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAiElG"}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { WebsiteAPI } from './website-api';
|
|
2
2
|
export { WebsiteAPI };
|
|
3
3
|
export type { APIHandler } from './website-api';
|
|
4
|
+
export * from './handlers/auth';
|
|
5
|
+
export * from './handlers/auth-handler';
|
|
4
6
|
declare const defaultAPI: WebsiteAPI;
|
|
5
7
|
export default defaultAPI;
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AAGxC,QAAA,MAAM,UAAU,YAAmB,CAAC;AACpC,eAAe,UAAU,CAAC"}
|
|
@@ -3,8 +3,8 @@ export declare class WebsiteAPI {
|
|
|
3
3
|
private customHandlers;
|
|
4
4
|
registerHandler(route: string, handler: APIHandler): void;
|
|
5
5
|
private addCORSHeaders;
|
|
6
|
+
private addAdminCORSHeaders;
|
|
6
7
|
private handleCORS;
|
|
7
|
-
private requireAuth;
|
|
8
8
|
fetch(request: Request, env: any): Promise<Response>;
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=website-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-api.d.ts","sourceRoot":"","sources":["../../src/api/website-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"website-api.d.ts","sourceRoot":"","sources":["../../src/api/website-api.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE3E,qBAAa,UAAU;IACrB,OAAO,CAAC,cAAc,CAAiC;IAEhD,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU;IAIzD,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,UAAU;IAYL,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC;CAkFlE"}
|
package/dist/api.js
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
import { W as WebsiteAPI } from "./chunks/website-api-
|
|
1
|
+
import { W as WebsiteAPI } from "./chunks/website-api-DI3muo2s.js";
|
|
2
|
+
import { A, B, M, R, c, a, g, b, d, h, e, r, s, v } from "./chunks/website-api-DI3muo2s.js";
|
|
2
3
|
const defaultAPI = new WebsiteAPI();
|
|
3
4
|
export {
|
|
5
|
+
A as AUTH_KV,
|
|
6
|
+
B as BASE_DELAY_MS,
|
|
7
|
+
M as MAX_ATTEMPTS,
|
|
8
|
+
R as RATE_LIMIT_KV,
|
|
4
9
|
WebsiteAPI,
|
|
5
|
-
|
|
10
|
+
c as checkRateLimit,
|
|
11
|
+
a as clearRateLimit,
|
|
12
|
+
defaultAPI as default,
|
|
13
|
+
g as generateSalt,
|
|
14
|
+
b as getAuthStore,
|
|
15
|
+
d as getClientIP,
|
|
16
|
+
h as handleAuth,
|
|
17
|
+
e as hashPassword,
|
|
18
|
+
r as recordFailedAttempt,
|
|
19
|
+
s as setupAuth,
|
|
20
|
+
v as verifyCredentials
|
|
6
21
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<svg width="600" height="320" viewBox="0 0 600 320" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<style>
|
|
3
|
+
.text-main {
|
|
4
|
+
fill: light-dark(#4A5568, #E2E8F0);
|
|
5
|
+
font-family: 'Segoe UI', 'Arial Black', sans-serif;
|
|
6
|
+
font-weight: 900;
|
|
7
|
+
font-size: 46px;
|
|
8
|
+
letter-spacing: -0.01em;
|
|
9
|
+
text-anchor: middle;
|
|
10
|
+
}
|
|
11
|
+
</style>
|
|
12
|
+
|
|
13
|
+
<!-- Big circle placeholder -->
|
|
14
|
+
<circle cx="300" cy="160" r="100" fill="none" stroke="light-dark(#A0AEC0, #718096)" stroke-width="2" stroke-dasharray="8 4" opacity="0.5" />
|
|
15
|
+
|
|
16
|
+
<!-- Plus sign in circle -->
|
|
17
|
+
<line x1="300" y1="100" x2="300" y2="220" stroke="light-dark(#A0AEC0, #718096)" stroke-width="2" opacity="0.3" />
|
|
18
|
+
<line x1="240" y1="160" x2="360" y2="160" stroke="light-dark(#A0AEC0, #718096)" stroke-width="2" opacity="0.3" />
|
|
19
|
+
|
|
20
|
+
<text x="300" y="290" class="text-main">YOUR LOGO</text>
|
|
21
|
+
</svg>
|