diff --git a/.envrc b/.envrc deleted file mode 100644 index 3550a30..0000000 --- a/.envrc +++ /dev/null @@ -1 +0,0 @@ -use flake diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c03e949..a91efcd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,10 +4,7 @@ on: push: tags: - "*" - -permissions: - id-token: write - contents: read + workflow_dispatch: concurrency: ${{ github.workflow }}-${{ github.ref }} @@ -15,30 +12,29 @@ jobs: release: name: Release runs-on: ubuntu-latest + permissions: + id-token: write steps: - name: Checkout Repo - uses: actions/checkout@v5 + uses: actions/checkout@v4 - uses: denoland/setup-deno@v2 with: - deno-version: "latest" - + deno-version: "v2.x" - name: Get tag version if: startsWith(github.ref, 'refs/tags/') id: get_tag_version run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT - - - uses: actions/setup-node@v6 + - uses: actions/setup-node@v4 with: - node-version: '24' - registry-url: 'https://registry.npmjs.org' - package-manager-cache: false # never use caching in release builds - - - uses: pnpm/action-setup@v6 + node-version: "22" + registry-url: "https://registry.npmjs.org" + - uses: pnpm/action-setup@v4 with: - version: 11 - + version: latest - name: npm build run: deno task npm ${{steps.get_tag_version.outputs.TAG_VERSION}} - name: npm publish if: startsWith(github.ref, 'refs/tags/') - run: cd npm && npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: cd npm && npm publish --provenance diff --git a/.gitignore b/.gitignore index 3bcc4be..4e34073 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ npm/ -.cov/ -.direnv/ +.cov/ \ No newline at end of file diff --git a/deno.jsonc b/deno.jsonc index 9f85d5f..6753cd3 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -6,7 +6,7 @@ }, "exclude": ["npm"], "imports": { - "@deno/dnt": "jsr:@deno/dnt@^0.42.3", + "@deno/dnt": "jsr:@deno/dnt@^0.41.3", "@std/assert": "jsr:@std/assert@^0.225.3" } } diff --git a/deno.lock b/deno.lock index 2b11198..cce0922 100644 --- a/deno.lock +++ b/deno.lock @@ -1,118 +1,165 @@ { - "version": "5", + "version": "4", "specifiers": { - "jsr:@david/code-block-writer@^13.0.3": "13.0.3", - "jsr:@deno/dnt@~0.42.3": "0.42.3", + "jsr:@david/code-block-writer@^13.0.2": "13.0.3", + "jsr:@deno/cache-dir@~0.10.3": "0.10.3", + "jsr:@deno/dnt@~0.41.3": "0.41.3", + "jsr:@deno/graph@~0.73.1": "0.73.1", + "jsr:@std/assert@0.223": "0.223.0", + "jsr:@std/assert@0.226": "0.226.0", "jsr:@std/assert@~0.225.3": "0.225.3", - "jsr:@std/fmt@1": "1.0.10", - "jsr:@std/fs@1": "1.0.23", + "jsr:@std/bytes@0.223": "0.223.0", + "jsr:@std/fmt@0.223": "0.223.0", + "jsr:@std/fmt@1": "1.0.2", + "jsr:@std/fs@0.223": "0.223.0", + "jsr:@std/fs@1": "1.0.4", + "jsr:@std/fs@~0.229.3": "0.229.3", "jsr:@std/internal@1": "1.0.0", - "jsr:@std/internal@^1.0.12": "1.0.13", - "jsr:@std/path@1": "1.1.4", - "jsr:@std/path@^1.1.4": "1.1.4", - "jsr:@ts-morph/bootstrap@0.27": "0.27.0", - "jsr:@ts-morph/common@0.27": "0.27.0", + "jsr:@std/io@0.223": "0.223.0", + "jsr:@std/path@0.223": "0.223.0", + "jsr:@std/path@1": "1.0.6", + "jsr:@std/path@1.0.0-rc.1": "1.0.0-rc.1", + "jsr:@std/path@^1.0.6": "1.0.6", + "jsr:@std/path@~0.225.2": "0.225.2", + "jsr:@ts-morph/bootstrap@0.24": "0.24.0", + "jsr:@ts-morph/common@0.24": "0.24.0", "npm:@biomejs/biome@*": "1.4.0" }, "jsr": { "@david/code-block-writer@13.0.3": { "integrity": "f98c77d320f5957899a61bfb7a9bead7c6d83ad1515daee92dbacc861e13bb7f" }, - "@deno/dnt@0.42.3": { - "integrity": "62a917a0492f3c8af002dce90605bb0d41f7d29debc06aca40dba72ab65d8ae3", + "@deno/cache-dir@0.10.3": { + "integrity": "eb022f84ecc49c91d9d98131c6e6b118ff63a29e343624d058646b9d50404776", + "dependencies": [ + "jsr:@deno/graph", + "jsr:@std/fmt@0.223", + "jsr:@std/fs@0.223", + "jsr:@std/io", + "jsr:@std/path@0.223" + ] + }, + "@deno/dnt@0.41.3": { + "integrity": "b2ef2c8a5111eef86cb5bfcae103d6a2938e8e649e2461634a7befb7fc59d6d2", "dependencies": [ "jsr:@david/code-block-writer", - "jsr:@std/fmt", - "jsr:@std/fs", + "jsr:@deno/cache-dir", + "jsr:@std/fmt@1", + "jsr:@std/fs@1", "jsr:@std/path@1", "jsr:@ts-morph/bootstrap" ] }, + "@deno/graph@0.73.1": { + "integrity": "cd69639d2709d479037d5ce191a422eabe8d71bb68b0098344f6b07411c84d41" + }, + "@std/assert@0.223.0": { + "integrity": "eb8d6d879d76e1cc431205bd346ed4d88dc051c6366365b1af47034b0670be24" + }, "@std/assert@0.225.3": { "integrity": "b3c2847aecf6955b50644cdb9cf072004ea3d1998dd7579fc0acb99dbb23bd4f", "dependencies": [ - "jsr:@std/internal@1" + "jsr:@std/internal" ] }, - "@std/fmt@1.0.10": { - "integrity": "90dfba288802ac6de82fb31d0917eb9e4450b9925b954d5e51fc29ac07419db5" + "@std/assert@0.226.0": { + "integrity": "0dfb5f7c7723c18cec118e080fec76ce15b4c31154b15ad2bd74822603ef75b3" }, - "@std/fs@1.0.23": { - "integrity": "3ecbae4ce4fee03b180fa710caff36bb5adb66631c46a6460aaad49515565a37", + "@std/bytes@0.223.0": { + "integrity": "84b75052cd8680942c397c2631318772b295019098f40aac5c36cead4cba51a8" + }, + "@std/fmt@0.223.0": { + "integrity": "6deb37794127dfc7d7bded2586b9fc6f5d50e62a8134846608baf71ffc1a5208" + }, + "@std/fmt@1.0.2": { + "integrity": "87e9dfcdd3ca7c066e0c3c657c1f987c82888eb8103a3a3baa62684ffeb0f7a7" + }, + "@std/fs@0.223.0": { + "integrity": "3b4b0550b2c524cbaaa5a9170c90e96cbb7354e837ad1bdaf15fc9df1ae9c31c" + }, + "@std/fs@0.229.3": { + "integrity": "783bca21f24da92e04c3893c9e79653227ab016c48e96b3078377ebd5222e6eb", "dependencies": [ - "jsr:@std/internal@^1.0.12", - "jsr:@std/path@^1.1.4" + "jsr:@std/path@1.0.0-rc.1" + ] + }, + "@std/fs@1.0.4": { + "integrity": "2907d32d8d1d9e540588fd5fe0ec21ee638134bd51df327ad4e443aaef07123c", + "dependencies": [ + "jsr:@std/path@^1.0.6" ] }, "@std/internal@1.0.0": { "integrity": "ac6a6dfebf838582c4b4f61a6907374e27e05bedb6ce276e0f1608fe84e7cd9a" }, - "@std/internal@1.0.13": { - "integrity": "2f9546691d4ac2d32859c82dff284aaeac980ddeca38430d07941e7e288725c0" - }, - "@std/path@1.1.4": { - "integrity": "1d2d43f39efb1b42f0b1882a25486647cb851481862dc7313390b2bb044314b5", + "@std/io@0.223.0": { + "integrity": "2d8c3c2ab3a515619b90da2c6ff5ea7b75a94383259ef4d02116b228393f84f1", "dependencies": [ - "jsr:@std/internal@^1.0.12" + "jsr:@std/assert@0.223", + "jsr:@std/bytes" ] }, - "@ts-morph/bootstrap@0.27.0": { - "integrity": "b8d7bc8f7942ce853dde4161b28f9aa96769cef3d8eebafb379a81800b9e2448", + "@std/path@0.223.0": { + "integrity": "593963402d7e6597f5a6e620931661053572c982fc014000459edc1f93cc3989", + "dependencies": [ + "jsr:@std/assert@0.223" + ] + }, + "@std/path@0.225.2": { + "integrity": "0f2db41d36b50ef048dcb0399aac720a5348638dd3cb5bf80685bf2a745aa506", + "dependencies": [ + "jsr:@std/assert@0.226" + ] + }, + "@std/path@1.0.0-rc.1": { + "integrity": "b8c00ae2f19106a6bb7cbf1ab9be52aa70de1605daeb2dbdc4f87a7cbaf10ff6" + }, + "@std/path@1.0.6": { + "integrity": "ab2c55f902b380cf28e0eec501b4906e4c1960d13f00e11cfbcd21de15f18fed" + }, + "@ts-morph/bootstrap@0.24.0": { + "integrity": "a826a2ef7fa8a7c3f1042df2c034d20744d94da2ee32bf29275bcd4dffd3c060", "dependencies": [ "jsr:@ts-morph/common" ] }, - "@ts-morph/common@0.27.0": { - "integrity": "c7b73592d78ce8479b356fd4f3d6ec3c460d77753a8680ff196effea7a939052", + "@ts-morph/common@0.24.0": { + "integrity": "12b625b8e562446ba658cdbe9ad77774b4bd96b992ae8bd34c60dbf24d06c1f3", "dependencies": [ - "jsr:@std/fs", - "jsr:@std/path@1" + "jsr:@std/fs@~0.229.3", + "jsr:@std/path@~0.225.2" ] } }, "npm": { "@biomejs/biome@1.4.0": { "integrity": "sha512-/rDlao6ra38nhxo4IYCqWCzfTJcpMk4YHjSVBI9yN/ifdhnzSwirL25xDVH7G9hZdNhpF9g78FaPJhFa9DX0Cw==", - "optionalDependencies": [ + "dependencies": [ "@biomejs/cli-darwin-arm64", "@biomejs/cli-darwin-x64", "@biomejs/cli-linux-arm64", "@biomejs/cli-linux-x64", "@biomejs/cli-win32-arm64", "@biomejs/cli-win32-x64" - ], - "scripts": true, - "bin": true + ] }, "@biomejs/cli-darwin-arm64@1.4.0": { - "integrity": "sha512-nBrtVRwr4IlTtxLOHwBwLv1sWvggf9/DnT5/ALIANJZOpoING6u8jHWipods69wK8kGa8Ld7iwHm3W5BrJJFFQ==", - "os": ["darwin"], - "cpu": ["arm64"] + "integrity": "sha512-nBrtVRwr4IlTtxLOHwBwLv1sWvggf9/DnT5/ALIANJZOpoING6u8jHWipods69wK8kGa8Ld7iwHm3W5BrJJFFQ==" }, "@biomejs/cli-darwin-x64@1.4.0": { - "integrity": "sha512-nny0VgOj3ksUGzU5GblgtQEvrAZFgFe1IJBoYOP978OQdDrg7BpS+GX5udfof87Dl4ZlHPRBU951ceHOxF7BTg==", - "os": ["darwin"], - "cpu": ["x64"] + "integrity": "sha512-nny0VgOj3ksUGzU5GblgtQEvrAZFgFe1IJBoYOP978OQdDrg7BpS+GX5udfof87Dl4ZlHPRBU951ceHOxF7BTg==" }, "@biomejs/cli-linux-arm64@1.4.0": { - "integrity": "sha512-gyLkT/Yh9xfW1T9yjQs/2txkCeG0e+LRs0adLugMwN0ptcNTRyusBvUoiHnpB+9rS6hWu9ZCedGMNmKQ8v2GSw==", - "os": ["linux"], - "cpu": ["arm64"] + "integrity": "sha512-gyLkT/Yh9xfW1T9yjQs/2txkCeG0e+LRs0adLugMwN0ptcNTRyusBvUoiHnpB+9rS6hWu9ZCedGMNmKQ8v2GSw==" }, "@biomejs/cli-linux-x64@1.4.0": { - "integrity": "sha512-LIxTuU2zSbIHM9XDYjQphJ5UU8h2eS7yR8uIvGYSba7Qt9AKqfbenyVJTsVnoj1CXxxgKNVSc/wVmlOlGz5DBQ==", - "os": ["linux"], - "cpu": ["x64"] + "integrity": "sha512-LIxTuU2zSbIHM9XDYjQphJ5UU8h2eS7yR8uIvGYSba7Qt9AKqfbenyVJTsVnoj1CXxxgKNVSc/wVmlOlGz5DBQ==" }, "@biomejs/cli-win32-arm64@1.4.0": { - "integrity": "sha512-U2jT1/0wZLJIRqnU8qHAfi/A/+yUwlL3sYJgqs+wO0BbR22WGQZlj03u5FdpEoyLXdsLv1pbeIcjNp+V0NYXWA==", - "os": ["win32"], - "cpu": ["arm64"] + "integrity": "sha512-U2jT1/0wZLJIRqnU8qHAfi/A/+yUwlL3sYJgqs+wO0BbR22WGQZlj03u5FdpEoyLXdsLv1pbeIcjNp+V0NYXWA==" }, "@biomejs/cli-win32-x64@1.4.0": { - "integrity": "sha512-gN6DgyyBxIwoCovAUFJHFWVallb0cLosayDRtNyxU3MDv/atZxSXOWQezfVKBIbgmFPxYWJObd+awvbPYXwwww==", - "os": ["win32"], - "cpu": ["x64"] + "integrity": "sha512-gN6DgyyBxIwoCovAUFJHFWVallb0cLosayDRtNyxU3MDv/atZxSXOWQezfVKBIbgmFPxYWJObd+awvbPYXwwww==" } }, "remote": { @@ -336,7 +383,7 @@ }, "workspace": { "dependencies": [ - "jsr:@deno/dnt@~0.42.3", + "jsr:@deno/dnt@~0.41.3", "jsr:@std/assert@~0.225.3" ] } diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 64da7c7..0000000 --- a/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1777988971, - "narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1777954456, - "narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1777168982, - "narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 538a404..0000000 --- a/flake.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - description = "Description for the project"; - - inputs = { - flake-parts.url = "github:hercules-ci/flake-parts"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - }; - - outputs = inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ - # To import an internal flake module: ./other.nix - # To import an external flake module: - # 1. Add foo to inputs - # 2. Add foo as a parameter to the outputs function - # 3. Add here: foo.flakeModule - - ]; - systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; - perSystem = { config, self', inputs', pkgs, system, ... }: { - devShells.default = pkgs.mkShellNoCC { - packages = with pkgs; [ - biome - deno - nodejs_24 - pnpm - ]; - }; - }; - flake = { - # The usual flake attributes can be defined here, including system- - # agnostic ones like nixosModule and system-enumerating ones, although - # those are more easily expressed in perSystem. - - }; - }; -} diff --git a/scripts/build_npm.ts b/scripts/build_npm.ts index 93a0c1f..f1abbb0 100644 --- a/scripts/build_npm.ts +++ b/scripts/build_npm.ts @@ -55,5 +55,8 @@ await build({ async postBuild() { await Deno.copyFile("LICENSE", "npm/LICENSE"); await Deno.copyFile("README.md", "npm/README.md"); + using npmIgnoreFile = await Deno.open("npm/.npmignore", { append: true }); + const data = new TextEncoder().encode("deps/" + "\n" + "*.map" + "\n"); + npmIgnoreFile.write(data); }, }); diff --git a/src/core/parentClient.ts b/src/core/parentClient.ts index 8d155cb..7cc30a3 100644 --- a/src/core/parentClient.ts +++ b/src/core/parentClient.ts @@ -62,7 +62,7 @@ export class ParentClient extends BaseClient { } const cookies = String(response.headers.get("set-cookie")); - this.authCookies = cookies.split(";"); + // this.authCookies = cookies.split(";"); const sessionCookies = parseCookies(cookies); const sessionID = JSON.parse( String(sessionCookies.parent_session_credentials),