roavatar-renderer 1.4.2 → 1.4.4

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.d.ts CHANGED
@@ -1250,6 +1250,10 @@ export declare const FLAGS: {
1250
1250
  ASSET_REQUEST_PRIORITY: RequestPriority | undefined;
1251
1251
  /**the domain all api requests go through */
1252
1252
  API_DOMAIN: string;
1253
+ /**prefix to add before all api requests */
1254
+ API_REQUEST_PREFIX: string;
1255
+ /**credentials request type when fetching from API_DOMAIN and credentials are usually include */
1256
+ INCLUDE_REQUEST_CREDENTIALS_OVERRIDE: RequestCredentials;
1253
1257
  /**loads assets from assetdelivery instead of local files */
1254
1258
  ONLINE_ASSETS: boolean;
1255
1259
  /**path to rbxasset:// local files*/
package/dist/index.js CHANGED
@@ -29515,6 +29515,8 @@ const FLAGS = {
29515
29515
  ASSETDELIVERY_V2: true,
29516
29516
  ASSET_REQUEST_PRIORITY: "high",
29517
29517
  API_DOMAIN: "roblox.com",
29518
+ API_REQUEST_PREFIX: "",
29519
+ INCLUDE_REQUEST_CREDENTIALS_OVERRIDE: "include",
29518
29520
  //assets
29519
29521
  ONLINE_ASSETS: false,
29520
29522
  ASSETS_PATH: "../assets/rbxasset/",
@@ -35218,9 +35220,9 @@ async function RBLXPost(url, auth, body, attempt = 0, method = "POST") {
35218
35220
  "X-CSRF-TOKEN": xCsrfToken
35219
35221
  });
35220
35222
  try {
35221
- fetch(url, {
35223
+ fetch(FLAGS.API_REQUEST_PREFIX + url, {
35222
35224
  method,
35223
- credentials: "include",
35225
+ credentials: FLAGS.INCLUDE_REQUEST_CREDENTIALS_OVERRIDE,
35224
35226
  headers: fetchHeaders,
35225
35227
  body
35226
35228
  }).then((response) => {
@@ -35263,8 +35265,8 @@ async function RBLXGet(url, headers, includeCredentials = true) {
35263
35265
  }
35264
35266
  const fetchHeaders = new Headers(newHeaders);
35265
35267
  try {
35266
- fetch(url, {
35267
- credentials: includeCredentials ? "include" : void 0,
35268
+ fetch(FLAGS.API_REQUEST_PREFIX + url, {
35269
+ credentials: includeCredentials ? FLAGS.INCLUDE_REQUEST_CREDENTIALS_OVERRIDE : void 0,
35268
35270
  headers: fetchHeaders,
35269
35271
  priority: FLAGS.ASSET_REQUEST_PRIORITY
35270
35272
  }).then((response) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roavatar-renderer",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "A renderer for Roblox avatars, used by the RoAvatar extension.",
5
5
  "author": "steinan",
6
6
  "type": "module",