diff --git a/.github/workflows/index-data.yml b/.github/workflows/index-data.yml index 686e1421..ad010b05 100644 --- a/.github/workflows/index-data.yml +++ b/.github/workflows/index-data.yml @@ -12,23 +12,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - path: tea.xyz/var/cli - repository: teaxyz/cli - - - uses: actions/checkout@v3 - with: - path: pantry - - uses: teaxyz/setup@v0 - with: - srcroot: tea.xyz/var/pantry - prefix: ${{ github.workspace }} - - - run: ./pantry/scripts/index-packages.ts ${{ inputs.projects }} + - run: ./scripts/index-packages.ts ${{ inputs.projects }} env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + TEA_PANTRY_PATH: ${{ github.workspace }} AWS_REGION: us-east-1 SQS_GENERATE_PACKAGE_DETAILS_URL: ${{ secrets.SQS_GENERATE_PACKAGE_DETAILS_URL }} - TEA_PANTRY_PATH: ${{ github.workspace }} diff --git a/.vscode/settings.json b/.vscode/settings.json index 8a27b72e..a25540ed 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,6 @@ "deno.enable": true, "deno.lint": true, "deno.unstable": true, - "deno.config": "deno.jsonc" + "deno.config": "deno.jsonc", + "deno.importMap": "../cli/import-map.json" } \ No newline at end of file diff --git a/deno.jsonc b/deno.jsonc index fd0552a6..e618930c 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -19,6 +19,5 @@ "deno.land": "^1.30" } }, - "importMap": "https://raw.githubusercontent.com/teaxyz/cli/v0.21/import-map.json" - // ^^ stuck in the past because we moved the import map into deno.json :-/ + "importMap": "https://raw.githubusercontent.com/teaxyz/cli/v0.22.1/import-map.json" } diff --git a/scripts/index-packages.ts b/scripts/index-packages.ts index fbf01997..8c46486d 100755 --- a/scripts/index-packages.ts +++ b/scripts/index-packages.ts @@ -8,21 +8,22 @@ args: - --allow-env - --allow-net - --allow-sys - - --import-map={{ srcroot }}/import-map.json ---*/ -import * as semver from "semver" import { usePantry } from "hooks" import * as ARGV from "./utils/args.ts" -import { SQSClient, SendMessageCommand } from "npm:@aws-sdk/client-sqs" +import { SQSClient, SendMessageCommand } from "npm:@aws-sdk/client-sqs@^3" +import { panic } from "utils" -const sqsClient = new SQSClient({ region: 'us-east-1' }) +const sqsClient = new SQSClient({ region: Deno.env.get("AWS_REGION") ?? panic("No region specified") }) const pantry = usePantry() const pkgs = await ARGV.toArray(ARGV.pkgs()) -for(const { project } of pkgs) { +for(const pkg of pkgs) { try { - const yml = await pantry.getYAML({ project, constraint: new semver.Range('*') }).parse() + const yml = await pantry.getYAML(pkg).parse() + + const project = pkg.project const taskMessage = { project,