Skip to content

Commit

Permalink
fix: Add ConnectClient to new SDK (#1667)
Browse files Browse the repository at this point in the history
Co-authored-by: fundthmcalculus <fundthmcalculus@users.noreply.github.com>
  • Loading branch information
fundthmcalculus and fundthmcalculus committed Jun 13, 2024
1 parent d2e7856 commit a666077
Show file tree
Hide file tree
Showing 7 changed files with 507 additions and 1,351 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/connect/build-typescript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@
Set-Location $PSScriptRoot/../../../
&./connect/make-swagger.ps1 -language "typescript-fetch" -swaggerFile "connect/swagger_api.json" -outputFolder 'connect/typescript'
Set-Location $PSScriptRoot/../../../connect/typescript
# Run the build script
npm ci

# Export the hand-coded ConnectClient
Add-Content -Path "src/index.ts" -Value 'export * from "./ConnectClient";'

npm install "micromodal@0.4.10" "oidc-client-ts@2.2.5" --save-exact

# Set repository.url to the correct value
$packageJson = Get-Content -Path "package.json" -Raw | ConvertFrom-Json
$packageJson.repository.url = "https://github.com/trinsic-id/sdk"
$packageJson.author = "Trinsic"
$packageJson | ConvertTo-Json -Depth 100 | Set-Content -Path "package.json"


# Run the build script - don't use CI in case we updated package version
npm install
npx --yes prettier --write .
npm run build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -410,3 +410,4 @@ samples/grpc-web/lib/
samples/grpc-web/coverage/
web/dist/
connect/typescript/lib
connect/typescript/dist
1 change: 1 addition & 0 deletions connect/config-typescript-fetch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
additionalProperties:
npmName: "@trinsic/connect"
npmVersion: "0.0.2"
npmAuthor: "Trinsic"
1,371 changes: 24 additions & 1,347 deletions connect/typescript/package-lock.json

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions connect/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "@trinsic/connect",
"version": "0.0.2",
"description": "OpenAPI client for @trinsic/connect",
"author": "OpenAPI-Generator",
"author": "Trinsic",
"repository": {
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
"url": "https://github.com/trinsic-id/sdk"
},
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
Expand All @@ -15,5 +15,9 @@
},
"devDependencies": {
"typescript": "^4.0 || ^5.0"
},
"dependencies": {
"micromodal": "0.4.10",
"oidc-client-ts": "2.2.5"
}
}
Loading

0 comments on commit a666077

Please sign in to comment.