cdeops 13.1.2-alpha.17 → 13.1.2-alpha.19

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/package.json +22 -11
  2. package/server.browser.mjs +28 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cdeops",
3
- "version": "13.1.2-alpha.17",
3
+ "version": "13.1.2-alpha.19",
4
4
  "description": "Cdecode - Extension API: build extensions that enhance coding experience in your cdeops editor",
5
5
  "license": "Apache-2.0",
6
6
  "author": "CDMBase LLC",
@@ -9,26 +9,37 @@
9
9
  ".": {
10
10
  "types": "./src/cdeops.d.ts",
11
11
  "import": "./src/index.mjs",
12
- "require": "./src/index.js"
13
- },
14
- "./server": {
15
- "types": "./server.d.ts",
16
- "import": "./server.mjs",
17
- "require": "./server.js"
12
+ "require": "./src/index.js",
13
+ "default": "./src/index.js"
18
14
  },
19
15
  "./client": {
20
16
  "types": "./client.d.ts",
21
17
  "import": "./client.mjs",
22
- "require": "./client.js"
18
+ "require": "./client.js",
19
+ "default": "./client.js"
20
+ },
21
+ "./server": {
22
+ "types": "./server.d.ts",
23
+ "browser": "./server.browser.mjs",
24
+ "import": "./server.browser.mjs",
25
+ "require": "./server.js",
26
+ "node": "./server.mjs",
27
+ "default": "./server.browser.mjs"
23
28
  }
24
29
  },
25
- "main": "src/index.js",
26
- "module": "src/index.mjs",
30
+ "main": "./src/index.js",
31
+ "module": "./src/index.mjs",
32
+ "browser": {
33
+ "./server.mjs": "./server.browser.mjs",
34
+ "./server.js": "./server.browser.mjs",
35
+ "cdeops/server": "./server.browser.mjs"
36
+ },
27
37
  "types": "./src/cdeops.d.ts",
28
38
  "files": [
29
39
  "server.d.ts",
30
40
  "server.js",
31
41
  "server.mjs",
42
+ "server.browser.mjs",
32
43
  "client.d.ts",
33
44
  "client.js",
34
45
  "client.mjs",
@@ -48,5 +59,5 @@
48
59
  "publishConfig": {
49
60
  "access": "public"
50
61
  },
51
- "gitHead": "ddcd14591e38516e1490f2377d299981a172b670"
62
+ "gitHead": "db0e3b940b2720c1b1e98d536f1ff533c01d8122"
52
63
  }
@@ -0,0 +1,28 @@
1
+ // ESM version of cdeops/server
2
+ // This is the module that is bundled with extensions when they use `import ... from 'cdeops/server'`.
3
+ // It delegates to the extension host's runtime implementation of this module by calling
4
+ // `globalThis.require` (which ensures that the extension host's `require` is called at runtime).
5
+
6
+ // For ESM environments, we need to use dynamic import or globalThis
7
+ let serverModule;
8
+
9
+ if (typeof globalThis !== 'undefined' && typeof globalThis.require === 'function') {
10
+ serverModule = globalThis.require('cdeops/server');
11
+ } else {
12
+ // Fallback: export an empty object or stub
13
+ // This allows the module to be imported without errors during SSR/bundling
14
+ serverModule = {};
15
+ }
16
+
17
+ export default serverModule;
18
+
19
+ // Re-export common server exports if they exist
20
+ export const {
21
+ createConnection,
22
+ Connection,
23
+ TextDocuments,
24
+ TextDocumentSyncKind,
25
+ InitializeParams,
26
+ InitializeResult,
27
+ ServerCapabilities,
28
+ } = serverModule || {};