gipity 1.0.394 → 1.0.395
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/colors.js +22 -7
- package/dist/commands/deploy.js +2 -1
- package/dist/commands/generate.js +5 -0
- package/package.json +2 -2
package/dist/colors.js
CHANGED
|
@@ -47,10 +47,14 @@ function detectColorLevel() {
|
|
|
47
47
|
return 2;
|
|
48
48
|
if (/-256(color)?$/.test(term) || term.includes('256'))
|
|
49
49
|
return 2;
|
|
50
|
-
//
|
|
51
|
-
// conhost
|
|
50
|
+
// Windows Terminal / VS Code set COLORTERM=truecolor (caught above). The
|
|
51
|
+
// classic console host (conhost, the standalone PowerShell window) advertises
|
|
52
|
+
// nothing, but every still-supported Windows build (10 v1703+, 2017) handles
|
|
53
|
+
// 256-color VT sequences reliably - so 256 is the safe floor. Orange then
|
|
54
|
+
// downscales to xterm-214 (a real orange) instead of the bright-yellow the
|
|
55
|
+
// 16-color palette is forced into (it has no orange slot at all).
|
|
52
56
|
if (process.platform === 'win32')
|
|
53
|
-
return
|
|
57
|
+
return 2;
|
|
54
58
|
if (term)
|
|
55
59
|
return 1;
|
|
56
60
|
return 0;
|
|
@@ -60,7 +64,8 @@ const COLOR_LEVEL = detectColorLevel();
|
|
|
60
64
|
const identity = (s) => s;
|
|
61
65
|
// ── RGB downgrade helpers ───────────────────────────────────────────────
|
|
62
66
|
// RGB → nearest xterm-256 palette index (6x6x6 cube + grayscale ramp).
|
|
63
|
-
|
|
67
|
+
// Exported for unit tests that pin the documented downscale (orange → 214).
|
|
68
|
+
export function rgbTo256(r, g, b) {
|
|
64
69
|
if (r === g && g === b) {
|
|
65
70
|
if (r < 8)
|
|
66
71
|
return 16;
|
|
@@ -74,7 +79,9 @@ function rgbTo256(r, g, b) {
|
|
|
74
79
|
Math.round((b / 255) * 5));
|
|
75
80
|
}
|
|
76
81
|
// RGB → nearest 16-color SGR foreground code (30-37 / 90-97).
|
|
77
|
-
|
|
82
|
+
// Exported for unit tests that pin the documented downscale (orange → bright
|
|
83
|
+
// yellow, i.e. the palette has no orange slot).
|
|
84
|
+
export function rgbTo16(r, g, b) {
|
|
78
85
|
const value = Math.round((Math.max(r, g, b) / 255) * 3);
|
|
79
86
|
if (value === 0)
|
|
80
87
|
return 30;
|
|
@@ -87,7 +94,13 @@ function rgbTo16(r, g, b) {
|
|
|
87
94
|
return code;
|
|
88
95
|
}
|
|
89
96
|
// ── Low-level builders ──────────────────────────────────────────────────
|
|
90
|
-
|
|
97
|
+
// `lowColorFallback` controls the 16-color (level 1) tier. The ANSI 16-color
|
|
98
|
+
// palette has no orange and only crude approximations of off-palette hues, so a
|
|
99
|
+
// color that can't be represented reads as a bug (brand orange → bright yellow).
|
|
100
|
+
// Off-palette brand colors pass a monochrome fallback (e.g. `bold`) to convey
|
|
101
|
+
// emphasis without a wrong hue; semantic colors that map cleanly (red, green,
|
|
102
|
+
// blue) omit it and keep their nearest-16 approximation.
|
|
103
|
+
export function makeFg(r, g, b, lowColorFallback) {
|
|
91
104
|
if (COLOR_LEVEL === 0)
|
|
92
105
|
return identity;
|
|
93
106
|
if (COLOR_LEVEL === 3) {
|
|
@@ -97,6 +110,8 @@ export function makeFg(r, g, b) {
|
|
|
97
110
|
const n = rgbTo256(r, g, b);
|
|
98
111
|
return (s) => `${ESC}[38;5;${n}m${s}${ESC}[39m`;
|
|
99
112
|
}
|
|
113
|
+
if (lowColorFallback)
|
|
114
|
+
return lowColorFallback;
|
|
100
115
|
const code = rgbTo16(r, g, b);
|
|
101
116
|
return (s) => `${ESC}[${code}m${s}${ESC}[39m`;
|
|
102
117
|
}
|
|
@@ -130,7 +145,7 @@ export const underline = makeStyle(4, 24);
|
|
|
130
145
|
// ── Gipity platform palette ────────────────────────────────────────────
|
|
131
146
|
// Colors sourced from platform/client/src/css/styles.css and
|
|
132
147
|
// platform/apps/gipitsm/src/css/tokens.css
|
|
133
|
-
export const brand = makeFg(254, 166, 14); // Gipity orange #fea60e
|
|
148
|
+
export const brand = makeFg(254, 166, 14, bold); // Gipity orange #fea60e (→ bold on 16-color; no orange in palette)
|
|
134
149
|
export const error = makeFg(239, 68, 68); // #ef4444
|
|
135
150
|
export const warning = makeFg(245, 158, 11); // #f59e0b
|
|
136
151
|
export const success = makeFg(34, 197, 94); // #22c55e
|
package/dist/commands/deploy.js
CHANGED
|
@@ -22,7 +22,8 @@ export const deployCommand = new Command('deploy')
|
|
|
22
22
|
.option('--only <phases>', 'Run only specific phases (comma-separated)')
|
|
23
23
|
.option('--force', 'Re-run all phases (ignore checksums) and bypass the sync bulk-deletion guard')
|
|
24
24
|
.option('--no-sync', 'Skip sync-up before deploy')
|
|
25
|
-
.option('--optimize', '
|
|
25
|
+
.option('--optimize', 'Force Vite build optimization on (default for prod; use this to optimize a dev deploy too)')
|
|
26
|
+
.option('--no-optimize', 'Skip build optimization and upload files as-is - the escape hatch for plain-HTML apps whose <script src> tags are not type="module"')
|
|
26
27
|
.option('--json', 'Output as JSON')
|
|
27
28
|
.action((target, opts) => run('Deploy', async () => {
|
|
28
29
|
if (target !== 'dev' && target !== 'prod') {
|
|
@@ -66,6 +66,7 @@ Examples:
|
|
|
66
66
|
.option('--quality <quality>', 'Quality: low|medium|high|auto (gpt-image-2)')
|
|
67
67
|
.option('--aspect-ratio <ratio>', 'Aspect ratio (Gemini only): 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 21:9')
|
|
68
68
|
.option('--image-size <size>', 'Output resolution (Gemini only): 512, 1K, 2K, 4K')
|
|
69
|
+
.option('--seed <n>', 'Deterministic seed (BFL only): reuse one seed to keep a set of images visually coherent', (v) => parseInt(v, 10))
|
|
69
70
|
.option('-o, --output <file>', 'Output path (default ./generated.png). For an image your app ships, write it into the source tree so it deploys, e.g. -o src/assets/images/hero.png; the cwd default is fine for one-off generation.')
|
|
70
71
|
.option('--json', 'Output as JSON')
|
|
71
72
|
.action(async (prompt, opts) => {
|
|
@@ -79,6 +80,7 @@ Examples:
|
|
|
79
80
|
quality: opts.quality,
|
|
80
81
|
aspect_ratio: opts.aspectRatio,
|
|
81
82
|
image_size: opts.imageSize,
|
|
83
|
+
seed: Number.isFinite(opts.seed) ? opts.seed : undefined,
|
|
82
84
|
});
|
|
83
85
|
const ext = result.content_type.includes('png') ? 'png' : 'jpg';
|
|
84
86
|
const filename = opts.output || `generated.${ext}`;
|
|
@@ -90,6 +92,9 @@ Examples:
|
|
|
90
92
|
const sizeKb = Math.round(result.size_bytes / 1024);
|
|
91
93
|
console.log(`${muted(`Generated with ${result.provider}/${result.model} (${sizeKb}KB)`)}`);
|
|
92
94
|
console.log(success(`Saved to ${savedPath}`));
|
|
95
|
+
if (result.seed !== undefined) {
|
|
96
|
+
console.log(muted(`Seed ${result.seed} — pass --seed ${result.seed} to keep the next image coherent`));
|
|
97
|
+
}
|
|
93
98
|
}
|
|
94
99
|
}
|
|
95
100
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gipity",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.395",
|
|
4
4
|
"description": "The full-stack platform tuned for AI agents. Database, storage, auth, functions, deploy, and drop-in kits - all agent-tuned. Pair with Claude Code or use standalone.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"gipity": "dist/updater/shim.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"build": "tsc && chmod +x dist/index.js dist/gipcc.js dist/gipccd.js dist/updater/shim.js dist/updater/check.js",
|
|
13
13
|
"dev": "tsc --watch",
|
|
14
14
|
"test": "npm run test:smoke",
|
|
15
|
-
"test:smoke": "tsc && node --test dist/__tests__/utils.test.js dist/__tests__/config.test.js dist/__tests__/sync.test.js dist/__tests__/sync-apply.test.js dist/__tests__/sync-lock.test.js dist/__tests__/push-cas.test.js dist/__tests__/upload.test.js dist/__tests__/progress.test.js dist/__tests__/updater.test.js dist/__tests__/cli-smoke.test.js dist/__tests__/claude-noninteractive.test.js dist/__tests__/claude-trust.test.js dist/__tests__/relay-state.test.js dist/__tests__/relay-daemon.test.js dist/__tests__/relay-installers.test.js dist/__tests__/relay-bridge-abort.test.js dist/__tests__/relay-redact.test.js dist/__tests__/relay-machine-id.test.js dist/__tests__/stream-json.test.js dist/__tests__/relay-ingest-contract.test.js dist/__tests__/prompts.test.js dist/__tests__/capture-transcript.test.js dist/__tests__/flag-aliases.test.js dist/__tests__/adopt-cwd.test.js dist/__tests__/cli-cmd-agent.test.js dist/__tests__/cli-cmd-approval.test.js dist/__tests__/cli-cmd-audit.test.js dist/__tests__/cli-cmd-chat.test.js dist/__tests__/cli-cmd-credits.test.js dist/__tests__/cli-cmd-db.test.js dist/__tests__/cli-cmd-deploy.test.js dist/__tests__/cli-cmd-domain.test.js dist/__tests__/cli-cmd-email.test.js dist/__tests__/cli-cmd-file.test.js dist/__tests__/cli-cmd-fn.test.js dist/__tests__/cli-cmd-service.test.js dist/__tests__/cli-cmd-job.test.js dist/__tests__/cli-cmd-generate.test.js dist/__tests__/cli-cmd-gmail.test.js dist/__tests__/cli-cmd-info.test.js dist/__tests__/cli-cmd-init.test.js dist/__tests__/cli-cmd-location.test.js dist/__tests__/cli-cmd-text.test.js dist/__tests__/cli-cmd-login.test.js dist/__tests__/cli-cmd-logout.test.js dist/__tests__/cli-cmd-token.test.js dist/__tests__/cli-cmd-logs.test.js dist/__tests__/cli-cmd-memory.test.js dist/__tests__/cli-cmd-page.test.js dist/__tests__/cli-cmd-plan.test.js dist/__tests__/cli-cmd-project.test.js dist/__tests__/cli-cmd-rbac.test.js dist/__tests__/cli-cmd-realtime.test.js dist/__tests__/cli-cmd-records.test.js dist/__tests__/cli-cmd-relay.test.js dist/__tests__/cli-cmd-sandbox.test.js dist/__tests__/cli-cmd-add.test.js dist/__tests__/cli-cmd-remove.test.js dist/__tests__/cli-cmd-skill.test.js dist/__tests__/cli-cmd-test.test.js dist/__tests__/cli-cmd-workflow.test.js dist/__tests__/setup-skills-block.test.js dist/__tests__/setup-hooks.test.js",
|
|
15
|
+
"test:smoke": "tsc && node --test dist/__tests__/utils.test.js dist/__tests__/colors.test.js dist/__tests__/config.test.js dist/__tests__/sync.test.js dist/__tests__/sync-apply.test.js dist/__tests__/sync-lock.test.js dist/__tests__/push-cas.test.js dist/__tests__/upload.test.js dist/__tests__/progress.test.js dist/__tests__/updater.test.js dist/__tests__/cli-smoke.test.js dist/__tests__/claude-noninteractive.test.js dist/__tests__/claude-trust.test.js dist/__tests__/relay-state.test.js dist/__tests__/relay-daemon.test.js dist/__tests__/relay-installers.test.js dist/__tests__/relay-bridge-abort.test.js dist/__tests__/relay-redact.test.js dist/__tests__/relay-machine-id.test.js dist/__tests__/stream-json.test.js dist/__tests__/relay-ingest-contract.test.js dist/__tests__/prompts.test.js dist/__tests__/capture-transcript.test.js dist/__tests__/flag-aliases.test.js dist/__tests__/adopt-cwd.test.js dist/__tests__/cli-cmd-agent.test.js dist/__tests__/cli-cmd-approval.test.js dist/__tests__/cli-cmd-audit.test.js dist/__tests__/cli-cmd-chat.test.js dist/__tests__/cli-cmd-credits.test.js dist/__tests__/cli-cmd-db.test.js dist/__tests__/cli-cmd-deploy.test.js dist/__tests__/cli-cmd-domain.test.js dist/__tests__/cli-cmd-email.test.js dist/__tests__/cli-cmd-file.test.js dist/__tests__/cli-cmd-fn.test.js dist/__tests__/cli-cmd-service.test.js dist/__tests__/cli-cmd-job.test.js dist/__tests__/cli-cmd-generate.test.js dist/__tests__/cli-cmd-gmail.test.js dist/__tests__/cli-cmd-info.test.js dist/__tests__/cli-cmd-init.test.js dist/__tests__/cli-cmd-location.test.js dist/__tests__/cli-cmd-text.test.js dist/__tests__/cli-cmd-login.test.js dist/__tests__/cli-cmd-logout.test.js dist/__tests__/cli-cmd-token.test.js dist/__tests__/cli-cmd-logs.test.js dist/__tests__/cli-cmd-memory.test.js dist/__tests__/cli-cmd-page.test.js dist/__tests__/cli-cmd-plan.test.js dist/__tests__/cli-cmd-project.test.js dist/__tests__/cli-cmd-rbac.test.js dist/__tests__/cli-cmd-realtime.test.js dist/__tests__/cli-cmd-records.test.js dist/__tests__/cli-cmd-relay.test.js dist/__tests__/cli-cmd-sandbox.test.js dist/__tests__/cli-cmd-add.test.js dist/__tests__/cli-cmd-remove.test.js dist/__tests__/cli-cmd-skill.test.js dist/__tests__/cli-cmd-test.test.js dist/__tests__/cli-cmd-workflow.test.js dist/__tests__/setup-skills-block.test.js dist/__tests__/setup-hooks.test.js",
|
|
16
16
|
"test:e2e": "tsc && GIPITY_E2E=1 node --test --test-timeout=180000 dist/__tests__/cli-e2e-live.test.js dist/__tests__/cli-e2e-services-media-live.test.js dist/__tests__/cli-e2e-workflow-live.test.js dist/__tests__/cli-e2e-sandbox-live.test.js dist/__tests__/cli-e2e-page-fetch-live.test.js dist/__tests__/cli-e2e-page-test-live.test.js",
|
|
17
17
|
"test:e2e:sandbox": "tsc && GIPITY_E2E=1 node --test --test-timeout=180000 dist/__tests__/cli-e2e-sandbox-live.test.js"
|
|
18
18
|
},
|