@mengine/medeo-client 0.1.3 → 1.0.0

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.js +9 -1
  2. package/package.json +6 -5
package/dist/index.js CHANGED
@@ -19,6 +19,14 @@ function base64ToBytes(base64) {
19
19
  }
20
20
  //#endregion
21
21
  //#region src/client/http-client.ts
22
+ /**
23
+ * Public route prefix of the mengine doc-collaboration API. Must stay in lockstep
24
+ * with `apps/mengine-server`'s `API_PREFIX` — the two form the private wire
25
+ * contract between this client and the relay server. Versioned, mengine-owned
26
+ * namespace (mirrors the cluster's `/oapi/v1` precedent for an independent
27
+ * subsystem) rather than folding into the shared `/api/v2/*` space.
28
+ */
29
+ const MENGINE_API_PREFIX = "/api/mengine/v1";
22
30
  var MengineHttpRequestError = class extends Error {
23
31
  status;
24
32
  payload;
@@ -99,7 +107,7 @@ var MengineHttpClient = class {
99
107
  return payload;
100
108
  }
101
109
  endpoint(path) {
102
- return `${this.options.httpOrigin.replace(/\/$/, "")}/api/mengine/docs/${encodeURIComponent(this.options.docId)}/${path}`;
110
+ return `${this.options.httpOrigin.replace(/\/$/, "")}${MENGINE_API_PREFIX}/docs/${encodeURIComponent(this.options.docId)}/${path}`;
103
111
  }
104
112
  };
105
113
  async function safeReadJson(response) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mengine/medeo-client",
3
- "version": "0.1.3",
3
+ "version": "1.0.0",
4
4
  "license": "UNLICENSED",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,20 +23,21 @@
23
23
  "dependencies": {
24
24
  "loro-mirror": "^2.2.0",
25
25
  "zod": "^4.4.3",
26
- "@mengine/storage": "0.1.3",
27
- "@mengine/sync": "0.1.3",
28
- "@mengine/utils": "0.1.3"
26
+ "@mengine/storage": "1.0.0",
27
+ "@mengine/sync": "1.0.0",
28
+ "@mengine/utils": "1.0.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^25.9.1",
32
32
  "@typescript/native-preview": "7.0.0-dev.20260521.1",
33
+ "loro-crdt": "^1.13.6",
33
34
  "typescript": "^6.0.3",
34
35
  "vite-plugin-wasm": "^3.6.0",
35
36
  "vite-plus": "^0.1.23",
36
37
  "@mengine/idl-codegen": "0.0.0"
37
38
  },
38
39
  "peerDependencies": {
39
- "loro-crdt": "^1.13.3"
40
+ "loro-crdt": "^1.13.6"
40
41
  },
41
42
  "scripts": {
42
43
  "build": "vp pack",