@moniiapp/shared 0.1.0
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/LICENSE +21 -0
- package/README.md +55 -0
- package/dist/auth.d.ts +38 -0
- package/dist/auth.js +63 -0
- package/dist/auth.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/mock.d.ts +7 -0
- package/dist/mock.js +94 -0
- package/dist/mock.js.map +1 -0
- package/dist/status-color.d.ts +9 -0
- package/dist/status-color.js +24 -0
- package/dist/status-color.js.map +1 -0
- package/dist/tokens.d.ts +122 -0
- package/dist/tokens.js +104 -0
- package/dist/tokens.js.map +1 -0
- package/dist/types.d.ts +103 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 The Hopium Lab Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @moniiapp/shared
|
|
2
|
+
|
|
3
|
+
Shared types, design tokens, and API contracts used across the MONII
|
|
4
|
+
ecosystem:
|
|
5
|
+
|
|
6
|
+
- The iOS app ([`apps/moni-app`](https://github.com/randomershenans/MONII/tree/main/apps/moni-app))
|
|
7
|
+
- The CLI ([`@moniiapp/cli`](https://www.npmjs.com/package/@moniiapp/cli))
|
|
8
|
+
- The MCP server ([`@moniiapp/mcp`](https://www.npmjs.com/package/@moniiapp/mcp))
|
|
9
|
+
|
|
10
|
+
Published as its own npm package so the CLI and MCP server can pull
|
|
11
|
+
from a single source of truth for the auth-file shape, status enums,
|
|
12
|
+
and Vercel/Netlify response types — without bundling the iOS-only
|
|
13
|
+
design tokens into a Node binary.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
You typically don't install this directly. Both `@moniiapp/cli` and
|
|
18
|
+
`@moniiapp/mcp` depend on it transitively.
|
|
19
|
+
|
|
20
|
+
If you're building your own integration on top of the same auth file:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install @moniiapp/shared
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## What's in here
|
|
27
|
+
|
|
28
|
+
| Export | Module | Notes |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| `MoniiAuthFile`, `Provider`, `ProjectStatus`, `Project`, etc. | `./types` | Auth-file shape + cross-package data contracts |
|
|
31
|
+
| `colors`, `fonts`, `radii`, `spacing`, `opacityTokens`, `status` | `./tokens` | Brutalist design tokens — used by the iOS app, optional elsewhere |
|
|
32
|
+
| `statusToColor(status)` | `.` | Maps `ProjectStatus` to a colour from `tokens.colors` |
|
|
33
|
+
| `parseDeepLink`, `parseProjectDeepLink`, `OAUTH_DEEPLINK_PREFIX` | `./auth` | Shared `monii://` URL handling |
|
|
34
|
+
| `MOCK_PROJECTS`, `MOCK_USAGE_ROWS` | `./mock` | Demo data used by the iOS app's "Continue without an account" path |
|
|
35
|
+
|
|
36
|
+
The CLI + MCP server use only the types + auth helpers. The design
|
|
37
|
+
tokens are dead weight for them but harmless — tree-shaking handles
|
|
38
|
+
it.
|
|
39
|
+
|
|
40
|
+
## Versioning
|
|
41
|
+
|
|
42
|
+
Semver. Type-shape changes that would break the CLI or MCP server
|
|
43
|
+
only land on major bumps. Token / colour additions are minor.
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
MIT. See `LICENSE`.
|
|
48
|
+
|
|
49
|
+
## Links
|
|
50
|
+
|
|
51
|
+
- App + docs: [getmonii.com](https://getmonii.com)
|
|
52
|
+
- iOS app: on the App Store
|
|
53
|
+
- CLI: [`@moniiapp/cli`](https://www.npmjs.com/package/@moniiapp/cli)
|
|
54
|
+
- MCP server: [`@moniiapp/mcp`](https://www.npmjs.com/package/@moniiapp/mcp)
|
|
55
|
+
- Source: [github.com/randomershenans/MONII](https://github.com/randomershenans/MONII)
|
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface MoniiAuthFile {
|
|
2
|
+
vercel?: {
|
|
3
|
+
token: string;
|
|
4
|
+
teamId?: string;
|
|
5
|
+
};
|
|
6
|
+
netlify?: {
|
|
7
|
+
token: string;
|
|
8
|
+
};
|
|
9
|
+
generatedAt: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const MONII_DEEP_LINK_SCHEME = "monii";
|
|
12
|
+
export declare const MONII_AUTH_HOST = "auth";
|
|
13
|
+
export declare const MONII_PROJECT_HOST = "project";
|
|
14
|
+
export interface DeepLinkPayload {
|
|
15
|
+
v?: string;
|
|
16
|
+
n?: string;
|
|
17
|
+
t?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Parsed result for the project-route variant: `monii://project/:id`. */
|
|
20
|
+
export interface ProjectDeepLink {
|
|
21
|
+
projectId: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function buildDeepLink(payload: DeepLinkPayload): string;
|
|
24
|
+
/** Build a project deep link — used in push notification payloads. */
|
|
25
|
+
export declare function buildProjectDeepLink(projectId: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Parse the auth deep link variant (`monii://auth?v=...&n=...&t=...`).
|
|
28
|
+
* Returns null for any other monii:// URL (including the project variant)
|
|
29
|
+
* so legacy callers don't accidentally hit the wrong branch.
|
|
30
|
+
*/
|
|
31
|
+
export declare function parseDeepLink(url: string): DeepLinkPayload | null;
|
|
32
|
+
/**
|
|
33
|
+
* Parse the project deep link variant (`monii://project/:id`).
|
|
34
|
+
*
|
|
35
|
+
* Returns null when the URL is anything other than a well-formed project link —
|
|
36
|
+
* including the auth variant, so each parser stays narrow and unambiguous.
|
|
37
|
+
*/
|
|
38
|
+
export declare function parseProjectDeepLink(url: string): ProjectDeepLink | null;
|
package/dist/auth.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export const MONII_DEEP_LINK_SCHEME = 'monii';
|
|
2
|
+
export const MONII_AUTH_HOST = 'auth';
|
|
3
|
+
export const MONII_PROJECT_HOST = 'project';
|
|
4
|
+
export function buildDeepLink(payload) {
|
|
5
|
+
const params = new URLSearchParams();
|
|
6
|
+
if (payload.v)
|
|
7
|
+
params.set('v', payload.v);
|
|
8
|
+
if (payload.n)
|
|
9
|
+
params.set('n', payload.n);
|
|
10
|
+
if (payload.t)
|
|
11
|
+
params.set('t', payload.t);
|
|
12
|
+
return `${MONII_DEEP_LINK_SCHEME}://${MONII_AUTH_HOST}?${params.toString()}`;
|
|
13
|
+
}
|
|
14
|
+
/** Build a project deep link — used in push notification payloads. */
|
|
15
|
+
export function buildProjectDeepLink(projectId) {
|
|
16
|
+
return `${MONII_DEEP_LINK_SCHEME}://${MONII_PROJECT_HOST}/${encodeURIComponent(projectId)}`;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Parse the auth deep link variant (`monii://auth?v=...&n=...&t=...`).
|
|
20
|
+
* Returns null for any other monii:// URL (including the project variant)
|
|
21
|
+
* so legacy callers don't accidentally hit the wrong branch.
|
|
22
|
+
*/
|
|
23
|
+
export function parseDeepLink(url) {
|
|
24
|
+
try {
|
|
25
|
+
const parsed = new URL(url);
|
|
26
|
+
if (parsed.protocol !== `${MONII_DEEP_LINK_SCHEME}:`)
|
|
27
|
+
return null;
|
|
28
|
+
if (parsed.hostname !== MONII_AUTH_HOST)
|
|
29
|
+
return null;
|
|
30
|
+
return {
|
|
31
|
+
v: parsed.searchParams.get('v') ?? undefined,
|
|
32
|
+
n: parsed.searchParams.get('n') ?? undefined,
|
|
33
|
+
t: parsed.searchParams.get('t') ?? undefined,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Parse the project deep link variant (`monii://project/:id`).
|
|
42
|
+
*
|
|
43
|
+
* Returns null when the URL is anything other than a well-formed project link —
|
|
44
|
+
* including the auth variant, so each parser stays narrow and unambiguous.
|
|
45
|
+
*/
|
|
46
|
+
export function parseProjectDeepLink(url) {
|
|
47
|
+
try {
|
|
48
|
+
const parsed = new URL(url);
|
|
49
|
+
if (parsed.protocol !== `${MONII_DEEP_LINK_SCHEME}:`)
|
|
50
|
+
return null;
|
|
51
|
+
if (parsed.hostname !== MONII_PROJECT_HOST)
|
|
52
|
+
return null;
|
|
53
|
+
// Path is "/:id" — strip the leading slash and decode.
|
|
54
|
+
const id = decodeURIComponent(parsed.pathname.replace(/^\//, ''));
|
|
55
|
+
if (!id)
|
|
56
|
+
return null;
|
|
57
|
+
return { projectId: id };
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=auth.js.map
|
package/dist/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;AACtC,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAa5C,MAAM,UAAU,aAAa,CAAC,OAAwB;IACpD,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IACrC,IAAI,OAAO,CAAC,CAAC;QAAE,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1C,IAAI,OAAO,CAAC,CAAC;QAAE,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1C,IAAI,OAAO,CAAC,CAAC;QAAE,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1C,OAAO,GAAG,sBAAsB,MAAM,eAAe,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;AAC/E,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,oBAAoB,CAAC,SAAiB;IACpD,OAAO,GAAG,sBAAsB,MAAM,kBAAkB,IAAI,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC;AAC9F,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,MAAM,CAAC,QAAQ,KAAK,GAAG,sBAAsB,GAAG;YAAE,OAAO,IAAI,CAAC;QAClE,IAAI,MAAM,CAAC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/mock.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Project, UsageRow, Insight, LogLine, EnvVar } from './types.js';
|
|
2
|
+
/** Mock data — verbatim from the prototype, useful for demo mode + tests. */
|
|
3
|
+
export declare const MOCK_PROJECTS: Project[];
|
|
4
|
+
export declare const MOCK_USAGE: UsageRow[];
|
|
5
|
+
export declare const MOCK_INSIGHTS: Insight[];
|
|
6
|
+
export declare const MOCK_LOG: LogLine[];
|
|
7
|
+
export declare const MOCK_ENVS: EnvVar[];
|
package/dist/mock.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/** Mock data — verbatim from the prototype, useful for demo mode + tests. */
|
|
2
|
+
export const MOCK_PROJECTS = [
|
|
3
|
+
{ id: 'monorail', name: 'monorail-web', platform: 'vercel', branch: 'main', status: 'live', ago: '14m', commit: 'feat: nav redesign', author: 'jules', paused: false },
|
|
4
|
+
{ id: 'aurora', name: 'aurora-api', platform: 'vercel', branch: 'main', status: 'building', ago: '2m', commit: 'fix: rate limit headers', author: 'jules', paused: false, progress: 64 },
|
|
5
|
+
{ id: 'mosaic', name: 'mosaic-blog', platform: 'netlify', branch: 'main', status: 'live', ago: '1h', commit: 'content: may roundup', author: 'kit', paused: false },
|
|
6
|
+
{ id: 'studio', name: 'studio-3d', platform: 'vercel', branch: 'staging', status: 'failed', ago: '6m', commit: 'wip: shader migration', author: 'jules', paused: false },
|
|
7
|
+
{ id: 'paperclip', name: 'paperclip-docs', platform: 'netlify', branch: 'main', status: 'live', ago: '3h', commit: 'docs: env var guide', author: 'kit', paused: false },
|
|
8
|
+
{ id: 'tide', name: 'tide-marketing', platform: 'netlify', branch: 'main', status: 'paused', ago: '2d', commit: 'launch: pricing v2', author: 'kit', paused: true },
|
|
9
|
+
{ id: 'lockbox', name: 'lockbox-auth', platform: 'vercel', branch: 'main', status: 'live', ago: '8h', commit: 'chore: bump deps', author: 'jules', paused: false },
|
|
10
|
+
];
|
|
11
|
+
export const MOCK_USAGE = [
|
|
12
|
+
{ label: 'Bandwidth', platform: 'vercel', used: 847, cap: 1000, unit: 'GB', cost: '$0.40/GB', spikeRate: 2.3, trend: '+12%' },
|
|
13
|
+
{ label: 'Build Minutes', platform: 'vercel', used: 412, cap: 600, unit: 'min', cost: '$0.008/min', spikeRate: 0.1, trend: '+3%' },
|
|
14
|
+
{ label: 'Edge Invocations', platform: 'vercel', used: 9.2, cap: 10, unit: 'M', cost: '$2.00/M', spikeRate: 0.4, trend: '+38%' },
|
|
15
|
+
{ label: 'Bandwidth', platform: 'netlify', used: 218, cap: 400, unit: 'GB', cost: '$0.55/GB', spikeRate: 0.8, trend: '+8%' },
|
|
16
|
+
];
|
|
17
|
+
export const MOCK_INSIGHTS = [
|
|
18
|
+
{
|
|
19
|
+
id: 'i1',
|
|
20
|
+
severity: 'warn',
|
|
21
|
+
icon: 'trend',
|
|
22
|
+
title: 'Edge Invocations spiking',
|
|
23
|
+
project: 'aurora-api',
|
|
24
|
+
body: '90% of your Vercel Pro Image Optimization limit, with 11 days left in cycle. Switching to a third-party CDN (Cloudinary, Bunny) on the largest two routes drops projected overage to zero.',
|
|
25
|
+
impact: '+$50 / mo',
|
|
26
|
+
action: 'Configure CDN',
|
|
27
|
+
impactKind: 'save',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 'i2',
|
|
31
|
+
severity: 'opp',
|
|
32
|
+
icon: 'swap',
|
|
33
|
+
title: 'Platform arbitrage available',
|
|
34
|
+
project: 'mosaic-blog',
|
|
35
|
+
body: 'Static React site on Vercel using 80 GB of bandwidth. Migrating to Cloudflare Pages or Netlify drops bandwidth cost to $0 within free tier. Same DNS, no code changes.',
|
|
36
|
+
impact: '+$20 / mo',
|
|
37
|
+
action: 'View migration guide',
|
|
38
|
+
impactKind: 'save',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'i3',
|
|
42
|
+
severity: 'opp',
|
|
43
|
+
icon: 'trend',
|
|
44
|
+
title: 'Tier upgrade pays for itself',
|
|
45
|
+
project: 'paperclip-docs',
|
|
46
|
+
body: 'Currently paying $40 in overages on Netlify Free. Upgrading to Pro ($19/mo) saves $21 net this cycle and unlocks deploy previews on private repos.',
|
|
47
|
+
impact: '+$21 / mo',
|
|
48
|
+
action: 'Upgrade to Pro',
|
|
49
|
+
impactKind: 'save',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'i4',
|
|
53
|
+
severity: 'info',
|
|
54
|
+
icon: 'zap',
|
|
55
|
+
title: 'Idle preview deployments',
|
|
56
|
+
project: 'studio-3d',
|
|
57
|
+
body: '14 preview deploys older than 30 days are still active. Pruning them reclaims 2.1 GB of storage and removes 3 stale env-var copies.',
|
|
58
|
+
impact: 'Tidy',
|
|
59
|
+
action: 'Review & prune',
|
|
60
|
+
impactKind: 'neutral',
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
export const MOCK_LOG = [
|
|
64
|
+
{ t: '14:02:11.041', lvl: 'info', text: '$ npm run build' },
|
|
65
|
+
{ t: '14:02:11.083', lvl: 'info', text: '> studio-3d@2.1.4 build' },
|
|
66
|
+
{ t: '14:02:11.084', lvl: 'info', text: '> next build' },
|
|
67
|
+
{ t: '14:02:13.220', lvl: 'info', text: ' ▲ Next.js 14.2.5' },
|
|
68
|
+
{ t: '14:02:13.221', lvl: 'info', text: ' Linting and checking validity of types ...' },
|
|
69
|
+
{ t: '14:02:18.704', lvl: 'info', text: ' Compiling shaders/ocean.glsl ...' },
|
|
70
|
+
{ t: '14:02:22.119', lvl: 'warn', text: ' ⚠ unused variable `attenuation` (shaders/ocean.glsl:42)' },
|
|
71
|
+
{ t: '14:02:24.881', lvl: 'info', text: ' Compiling routes (12/17) ...' },
|
|
72
|
+
{ t: '14:02:31.402', lvl: 'err', text: ' ✗ Type error in app/scene/[id]/page.tsx:88' },
|
|
73
|
+
{ t: '14:02:31.403', lvl: 'err', text: ' Property `uniforms` does not exist on type `Material`.' },
|
|
74
|
+
{ t: '14:02:31.404', lvl: 'err', text: ' 86 | const mat = useMaterial(uniforms);' },
|
|
75
|
+
{ t: '14:02:31.404', lvl: 'err', text: ' 87 | mat.uniforms.time.value = clock.elapsed;' },
|
|
76
|
+
{ t: '14:02:31.405', lvl: 'errH', text: ' > 88 | mat.uniforms.tex = wave.tex;' },
|
|
77
|
+
{ t: '14:02:31.406', lvl: 'err', text: ' | ^^^^^^^^' },
|
|
78
|
+
{ t: '14:02:31.407', lvl: 'err', text: ' 89 | }' },
|
|
79
|
+
{ t: '14:02:31.520', lvl: 'err', text: '' },
|
|
80
|
+
{ t: '14:02:31.521', lvl: 'err', text: ' Build failed in 20.3s' },
|
|
81
|
+
{ t: '14:02:31.602', lvl: 'info', text: ' Cached node_modules retained for next build' },
|
|
82
|
+
{ t: '14:02:31.610', lvl: 'info', text: 'Error: Command "npm run build" exited with 1' },
|
|
83
|
+
];
|
|
84
|
+
export const MOCK_ENVS = [
|
|
85
|
+
{ key: 'DATABASE_URL', value: 'postgres://moni:••••@db.neon.tech:5432/aurora_prod', scope: 'production', hidden: true },
|
|
86
|
+
{ key: 'STRIPE_SECRET_KEY', value: 'sk_live_••••••••••••••••••••••GxRf', scope: 'production', hidden: true },
|
|
87
|
+
{ key: 'STRIPE_WEBHOOK_SECRET', value: 'whsec_••••••••••••••••••••••dE2', scope: 'production', hidden: true },
|
|
88
|
+
{ key: 'NEXT_PUBLIC_API_URL', value: 'https://api.aurora.dev', scope: 'all', hidden: false },
|
|
89
|
+
{ key: 'NEXT_PUBLIC_POSTHOG', value: 'phc_aZ91x0RT8hJ4kLm22pNcQyVfWdEoBgUuS4tHcXnRDsa', scope: 'all', hidden: false },
|
|
90
|
+
{ key: 'OPENAI_API_KEY', value: 'sk-proj-••••••••••••••••••••••••L9Qm', scope: 'production', hidden: true },
|
|
91
|
+
{ key: 'OPENAI_ORG_ID', value: 'org-7nQpL4xVRtWmK9sB', scope: 'production', hidden: false },
|
|
92
|
+
{ key: 'REDIS_URL', value: 'rediss://default:••••@cache.upstash.io:6379', scope: 'production', hidden: true },
|
|
93
|
+
];
|
|
94
|
+
//# sourceMappingURL=mock.js.map
|
package/dist/mock.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock.js","sourceRoot":"","sources":["../src/mock.ts"],"names":[],"mappings":"AAEA,6EAA6E;AAC7E,MAAM,CAAC,MAAM,aAAa,GAAc;IACtC,EAAE,EAAE,EAAE,UAAU,EAAG,IAAI,EAAE,cAAc,EAAI,QAAQ,EAAE,QAAQ,EAAG,MAAM,EAAE,MAAM,EAAK,MAAM,EAAE,MAAM,EAAM,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAM,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;IACrL,EAAE,EAAE,EAAE,QAAQ,EAAK,IAAI,EAAE,YAAY,EAAM,QAAQ,EAAE,QAAQ,EAAG,MAAM,EAAE,MAAM,EAAK,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAG,MAAM,EAAE,yBAAyB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpM,EAAE,EAAE,EAAE,QAAQ,EAAK,IAAI,EAAE,aAAa,EAAK,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAK,MAAM,EAAE,MAAM,EAAM,GAAG,EAAE,IAAI,EAAG,MAAM,EAAE,sBAAsB,EAAK,MAAM,EAAE,KAAK,EAAI,MAAM,EAAE,KAAK,EAAE;IACtL,EAAE,EAAE,EAAE,QAAQ,EAAK,IAAI,EAAE,WAAW,EAAO,QAAQ,EAAE,QAAQ,EAAG,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAI,GAAG,EAAE,IAAI,EAAG,MAAM,EAAE,uBAAuB,EAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;IACtL,EAAE,EAAE,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,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAG;IACnH,EAAE,GAAG,EAAE,eAAe,EAAU,KAAK,EAAE,sBAAsB,EAAqD,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE;IACtJ,EAAE,GAAG,EAAE,WAAW,EAAc,KAAK,EAAE,6CAA6C,EAAY,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAG;CACrI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ProjectStatus } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Single source of truth for "what colour represents this status".
|
|
4
|
+
*
|
|
5
|
+
* Previously duplicated across radar / grid / detail with identical
|
|
6
|
+
* switch statements — any change to one had to be hand-mirrored to the
|
|
7
|
+
* others. Now they all import this.
|
|
8
|
+
*/
|
|
9
|
+
export declare function statusToColor(status: ProjectStatus): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { colors } from './tokens.js';
|
|
2
|
+
/**
|
|
3
|
+
* Single source of truth for "what colour represents this status".
|
|
4
|
+
*
|
|
5
|
+
* Previously duplicated across radar / grid / detail with identical
|
|
6
|
+
* switch statements — any change to one had to be hand-mirrored to the
|
|
7
|
+
* others. Now they all import this.
|
|
8
|
+
*/
|
|
9
|
+
export function statusToColor(status) {
|
|
10
|
+
switch (status) {
|
|
11
|
+
case 'live':
|
|
12
|
+
return colors.green;
|
|
13
|
+
case 'building':
|
|
14
|
+
case 'queued':
|
|
15
|
+
return colors.amber;
|
|
16
|
+
case 'failed':
|
|
17
|
+
return colors.red;
|
|
18
|
+
case 'paused':
|
|
19
|
+
case 'unknown':
|
|
20
|
+
default:
|
|
21
|
+
return colors.textDim;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=status-color.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-color.js","sourceRoot":"","sources":["../src/status-color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,MAAqB;IACjD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,MAAM;YACT,OAAO,MAAM,CAAC,KAAK,CAAC;QACtB,KAAK,UAAU,CAAC;QAChB,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC,KAAK,CAAC;QACtB,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC,GAAG,CAAC;QACpB,KAAK,QAAQ,CAAC;QACd,KAAK,SAAS,CAAC;QACf;YACE,OAAO,MAAM,CAAC,OAAO,CAAC;IAC1B,CAAC;AACH,CAAC"}
|
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design tokens — ported verbatim from the MONI prototype (moni-core.jsx).
|
|
3
|
+
* Do not redefine these elsewhere. If you need a new shade, add it here.
|
|
4
|
+
*/
|
|
5
|
+
export declare const colors: {
|
|
6
|
+
/** Slight blue-tinted black from the v0.1 branding sheet (lifts subtly over pure #000). */
|
|
7
|
+
readonly bg: "#08080A";
|
|
8
|
+
/** Splash + lock-screen pure black — keep #000 here so radial gradients pop. */
|
|
9
|
+
readonly bgDeep: "#000000";
|
|
10
|
+
readonly surface: "#0E0E10";
|
|
11
|
+
readonly surfaceRaised: "#121214";
|
|
12
|
+
readonly surfaceHigh: "#1A1A1C";
|
|
13
|
+
readonly hairline: "rgba(255,255,255,0.07)";
|
|
14
|
+
readonly hairlineStrong: "rgba(255,255,255,0.12)";
|
|
15
|
+
readonly text: "#EDEDED";
|
|
16
|
+
readonly textDim: "#8B8B8B";
|
|
17
|
+
readonly textFaint: "#5A5A5A";
|
|
18
|
+
readonly green: "#4ADE80";
|
|
19
|
+
/** Background tint at ~6 % — subtlest fill (banner, faint success card bg). */
|
|
20
|
+
readonly greenTint06: "rgba(74,222,128,0.06)";
|
|
21
|
+
/** Background tint at ~10 % — connect-screen sweep glow. */
|
|
22
|
+
readonly greenTint10: "rgba(74,222,128,0.10)";
|
|
23
|
+
/** Background tint at ~12 % — monogram stripes, progress track. */
|
|
24
|
+
readonly greenTint12: "rgba(74,222,128,0.12)";
|
|
25
|
+
readonly greenDim: "rgba(74,222,128,0.14)";
|
|
26
|
+
/** Border at ~22 % — soft success card border (pro card etc.). */
|
|
27
|
+
readonly greenBorderSoft: "rgba(74,222,128,0.22)";
|
|
28
|
+
readonly greenBorder: "rgba(74,222,128,0.35)";
|
|
29
|
+
readonly red: "#FF453A";
|
|
30
|
+
readonly redDim: "rgba(255,69,58,0.16)";
|
|
31
|
+
/** Border at ~22 % — soft danger card (failing list, lock-screen banner). */
|
|
32
|
+
readonly redBorderSoft: "rgba(255,69,58,0.22)";
|
|
33
|
+
/** Border at ~30 % — mid danger button border. */
|
|
34
|
+
readonly redBorderMid: "rgba(255,69,58,0.30)";
|
|
35
|
+
readonly redBorder: "rgba(255,69,58,0.45)";
|
|
36
|
+
/** Red-tinted text at 55 % — danger sub-text on cards. */
|
|
37
|
+
readonly redText55: "rgba(255,69,58,0.55)";
|
|
38
|
+
/** Red-tinted text at 70 % — danger chevron. */
|
|
39
|
+
readonly redText70: "rgba(255,69,58,0.70)";
|
|
40
|
+
readonly amber: "#FFB020";
|
|
41
|
+
/** Background tint at ~6 % — faintest amber surface fill. */
|
|
42
|
+
readonly amberTintFaint: "rgba(255,176,32,0.06)";
|
|
43
|
+
/** Background tint at ~10 % — warning row, soft pill bg. */
|
|
44
|
+
readonly amberTintSoft: "rgba(255,176,32,0.10)";
|
|
45
|
+
readonly amberDim: "rgba(255,176,32,0.14)";
|
|
46
|
+
/** Border at ~22 % — expiring-soon card outline. */
|
|
47
|
+
readonly amberBorderSoft: "rgba(255,176,32,0.22)";
|
|
48
|
+
readonly amberBorder: "rgba(255,176,32,0.35)";
|
|
49
|
+
readonly teal: "#00C7B7";
|
|
50
|
+
/** Background tint at ~5 % — Owndle row hover/fill. */
|
|
51
|
+
readonly tealTint05: "rgba(0,199,183,0.05)";
|
|
52
|
+
readonly tealDim: "rgba(0,199,183,0.14)";
|
|
53
|
+
readonly tealBorder: "rgba(0,199,183,0.35)";
|
|
54
|
+
/** Stronger teal border at ~55 % — revert chip. */
|
|
55
|
+
readonly tealBorderStrong: "rgba(0,199,183,0.55)";
|
|
56
|
+
/** White-tint surface (~4 %) — icon tile background that sits on top of `surface`. */
|
|
57
|
+
readonly surfaceTint04: "rgba(255,255,255,0.04)";
|
|
58
|
+
readonly vercel: "#FFFFFF";
|
|
59
|
+
readonly vercelDim: "rgba(255,255,255,0.10)";
|
|
60
|
+
readonly vercelBorder: "rgba(255,255,255,0.18)";
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Canonical pressed-state opacity. Three different values (0.55 / 0.6 / 0.65)
|
|
64
|
+
* were drifting across screens — settle on 0.6.
|
|
65
|
+
*/
|
|
66
|
+
export declare const opacityTokens: {
|
|
67
|
+
readonly pressed: 0.6;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Spacing rhythm — all screens follow the same horizontal margins.
|
|
71
|
+
* Cards align to `cardX`, header titles align to `screenX` (4px outdent).
|
|
72
|
+
*/
|
|
73
|
+
export declare const spacing: {
|
|
74
|
+
/** Horizontal margin for cards / rows inside ScrollViews. */
|
|
75
|
+
readonly cardX: 16;
|
|
76
|
+
/** Horizontal padding for screen headers and sections (4px outdent vs cards). */
|
|
77
|
+
readonly screenX: 20;
|
|
78
|
+
};
|
|
79
|
+
export declare const fonts: {
|
|
80
|
+
readonly sans: "Inter";
|
|
81
|
+
readonly sansLoaded: "Inter_400Regular";
|
|
82
|
+
readonly sansMedium: "Inter_500Medium";
|
|
83
|
+
readonly sansSemibold: "Inter_600SemiBold";
|
|
84
|
+
readonly sansBold: "Inter_700Bold";
|
|
85
|
+
readonly mono: "JetBrainsMono_400Regular";
|
|
86
|
+
readonly monoMedium: "JetBrainsMono_500Medium";
|
|
87
|
+
readonly monoSemibold: "JetBrainsMono_600SemiBold";
|
|
88
|
+
readonly systemRound: "System";
|
|
89
|
+
};
|
|
90
|
+
export declare const radii: {
|
|
91
|
+
readonly none: 0;
|
|
92
|
+
readonly sm: 2;
|
|
93
|
+
readonly ios: 18;
|
|
94
|
+
readonly full: 9999;
|
|
95
|
+
};
|
|
96
|
+
export declare const status: {
|
|
97
|
+
readonly live: {
|
|
98
|
+
readonly color: "#4ADE80";
|
|
99
|
+
readonly label: "LIVE";
|
|
100
|
+
};
|
|
101
|
+
readonly building: {
|
|
102
|
+
readonly color: "#FFB020";
|
|
103
|
+
readonly label: "BUILDING";
|
|
104
|
+
};
|
|
105
|
+
readonly failed: {
|
|
106
|
+
readonly color: "#FF453A";
|
|
107
|
+
readonly label: "FAILED";
|
|
108
|
+
};
|
|
109
|
+
readonly paused: {
|
|
110
|
+
readonly color: "#8B8B8B";
|
|
111
|
+
readonly label: "PAUSED";
|
|
112
|
+
};
|
|
113
|
+
readonly queued: {
|
|
114
|
+
readonly color: "#8B8B8B";
|
|
115
|
+
readonly label: "QUEUED";
|
|
116
|
+
};
|
|
117
|
+
readonly unknown: {
|
|
118
|
+
readonly color: "#8B8B8B";
|
|
119
|
+
readonly label: "UNKNOWN";
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
export type StatusKey = keyof typeof status;
|
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design tokens — ported verbatim from the MONI prototype (moni-core.jsx).
|
|
3
|
+
* Do not redefine these elsewhere. If you need a new shade, add it here.
|
|
4
|
+
*/
|
|
5
|
+
export const colors = {
|
|
6
|
+
/** Slight blue-tinted black from the v0.1 branding sheet (lifts subtly over pure #000). */
|
|
7
|
+
bg: '#08080A',
|
|
8
|
+
/** Splash + lock-screen pure black — keep #000 here so radial gradients pop. */
|
|
9
|
+
bgDeep: '#000000',
|
|
10
|
+
surface: '#0E0E10',
|
|
11
|
+
surfaceRaised: '#121214',
|
|
12
|
+
surfaceHigh: '#1A1A1C',
|
|
13
|
+
hairline: 'rgba(255,255,255,0.07)',
|
|
14
|
+
hairlineStrong: 'rgba(255,255,255,0.12)',
|
|
15
|
+
text: '#EDEDED',
|
|
16
|
+
textDim: '#8B8B8B',
|
|
17
|
+
textFaint: '#5A5A5A',
|
|
18
|
+
green: '#4ADE80',
|
|
19
|
+
/** Background tint at ~6 % — subtlest fill (banner, faint success card bg). */
|
|
20
|
+
greenTint06: 'rgba(74,222,128,0.06)',
|
|
21
|
+
/** Background tint at ~10 % — connect-screen sweep glow. */
|
|
22
|
+
greenTint10: 'rgba(74,222,128,0.10)',
|
|
23
|
+
/** Background tint at ~12 % — monogram stripes, progress track. */
|
|
24
|
+
greenTint12: 'rgba(74,222,128,0.12)',
|
|
25
|
+
greenDim: 'rgba(74,222,128,0.14)',
|
|
26
|
+
/** Border at ~22 % — soft success card border (pro card etc.). */
|
|
27
|
+
greenBorderSoft: 'rgba(74,222,128,0.22)',
|
|
28
|
+
greenBorder: 'rgba(74,222,128,0.35)',
|
|
29
|
+
red: '#FF453A',
|
|
30
|
+
redDim: 'rgba(255,69,58,0.16)',
|
|
31
|
+
/** Border at ~22 % — soft danger card (failing list, lock-screen banner). */
|
|
32
|
+
redBorderSoft: 'rgba(255,69,58,0.22)',
|
|
33
|
+
/** Border at ~30 % — mid danger button border. */
|
|
34
|
+
redBorderMid: 'rgba(255,69,58,0.30)',
|
|
35
|
+
redBorder: 'rgba(255,69,58,0.45)',
|
|
36
|
+
/** Red-tinted text at 55 % — danger sub-text on cards. */
|
|
37
|
+
redText55: 'rgba(255,69,58,0.55)',
|
|
38
|
+
/** Red-tinted text at 70 % — danger chevron. */
|
|
39
|
+
redText70: 'rgba(255,69,58,0.70)',
|
|
40
|
+
amber: '#FFB020',
|
|
41
|
+
/** Background tint at ~6 % — faintest amber surface fill. */
|
|
42
|
+
amberTintFaint: 'rgba(255,176,32,0.06)',
|
|
43
|
+
/** Background tint at ~10 % — warning row, soft pill bg. */
|
|
44
|
+
amberTintSoft: 'rgba(255,176,32,0.10)',
|
|
45
|
+
amberDim: 'rgba(255,176,32,0.14)',
|
|
46
|
+
/** Border at ~22 % — expiring-soon card outline. */
|
|
47
|
+
amberBorderSoft: 'rgba(255,176,32,0.22)',
|
|
48
|
+
amberBorder: 'rgba(255,176,32,0.35)',
|
|
49
|
+
teal: '#00C7B7',
|
|
50
|
+
/** Background tint at ~5 % — Owndle row hover/fill. */
|
|
51
|
+
tealTint05: 'rgba(0,199,183,0.05)',
|
|
52
|
+
tealDim: 'rgba(0,199,183,0.14)',
|
|
53
|
+
tealBorder: 'rgba(0,199,183,0.35)',
|
|
54
|
+
/** Stronger teal border at ~55 % — revert chip. */
|
|
55
|
+
tealBorderStrong: 'rgba(0,199,183,0.55)',
|
|
56
|
+
/** White-tint surface (~4 %) — icon tile background that sits on top of `surface`. */
|
|
57
|
+
surfaceTint04: 'rgba(255,255,255,0.04)',
|
|
58
|
+
vercel: '#FFFFFF',
|
|
59
|
+
vercelDim: 'rgba(255,255,255,0.10)',
|
|
60
|
+
vercelBorder: 'rgba(255,255,255,0.18)',
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Canonical pressed-state opacity. Three different values (0.55 / 0.6 / 0.65)
|
|
64
|
+
* were drifting across screens — settle on 0.6.
|
|
65
|
+
*/
|
|
66
|
+
export const opacityTokens = {
|
|
67
|
+
pressed: 0.6,
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Spacing rhythm — all screens follow the same horizontal margins.
|
|
71
|
+
* Cards align to `cardX`, header titles align to `screenX` (4px outdent).
|
|
72
|
+
*/
|
|
73
|
+
export const spacing = {
|
|
74
|
+
/** Horizontal margin for cards / rows inside ScrollViews. */
|
|
75
|
+
cardX: 16,
|
|
76
|
+
/** Horizontal padding for screen headers and sections (4px outdent vs cards). */
|
|
77
|
+
screenX: 20,
|
|
78
|
+
};
|
|
79
|
+
export const fonts = {
|
|
80
|
+
sans: 'Inter',
|
|
81
|
+
sansLoaded: 'Inter_400Regular',
|
|
82
|
+
sansMedium: 'Inter_500Medium',
|
|
83
|
+
sansSemibold: 'Inter_600SemiBold',
|
|
84
|
+
sansBold: 'Inter_700Bold',
|
|
85
|
+
mono: 'JetBrainsMono_400Regular',
|
|
86
|
+
monoMedium: 'JetBrainsMono_500Medium',
|
|
87
|
+
monoSemibold: 'JetBrainsMono_600SemiBold',
|
|
88
|
+
systemRound: 'System', // for status bar time / lock screen clock
|
|
89
|
+
};
|
|
90
|
+
export const radii = {
|
|
91
|
+
none: 0,
|
|
92
|
+
sm: 2,
|
|
93
|
+
ios: 18, // iOS notification card
|
|
94
|
+
full: 9999,
|
|
95
|
+
};
|
|
96
|
+
export const status = {
|
|
97
|
+
live: { color: colors.green, label: 'LIVE' },
|
|
98
|
+
building: { color: colors.amber, label: 'BUILDING' },
|
|
99
|
+
failed: { color: colors.red, label: 'FAILED' },
|
|
100
|
+
paused: { color: colors.textDim, label: 'PAUSED' },
|
|
101
|
+
queued: { color: colors.textDim, label: 'QUEUED' },
|
|
102
|
+
unknown: { color: colors.textDim, label: 'UNKNOWN' },
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,2FAA2F;IAC3F,EAAE,EAAE,SAAS;IACb,gFAAgF;IAChF,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,SAAS;IACxB,WAAW,EAAE,SAAS;IAEtB,QAAQ,EAAE,wBAAwB;IAClC,cAAc,EAAE,wBAAwB;IAExC,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,SAAS;IAEpB,KAAK,EAAE,SAAS;IAChB,+EAA+E;IAC/E,WAAW,EAAE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kBAAkB;IAC9B,UAAU,EAAE,iBAAiB;IAC7B,YAAY,EAAE,mBAAmB;IACjC,QAAQ,EAAE,eAAe;IACzB,IAAI,EAAE,0BAA0B;IAChC,UAAU,EAAE,yBAAyB;IACrC,YAAY,EAAE,2BAA2B;IACzC,WAAW,EAAE,QAAQ,EAAE,0CAA0C;CACzD,CAAC;AAEX,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,CAAC;IACP,EAAE,EAAE,CAAC;IACL,GAAG,EAAE,EAAE,EAAE,wBAAwB;IACjC,IAAI,EAAE,IAAI;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE;IAC5C,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE;IACpD,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE;IAC9C,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE;IAClD,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE;IAClD,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE;CAC5C,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export type Provider = 'vercel' | 'netlify';
|
|
2
|
+
export type ProjectStatus = 'live' | 'building' | 'queued' | 'failed' | 'paused' | 'unknown';
|
|
3
|
+
export interface Project {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
platform: Provider;
|
|
7
|
+
branch: string;
|
|
8
|
+
status: ProjectStatus;
|
|
9
|
+
ago: string;
|
|
10
|
+
commit: string;
|
|
11
|
+
author?: string;
|
|
12
|
+
paused?: boolean;
|
|
13
|
+
progress?: number;
|
|
14
|
+
/** Absolute "https://…" URL of the latest deploy, if known. */
|
|
15
|
+
url?: string;
|
|
16
|
+
/** Short commit sha (first 7 chars) — useful when commit message is empty. */
|
|
17
|
+
commitSha?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Unix ms of the latest deploy. Lets the UI compute recency without parsing
|
|
20
|
+
* the human-readable {@link ago} string.
|
|
21
|
+
*/
|
|
22
|
+
updatedAt?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface UnifiedDeployment {
|
|
25
|
+
id: string;
|
|
26
|
+
projectId: string;
|
|
27
|
+
provider: Provider;
|
|
28
|
+
state: ProjectStatus;
|
|
29
|
+
url?: string;
|
|
30
|
+
commitMessage?: string;
|
|
31
|
+
commitSha?: string;
|
|
32
|
+
branch?: string;
|
|
33
|
+
createdAt: number;
|
|
34
|
+
buildingAt?: number;
|
|
35
|
+
readyAt?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface UsageRow {
|
|
38
|
+
label: string;
|
|
39
|
+
platform: Provider;
|
|
40
|
+
used: number;
|
|
41
|
+
cap: number;
|
|
42
|
+
unit: 'GB' | 'min' | 'M';
|
|
43
|
+
cost: string;
|
|
44
|
+
trend?: string;
|
|
45
|
+
spikeRate?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface UnifiedUsage {
|
|
48
|
+
provider: Provider;
|
|
49
|
+
bandwidth: {
|
|
50
|
+
used: number;
|
|
51
|
+
limit: number;
|
|
52
|
+
unit: 'GB';
|
|
53
|
+
};
|
|
54
|
+
buildMinutes: {
|
|
55
|
+
used: number;
|
|
56
|
+
limit: number;
|
|
57
|
+
};
|
|
58
|
+
edgeInvocations?: {
|
|
59
|
+
used: number;
|
|
60
|
+
limit: number;
|
|
61
|
+
};
|
|
62
|
+
serverless?: {
|
|
63
|
+
used: number;
|
|
64
|
+
limit: number;
|
|
65
|
+
};
|
|
66
|
+
periodStart: number;
|
|
67
|
+
periodEnd: number;
|
|
68
|
+
}
|
|
69
|
+
export interface BillingSnapshot {
|
|
70
|
+
vercel?: UnifiedUsage;
|
|
71
|
+
netlify?: UnifiedUsage;
|
|
72
|
+
fetchedAt: number;
|
|
73
|
+
}
|
|
74
|
+
export type InsightSeverity = 'warn' | 'opp' | 'info';
|
|
75
|
+
export type InsightImpactKind = 'save' | 'neutral';
|
|
76
|
+
export interface Insight {
|
|
77
|
+
id: string;
|
|
78
|
+
severity: InsightSeverity;
|
|
79
|
+
icon: string;
|
|
80
|
+
title: string;
|
|
81
|
+
project: string;
|
|
82
|
+
body: string;
|
|
83
|
+
impact: string;
|
|
84
|
+
action: string;
|
|
85
|
+
impactKind: InsightImpactKind;
|
|
86
|
+
}
|
|
87
|
+
export interface LogLine {
|
|
88
|
+
t: string;
|
|
89
|
+
lvl: 'info' | 'warn' | 'err' | 'errH';
|
|
90
|
+
text: string;
|
|
91
|
+
}
|
|
92
|
+
export interface EnvVar {
|
|
93
|
+
key: string;
|
|
94
|
+
value: string;
|
|
95
|
+
scope: 'production' | 'preview' | 'all';
|
|
96
|
+
hidden: boolean;
|
|
97
|
+
}
|
|
98
|
+
export interface KillSwitchResult {
|
|
99
|
+
provider: Provider;
|
|
100
|
+
projectId: string;
|
|
101
|
+
success: boolean;
|
|
102
|
+
message: string;
|
|
103
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@moniiapp/shared",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared types, design tokens, and API contracts used by @moniiapp/cli, @moniiapp/mcp, and the MONII iOS app",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"monii",
|
|
7
|
+
"vercel",
|
|
8
|
+
"netlify",
|
|
9
|
+
"deployment",
|
|
10
|
+
"types",
|
|
11
|
+
"design-tokens"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://getmonii.com",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/randomershenans/MONII.git",
|
|
17
|
+
"directory": "packages/shared"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/randomershenans/MONII/issues"
|
|
21
|
+
},
|
|
22
|
+
"author": "The Hopium Lab Ltd <support@getmonii.com>",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"type": "module",
|
|
25
|
+
"main": "dist/index.js",
|
|
26
|
+
"types": "dist/index.d.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"import": "./dist/index.js",
|
|
30
|
+
"types": "./dist/index.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./tokens": {
|
|
33
|
+
"import": "./dist/tokens.js",
|
|
34
|
+
"types": "./dist/tokens.d.ts"
|
|
35
|
+
},
|
|
36
|
+
"./types": {
|
|
37
|
+
"import": "./dist/types.js",
|
|
38
|
+
"types": "./dist/types.d.ts"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist",
|
|
43
|
+
"README.md",
|
|
44
|
+
"LICENSE"
|
|
45
|
+
],
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsc -p tsconfig.json",
|
|
48
|
+
"dev": "tsc -p tsconfig.json --watch",
|
|
49
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"typescript": "~5.9.0"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=20.19"
|
|
56
|
+
},
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public"
|
|
59
|
+
}
|
|
60
|
+
}
|