cdeops 13.1.2-alpha.9 → 13.1.3-alpha.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.
- package/client.mjs +13 -0
- package/package.json +34 -4
- package/server.browser.mjs +28 -0
- package/server.mjs +13 -0
- package/src/index.mjs +13 -0
package/client.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This is the module that is bundled with extensions when they use `import ... from 'cdeops/client'`.
|
|
2
|
+
// It delegates to the extension host's runtime implementation of this module by calling
|
|
3
|
+
// `globalThis.require` (which ensures that the extension host's `require` is called at runtime).
|
|
4
|
+
//
|
|
5
|
+
// This dummy file is used when extension is bundled with a JavaScript bundler that lacks support for externals
|
|
6
|
+
// (or when `cdeops/client` is not configured as an external module). Parcel does not support externals
|
|
7
|
+
// (https://github.com/parcel-bundler/parcel/issues/144). Webpack, Rollup, and Microbundle support externals.
|
|
8
|
+
|
|
9
|
+
// ESM named exports must be statically analyzable, so we can only reliably export the module as default.
|
|
10
|
+
// Consumers should use: import cdeopsClient from 'cdeops/client'; then access cdeopsClient.commands, etc.
|
|
11
|
+
// Or use: import cdeopsClient from 'cdeops/client'; const { commands, configuration } = cdeopsClient;
|
|
12
|
+
const cdeopsClient = globalThis.require('cdeops/client');
|
|
13
|
+
export default cdeopsClient;
|
package/package.json
CHANGED
|
@@ -1,18 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cdeops",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.3-alpha.2",
|
|
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",
|
|
7
7
|
"sideEffects": false,
|
|
8
|
-
"
|
|
9
|
-
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./src/cdeops.d.ts",
|
|
11
|
+
"import": "./src/index.mjs",
|
|
12
|
+
"require": "./src/index.js",
|
|
13
|
+
"default": "./src/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./client": {
|
|
16
|
+
"types": "./client.d.ts",
|
|
17
|
+
"import": "./client.mjs",
|
|
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"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
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
|
+
},
|
|
10
37
|
"types": "./src/cdeops.d.ts",
|
|
11
38
|
"files": [
|
|
12
39
|
"server.d.ts",
|
|
13
40
|
"server.js",
|
|
41
|
+
"server.mjs",
|
|
42
|
+
"server.browser.mjs",
|
|
14
43
|
"client.d.ts",
|
|
15
44
|
"client.js",
|
|
45
|
+
"client.mjs",
|
|
16
46
|
"src",
|
|
17
47
|
"dist/docs"
|
|
18
48
|
],
|
|
@@ -29,5 +59,5 @@
|
|
|
29
59
|
"publishConfig": {
|
|
30
60
|
"access": "public"
|
|
31
61
|
},
|
|
32
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "394adad29e2a114eb360b13076eab61df7d2d14a"
|
|
33
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 || {};
|
package/server.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This is the module that is bundled with extensions when they use `import ... from 'cdeops/server'`.
|
|
2
|
+
// It delegates to the extension host's runtime implementation of this module by calling
|
|
3
|
+
// `globalThis.require` (which ensures that the extension host's `require` is called at runtime).
|
|
4
|
+
//
|
|
5
|
+
// This dummy file is used when extension is bundled with a JavaScript bundler that lacks support for externals
|
|
6
|
+
// (or when `cdeops/server` is not configured as an external module). Parcel does not support externals
|
|
7
|
+
// (https://github.com/parcel-bundler/parcel/issues/144). Webpack, Rollup, and Microbundle support externals.
|
|
8
|
+
|
|
9
|
+
// ESM named exports must be statically analyzable, so we can only reliably export the module as default.
|
|
10
|
+
// Consumers should use: import cdeopsServer from 'cdeops/server'; then access cdeopsServer.commands, etc.
|
|
11
|
+
// Or use: import cdeopsServer from 'cdeops/server'; const { commands, configuration } = cdeopsServer;
|
|
12
|
+
const cdeopsServer = globalThis.require('cdeops/server');
|
|
13
|
+
export default cdeopsServer;
|
package/src/index.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This is the module that is bundled with extensions when they use `import ... from 'cdeops'`.
|
|
2
|
+
// It delegates to the extension host's runtime implementation of this module by calling
|
|
3
|
+
// `globalThis.require` (which ensures that the extension host's `require` is called at runtime).
|
|
4
|
+
//
|
|
5
|
+
// This dummy file is used when extension is bundled with a JavaScript bundler that lacks support for externals
|
|
6
|
+
// (or when `cdeops` is not configured as an external module). Parcel does not support externals
|
|
7
|
+
// (https://github.com/parcel-bundler/parcel/issues/144). Webpack, Rollup, and Microbundle support externals.
|
|
8
|
+
|
|
9
|
+
// ESM named exports must be statically analyzable, so we can only reliably export the module as default.
|
|
10
|
+
// Consumers should use: import cdeops from 'cdeops'; then access cdeops.workspace, cdeops.commands, etc.
|
|
11
|
+
// Or use: import cdeops from 'cdeops'; const { workspace, commands } = cdeops;
|
|
12
|
+
const cdeops = globalThis.require('cdeops');
|
|
13
|
+
export default cdeops;
|