diff --git a/packages/nakama-js/client.ts b/packages/nakama-js/client.ts index cf63cfc..94fb992 100644 --- a/packages/nakama-js/client.ts +++ b/packages/nakama-js/client.ts @@ -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, diff --git a/packages/nakama-js/dist/client.d.ts b/packages/nakama-js/dist/client.d.ts index dadd3bd..140009e 100644 --- a/packages/nakama-js/dist/client.d.ts +++ b/packages/nakama-js/dist/client.d.ts @@ -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"; @@ -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): Promise; diff --git a/packages/nakama-js/dist/nakama-js.cjs.js b/packages/nakama-js/dist/nakama-js.cjs.js index 796e999..9ca41f1 100644 --- a/packages/nakama-js/dist/nakama-js.cjs.js +++ b/packages/nakama-js/dist/nakama-js.cjs.js @@ -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(); } } } @@ -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) => { @@ -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)); @@ -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) { @@ -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."); diff --git a/packages/nakama-js/dist/nakama-js.esm.mjs b/packages/nakama-js/dist/nakama-js.esm.mjs index b022b18..b08eb1a 100644 --- a/packages/nakama-js/dist/nakama-js.esm.mjs +++ b/packages/nakama-js/dist/nakama-js.esm.mjs @@ -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(); } } } @@ -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) => { @@ -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)); @@ -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) { @@ -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."); diff --git a/packages/nakama-js/dist/nakama-js.iife.js b/packages/nakama-js/dist/nakama-js.iife.js index 944642a..1f25029 100644 --- a/packages/nakama-js/dist/nakama-js.iife.js +++ b/packages/nakama-js/dist/nakama-js.iife.js @@ -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(); } } } @@ -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) => { @@ -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)); @@ -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) { @@ -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."); diff --git a/packages/nakama-js/dist/nakama-js.umd.js b/packages/nakama-js/dist/nakama-js.umd.js index 5812d9d..e8e7552 100644 --- a/packages/nakama-js/dist/nakama-js.umd.js +++ b/packages/nakama-js/dist/nakama-js.umd.js @@ -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) { @@ -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, ''); @@ -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') @@ -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. */ @@ -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 diff --git a/packages/satori-js/client.ts b/packages/satori-js/client.ts index 97f2b7f..b774a14 100644 --- a/packages/satori-js/client.ts +++ b/packages/satori-js/client.ts @@ -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, diff --git a/packages/satori-js/dist/client.d.ts b/packages/satori-js/dist/client.d.ts index c06f815..339cbf5 100644 --- a/packages/satori-js/dist/client.d.ts +++ b/packages/satori-js/dist/client.d.ts @@ -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 { @@ -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, defaultProperties?: Record): Promise; diff --git a/packages/satori-js/dist/satori-js.cjs.js b/packages/satori-js/dist/satori-js.cjs.js index 62c3eaa..3200203 100644 --- a/packages/satori-js/dist/satori-js.cjs.js +++ b/packages/satori-js/dist/satori-js.cjs.js @@ -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(); } } } @@ -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) => { @@ -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) { diff --git a/packages/satori-js/dist/satori-js.esm.mjs b/packages/satori-js/dist/satori-js.esm.mjs index 9519e6e..7a70854 100644 --- a/packages/satori-js/dist/satori-js.esm.mjs +++ b/packages/satori-js/dist/satori-js.esm.mjs @@ -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(); } } } @@ -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) => { @@ -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) { diff --git a/packages/satori-js/dist/satori-js.iife.js b/packages/satori-js/dist/satori-js.iife.js index 4aa84cf..79cf572 100644 --- a/packages/satori-js/dist/satori-js.iife.js +++ b/packages/satori-js/dist/satori-js.iife.js @@ -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(); } } } @@ -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) => { @@ -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) { diff --git a/packages/satori-js/dist/satori-js.umd.js b/packages/satori-js/dist/satori-js.umd.js index f3d440a..b1992a7 100644 --- a/packages/satori-js/dist/satori-js.umd.js +++ b/packages/satori-js/dist/satori-js.umd.js @@ -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) { @@ -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, ''); @@ -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; diff --git a/packages/satori-js/package.json b/packages/satori-js/package.json index 9c952ad..32cfc83 100644 --- a/packages/satori-js/package.json +++ b/packages/satori-js/package.json @@ -12,8 +12,12 @@ "exports": { "./package.json": "./package.json", ".": { + "types": "./dist/index.d.ts", "import": "./dist/satori-js.esm.mjs", "require": "./dist/satori-js.cjs.js" + }, + "./api": { + "types": "./dist/api.gen.d.ts" } }, "keywords": [