oiu-core 0.1.5 → 0.1.6

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.
@@ -1,4 +1,4 @@
1
- import { A as Re, P as f, a as $, d as Ue } from "./main-DDVh2kVN.js";
1
+ import { A as Re, P as f, a as $, d as Ue } from "./main-FBHPIaGD.js";
2
2
  class j extends Error {
3
3
  }
4
4
  j.prototype.name = "InvalidTokenError";
@@ -19318,7 +19318,7 @@ function UR({ className: e, children: t, getPermissionFor: r, defaultAbility: n
19318
19318
  var zv = /* @__PURE__ */ ((e) => (e[e.Always = 1] = "Always", e[e.Never = 2] = "Never", e[e.RedirectIfFails = 3] = "RedirectIfFails", e))(zv || {});
19319
19319
  const WR = () => import(
19320
19320
  /* @vite-ignore */
19321
- "./index-YSAkS2Gn.js"
19321
+ "./index-DBhagcq9.js"
19322
19322
  );
19323
19323
  async function GR(e, t, r) {
19324
19324
  return (await WR()).default(e, t, r);
@@ -19340,6 +19340,23 @@ const FN = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
19340
19340
  }, Symbol.toStringTag, { value: "Module" }));
19341
19341
  var qv = /* @__PURE__ */ ((e) => (e[e.Info = 1] = "Info", e[e.Error = 2] = "Error", e[e.Warning = 3] = "Warning", e[e.Success = 4] = "Success", e))(qv || {});
19342
19342
  Promise.delay = (e) => new Promise((t) => setTimeout(t, e));
19343
+ Promise.waitUntil = (e, t) => {
19344
+ const r = t?.timeoutMs ?? 1e4, n = t?.intervalMs ?? 25, o = t?.timeoutMessage ?? "Timed out waiting for condition";
19345
+ return new Promise((i, s) => {
19346
+ const a = Date.now(), c = () => {
19347
+ if (e()) {
19348
+ i();
19349
+ return;
19350
+ }
19351
+ if (Date.now() - a >= r) {
19352
+ s(new Error(o));
19353
+ return;
19354
+ }
19355
+ setTimeout(c, n);
19356
+ };
19357
+ c();
19358
+ });
19359
+ };
19343
19360
  var Oa, Np;
19344
19361
  function Zn() {
19345
19362
  return Np || (Np = 1, Oa = TypeError), Oa;
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as e, b as t, h as u, j as i, c as n, e as o, f as h, u as c, g } from "./main-DDVh2kVN.js";
1
+ import { i as e, b as t, h as u, j as i, c as n, e as o, f as h, u as c, g } from "./main-FBHPIaGD.js";
2
2
  export {
3
3
  e as auth,
4
4
  t as components,
@@ -1 +1 @@
1
- {"version":3,"file":"promise.d.ts","sourceRoot":"","sources":["../../lib/utils/promise.ts"],"names":[],"mappings":"AAKA,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"promise.d.ts","sourceRoot":"","sources":["../../lib/utils/promise.ts"],"names":[],"mappings":"AAqCA,eAAe,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oiu-core",
3
3
  "private": false,
4
- "version": "0.1.5",
4
+ "version": "0.1.6",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"