@ibgib/web-gib 0.0.62 → 0.0.63
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/AUTO-GENERATED-version.d.mts +1 -1
- package/dist/AUTO-GENERATED-version.mjs +1 -1
- package/dist/helpers.web.d.mts +17 -2
- package/dist/helpers.web.d.mts.map +1 -1
- package/dist/helpers.web.mjs +67 -2
- package/dist/helpers.web.mjs.map +1 -1
- package/dist/identity/passkey-helper.d.mts +7 -2
- package/dist/identity/passkey-helper.d.mts.map +1 -1
- package/dist/identity/passkey-helper.mjs +33 -12
- package/dist/identity/passkey-helper.mjs.map +1 -1
- package/dist/ui/component/identity/keystone-creator/keystone-creator.css +26 -0
- package/dist/ui/component/identity/keystone-creator/keystone-creator.d.mts.map +1 -1
- package/dist/ui/component/identity/keystone-creator/keystone-creator.html +18 -1
- package/dist/ui/component/identity/keystone-creator/keystone-creator.mjs +10 -2
- package/dist/ui/component/identity/keystone-creator/keystone-creator.mjs.map +1 -1
- package/dist/ui/component/identity/keystone-details/keystone-details.d.mts +12 -0
- package/dist/ui/component/identity/keystone-details/keystone-details.d.mts.map +1 -1
- package/dist/ui/component/identity/keystone-details/keystone-details.html +8 -0
- package/dist/ui/component/identity/keystone-details/keystone-details.mjs +419 -305
- package/dist/ui/component/identity/keystone-details/keystone-details.mjs.map +1 -1
- package/dist/ui/ui-helpers.d.mts.map +1 -1
- package/dist/ui/ui-helpers.mjs +7 -2
- package/dist/ui/ui-helpers.mjs.map +1 -1
- package/package.json +2 -2
- package/src/AUTO-GENERATED-version.mts +1 -1
- package/src/helpers.web.mts +95 -5
- package/src/identity/passkey-helper.mts +43 -10
- package/src/ui/component/identity/keystone-creator/keystone-creator.css +26 -0
- package/src/ui/component/identity/keystone-creator/keystone-creator.html +18 -1
- package/src/ui/component/identity/keystone-creator/keystone-creator.mts +12 -2
- package/src/ui/component/identity/keystone-details/keystone-details.html +8 -0
- package/src/ui/component/identity/keystone-details/keystone-details.mts +474 -339
- package/src/ui/ui-helpers.mts +6 -2
- package/tools/auto-generated-agent-skills/skills/ibgib-create-app-server/SKILL.md +50 -0
- package/src/identity/custodian-delegate-helper.mts.bak +0 -7
- package/src/identity/sso/sso-config-helper.mts.bak +0 -52
- package/src/identity/sso/sso-custodian-service.mts.bak +0 -566
- package/src/identity/sso/sso-custodian-service.respec.mts.bak +0 -298
package/src/ui/ui-helpers.mts
CHANGED
|
@@ -334,7 +334,11 @@ export async function showFullscreenDialog({
|
|
|
334
334
|
true.toString();
|
|
335
335
|
if (promptInput) { promptInput.value = ''; } // Clear input for next time
|
|
336
336
|
dialog.close(result);
|
|
337
|
-
|
|
337
|
+
if (validPasskeys.length > 0) {
|
|
338
|
+
resolve({ secret: result, poolId: 'manage' });
|
|
339
|
+
} else {
|
|
340
|
+
resolve(result);
|
|
341
|
+
}
|
|
338
342
|
};
|
|
339
343
|
|
|
340
344
|
/** user clicks Passkey button */
|
|
@@ -353,7 +357,7 @@ export async function showFullscreenDialog({
|
|
|
353
357
|
removeEventListeners();
|
|
354
358
|
if (promptInput) { promptInput.value = ''; }
|
|
355
359
|
dialog.close(passkeySecret);
|
|
356
|
-
resolve(passkeySecret);
|
|
360
|
+
resolve({ secret: passkeySecret, poolId: selectedPasskey.poolId || 'passkey-manage' });
|
|
357
361
|
} else {
|
|
358
362
|
btnPasskey!.disabled = false;
|
|
359
363
|
btnPasskey!.textContent = passkeyButtonTitle || '🛡️ Touch ID / Security Key';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ibgib-create-app-server
|
|
3
|
+
description: Scaffolds the backend Node.js server for an ibgib full-stack application using serve-gib from @ibgib/node-gib, including WebSocket sync upgrade, Traefik Docker Compose, and server TypeScript configuration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: ibgib-create-app-server
|
|
7
|
+
|
|
8
|
+
## What This Skill Does
|
|
9
|
+
|
|
10
|
+
Generates the backend server infrastructure for a full-stack ibgib application. This includes:
|
|
11
|
+
- **`src/server/server.mts`**: Node.js HTTP/WebSocket server utilizing `serve-gib`, `getStandardServeGibHandlers()`, and `SyncUpgradeHandler`.
|
|
12
|
+
- **`tsconfig.server.json`**: TypeScript compiler configuration targeted for Node.js ESNext.
|
|
13
|
+
- **`Dockerfile`**: Lightweight Alpine container packaging the bundled server and static client SPA.
|
|
14
|
+
- **`docker-compose.yml`**: Local multi-container orchestration behind the Traefik reverse proxy with automatic local HTTPS.
|
|
15
|
+
|
|
16
|
+
This skill is invoked during the scaffolding of **Full-Stack (Archetype A)** applications.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Token Reference
|
|
21
|
+
|
|
22
|
+
| Token | Example value | How it's computed |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `{{APP_NAME}}` | `my-app` | kebab-case application name |
|
|
25
|
+
| `{{APP_DIR_NAME}}` | `my-app` | Folder name |
|
|
26
|
+
| `{{APP_HUMAN_NAME}}` | `My App` | Natural language name |
|
|
27
|
+
| `{{PORT}}` | `3000` | Server port (default `3000`) |
|
|
28
|
+
| `{{DATA_DIR_REL}}` | `../../.data/my-app-space` | Local storage directory relative to server |
|
|
29
|
+
| `{{LOCAL_DOMAIN}}` | `my-app.localhost` | Local HTTPS subdomain |
|
|
30
|
+
| `{{APP_UUID}}` | `4b810a9c...` | Unique 32-char hex string from `generate-id.js` |
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Generation Steps
|
|
35
|
+
|
|
36
|
+
### 1. Confirm token values
|
|
37
|
+
Derive tokens from the developer's inputs and generate fresh UUIDs using `node .agents/skills/ibgib-create-app-core/generate-id.js`.
|
|
38
|
+
|
|
39
|
+
### 2. Generate files
|
|
40
|
+
Apply token substitutions to templates in `templates/` and write to the target application directory:
|
|
41
|
+
|
|
42
|
+
| Template file | Output file |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `templates/server.mts.template` | `src/server/server.mts` |
|
|
45
|
+
| `templates/tsconfig.server.json.template` | `tsconfig.server.json` |
|
|
46
|
+
| `templates/Dockerfile.template` | `Dockerfile` |
|
|
47
|
+
| `templates/docker-compose.yml.template` | `docker-compose.yml` (or app service block) |
|
|
48
|
+
|
|
49
|
+
### 3. Update Build Script
|
|
50
|
+
Ensure the application's `build-[app-name].mts` script configures `tsconfigConfigs` for both client (`tsconfig.json`) and server (`tsconfig.server.json`), and builds the server entry point via `buildServer()`.
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { SsoServerConfig, SsoProviderServerConfig, SsoProviderId } from './sso-types.mjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Loads the SSO configuration from environment variables.
|
|
5
|
-
* Parses active OAuth2 providers dynamically based on their environment keys.
|
|
6
|
-
*/
|
|
7
|
-
export function loadSsoServerConfig(): SsoServerConfig {
|
|
8
|
-
const ssoServerKdfSecret = process.env.SSO_SERVER_KDF_SECRET;
|
|
9
|
-
const sessionSecret = process.env.SESSION_SECRET;
|
|
10
|
-
|
|
11
|
-
if (!ssoServerKdfSecret) {
|
|
12
|
-
throw new Error(
|
|
13
|
-
`SSO_SERVER_KDF_SECRET is missing from environment. (E: 840899ab4fdfd23e89cfae1889cfae12)`
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
if (!sessionSecret) {
|
|
17
|
-
throw new Error(
|
|
18
|
-
`SESSION_SECRET is missing from environment. (E: bfa899ab4fdfd23e89cfae23)`
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const providers: Partial<Record<SsoProviderId, SsoProviderServerConfig>> = {};
|
|
23
|
-
|
|
24
|
-
// Load Google Provider if configured
|
|
25
|
-
if (process.env.GOOGLE_CLIENT_ID && process.env.GOOGLE_CLIENT_SECRET) {
|
|
26
|
-
providers.google = {
|
|
27
|
-
providerId: 'google',
|
|
28
|
-
clientId: process.env.GOOGLE_CLIENT_ID,
|
|
29
|
-
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
|
|
30
|
-
tokenUrl: 'https://oauth2.googleapis.com/token',
|
|
31
|
-
userInfoUrl: 'https://openidconnect.googleapis.com/v1/userinfo',
|
|
32
|
-
jwksUrl: 'https://www.googleapis.com/oauth2/v3/certs'
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Load GitHub Provider if configured
|
|
37
|
-
if (process.env.GITHUB_CLIENT_ID && process.env.GITHUB_CLIENT_SECRET) {
|
|
38
|
-
providers.github = {
|
|
39
|
-
providerId: 'github',
|
|
40
|
-
clientId: process.env.GITHUB_CLIENT_ID,
|
|
41
|
-
clientSecret: process.env.GITHUB_CLIENT_SECRET,
|
|
42
|
-
tokenUrl: 'https://github.com/login/oauth/access_token',
|
|
43
|
-
userInfoUrl: 'https://api.github.com/user'
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
ssoServerKdfSecret,
|
|
49
|
-
sessionSecret,
|
|
50
|
-
providers
|
|
51
|
-
};
|
|
52
|
-
}
|