@pymthouse/builder-sdk 0.4.1-rc.3 → 0.4.2-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -242,14 +242,8 @@ var init_fetch_json = __esm({
242
242
  });
243
243
 
244
244
  // src/signer/handler-errors.ts
245
- function isPmtHouseError(error) {
246
- if (error instanceof PmtHouseError) {
247
- return true;
248
- }
249
- return error instanceof Error && typeof error.status === "number" && typeof error.code === "string";
250
- }
251
245
  function signerHandlerErrorResponse(error) {
252
- if (isPmtHouseError(error)) {
246
+ if (error instanceof PmtHouseError) {
253
247
  return new Response(
254
248
  JSON.stringify({
255
249
  error: error.code,
@@ -302,9 +296,6 @@ var init_json_fields = __esm({
302
296
  });
303
297
 
304
298
  // src/signer/mint-token.ts
305
- function signerJwtAudience(issuerUrl) {
306
- return stripTrailingSlashes(issuerUrl);
307
- }
308
299
  function parseMintUserSignerTokenResponse(body, ttlRefreshRatio = DEFAULT_TTL_REFRESH_RATIO) {
309
300
  const accessToken = readStringField(body, "access_token", TOKEN_RESPONSE_ERROR, "Token response");
310
301
  const expiresIn = readExpiresIn(body, TOKEN_RESPONSE_ERROR);
@@ -334,7 +325,6 @@ function parseMintUserSignerTokenResponse(body, ttlRefreshRatio = DEFAULT_TTL_RE
334
325
  var DEFAULT_TTL_REFRESH_RATIO, TOKEN_RESPONSE_ERROR;
335
326
  var init_mint_token = __esm({
336
327
  "src/signer/mint-token.ts"() {
337
- init_string_utils();
338
328
  init_json_fields();
339
329
  DEFAULT_TTL_REFRESH_RATIO = 0.8;
340
330
  TOKEN_RESPONSE_ERROR = "invalid_token_response";
@@ -402,7 +392,7 @@ async function mintSignerTokenFromDeviceToken(options) {
402
392
  code: "oidc_discovery_invalid"
403
393
  });
404
394
  }
405
- const audience = options.audience?.trim() || signerJwtAudience(issuerUrl);
395
+ const audience = options.audience?.trim() || issuerUrl;
406
396
  const params = new URLSearchParams({
407
397
  grant_type: TOKEN_EXCHANGE_GRANT,
408
398
  subject_token: options.deviceToken,