Skip to content

Commit a42ccf3

Browse files
committed
fix: remove stale banned gen-v-connector V-lang recipe
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.
1 parent 5598c7e commit a42ccf3

2 files changed

Lines changed: 0 additions & 168 deletions

File tree

affinescript-ecosystem/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
# ═══════════════════════════════════════════════════════════════════════════════

affinescript-ecosystem/rattlescript/Justfile

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

0 commit comments

Comments
 (0)