Skip to content

Commit 2ca6164

Browse files
fix: remove stale banned gen-v-connector V-lang recipe (#6)
Held consumer sweep following rsr-template-repo PR #22. Removes the pre-PR#22 copy of the banned gen-v-connector V-lang connector-scaffold recipe from the Justfile. Repo own V-lang ban-enforcement guards (if any) are preserved. Co-authored-by: hyperpolymath <hyperpolymath@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 0fca54b commit 2ca6164

1 file changed

Lines changed: 0 additions & 88 deletions

File tree

Justfile

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -356,94 +356,6 @@ verify-template:
356356
exit 1
357357
fi
358358
359-
# Generate a V-lang connector scaffold from the Groove manifest
360-
gen-v-connector:
361-
#!/usr/bin/env bash
362-
set -euo pipefail
363-
MANIFEST=".machine_readable/integrations/groove.a2ml"
364-
if [ ! -f "$MANIFEST" ]; then
365-
echo "Error: No Groove manifest. Run 'just groove-setup' first."
366-
exit 1
367-
fi
368-
369-
# Extract service name and port from manifest
370-
SERVICE=$(grep '(service "' "$MANIFEST" | head -1 | sed 's/.*"\(.*\)".*/\1/')
371-
PORT=$(grep '(port ' "$MANIFEST" | head -1 | sed 's/.*(port \([0-9]*\)).*/\1/')
372-
373-
if [ "$PORT" = "0" ] || [ -z "$PORT" ]; then
374-
echo "Error: Port not assigned. Run 'just groove-setup' first."
375-
exit 1
376-
fi
377-
378-
# Check which API surfaces are enabled
379-
REST=$(grep -q '(rest.*enabled true)' "$MANIFEST" && echo "true" || echo "false")
380-
GRPC=$(grep -q '(grpc.*enabled true)' "$MANIFEST" && echo "true" || echo "false")
381-
GRAPHQL=$(grep -q '(graphql.*enabled true)' "$MANIFEST" && echo "true" || echo "false")
382-
383-
OUTDIR="connectors/v-${SERVICE}"
384-
mkdir -p "${OUTDIR}/src"
385-
386-
cat << VEOF | sed "s/^ //" > "${OUTDIR}/src/main.v"
387-
// SPDX-License-Identifier: PMPL-1.0-or-later
388-
// V-${SERVICE} — auto-generated V-lang connector.
389-
// Generated by: just gen-v-connector
390-
// From: ${MANIFEST}
391-
392-
module v_${SERVICE//-/_}
393-
394-
import net.http
395-
import json
396-
397-
pub struct Config {
398-
pub mut:
399-
base_url string = 'http://localhost:${PORT}'
400-
}
401-
402-
pub fn new_client(config Config) &Client {
403-
return &Client{ config: config }
404-
}
405-
406-
pub fn new_default() &Client {
407-
return new_client(Config{})
408-
}
409-
410-
pub struct Client {
411-
config Config
412-
}
413-
414-
pub fn (c &Client) health() !string {
415-
resp := http.get('\${c.config.base_url}/health') or {
416-
return error('${SERVICE} unreachable: \${err}')
417-
}
418-
if resp.status_code != 200 {
419-
return error('${SERVICE} unhealthy: HTTP \${resp.status_code}')
420-
}
421-
return resp.body
422-
}
423-
424-
// Groove discovery
425-
pub fn discover() ?&Client {
426-
client := new_default()
427-
if _ := client.health() { return client }
428-
return none
429-
}
430-
431-
// TODO: Add endpoint-specific methods for your API
432-
// REST=${REST} gRPC=${GRPC} GraphQL=${GRAPHQL}
433-
VEOF
434-
435-
echo "Generated: ${OUTDIR}/src/main.v"
436-
echo " Service: ${SERVICE}"
437-
echo " Port: ${PORT}"
438-
echo " REST: ${REST}, gRPC: ${GRPC}, GraphQL: ${GRAPHQL}"
439-
echo ""
440-
echo "Next: add endpoint methods to ${OUTDIR}/src/main.v"
441-
echo "Then copy to developer-ecosystem/v-ecosystem/connectors/"
442-
443-
# ═══════════════════════════════════════════════════════════════════════════════
444-
# PROJECT SELF-ASSESSMENT
445-
# ═══════════════════════════════════════════════════════════════════════════════
446-
447359
# Analyse this project and advise what to keep, remove, or leave for later.
448360
# Does NOT modify any files — only prints recommendations.
449361
self-assess:

0 commit comments

Comments
 (0)