Skip to content

Commit b00f8e4

Browse files
fix: remove stale banned gen-v-connector V-lang recipe (#124)
Held consumer sweep following rsr-template-repo PR #22, which removed the banned gen-v-connector V-lang connector-scaffold recipe from the template. This repo carried a pre-PR#22 copy of that drift recipe. Removes the "Generate a V-lang connector scaffold from the Groove manifest" Justfile recipe and its full body (the connectors/v-*/ generator and embedded main.v heredoc). V-lang ban-enforcement assets (check-no-vlang.sh, estate-rules workflow, 6a2/PLAYBOOK.a2ml) are intentionally left untouched: they contain the gen-v-connector/vlang string as a detection pattern. The legitimate groove-setup and verify-template recipes and the GROOVE & V-TRIPLE SETUP section header are unchanged. Co-authored-by: hyperpolymath <hyperpolymath@users.noreply.github.com>
1 parent f34391c commit b00f8e4

2 files changed

Lines changed: 0 additions & 168 deletions

File tree

affinescript-vite/Justfile

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -356,90 +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-
// PENDING: 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-
443359
# ═══════════════════════════════════════════════════════════════════════════════
444360
# PROJECT SELF-ASSESSMENT
445361
# ═══════════════════════════════════════════════════════════════════════════════

road-skate/Justfile

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -356,90 +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-
// PENDING: 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-
443359
# ═══════════════════════════════════════════════════════════════════════════════
444360
# PROJECT SELF-ASSESSMENT
445361
# ═══════════════════════════════════════════════════════════════════════════════

0 commit comments

Comments
 (0)