@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.cjs CHANGED
@@ -244,14 +244,8 @@ var init_fetch_json = __esm({
244
244
  });
245
245
 
246
246
  // src/signer/handler-errors.ts
247
- function isPmtHouseError(error) {
248
- if (error instanceof exports.PmtHouseError) {
249
- return true;
250
- }
251
- return error instanceof Error && typeof error.status === "number" && typeof error.code === "string";
252
- }
253
247
  function signerHandlerErrorResponse(error) {
254
- if (isPmtHouseError(error)) {
248
+ if (error instanceof exports.PmtHouseError) {
255
249
  return new Response(
256
250
  JSON.stringify({
257
251
  error: error.code,
@@ -304,9 +298,6 @@ var init_json_fields = __esm({
304
298
  });
305
299
 
306
300
  // src/signer/mint-token.ts
307
- function signerJwtAudience(issuerUrl) {
308
- return stripTrailingSlashes(issuerUrl);
309
- }
310
301
  function parseMintUserSignerTokenResponse(body, ttlRefreshRatio = DEFAULT_TTL_REFRESH_RATIO) {
311
302
  const accessToken = readStringField(body, "access_token", TOKEN_RESPONSE_ERROR, "Token response");
312
303
  const expiresIn = readExpiresIn(body, TOKEN_RESPONSE_ERROR);
@@ -336,7 +327,6 @@ function parseMintUserSignerTokenResponse(body, ttlRefreshRatio = DEFAULT_TTL_RE
336
327
  var DEFAULT_TTL_REFRESH_RATIO, TOKEN_RESPONSE_ERROR;
337
328
  var init_mint_token = __esm({
338
329
  "src/signer/mint-token.ts"() {
339
- init_string_utils();
340
330
  init_json_fields();
341
331
  DEFAULT_TTL_REFRESH_RATIO = 0.8;
342
332
  TOKEN_RESPONSE_ERROR = "invalid_token_response";
@@ -404,7 +394,7 @@ async function mintSignerTokenFromDeviceToken(options) {
404
394
  code: "oidc_discovery_invalid"
405
395
  });
406
396
  }
407
- const audience = options.audience?.trim() || signerJwtAudience(issuerUrl);
397
+ const audience = options.audience?.trim() || issuerUrl;
408
398
  const params = new URLSearchParams({
409
399
  grant_type: TOKEN_EXCHANGE_GRANT,
410
400
  subject_token: options.deviceToken,