@dyrected/admin 2.5.1 → 2.5.2

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.
Files changed (2) hide show
  1. package/dist/index.mjs +5 -5
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -25602,7 +25602,7 @@ var Ka = class extends Error {
25602
25602
  fetch;
25603
25603
  defaultDepth;
25604
25604
  constructor(e) {
25605
- this.baseUrl = e.baseUrl.replace(/\/$/, ""), this.fetch = e.fetch || fetch, this.defaultDepth = e.defaultDepth ?? 1, this.headers = {
25605
+ this.baseUrl = e.baseUrl.replace(/\/$/, ""), this.fetch = (e.fetch || fetch).bind(globalThis), this.defaultDepth = e.defaultDepth ?? 1, this.headers = {
25606
25606
  "Content-Type": "application/json",
25607
25607
  ...e.apiKey ? { "x-api-key": e.apiKey } : {},
25608
25608
  ...e.siteId ? { "x-site-id": e.siteId } : {},
@@ -25627,7 +25627,7 @@ var Ka = class extends Error {
25627
25627
  async find(e, t = {}) {
25628
25628
  let { initialData: n, ...r } = t, i = { ...r };
25629
25629
  i.where && typeof i.where == "object" && (i.where = JSON.stringify(i.where));
25630
- let a = Pa.default.stringify(i, { addQueryPrefix: !0 }), o = await this.request(`/api/collections/${e}${a}`);
25630
+ let a = Pa.stringify(i, { addQueryPrefix: !0 }), o = await this.request(`/api/collections/${e}${a}`);
25631
25631
  return o.docs.length === 0 && n && n.length > 0 ? (this.request(`/api/collections/${e}/seed`, {
25632
25632
  method: "POST",
25633
25633
  body: JSON.stringify({ data: n })
@@ -25689,7 +25689,7 @@ var Ka = class extends Error {
25689
25689
  };
25690
25690
  }
25691
25691
  async findOne(e, t, n = {}) {
25692
- let { initialData: r, ...i } = n, a = Pa.default.stringify(i, { addQueryPrefix: !0 });
25692
+ let { initialData: r, ...i } = n, a = Pa.stringify(i, { addQueryPrefix: !0 });
25693
25693
  try {
25694
25694
  return await this.request(`/api/collections/${e}/${t}${a}`);
25695
25695
  } catch (n) {
@@ -25721,11 +25721,11 @@ var Ka = class extends Error {
25721
25721
  async deleteMany(e, t) {
25722
25722
  return this.request(`/api/collections/${e}/delete-many`, {
25723
25723
  method: "DELETE",
25724
- body: Pa.default.stringify({ ids: t })
25724
+ body: Pa.stringify({ ids: t })
25725
25725
  });
25726
25726
  }
25727
25727
  async getGlobal(e, t = {}) {
25728
- let { initialData: n, ...r } = t, i = Pa.default.stringify(r, { addQueryPrefix: !0 });
25728
+ let { initialData: n, ...r } = t, i = Pa.stringify(r, { addQueryPrefix: !0 });
25729
25729
  try {
25730
25730
  let t = await this.request(`/api/globals/${e}${i}`);
25731
25731
  return (!t || Object.keys(t).length === 0) && n ? (this.request(`/api/globals/${e}/seed`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyrected/admin",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -63,8 +63,8 @@
63
63
  "tailwind-merge": "^3.5.0",
64
64
  "tailwindcss-animate": "^1.0.7",
65
65
  "zod": "^3.25.76",
66
- "@dyrected/core": "^2.5.0",
67
- "@dyrected/sdk": "^2.4.2"
66
+ "@dyrected/sdk": "^2.4.5",
67
+ "@dyrected/core": "^2.5.1"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@eslint/js": "^10.0.1",
@@ -90,7 +90,7 @@
90
90
  "homepage": "https://dyrected.com",
91
91
  "repository": {
92
92
  "type": "git",
93
- "url": "git+https://github.com/she-WritesCode/dyrected.git"
93
+ "url": "git+https://github.com/Dyrected/dyrected.git"
94
94
  },
95
95
  "publishConfig": {
96
96
  "access": "public"