Skip to content

Commit

Permalink
Expose the low level API client and dependent types. (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
jt-metatheory authored Aug 23, 2024
1 parent 1e3d21c commit 571d483
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 46 deletions.
2 changes: 1 addition & 1 deletion packages/nakama-js/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ export class Client {
public expiredTimespanMs = DEFAULT_EXPIRED_TIMESPAN_MS;

/** The low level API client for Nakama server. */
private readonly apiClient: NakamaApi;
public readonly apiClient: NakamaApi;

constructor(
readonly serverkey = DEFAULT_SERVER_KEY,
Expand Down
4 changes: 2 additions & 2 deletions packages/nakama-js/dist/client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiCreateGroupRequest, ApiDeleteStorageObjectsRequest, ApiEvent, ApiMatchList, ApiReadStorageObjectsRequest, ApiStorageObjectAcks, ApiUpdateAccountRequest, ApiUpdateGroupRequest, ApiAccountApple, ApiLinkSteamRequest, ApiValidatePurchaseResponse, ApiStoreEnvironment, ApiStoreProvider, ApiValidateSubscriptionResponse, ApiValidatedSubscription } from "./api.gen";
import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiCreateGroupRequest, ApiDeleteStorageObjectsRequest, ApiEvent, ApiMatchList, ApiReadStorageObjectsRequest, ApiStorageObjectAcks, ApiUpdateAccountRequest, ApiUpdateGroupRequest, NakamaApi, ApiAccountApple, ApiLinkSteamRequest, ApiValidatePurchaseResponse, ApiStoreEnvironment, ApiStoreProvider, ApiValidateSubscriptionResponse, ApiValidatedSubscription } from "./api.gen";
import { Session } from "./session";
import { Socket } from "./socket";
import { WebSocketAdapter } from "./web_socket_adapter";
Expand Down Expand Up @@ -412,7 +412,7 @@ export declare class Client {
/** The expired timespan used to check session lifetime. */
expiredTimespanMs: number;
/** The low level API client for Nakama server. */
private readonly apiClient;
readonly apiClient: NakamaApi;
constructor(serverkey?: string, host?: string, port?: string, useSSL?: boolean, timeout?: number, autoRefreshSession?: boolean);
/** Add users to a group, or accept their join requests. */
addGroupUsers(session: Session, groupId: string, ids?: Array<string>): Promise<boolean>;
Expand Down
14 changes: 8 additions & 6 deletions packages/nakama-js/dist/nakama-js.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ function Request(input, options) {
if (options.cache === "no-store" || options.cache === "no-cache") {
var reParamSearch = /([?&])_=[^&]*/;
if (reParamSearch.test(this.url)) {
this.url = this.url.replace(reParamSearch, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
this.url = this.url.replace(reParamSearch, "$1_=" + new Date().getTime());
} else {
var reQueryString = /\?/;
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + new Date().getTime();
}
}
}
Expand Down Expand Up @@ -567,7 +567,7 @@ var b64tab = ((a) => {
})(b64chs);
var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
var _fromCC = String.fromCharCode.bind(String);
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_");
var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, "");
var btoaPolyfill = (bin) => {
Expand Down Expand Up @@ -629,7 +629,7 @@ var atobPolyfill = (asc) => {
return bin;
};
var _atob = _hasatob ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, "base64").toString("binary") : atobPolyfill;
var _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0)));
var _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a), (c) => c.charCodeAt(0));
var _decode = _hasBuffer ? (a) => Buffer.from(a, "base64").toString("utf8") : _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
var _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/"));
var decode2 = (src) => _decode(_unURI(src));
Expand Down Expand Up @@ -3196,7 +3196,7 @@ var Session = class {
this.created = created;
this.token = token;
this.refresh_token = refresh_token;
this.created_at = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
this.created_at = Math.floor(new Date().getTime() / 1e3);
this.update(token, refresh_token);
}
isexpired(currenttime) {
Expand Down Expand Up @@ -3454,7 +3454,9 @@ var _DefaultSocket = class {
};
this.adapter.onError = (evt) => {
reject(evt);
this.adapter.close();
if (this.adapter.isOpen()) {
this.adapter.close();
}
};
setTimeout(() => {
reject("The socket timed out when trying to connect.");
Expand Down
14 changes: 8 additions & 6 deletions packages/nakama-js/dist/nakama-js.esm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,10 @@ function Request(input, options) {
if (options.cache === "no-store" || options.cache === "no-cache") {
var reParamSearch = /([?&])_=[^&]*/;
if (reParamSearch.test(this.url)) {
this.url = this.url.replace(reParamSearch, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
this.url = this.url.replace(reParamSearch, "$1_=" + new Date().getTime());
} else {
var reQueryString = /\?/;
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + new Date().getTime();
}
}
}
Expand Down Expand Up @@ -541,7 +541,7 @@ var b64tab = ((a) => {
})(b64chs);
var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
var _fromCC = String.fromCharCode.bind(String);
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_");
var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, "");
var btoaPolyfill = (bin) => {
Expand Down Expand Up @@ -603,7 +603,7 @@ var atobPolyfill = (asc) => {
return bin;
};
var _atob = _hasatob ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, "base64").toString("binary") : atobPolyfill;
var _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0)));
var _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a), (c) => c.charCodeAt(0));
var _decode = _hasBuffer ? (a) => Buffer.from(a, "base64").toString("utf8") : _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
var _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/"));
var decode2 = (src) => _decode(_unURI(src));
Expand Down Expand Up @@ -3170,7 +3170,7 @@ var Session = class {
this.created = created;
this.token = token;
this.refresh_token = refresh_token;
this.created_at = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
this.created_at = Math.floor(new Date().getTime() / 1e3);
this.update(token, refresh_token);
}
isexpired(currenttime) {
Expand Down Expand Up @@ -3428,7 +3428,9 @@ var _DefaultSocket = class {
};
this.adapter.onError = (evt) => {
reject(evt);
this.adapter.close();
if (this.adapter.isOpen()) {
this.adapter.close();
}
};
setTimeout(() => {
reject("The socket timed out when trying to connect.");
Expand Down
14 changes: 8 additions & 6 deletions packages/nakama-js/dist/nakama-js.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ var nakamajs = (() => {
if (options.cache === "no-store" || options.cache === "no-cache") {
var reParamSearch = /([?&])_=[^&]*/;
if (reParamSearch.test(this.url)) {
this.url = this.url.replace(reParamSearch, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
this.url = this.url.replace(reParamSearch, "$1_=" + new Date().getTime());
} else {
var reQueryString = /\?/;
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + new Date().getTime();
}
}
}
Expand Down Expand Up @@ -567,7 +567,7 @@ var nakamajs = (() => {
})(b64chs);
var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
var _fromCC = String.fromCharCode.bind(String);
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_");
var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, "");
var btoaPolyfill = (bin) => {
Expand Down Expand Up @@ -629,7 +629,7 @@ var nakamajs = (() => {
return bin;
};
var _atob = _hasatob ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, "base64").toString("binary") : atobPolyfill;
var _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0)));
var _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a), (c) => c.charCodeAt(0));
var _decode = _hasBuffer ? (a) => Buffer.from(a, "base64").toString("utf8") : _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
var _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/"));
var decode2 = (src) => _decode(_unURI(src));
Expand Down Expand Up @@ -3196,7 +3196,7 @@ var nakamajs = (() => {
this.created = created;
this.token = token;
this.refresh_token = refresh_token;
this.created_at = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
this.created_at = Math.floor(new Date().getTime() / 1e3);
this.update(token, refresh_token);
}
isexpired(currenttime) {
Expand Down Expand Up @@ -3454,7 +3454,9 @@ var nakamajs = (() => {
};
this.adapter.onError = (evt) => {
reject(evt);
this.adapter.close();
if (this.adapter.isOpen()) {
this.adapter.close();
}
};
setTimeout(() => {
reject("The socket timed out when trying to connect.");
Expand Down
11 changes: 5 additions & 6 deletions packages/nakama-js/dist/nakama-js.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,6 @@
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */


var __assign = function() {
__assign = Object.assign || function __assign(t) {
Expand Down Expand Up @@ -732,7 +730,7 @@
const _fromCC = String.fromCharCode.bind(String);
const _U8Afrom = typeof Uint8Array.from === 'function'
? Uint8Array.from.bind(Uint8Array)
: (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
: (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
const _mkUriSafe = (src) => src
.replace(/=/g, '').replace(/[+\/]/g, (m0) => m0 == '+' ? '-' : '_');
const _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, '');
Expand Down Expand Up @@ -879,7 +877,7 @@
//
const _toUint8Array = _hasBuffer
? (a) => _U8Afrom(Buffer.from(a, 'base64'))
: (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));
: (a) => _U8Afrom(_atob(a), c => c.charCodeAt(0));
//
const _decode = _hasBuffer
? (a) => Buffer.from(a, 'base64').toString('utf8')
Expand Down Expand Up @@ -923,7 +921,6 @@
}

// tslint:disable
/* Code generated by openapi-gen/main.go. DO NOT EDIT. */
/**
* Operator that can be used to override the one set in the leaderboard.
*/
Expand Down Expand Up @@ -4251,7 +4248,9 @@
};
_this.adapter.onError = function (evt) {
reject(evt);
_this.adapter.close();
if (_this.adapter.isOpen()) {
_this.adapter.close();
}
};
setTimeout(function () {
// if promise has resolved by now, the reject() is a no-op
Expand Down
2 changes: 1 addition & 1 deletion packages/satori-js/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class Client {
public expiredTimespanMs = DEFAULT_EXPIRED_TIMESPAN_MS;

/** The low level API client for Nakama server. */
private readonly apiClient: SatoriApi;
public readonly apiClient: SatoriApi;

constructor(
readonly apiKey = DEFAULT_API_KEY,
Expand Down
4 changes: 2 additions & 2 deletions packages/satori-js/dist/client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ApiEvent } from "./api.gen";
import { SatoriApi, ApiEvent } from "./api.gen";
import { Session } from "./session";
/** A client for Satori server. */
export declare class Client {
Expand All @@ -26,7 +26,7 @@ export declare class Client {
/** The expired timespan used to check session lifetime. */
expiredTimespanMs: number;
/** The low level API client for Nakama server. */
private readonly apiClient;
readonly apiClient: SatoriApi;
constructor(apiKey?: string, host?: string, port?: string, useSSL?: boolean, timeout?: number, autoRefreshSession?: boolean);
/** Authenticate a user with an ID against the server. */
authenticate(id: string, customProperties?: Record<string, string>, defaultProperties?: Record<string, string>): Promise<Session>;
Expand Down
8 changes: 4 additions & 4 deletions packages/satori-js/dist/satori-js.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ function Request(input, options) {
if (options.cache === "no-store" || options.cache === "no-cache") {
var reParamSearch = /([?&])_=[^&]*/;
if (reParamSearch.test(this.url)) {
this.url = this.url.replace(reParamSearch, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
this.url = this.url.replace(reParamSearch, "$1_=" + new Date().getTime());
} else {
var reQueryString = /\?/;
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + new Date().getTime();
}
}
}
Expand Down Expand Up @@ -565,7 +565,7 @@ var b64tab = ((a) => {
})(b64chs);
var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
var _fromCC = String.fromCharCode.bind(String);
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_");
var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, "");
var btoaPolyfill = (bin) => {
Expand Down Expand Up @@ -1112,7 +1112,7 @@ var Session = class {
constructor(token, refresh_token) {
this.token = token;
this.refresh_token = refresh_token;
this.created_at = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
this.created_at = Math.floor(new Date().getTime() / 1e3);
this.update(token, refresh_token);
}
isexpired(currenttime) {
Expand Down
8 changes: 4 additions & 4 deletions packages/satori-js/dist/satori-js.esm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,10 @@ function Request(input, options) {
if (options.cache === "no-store" || options.cache === "no-cache") {
var reParamSearch = /([?&])_=[^&]*/;
if (reParamSearch.test(this.url)) {
this.url = this.url.replace(reParamSearch, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
this.url = this.url.replace(reParamSearch, "$1_=" + new Date().getTime());
} else {
var reQueryString = /\?/;
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + new Date().getTime();
}
}
}
Expand Down Expand Up @@ -541,7 +541,7 @@ var b64tab = ((a) => {
})(b64chs);
var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
var _fromCC = String.fromCharCode.bind(String);
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_");
var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, "");
var btoaPolyfill = (bin) => {
Expand Down Expand Up @@ -1088,7 +1088,7 @@ var Session = class {
constructor(token, refresh_token) {
this.token = token;
this.refresh_token = refresh_token;
this.created_at = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
this.created_at = Math.floor(new Date().getTime() / 1e3);
this.update(token, refresh_token);
}
isexpired(currenttime) {
Expand Down
8 changes: 4 additions & 4 deletions packages/satori-js/dist/satori-js.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ var satorijs = (() => {
if (options.cache === "no-store" || options.cache === "no-cache") {
var reParamSearch = /([?&])_=[^&]*/;
if (reParamSearch.test(this.url)) {
this.url = this.url.replace(reParamSearch, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
this.url = this.url.replace(reParamSearch, "$1_=" + new Date().getTime());
} else {
var reQueryString = /\?/;
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + new Date().getTime();
}
}
}
Expand Down Expand Up @@ -565,7 +565,7 @@ var satorijs = (() => {
})(b64chs);
var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
var _fromCC = String.fromCharCode.bind(String);
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_");
var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, "");
var btoaPolyfill = (bin) => {
Expand Down Expand Up @@ -1112,7 +1112,7 @@ var satorijs = (() => {
constructor(token, refresh_token) {
this.token = token;
this.refresh_token = refresh_token;
this.created_at = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
this.created_at = Math.floor(new Date().getTime() / 1e3);
this.update(token, refresh_token);
}
isexpired(currenttime) {
Expand Down
5 changes: 1 addition & 4 deletions packages/satori-js/dist/satori-js.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,6 @@
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */


var __assign = function() {
__assign = Object.assign || function __assign(t) {
Expand Down Expand Up @@ -732,7 +730,7 @@
const _fromCC = String.fromCharCode.bind(String);
typeof Uint8Array.from === 'function'
? Uint8Array.from.bind(Uint8Array)
: (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
: (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
const _mkUriSafe = (src) => src
.replace(/=/g, '').replace(/[+\/]/g, (m0) => m0 == '+' ? '-' : '_');
const _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, '');
Expand Down Expand Up @@ -876,7 +874,6 @@
}

// tslint:disable
/* Code generated by openapi-gen/main.go. DO NOT EDIT. */
var SatoriApi = /** @class */ (function () {
function SatoriApi(apiKey, basePath, timeoutMs) {
this.apiKey = apiKey;
Expand Down
Loading

0 comments on commit 571d483

Please sign in to comment.