diff --git a/.changeset/config.json b/.changeset/config.json index 2aef78b..30c00f8 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -4,6 +4,7 @@ "commit": false, "fixed": [], "linked": [], + "ignore": ["@open-iga/connector-sdk"], "access": "restricted", "baseBranch": "main", "updateInternalDependencies": "patch" diff --git a/.changeset/personio-source.md b/.changeset/personio-source.md new file mode 100644 index 0000000..f1aeb0a --- /dev/null +++ b/.changeset/personio-source.md @@ -0,0 +1,5 @@ +--- +'@open-iga/personio-source': minor +--- + +Add the Personio source connector, which lists employees as identities diff --git a/.changeset/sink-connectors-folder.md b/.changeset/sink-connectors-folder.md new file mode 100644 index 0000000..a845151 --- /dev/null +++ b/.changeset/sink-connectors-folder.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.github/actions/compile/action.yml b/.github/actions/compile/action.yml new file mode 100644 index 0000000..57efc14 --- /dev/null +++ b/.github/actions/compile/action.yml @@ -0,0 +1,57 @@ +name: Compile Extism JS plugin +description: >- + Install extism-js and Bun, install the project's dependencies, then run the compile command. + Linux x86_64 runners only. Check out your code first. + +inputs: + command: + description: Shell command that compiles the plugin + required: false + default: bun run compile + bun-version: + description: Bun version to install + required: false + default: 1.4.5 + working-directory: + description: Directory to install dependencies and compile in + required: false + default: . + +runs: + using: composite + steps: + - name: Install extism-js - Linux x86_64 + shell: bash + # The installer unpacks binaryen into the current directory, so keep it out of the checkout + working-directory: ${{ runner.temp }} + env: + # Single source of truth for the version. Must stay compatible with the catalog's @extism/extism + # runtime: js-pdk > 1.5.1 emits wasm that 2.0.0-rc13 cannot parse. Bump the checksums with it. + EXTISM_JS_TAG: v1.5.1 + # Verifies the installer at that tag before it runs + INSTALLER_SHA256: c395d700898249a49c54072950fbd2d0e4d3719acf5b4390f1cb142680ec1f05 + # The installer downloads the extism-js binary separately (unverified), so also pin the installed + # binary (Linux x86_64 asset). A changed release asset fails here, before it ever runs. + EXTISM_JS_SHA256: 4552ee7385d2f0583363448c9e45aa733dec8d7edac8d646b69ee1271ad09483 + run: | + curl -fLs "https://raw.githubusercontent.com/extism/js-pdk/${EXTISM_JS_TAG}/install.sh" -o extism-install.sh + echo "${INSTALLER_SHA256} extism-install.sh" | sha256sum -c - + bash extism-install.sh "$EXTISM_JS_TAG" + echo "${EXTISM_JS_SHA256} $(command -v extism-js)" | sha256sum -c - + + - uses: oven-sh/setup-bun@v2 + name: Setup Bun + with: + bun-version: ${{ inputs.bun-version }} + + - name: Install dependencies + shell: bash + working-directory: ${{ inputs.working-directory }} + run: bun install --frozen-lockfile + + - name: Compile Connector + shell: bash + working-directory: ${{ inputs.working-directory }} + env: + COMMAND: ${{ inputs.command }} + run: bash -eo pipefail -c "$COMMAND" diff --git a/.github/workflows/package-ci.yml b/.github/workflows/package-ci.yml new file mode 100644 index 0000000..8a24d59 --- /dev/null +++ b/.github/workflows/package-ci.yml @@ -0,0 +1,42 @@ +name: Package CI + +on: + workflow_call: + inputs: + package: + description: Workspace package name to check + required: true + type: string + path: + description: Package directory, relative to the repo root + required: true + type: string + +permissions: + contents: read + +jobs: + check: + runs-on: ubuntu-latest + env: + PACKAGE: ${{ inputs.package }} + steps: + - uses: actions/checkout@v6 + + - name: Install tools and dependencies, then compile + uses: ./.github/actions/compile + with: + command: bunx turbo run compile --filter="$PACKAGE" + + - name: Lint + env: + PACKAGE_PATH: ${{ inputs.path }} + run: bunx oxlint "$PACKAGE_PATH" + + # turbo also runs each task for whatever the package depends on + - name: Typecheck + run: bunx turbo run typecheck --filter="$PACKAGE" + + # test depends on compile, which turbo replays from the cache of the compile step + - name: Test + run: bunx turbo run test --filter="$PACKAGE" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e74516f..fbaf272 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,53 +12,74 @@ concurrency: cancel-in-progress: true jobs: - ci: + detect: runs-on: ubuntu-latest + outputs: + packages: ${{ steps.affected.outputs.packages }} steps: - uses: actions/checkout@v6 + with: + # turbo needs the history to diff against the base commit + fetch-depth: 0 - uses: oven-sh/setup-bun@v2 with: - bun-version: 1.4.4 - - - name: Install extism-js - env: - # Version is pinned in package.json (config.extism-js-version); - # the checksum verifies the installer at that tag before it runs. - INSTALLER_SHA256: c395d700898249a49c54072950fbd2d0e4d3719acf5b4390f1cb142680ec1f05 - # The installer downloads the extism-js binary separately (unverified), so - # also pin the installed binary. Linux x86_64 asset for the tag above; a - # changed release asset mismatches here and fails before it ever compiles. - EXTISM_JS_SHA256: 4552ee7385d2f0583363448c9e45aa733dec8d7edac8d646b69ee1271ad09483 - run: | - EXTISM_JS_TAG="$(jq -r '.config["extism-js-version"]' package.json)" - curl -fLs "https://raw.githubusercontent.com/extism/js-pdk/${EXTISM_JS_TAG}/install.sh" -o /tmp/extism-install.sh - echo "${INSTALLER_SHA256} /tmp/extism-install.sh" | sha256sum -c - - bash /tmp/extism-install.sh "$EXTISM_JS_TAG" - echo "${EXTISM_JS_SHA256} $(command -v extism-js)" | sha256sum -c - + bun-version: 1.4.5 - name: Install dependencies run: bun install --frozen-lockfile - - name: Typecheck, Lint, test and compile - run: bunx turbo run typecheck "//#lint" test compile + # Changed packages plus every package that depends on them + - name: Detect affected packages + id: affected + env: + TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }} + run: bun scripts/affected-packages.ts + + package: + needs: detect + # An empty matrix is an error, so skip the job instead + if: ${{ needs.detect.outputs.packages != '[]' }} + strategy: + fail-fast: false + matrix: + package: ${{ fromJSON(needs.detect.outputs.packages) }} + name: ${{ matrix.package.name }} + uses: ./.github/workflows/package-ci.yml + with: + package: ${{ matrix.package.name }} + path: ${{ matrix.package.path }} + + # Single status to require in branch protection; matrix job names vary per PR + ci: + needs: [detect, package] + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Fail if any job failed + if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} + run: exit 1 changeset-check: needs: ci runs-on: ubuntu-latest # Version PRs (changeset-release/*) and dependency bots don't carry changesets - if: ${{ !startsWith(github.head_ref, 'changeset-release/') }} + # !cancelled() is needed: a skipped matrix job upstream would otherwise skip this one too + if: >- + ${{ !cancelled() && needs.ci.result == 'success' && + !startsWith(github.head_ref, 'changeset-release/') }} steps: - uses: actions/checkout@v6 with: fetch-depth: 0 - uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.4.5 - name: Install dependencies run: bun install --frozen-lockfile - name: Check for changesets - # Fails when packages under connectors/ or packages/ changed - # without a changeset + # Fails when a connector changed without a changeset (the SDK is ignored until it is published) run: bunx changeset status --since="origin/${{ github.base_ref }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e15a937..74c7073 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,23 +21,8 @@ jobs: fetch-depth: 0 - uses: oven-sh/setup-bun@v2 - - - name: Install extism-js - env: - # Version is pinned in package.json (config.extism-js-version); - # the checksum verifies the installer at that tag before it - # runs with this job's write token. - INSTALLER_SHA256: c395d700898249a49c54072950fbd2d0e4d3719acf5b4390f1cb142680ec1f05 - # The installer downloads the extism-js binary separately (unverified), so - # also pin the installed binary. Linux x86_64 asset for the tag above; a - # changed release asset mismatches here and fails before it ever runs. - EXTISM_JS_SHA256: 4552ee7385d2f0583363448c9e45aa733dec8d7edac8d646b69ee1271ad09483 - run: | - EXTISM_JS_TAG="$(jq -r '.config["extism-js-version"]' package.json)" - curl -fLs "https://raw.githubusercontent.com/extism/js-pdk/${EXTISM_JS_TAG}/install.sh" -o /tmp/extism-install.sh - echo "${INSTALLER_SHA256} /tmp/extism-install.sh" | sha256sum -c - - bash /tmp/extism-install.sh "$EXTISM_JS_TAG" - echo "${EXTISM_JS_SHA256} $(command -v extism-js)" | sha256sum -c - + with: + bun-version: 1.4.5 - name: Install dependencies run: bun install --frozen-lockfile @@ -52,18 +37,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Compile and publish GitHub release + - name: Install tools and dependencies, then compile + if: steps.changesets.outputs.hasChangesets == 'false' + uses: ./.github/actions/compile + with: + command: bunx turbo run compile + + - name: Publish GitHub releases if: steps.changesets.outputs.hasChangesets == 'false' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - TAG="@open-iga/aws-sink@$(jq -r .version connectors/aws/package.json)" - if gh release view "$TAG" >/dev/null 2>&1; then - echo "Release $TAG already exists; nothing to do." - exit 0 - fi - bunx turbo run compile - cd connectors/aws/.open-iga - sha256sum AWS.wasm | cut -d' ' -f1 > AWS.wasm.hash.txt - gh release create "$TAG" --title "$TAG" --generate-notes \ - AWS.wasm AWS.wasm.hash.txt + run: bun scripts/release.ts diff --git a/README.md b/README.md index dd05a05..73cc0e9 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This is a [Bun workspaces](https://bun.sh/docs/install/workspaces) monorepo. | Path | Package | Role | | ---------------------------- | --------------------------- | -------------------------------------------------------------------------------- | | `packages/connector-sdk` | `@open-iga/connector-sdk` | Build toolchain + runtime that connector authors depend on; compiles TS to WASM. | -| `connectors/aws` | `@open-iga/aws-sink` | AWS connector built on the SDK — account actions (IAM users) and entitlements. | +| `sink-connectors/aws` | `@open-iga/aws-sink` | AWS connector built on the SDK — account actions (IAM users) and entitlements. | | `source-connectors/personio` | `@open-iga/personio-source` | Personio source connector — lists employees. | ## Getting started @@ -23,7 +23,7 @@ bun install # install workspace dependencies bun run test # build + test every workspace (via turbo) ``` -Per connector (e.g. `connectors/aws`): +Per connector (e.g. `sink-connectors/aws`): ```sh bun run compile # compile the connector to a .wasm module (open-iga compile) @@ -31,6 +31,28 @@ bun run test # compile, then run the test suite bun run typecheck # type-check app and test sources ``` +## CI + +Pull requests run the [PR workflow](.github/workflows/pr.yml): it asks turbo for the changed packages and everything +that depends on them, then runs [Package CI](.github/workflows/package-ci.yml) (compile, lint, typecheck, test) once +per package. Changing the root `tsconfig.json`, `oxlint.config.ts`, `turbo.json`, `scripts/` or the CI files checks every package. + +### Compile action for other repositories + +The [compile action](.github/actions/compile/action.yml) does everything a compile needs on a Linux x86_64 runner, in +this order: install the pinned `extism-js` CLI, install Bun (the `open-iga` CLI runs on it), install your dependencies, +run your compile command. Check out your code first: + +```yaml +steps: + - uses: actions/checkout@v6 + - uses: open-iga/plugins/.github/actions/compile@main # pin a tag or commit SHA + with: + command: bun run compile # default + working-directory: . # default + bun-version: 1.4.5 # default +``` + ## Writing a connector A connector is plain TypeScript that defines its capabilities against `@open-iga/connector-sdk` and @@ -47,7 +69,7 @@ A `source` connector declares: - **Identities** — a paged `list` of people (e.g. employees). -See `connectors/aws` for a complete reference implementation. +See `sink-connectors/aws` for a complete reference implementation. ## Roadmap diff --git a/bun.lock b/bun.lock index 3337c4e..f793f7b 100644 --- a/bun.lock +++ b/bun.lock @@ -7,7 +7,7 @@ "devDependencies": { "@changesets/cli": "catalog:", "@extism/js-pdk": "catalog:", - "oxfmt": "catalog:", + "@types/bun": "catalog:", "oxlint": "catalog:", "oxlint-tsgolint": "catalog:", "testcontainers": "catalog:", @@ -15,21 +15,6 @@ "typescript": "catalog:", }, }, - "connectors/aws": { - "name": "@open-iga/aws-sink", - "version": "0.6.0", - "dependencies": { - "@aws-sdk/client-iam": "catalog:", - "@aws-sdk/client-sts": "catalog:", - }, - "devDependencies": { - "@open-iga/connector-sdk": "workspace:*", - "@types/bun": "catalog:", - "bun-types": "catalog:", - "testcontainers": "catalog:", - "typescript": "catalog:", - }, - }, "packages/connector-sdk": { "name": "@open-iga/connector-sdk", "version": "0.0.1", @@ -46,6 +31,21 @@ "bun-types": "catalog:", }, }, + "sink-connectors/aws": { + "name": "@open-iga/aws-sink", + "version": "0.6.0", + "dependencies": { + "@aws-sdk/client-iam": "catalog:", + "@aws-sdk/client-sts": "catalog:", + }, + "devDependencies": { + "@open-iga/connector-sdk": "workspace:*", + "@types/bun": "catalog:", + "bun-types": "catalog:", + "testcontainers": "catalog:", + "typescript": "catalog:", + }, + }, "source-connectors/personio": { "name": "@open-iga/personio-source", "version": "0.0.0", @@ -69,7 +69,6 @@ "@noble/hashes": "2.2.0", "@types/bun": "1.4.0", "bun-types": "1.4.0", - "oxfmt": "0.61.0", "oxlint": "1.76.0", "oxlint-tsgolint": "7.0.2001", "testcontainers": "12.1.0", @@ -170,50 +169,12 @@ "@noble/hashes": ["@noble/hashes@2.2.0", "", {}, "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg=="], - "@open-iga/aws-sink": ["@open-iga/aws-sink@workspace:connectors/aws"], + "@open-iga/aws-sink": ["@open-iga/aws-sink@workspace:sink-connectors/aws"], "@open-iga/connector-sdk": ["@open-iga/connector-sdk@workspace:packages/connector-sdk"], "@open-iga/personio-source": ["@open-iga/personio-source@workspace:source-connectors/personio"], - "@oxfmt/binding-android-arm-eabi": ["@oxfmt/binding-android-arm-eabi@0.61.0", "", { "os": "android", "cpu": "arm" }, "sha512-BaS+1OVvg9sr+Xav0+KdWedQRcAzrdoEcwMZeqoc2F6ieC1s/t5eM35YQoRPQ7vAqkZ+p3tbQb1r9I9mrV5oGA=="], - - "@oxfmt/binding-android-arm64": ["@oxfmt/binding-android-arm64@0.61.0", "", { "os": "android", "cpu": "arm64" }, "sha512-of8atAV0M1egGcVOMbgZCvc10sFOP3ayQBNQV5h5G3fNq8gACdEswfFk9bzGrdbM23rtg0Coxi7np7oPLcueNw=="], - - "@oxfmt/binding-darwin-arm64": ["@oxfmt/binding-darwin-arm64@0.61.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-7l8+5ov4BGwtAcmpzvEik/TG3bciwyw/S3e6j5GKH7pcQqcgCVxD3AuJeP6upto+SOTBKQ4wrrdbMt0gq8fHSQ=="], - - "@oxfmt/binding-darwin-x64": ["@oxfmt/binding-darwin-x64@0.61.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-Fnz4dDDXBb7udk+DmwelNjxbD6yptyxwCqwCH2ebo4RVLxVsRfFsn/AHJC49KIltPrVokamGv4SSOsiV50DTxQ=="], - - "@oxfmt/binding-freebsd-x64": ["@oxfmt/binding-freebsd-x64@0.61.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-mddOebKNCP+AucmzfNsk3jgbr681qAUvgMqi865GW5gWLJ/AnzXbvjQRrny0e++NAN8aphav/aRSrfFxNsNjpA=="], - - "@oxfmt/binding-linux-arm-gnueabihf": ["@oxfmt/binding-linux-arm-gnueabihf@0.61.0", "", { "os": "linux", "cpu": "arm" }, "sha512-svx59iYL+DbaZGZUIoice4W0CjRXGExnbz7Re+awIb60rVxBS2KrU7Hnlx+nZYanLGLpjneUEgo/VFEKkSZAyQ=="], - - "@oxfmt/binding-linux-arm-musleabihf": ["@oxfmt/binding-linux-arm-musleabihf@0.61.0", "", { "os": "linux", "cpu": "arm" }, "sha512-BYK9MPJPCf6d+fLKMTruThmEyCtHzQ1zLcsrTlUVkmnoXIaHAbfpeLYQwX1tkjs7W11dyzoi6HFvKcdnvX1zNg=="], - - "@oxfmt/binding-linux-arm64-gnu": ["@oxfmt/binding-linux-arm64-gnu@0.61.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-QUaCNLq2/EC6G5ljOuFanl9Lgw6ZWp4co7rs4+KOMUzbGfA4Lq58FHRjjF9sVIG+93XSbo343MxFATrOU1qctA=="], - - "@oxfmt/binding-linux-arm64-musl": ["@oxfmt/binding-linux-arm64-musl@0.61.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-S6uvJ6MXnRXl+zTs0CARNDvkE+cymj0EVWEKKsyKnlLlqTyQJBjw5s4D2pSIOZc+S46cy4STefzcr/sm0VzVPA=="], - - "@oxfmt/binding-linux-ppc64-gnu": ["@oxfmt/binding-linux-ppc64-gnu@0.61.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-6VDlRcytvZG6UlSIdAFKDLbppo9tvPxrWzle6vHldYFMeuDPQEfMKrkwezp7FaBq1wik9ra554ZZeRPsyIkFpg=="], - - "@oxfmt/binding-linux-riscv64-gnu": ["@oxfmt/binding-linux-riscv64-gnu@0.61.0", "", { "os": "linux", "cpu": "none" }, "sha512-KkBTYbzExpbmn15XjKPLu2fRV2PVlq+KWt+brad5rwIa03vdYoaDRWiS7raHII/dCTR6Ro4UpYUCH4t6lif4WQ=="], - - "@oxfmt/binding-linux-riscv64-musl": ["@oxfmt/binding-linux-riscv64-musl@0.61.0", "", { "os": "linux", "cpu": "none" }, "sha512-69tzIq7sJLVB9dxYYtvMzcSSsnZHSO+U2U19O2RqDqgj6+Q4O7HjSXdaszbcgqzhsUwzSH7z5kWvk8nmf6BHTg=="], - - "@oxfmt/binding-linux-s390x-gnu": ["@oxfmt/binding-linux-s390x-gnu@0.61.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-Oqi/N0OvtOVXsPKAOOhKgGH3msRYF8BLJaNBbWiupRiKoKVyc8JRKPCfarkQJC+RgP9U8raUKLe+bNwd0HUMiA=="], - - "@oxfmt/binding-linux-x64-gnu": ["@oxfmt/binding-linux-x64-gnu@0.61.0", "", { "os": "linux", "cpu": "x64" }, "sha512-3TKwv/ed4uwJSemAA8P9XcoqETpjQI4waquF9UilhA9Mn/dhr1PdUEXWlL74mtc6ZNfmKPA9+NEJm01nRF8CVA=="], - - "@oxfmt/binding-linux-x64-musl": ["@oxfmt/binding-linux-x64-musl@0.61.0", "", { "os": "linux", "cpu": "x64" }, "sha512-uFso4u4nLkVSlMCpgjyvWV60Gt7GvDQHnk1mmRxHIkZTMB0ljpUKwCD9FYGgN9H97x2wYl0UwEjgRZaPIuhEhw=="], - - "@oxfmt/binding-openharmony-arm64": ["@oxfmt/binding-openharmony-arm64@0.61.0", "", { "os": "none", "cpu": "arm64" }, "sha512-keGLkzeOvkMpNmPp4hffXWpfoSsY6e1K8++KXD4mSSfxdvM8q9QUDsYY689TB1k6Co832DZn1MnaaVx6cIBMWQ=="], - - "@oxfmt/binding-win32-arm64-msvc": ["@oxfmt/binding-win32-arm64-msvc@0.61.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-VzsAISkFxmNhJ5LBDEL9VuH6tJsVJMtqYit2LyIUf/HLnsCe4Pg9SMOjjVQzGWt0bnpyfJ94CrqTqcpNZzK+ug=="], - - "@oxfmt/binding-win32-ia32-msvc": ["@oxfmt/binding-win32-ia32-msvc@0.61.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-xv4t7yzwJoYaLB6Zv28B3W+j7brEjsyv50rLTAQgmxJzddce9fAMCxed8dSAkbWES0zz2J29nYK5FaTuD2YBHg=="], - - "@oxfmt/binding-win32-x64-msvc": ["@oxfmt/binding-win32-x64-msvc@0.61.0", "", { "os": "win32", "cpu": "x64" }, "sha512-6EZXFkqOwxdDYjIn3TSNnPk3ST5E5GiYd4FiM6UF/mCL/LZSfr6D6UygTfW3R1PCQP2quCKpCEGRlij8E3VYbg=="], - "@oxlint-tsgolint/darwin-arm64": ["@oxlint-tsgolint/darwin-arm64@7.0.2001", "", { "os": "darwin", "cpu": "arm64" }, "sha512-CUJEdbSZ54+Xy9OXqOhWLTKZKV0BBiV7C2i/ygyVmXtkUNXx5YCzN8DpSSshTAKktoL7S+tnQ/ftFG/i7X896w=="], "@oxlint-tsgolint/darwin-x64": ["@oxlint-tsgolint/darwin-x64@7.0.2001", "", { "os": "darwin", "cpu": "x64" }, "sha512-pXfBb5BqONCcgrXQNUZWXgiYmRSWJzd97S8i41VVOh6ut0tyo+cJ5FKFpczDHxiVNfj/3e7c9B4MtztNdpIVCw=="], @@ -240,21 +201,21 @@ "@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.76.0", "", { "os": "linux", "cpu": "arm" }, "sha512-PvPCVptkgVARsucgIqFQQcSmJ6xc6GtnVB5bRBekRahTc9eObMtjHfMjy5M+C2tHt5UCMttWM9RuSk/H9NqYeg=="], - "@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.76.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-3KeFDx8Bu4HPAXbuHZOr/oHvN+QT+JQhMw/NYPz7Z071xLSsG27Jfh9PIQVEY7hk1I+jr43ExqRIeJ6VKk2yLw=="], + "@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.76.0", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-3KeFDx8Bu4HPAXbuHZOr/oHvN+QT+JQhMw/NYPz7Z071xLSsG27Jfh9PIQVEY7hk1I+jr43ExqRIeJ6VKk2yLw=="], - "@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.76.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-oPFkkKTgl0K/EIg9fQ8oA3IGcI05/Mq1en04iFa41mmNPT+6KEiByVazTOZZJiHMBBrbsns1YJ2e1Scqwzesjw=="], + "@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.76.0", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-oPFkkKTgl0K/EIg9fQ8oA3IGcI05/Mq1en04iFa41mmNPT+6KEiByVazTOZZJiHMBBrbsns1YJ2e1Scqwzesjw=="], - "@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.76.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-gN7yZ0eqflA5Fhf1wvHxGUltIV3FsvmB1zhNMDEK9vSHhc7E6qg9CuPeBgPZab66Tjzq6w6kHAtNEvnTHf4cyw=="], + "@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.76.0", "", { "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-gN7yZ0eqflA5Fhf1wvHxGUltIV3FsvmB1zhNMDEK9vSHhc7E6qg9CuPeBgPZab66Tjzq6w6kHAtNEvnTHf4cyw=="], - "@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.76.0", "", { "os": "linux", "cpu": "none" }, "sha512-S/HqMbn22mQrjtErUxEoS/a55u8kIeXvreIxiJu5G7Le3UecEd6SQZxrDIpuhtgaFnsY/nVra3ytP+pRljDilA=="], + "@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.76.0", "", { "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-S/HqMbn22mQrjtErUxEoS/a55u8kIeXvreIxiJu5G7Le3UecEd6SQZxrDIpuhtgaFnsY/nVra3ytP+pRljDilA=="], - "@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.76.0", "", { "os": "linux", "cpu": "none" }, "sha512-ZIga3097VJZolGZk6SrIAUokIGfRkxRlhiHDUznZptGBfwrhD7pNfD1rzEzsCwvk/1DX0A1bLz+liuNh5QKIVQ=="], + "@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.76.0", "", { "os": "linux", "cpu": "none", "libc": "musl" }, "sha512-ZIga3097VJZolGZk6SrIAUokIGfRkxRlhiHDUznZptGBfwrhD7pNfD1rzEzsCwvk/1DX0A1bLz+liuNh5QKIVQ=="], - "@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.76.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-ZGiiA7pFzMJSyMWYZTVlPgbTsx+Vl8ihLGMIujPwaslUF7kIPPWAbVmAlTc+9lWDV+DCiB8Ikixu+lSHeOIIWQ=="], + "@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.76.0", "", { "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-ZGiiA7pFzMJSyMWYZTVlPgbTsx+Vl8ihLGMIujPwaslUF7kIPPWAbVmAlTc+9lWDV+DCiB8Ikixu+lSHeOIIWQ=="], - "@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.76.0", "", { "os": "linux", "cpu": "x64" }, "sha512-JLiy5WuvEBFTT6ErIFV35SLzi0R7Iri6MKU6dZbTxfIx8pndbbPs3Mj780nMipBFcPkti+okAPOJ9POKkHFEgg=="], + "@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.76.0", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-JLiy5WuvEBFTT6ErIFV35SLzi0R7Iri6MKU6dZbTxfIx8pndbbPs3Mj780nMipBFcPkti+okAPOJ9POKkHFEgg=="], - "@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.76.0", "", { "os": "linux", "cpu": "x64" }, "sha512-z7lgKQtbo/I1NIe8G5NHLesxJDv0tRSUWTpXKb9Pm3E9nKFKfO4IOSDtFroKgXtOYb0jQbcdH+0wzTyMXVes+A=="], + "@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.76.0", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-z7lgKQtbo/I1NIe8G5NHLesxJDv0tRSUWTpXKb9Pm3E9nKFKfO4IOSDtFroKgXtOYb0jQbcdH+0wzTyMXVes+A=="], "@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.76.0", "", { "os": "none", "cpu": "arm64" }, "sha512-JOjKymIpb9QcYfEhZsN6h4V9Ivd474W38cNIBRv6bg2TbIvogbMTH0Mg6YWW9TiRDqfcX+/Hyfsbo5vcSE5guQ=="], @@ -528,8 +489,6 @@ "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], - "oxfmt": ["oxfmt@0.61.0", "", { "dependencies": { "tinypool": "2.1.0" }, "optionalDependencies": { "@oxfmt/binding-android-arm-eabi": "0.61.0", "@oxfmt/binding-android-arm64": "0.61.0", "@oxfmt/binding-darwin-arm64": "0.61.0", "@oxfmt/binding-darwin-x64": "0.61.0", "@oxfmt/binding-freebsd-x64": "0.61.0", "@oxfmt/binding-linux-arm-gnueabihf": "0.61.0", "@oxfmt/binding-linux-arm-musleabihf": "0.61.0", "@oxfmt/binding-linux-arm64-gnu": "0.61.0", "@oxfmt/binding-linux-arm64-musl": "0.61.0", "@oxfmt/binding-linux-ppc64-gnu": "0.61.0", "@oxfmt/binding-linux-riscv64-gnu": "0.61.0", "@oxfmt/binding-linux-riscv64-musl": "0.61.0", "@oxfmt/binding-linux-s390x-gnu": "0.61.0", "@oxfmt/binding-linux-x64-gnu": "0.61.0", "@oxfmt/binding-linux-x64-musl": "0.61.0", "@oxfmt/binding-openharmony-arm64": "0.61.0", "@oxfmt/binding-win32-arm64-msvc": "0.61.0", "@oxfmt/binding-win32-ia32-msvc": "0.61.0", "@oxfmt/binding-win32-x64-msvc": "0.61.0" }, "peerDependencies": { "svelte": "^5.0.0", "vite-plus": "*" }, "optionalPeers": ["svelte", "vite-plus"], "bin": { "oxfmt": "bin/oxfmt" } }, "sha512-DxdHBEMYpcEnHoUHjjOigUqV2TYKsvxLwUPXnVYBjgFdqrcQ/91OtwubtZ2PUodCs3sStI8R5Qw3fKNGK4e8wQ=="], - "oxlint": ["oxlint@1.76.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.76.0", "@oxlint/binding-android-arm64": "1.76.0", "@oxlint/binding-darwin-arm64": "1.76.0", "@oxlint/binding-darwin-x64": "1.76.0", "@oxlint/binding-freebsd-x64": "1.76.0", "@oxlint/binding-linux-arm-gnueabihf": "1.76.0", "@oxlint/binding-linux-arm-musleabihf": "1.76.0", "@oxlint/binding-linux-arm64-gnu": "1.76.0", "@oxlint/binding-linux-arm64-musl": "1.76.0", "@oxlint/binding-linux-ppc64-gnu": "1.76.0", "@oxlint/binding-linux-riscv64-gnu": "1.76.0", "@oxlint/binding-linux-riscv64-musl": "1.76.0", "@oxlint/binding-linux-s390x-gnu": "1.76.0", "@oxlint/binding-linux-x64-gnu": "1.76.0", "@oxlint/binding-linux-x64-musl": "1.76.0", "@oxlint/binding-openharmony-arm64": "1.76.0", "@oxlint/binding-win32-arm64-msvc": "1.76.0", "@oxlint/binding-win32-ia32-msvc": "1.76.0", "@oxlint/binding-win32-x64-msvc": "1.76.0" }, "peerDependencies": { "oxlint-tsgolint": ">=7.0.2001", "vite-plus": "*" }, "optionalPeers": ["oxlint-tsgolint", "vite-plus"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-6QoFioEU4fNdiUx/2Eo6TRd6NG7H7njnRCz8rhB66cZmMHDTqcm1Rjvl8Wry+ZTQMBAmyb4Mlf62Mk5X+eHSOw=="], "oxlint-tsgolint": ["oxlint-tsgolint@7.0.2001", "", { "optionalDependencies": { "@oxlint-tsgolint/darwin-arm64": "7.0.2001", "@oxlint-tsgolint/darwin-x64": "7.0.2001", "@oxlint-tsgolint/linux-arm64": "7.0.2001", "@oxlint-tsgolint/linux-x64": "7.0.2001", "@oxlint-tsgolint/win32-arm64": "7.0.2001", "@oxlint-tsgolint/win32-x64": "7.0.2001" }, "bin": { "tsgolint": "./bin/tsgolint.js" } }, "sha512-KjK/XLcXr1DSyonKhsuFqJRiuKqcyG9j3LJ8nkOsrLzGvodBPqzHOKauy10asLMDI0sUpvb+1sxlzff3udZvfg=="], @@ -614,8 +573,6 @@ "tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="], - "tinypool": ["tinypool@2.1.0", "", {}, "sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw=="], - "tmp": ["tmp@0.2.7", "", {}, "sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw=="], "tslib": ["tslib@2.9.1", "", {}, "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA=="], diff --git a/bunfig.toml b/bunfig.toml index ffe5129..0acc22e 100644 --- a/bunfig.toml +++ b/bunfig.toml @@ -2,3 +2,14 @@ minimumReleaseAge = 432000 # 5 days minimumReleaseAgeExcludes = ["@types/bun", "bun-types"] ignoreScripts = true + +[fmt] +printWidth = 120 +tabWidth = 4 +useTabs = false +semi = true +singleQuote = true +trailingComma = "all" +bracketSpacing = true +bracketSameLine = false +arrowParens = "always" diff --git a/connectors/aws/tsconfig.json b/connectors/aws/tsconfig.json deleted file mode 100644 index 2ecc248..0000000 --- a/connectors/aws/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "files": [], - "references": [ - { "path": "./tsconfig.app.json" }, - { "path": "./tsconfig.test.json" } - ] -} diff --git a/oxfmt.config.ts b/oxfmt.config.ts deleted file mode 100644 index 3f09c20..0000000 --- a/oxfmt.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineConfig } from 'oxfmt'; - -export default defineConfig({ - printWidth: 120, - tabWidth: 4, - useTabs: false, - semi: true, - singleQuote: true, - trailingComma: 'all', - bracketSpacing: true, - bracketSameLine: false, - arrowParens: 'always', -}); diff --git a/package.json b/package.json index 1f118f8..ca636d5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@open-iga/plugins", "workspaces": { "packages": [ - "connectors/*", + "sink-connectors/*", "source-connectors/*", "packages/*" ], @@ -15,7 +15,6 @@ "@noble/hashes": "2.2.0", "@types/bun": "1.4.0", "bun-types": "1.4.0", - "oxfmt": "0.61.0", "oxlint": "1.76.0", "oxlint-tsgolint": "7.0.2001", "turbo": "2.10.7", @@ -36,19 +35,15 @@ "devDependencies": { "@changesets/cli": "catalog:", "@extism/js-pdk": "catalog:", - "oxfmt": "catalog:", + "@types/bun": "catalog:", "oxlint": "catalog:", "oxlint-tsgolint": "catalog:", "testcontainers": "catalog:", "turbo": "catalog:", "typescript": "catalog:" }, - "config": { - "//extism-js-version": "Single source of truth for the extism-js CLI version used by CI workflows (the CLI is not on npm). Must stay compatible with the catalog's @extism/extism runtime — js-pdk > 1.5.1 emits wasm that 2.0.0-rc13 cannot parse. When bumping, update INSTALLER_SHA256 in .github/workflows/*.", - "extism-js-version": "v1.5.1" - }, "engines": { - "bun": ">=1.4.4" + "bun": ">=1.4.5" }, - "packageManager": "bun@1.4.0" + "packageManager": "bun@1.4.5" } diff --git a/packages/connector-sdk/lib/test/mock-host.ts b/packages/connector-sdk/lib/test/mock-host.ts index 8f9a509..fef856f 100644 --- a/packages/connector-sdk/lib/test/mock-host.ts +++ b/packages/connector-sdk/lib/test/mock-host.ts @@ -22,8 +22,7 @@ import { createFetchProxy } from './mock-fetch.ts'; import { emailPayloadSchema, type EmailPayload } from '../iga/capabilities/email.schema.ts'; export type MockedHostResult = - | { ok: true; output: z.infer<(typeof handlerInputOutputSchema)[Type]['output']> } - | { ok: false; error: string }; + { ok: true; output: z.infer<(typeof handlerInputOutputSchema)[Type]['output']> } | { ok: false; error: string }; export type MockedEntitlementResult = | { ok: true; output: z.infer<(typeof entitlementHandlerInputOutputSchema)[Type]['output']> } @@ -96,8 +95,7 @@ export const createMockedHost = async ({ // A denied or failed request comes back as `error` rather than throwing into the guest. fetch: async (callContext, offset: bigint) => { const request = callContext.read(offset)?.json() as - | { url: string; method?: string; headers?: Record; body?: string } - | undefined; + { url: string; method?: string; headers?: Record; body?: string } | undefined; if (!request) return 0n; try { const { url, method, headers, body } = request; diff --git a/scripts/affected-packages.ts b/scripts/affected-packages.ts new file mode 100644 index 0000000..e72bb4c --- /dev/null +++ b/scripts/affected-packages.ts @@ -0,0 +1,14 @@ +// Prints the changed packages and everything that depends on them, as the CI job matrix. +// Run locally: TURBO_SCM_BASE=origin/main bun scripts/affected-packages.ts +import { $ } from 'bun'; +import { appendFile } from 'node:fs/promises'; + +const { packages } = await $`bunx turbo ls --affected --output=json`.json(); +const matrix = packages.items.map(({ name, path }: { name: string; path: string }) => ({ name, path })); +const output = `packages=${JSON.stringify(matrix)}`; + +console.log(output); + +if (process.env.GITHUB_OUTPUT) { + await appendFile(process.env.GITHUB_OUTPUT, `${output}\n`); +} diff --git a/scripts/release.ts b/scripts/release.ts new file mode 100644 index 0000000..340fc08 --- /dev/null +++ b/scripts/release.ts @@ -0,0 +1,38 @@ +// Creates a GitHub release for every connector version that doesn't have one yet. Compile first. +// Preview without creating anything: bun scripts/release.ts --dry-run +import { $, Glob } from 'bun'; +import { dirname, join } from 'node:path'; + +const isDryRun = process.argv.includes('--dry-run'); + +for await (const manifestPath of new Glob('{sink,source}-connectors/*/package.json').scan()) { + const { name, version } = await Bun.file(manifestPath).json(); + const tag = `${name}@${version}`; + + if ((await $`gh release view ${tag}`.nothrow().quiet()).exitCode === 0) { + console.log(`Skipping ${tag}: already released`); + continue; + } + + const outputDir = join(dirname(manifestPath), '.open-iga'); + const wasmPaths = [...new Glob('*.wasm').scanSync(outputDir)].map((file) => join(outputDir, file)); + + if (wasmPaths.length === 0) { + throw new Error(`No .wasm file in ${outputDir} for ${tag}`); + } + + const assets: string[] = []; + + for (const wasmPath of wasmPaths) { + const hash = new Bun.CryptoHasher('sha256').update(await Bun.file(wasmPath).bytes()).digest('hex'); + await Bun.write(`${wasmPath}.hash.txt`, `${hash}\n`); + assets.push(wasmPath, `${wasmPath}.hash.txt`); + } + + if (isDryRun) { + console.log(`Would release ${tag} with ${assets.join(', ')}`); + continue; + } + + await $`gh release create ${tag} --title ${tag} --generate-notes ${assets}`; +} diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json new file mode 100644 index 0000000..ef09784 --- /dev/null +++ b/scripts/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "lib": ["esnext"], + "types": ["bun"] + }, + "include": ["."] +} diff --git a/connectors/aws/CHANGELOG.md b/sink-connectors/aws/CHANGELOG.md similarity index 100% rename from connectors/aws/CHANGELOG.md rename to sink-connectors/aws/CHANGELOG.md diff --git a/connectors/aws/README.md b/sink-connectors/aws/README.md similarity index 100% rename from connectors/aws/README.md rename to sink-connectors/aws/README.md diff --git a/connectors/aws/bunfig.toml b/sink-connectors/aws/bunfig.toml similarity index 100% rename from connectors/aws/bunfig.toml rename to sink-connectors/aws/bunfig.toml diff --git a/connectors/aws/docker-compose.yml b/sink-connectors/aws/docker-compose.yml similarity index 100% rename from connectors/aws/docker-compose.yml rename to sink-connectors/aws/docker-compose.yml diff --git a/connectors/aws/e2e/account-acctions.create.test.ts b/sink-connectors/aws/e2e/account-acctions.create.test.ts similarity index 100% rename from connectors/aws/e2e/account-acctions.create.test.ts rename to sink-connectors/aws/e2e/account-acctions.create.test.ts diff --git a/connectors/aws/e2e/account-actions.lifecycle.test.ts b/sink-connectors/aws/e2e/account-actions.lifecycle.test.ts similarity index 100% rename from connectors/aws/e2e/account-actions.lifecycle.test.ts rename to sink-connectors/aws/e2e/account-actions.lifecycle.test.ts diff --git a/connectors/aws/e2e/entitlements.test.ts b/sink-connectors/aws/e2e/entitlements.test.ts similarity index 100% rename from connectors/aws/e2e/entitlements.test.ts rename to sink-connectors/aws/e2e/entitlements.test.ts diff --git a/connectors/aws/package.json b/sink-connectors/aws/package.json similarity index 100% rename from connectors/aws/package.json rename to sink-connectors/aws/package.json diff --git a/connectors/aws/src/account-actions/create.ts b/sink-connectors/aws/src/account-actions/create.ts similarity index 100% rename from connectors/aws/src/account-actions/create.ts rename to sink-connectors/aws/src/account-actions/create.ts diff --git a/connectors/aws/src/account-actions/delete.ts b/sink-connectors/aws/src/account-actions/delete.ts similarity index 100% rename from connectors/aws/src/account-actions/delete.ts rename to sink-connectors/aws/src/account-actions/delete.ts diff --git a/connectors/aws/src/account-actions/disable.ts b/sink-connectors/aws/src/account-actions/disable.ts similarity index 100% rename from connectors/aws/src/account-actions/disable.ts rename to sink-connectors/aws/src/account-actions/disable.ts diff --git a/connectors/aws/src/account-actions/enable.ts b/sink-connectors/aws/src/account-actions/enable.ts similarity index 100% rename from connectors/aws/src/account-actions/enable.ts rename to sink-connectors/aws/src/account-actions/enable.ts diff --git a/connectors/aws/src/account-actions/read.ts b/sink-connectors/aws/src/account-actions/read.ts similarity index 100% rename from connectors/aws/src/account-actions/read.ts rename to sink-connectors/aws/src/account-actions/read.ts diff --git a/connectors/aws/src/aws-connector.ts b/sink-connectors/aws/src/aws-connector.ts similarity index 100% rename from connectors/aws/src/aws-connector.ts rename to sink-connectors/aws/src/aws-connector.ts diff --git a/connectors/aws/src/entitlements/iam-user-groups/discover.test.ts b/sink-connectors/aws/src/entitlements/iam-user-groups/discover.test.ts similarity index 100% rename from connectors/aws/src/entitlements/iam-user-groups/discover.test.ts rename to sink-connectors/aws/src/entitlements/iam-user-groups/discover.test.ts diff --git a/connectors/aws/src/entitlements/iam-user-groups/discover.ts b/sink-connectors/aws/src/entitlements/iam-user-groups/discover.ts similarity index 100% rename from connectors/aws/src/entitlements/iam-user-groups/discover.ts rename to sink-connectors/aws/src/entitlements/iam-user-groups/discover.ts diff --git a/connectors/aws/src/entitlements/iam-user-groups/grant.ts b/sink-connectors/aws/src/entitlements/iam-user-groups/grant.ts similarity index 100% rename from connectors/aws/src/entitlements/iam-user-groups/grant.ts rename to sink-connectors/aws/src/entitlements/iam-user-groups/grant.ts diff --git a/connectors/aws/src/entitlements/iam-user-groups/read.ts b/sink-connectors/aws/src/entitlements/iam-user-groups/read.ts similarity index 100% rename from connectors/aws/src/entitlements/iam-user-groups/read.ts rename to sink-connectors/aws/src/entitlements/iam-user-groups/read.ts diff --git a/connectors/aws/src/entitlements/iam-user-groups/revoke.ts b/sink-connectors/aws/src/entitlements/iam-user-groups/revoke.ts similarity index 100% rename from connectors/aws/src/entitlements/iam-user-groups/revoke.ts rename to sink-connectors/aws/src/entitlements/iam-user-groups/revoke.ts diff --git a/connectors/aws/src/utils/arn.ts b/sink-connectors/aws/src/utils/arn.ts similarity index 100% rename from connectors/aws/src/utils/arn.ts rename to sink-connectors/aws/src/utils/arn.ts diff --git a/connectors/aws/src/utils/aws-endpoints.ts b/sink-connectors/aws/src/utils/aws-endpoints.ts similarity index 100% rename from connectors/aws/src/utils/aws-endpoints.ts rename to sink-connectors/aws/src/utils/aws-endpoints.ts diff --git a/connectors/aws/src/utils/client.ts b/sink-connectors/aws/src/utils/client.ts similarity index 100% rename from connectors/aws/src/utils/client.ts rename to sink-connectors/aws/src/utils/client.ts diff --git a/connectors/aws/src/utils/iam.ts b/sink-connectors/aws/src/utils/iam.ts similarity index 100% rename from connectors/aws/src/utils/iam.ts rename to sink-connectors/aws/src/utils/iam.ts diff --git a/connectors/aws/src/utils/password.test.ts b/sink-connectors/aws/src/utils/password.test.ts similarity index 100% rename from connectors/aws/src/utils/password.test.ts rename to sink-connectors/aws/src/utils/password.test.ts diff --git a/connectors/aws/src/utils/password.ts b/sink-connectors/aws/src/utils/password.ts similarity index 100% rename from connectors/aws/src/utils/password.ts rename to sink-connectors/aws/src/utils/password.ts diff --git a/connectors/aws/src/utils/region.test.ts b/sink-connectors/aws/src/utils/region.test.ts similarity index 100% rename from connectors/aws/src/utils/region.test.ts rename to sink-connectors/aws/src/utils/region.test.ts diff --git a/connectors/aws/src/utils/region.ts b/sink-connectors/aws/src/utils/region.ts similarity index 100% rename from connectors/aws/src/utils/region.ts rename to sink-connectors/aws/src/utils/region.ts diff --git a/connectors/aws/src/utils/request-handler.ts b/sink-connectors/aws/src/utils/request-handler.ts similarity index 100% rename from connectors/aws/src/utils/request-handler.ts rename to sink-connectors/aws/src/utils/request-handler.ts diff --git a/connectors/aws/src/utils/role-config.ts b/sink-connectors/aws/src/utils/role-config.ts similarity index 100% rename from connectors/aws/src/utils/role-config.ts rename to sink-connectors/aws/src/utils/role-config.ts diff --git a/connectors/aws/src/utils/username.test.ts b/sink-connectors/aws/src/utils/username.test.ts similarity index 100% rename from connectors/aws/src/utils/username.test.ts rename to sink-connectors/aws/src/utils/username.test.ts diff --git a/connectors/aws/src/utils/username.ts b/sink-connectors/aws/src/utils/username.ts similarity index 100% rename from connectors/aws/src/utils/username.ts rename to sink-connectors/aws/src/utils/username.ts diff --git a/connectors/aws/src/xml-parser.plugin.ts b/sink-connectors/aws/src/xml-parser.plugin.ts similarity index 100% rename from connectors/aws/src/xml-parser.plugin.ts rename to sink-connectors/aws/src/xml-parser.plugin.ts diff --git a/connectors/aws/test-setup.ts b/sink-connectors/aws/test-setup.ts similarity index 100% rename from connectors/aws/test-setup.ts rename to sink-connectors/aws/test-setup.ts diff --git a/connectors/aws/tsconfig.app.json b/sink-connectors/aws/tsconfig.app.json similarity index 100% rename from connectors/aws/tsconfig.app.json rename to sink-connectors/aws/tsconfig.app.json diff --git a/sink-connectors/aws/tsconfig.json b/sink-connectors/aws/tsconfig.json new file mode 100644 index 0000000..3eded8f --- /dev/null +++ b/sink-connectors/aws/tsconfig.json @@ -0,0 +1,4 @@ +{ + "files": [], + "references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.test.json" }] +} diff --git a/connectors/aws/tsconfig.test.json b/sink-connectors/aws/tsconfig.test.json similarity index 100% rename from connectors/aws/tsconfig.test.json rename to sink-connectors/aws/tsconfig.test.json diff --git a/turbo.json b/turbo.json index a781cbb..a768856 100644 --- a/turbo.json +++ b/turbo.json @@ -1,6 +1,13 @@ { "$schema": "https://turborepo.dev/schema.json", "ui": "tui", + "globalDependencies": [ + "tsconfig.json", + "oxlint.config.ts", + ".github/actions/**", + ".github/workflows/**", + "scripts/**" + ], "tasks": { "test": { "dependsOn": ["^test", "compile"]