@theia/plugin-utils 1.75.0-next.28
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/README.md +30 -0
- package/lib/common/constants.d.ts +12 -0
- package/lib/common/constants.d.ts.map +1 -0
- package/lib/common/constants.js +30 -0
- package/lib/common/constants.js.map +1 -0
- package/lib/common/constants.spec.d.ts +2 -0
- package/lib/common/constants.spec.d.ts.map +1 -0
- package/lib/common/constants.spec.js +33 -0
- package/lib/common/constants.spec.js.map +1 -0
- package/lib/common/contribution-types.d.ts +648 -0
- package/lib/common/contribution-types.d.ts.map +1 -0
- package/lib/common/contribution-types.js +30 -0
- package/lib/common/contribution-types.js.map +1 -0
- package/lib/common/manifest-types.d.ts +105 -0
- package/lib/common/manifest-types.d.ts.map +1 -0
- package/lib/common/manifest-types.js +31 -0
- package/lib/common/manifest-types.js.map +1 -0
- package/lib/common/manifest-types.spec.d.ts +2 -0
- package/lib/common/manifest-types.spec.d.ts.map +1 -0
- package/lib/common/manifest-types.spec.js +35 -0
- package/lib/common/manifest-types.spec.js.map +1 -0
- package/lib/common/package-nls.d.ts +24 -0
- package/lib/common/package-nls.d.ts.map +1 -0
- package/lib/common/package-nls.js +82 -0
- package/lib/common/package-nls.js.map +1 -0
- package/lib/common/package-nls.spec.d.ts +2 -0
- package/lib/common/package-nls.spec.d.ts.map +1 -0
- package/lib/common/package-nls.spec.js +98 -0
- package/lib/common/package-nls.spec.js.map +1 -0
- package/lib/common/plugin-activation-events.d.ts +7 -0
- package/lib/common/plugin-activation-events.d.ts.map +1 -0
- package/lib/common/plugin-activation-events.js +95 -0
- package/lib/common/plugin-activation-events.js.map +1 -0
- package/lib/common/plugin-activation-events.spec.d.ts +2 -0
- package/lib/common/plugin-activation-events.spec.d.ts.map +1 -0
- package/lib/common/plugin-activation-events.spec.js +89 -0
- package/lib/common/plugin-activation-events.spec.js.map +1 -0
- package/lib/common/plugin-manifest.d.ts +10 -0
- package/lib/common/plugin-manifest.d.ts.map +1 -0
- package/lib/common/plugin-manifest.js +35 -0
- package/lib/common/plugin-manifest.js.map +1 -0
- package/lib/common/plugin-manifest.spec.d.ts +2 -0
- package/lib/common/plugin-manifest.spec.d.ts.map +1 -0
- package/lib/common/plugin-manifest.spec.js +83 -0
- package/lib/common/plugin-manifest.spec.js.map +1 -0
- package/lib/common/plugin-model.d.ts +33 -0
- package/lib/common/plugin-model.d.ts.map +1 -0
- package/lib/common/plugin-model.js +166 -0
- package/lib/common/plugin-model.js.map +1 -0
- package/lib/common/plugin-model.spec.d.ts +2 -0
- package/lib/common/plugin-model.spec.d.ts.map +1 -0
- package/lib/common/plugin-model.spec.js +204 -0
- package/lib/common/plugin-model.spec.js.map +1 -0
- package/lib/common/protocol-shims.d.ts +128 -0
- package/lib/common/protocol-shims.d.ts.map +1 -0
- package/lib/common/protocol-shims.js +29 -0
- package/lib/common/protocol-shims.js.map +1 -0
- package/lib/common/test-helpers.d.ts +5 -0
- package/lib/common/test-helpers.d.ts.map +1 -0
- package/lib/common/test-helpers.js +41 -0
- package/lib/common/test-helpers.js.map +1 -0
- package/lib/common/utils.d.ts +20 -0
- package/lib/common/utils.d.ts.map +1 -0
- package/lib/common/utils.js +74 -0
- package/lib/common/utils.js.map +1 -0
- package/lib/common/utils.spec.d.ts +2 -0
- package/lib/common/utils.spec.d.ts.map +1 -0
- package/lib/common/utils.spec.js +77 -0
- package/lib/common/utils.spec.js.map +1 -0
- package/lib/node/normalize-contributions.d.ts +54 -0
- package/lib/node/normalize-contributions.d.ts.map +1 -0
- package/lib/node/normalize-contributions.js +985 -0
- package/lib/node/normalize-contributions.js.map +1 -0
- package/lib/node/normalize-contributions.spec.d.ts +2 -0
- package/lib/node/normalize-contributions.spec.d.ts.map +1 -0
- package/lib/node/normalize-contributions.spec.js +850 -0
- package/lib/node/normalize-contributions.spec.js.map +1 -0
- package/lib/node/package-nls.d.ts +3 -0
- package/lib/node/package-nls.d.ts.map +1 -0
- package/lib/node/package-nls.js +45 -0
- package/lib/node/package-nls.js.map +1 -0
- package/lib/node/plugin-manifest.d.ts +6 -0
- package/lib/node/plugin-manifest.d.ts.map +1 -0
- package/lib/node/plugin-manifest.js +26 -0
- package/lib/node/plugin-manifest.js.map +1 -0
- package/lib/node/plugin-model.d.ts +5 -0
- package/lib/node/plugin-model.d.ts.map +1 -0
- package/lib/node/plugin-model.js +36 -0
- package/lib/node/plugin-model.js.map +1 -0
- package/lib/node/read-grammars.d.ts +10 -0
- package/lib/node/read-grammars.d.ts.map +1 -0
- package/lib/node/read-grammars.js +83 -0
- package/lib/node/read-grammars.js.map +1 -0
- package/lib/node/read-grammars.spec.d.ts +2 -0
- package/lib/node/read-grammars.spec.d.ts.map +1 -0
- package/lib/node/read-grammars.spec.js +109 -0
- package/lib/node/read-grammars.spec.js.map +1 -0
- package/package.json +42 -0
- package/src/common/constants.spec.ts +34 -0
- package/src/common/constants.ts +35 -0
- package/src/common/contribution-types.ts +677 -0
- package/src/common/manifest-types.spec.ts +36 -0
- package/src/common/manifest-types.ts +126 -0
- package/src/common/package-nls.spec.ts +122 -0
- package/src/common/package-nls.ts +95 -0
- package/src/common/plugin-activation-events.spec.ts +104 -0
- package/src/common/plugin-activation-events.ts +102 -0
- package/src/common/plugin-manifest.spec.ts +94 -0
- package/src/common/plugin-manifest.ts +44 -0
- package/src/common/plugin-model.spec.ts +246 -0
- package/src/common/plugin-model.ts +194 -0
- package/src/common/protocol-shims.ts +148 -0
- package/src/common/test-helpers.ts +44 -0
- package/src/common/utils.spec.ts +86 -0
- package/src/common/utils.ts +81 -0
- package/src/node/normalize-contributions.spec.ts +931 -0
- package/src/node/normalize-contributions.ts +1098 -0
- package/src/node/package-nls.ts +45 -0
- package/src/node/plugin-manifest.ts +30 -0
- package/src/node/plugin-model.ts +33 -0
- package/src/node/read-grammars.spec.ts +128 -0
- package/src/node/read-grammars.ts +97 -0
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<div align='center'>
|
|
2
|
+
|
|
3
|
+
<br />
|
|
4
|
+
|
|
5
|
+
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
|
6
|
+
|
|
7
|
+
<h2>ECLIPSE THEIA - PLUGIN UTILS</h2>
|
|
8
|
+
|
|
9
|
+
<hr />
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## Description
|
|
14
|
+
|
|
15
|
+
The `@theia/plugin-utils` package provides shared utilities for plugin manifest normalization used by the application build and plugin hosting.
|
|
16
|
+
|
|
17
|
+
## Additional Information
|
|
18
|
+
|
|
19
|
+
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
20
|
+
- [Theia - Website](https://theia-ide.org/)
|
|
21
|
+
|
|
22
|
+
## License
|
|
23
|
+
|
|
24
|
+
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
|
25
|
+
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
|
26
|
+
|
|
27
|
+
## Trademark
|
|
28
|
+
|
|
29
|
+
"Theia" is a trademark of the Eclipse Foundation
|
|
30
|
+
<https://www.eclipse.org/theia>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const PLUGINS_BASE_PATH = "hostedPlugin";
|
|
2
|
+
export declare const UNPUBLISHED = "<unpublished>";
|
|
3
|
+
export declare const DEFAULT_PLUGINS_DIR = "plugins";
|
|
4
|
+
export declare const LIST_JSON = "list.json";
|
|
5
|
+
export declare const VSCODE_BUILTIN_NAME_PREFIX = "@theia/vscode-builtin-";
|
|
6
|
+
export declare const VSCODE_FRONTEND_INIT = "plugin-vscode-init-fe.js";
|
|
7
|
+
export declare const THEIA_PLUGIN_START_METHOD = "start";
|
|
8
|
+
export declare const THEIA_PLUGIN_STOP_METHOD = "stop";
|
|
9
|
+
export declare const VSCODE_EXTENSION_ACTIVATE = "activate";
|
|
10
|
+
export declare const VSCODE_EXTENSION_DEACTIVATE = "deactivate";
|
|
11
|
+
export declare const PLUGIN_COPY_IGNORE: RegExp;
|
|
12
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAEhD,eAAO,MAAM,WAAW,kBAAkB,CAAC;AAE3C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAE7C,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC,eAAO,MAAM,0BAA0B,2BAA2B,CAAC;AAEnE,eAAO,MAAM,oBAAoB,6BAA6B,CAAC;AAE/D,eAAO,MAAM,yBAAyB,UAAU,CAAC;AACjD,eAAO,MAAM,wBAAwB,SAAS,CAAC;AAE/C,eAAO,MAAM,yBAAyB,aAAa,CAAC;AACpD,eAAO,MAAM,2BAA2B,eAAe,CAAC;AAExD,eAAO,MAAM,kBAAkB,QAAuC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2026 Maksim Kachurin and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PLUGIN_COPY_IGNORE = exports.VSCODE_EXTENSION_DEACTIVATE = exports.VSCODE_EXTENSION_ACTIVATE = exports.THEIA_PLUGIN_STOP_METHOD = exports.THEIA_PLUGIN_START_METHOD = exports.VSCODE_FRONTEND_INIT = exports.VSCODE_BUILTIN_NAME_PREFIX = exports.LIST_JSON = exports.DEFAULT_PLUGINS_DIR = exports.UNPUBLISHED = exports.PLUGINS_BASE_PATH = void 0;
|
|
19
|
+
exports.PLUGINS_BASE_PATH = 'hostedPlugin';
|
|
20
|
+
exports.UNPUBLISHED = '<unpublished>';
|
|
21
|
+
exports.DEFAULT_PLUGINS_DIR = 'plugins';
|
|
22
|
+
exports.LIST_JSON = 'list.json';
|
|
23
|
+
exports.VSCODE_BUILTIN_NAME_PREFIX = '@theia/vscode-builtin-';
|
|
24
|
+
exports.VSCODE_FRONTEND_INIT = 'plugin-vscode-init-fe.js';
|
|
25
|
+
exports.THEIA_PLUGIN_START_METHOD = 'start';
|
|
26
|
+
exports.THEIA_PLUGIN_STOP_METHOD = 'stop';
|
|
27
|
+
exports.VSCODE_EXTENSION_ACTIVATE = 'activate';
|
|
28
|
+
exports.VSCODE_EXTENSION_DEACTIVATE = 'deactivate';
|
|
29
|
+
exports.PLUGIN_COPY_IGNORE = /[/\\](\.git|node_modules)([/\\]|$)/;
|
|
30
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,iDAAiD;AACjD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEnE,QAAA,iBAAiB,GAAG,cAAc,CAAC;AAEnC,QAAA,WAAW,GAAG,eAAe,CAAC;AAE9B,QAAA,mBAAmB,GAAG,SAAS,CAAC;AAEhC,QAAA,SAAS,GAAG,WAAW,CAAC;AAExB,QAAA,0BAA0B,GAAG,wBAAwB,CAAC;AAEtD,QAAA,oBAAoB,GAAG,0BAA0B,CAAC;AAElD,QAAA,yBAAyB,GAAG,OAAO,CAAC;AACpC,QAAA,wBAAwB,GAAG,MAAM,CAAC;AAElC,QAAA,yBAAyB,GAAG,UAAU,CAAC;AACvC,QAAA,2BAA2B,GAAG,YAAY,CAAC;AAE3C,QAAA,kBAAkB,GAAG,oCAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.spec.d.ts","sourceRoot":"","sources":["../../src/common/constants.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2026 Maksim Kachurin and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const chai_1 = require("chai");
|
|
19
|
+
const constants_1 = require("./constants");
|
|
20
|
+
describe('constants', () => {
|
|
21
|
+
describe('PLUGIN_COPY_IGNORE', () => {
|
|
22
|
+
it('skips git metadata and node_modules anywhere in the path', () => {
|
|
23
|
+
(0, chai_1.expect)(constants_1.PLUGIN_COPY_IGNORE.test('/plugin/.git/config')).to.equal(true);
|
|
24
|
+
(0, chai_1.expect)(constants_1.PLUGIN_COPY_IGNORE.test('/plugin/node_modules/pkg/index.js')).to.equal(true);
|
|
25
|
+
(0, chai_1.expect)(constants_1.PLUGIN_COPY_IGNORE.test('/plugin\\node_modules\\pkg')).to.equal(true);
|
|
26
|
+
});
|
|
27
|
+
it('allows regular plugin files', () => {
|
|
28
|
+
(0, chai_1.expect)(constants_1.PLUGIN_COPY_IGNORE.test('/plugin/dist/extension.js')).to.equal(false);
|
|
29
|
+
(0, chai_1.expect)(constants_1.PLUGIN_COPY_IGNORE.test('/plugin/media/icon.png')).to.equal(false);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=constants.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.spec.js","sourceRoot":"","sources":["../../src/common/constants.spec.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,iDAAiD;AACjD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,+BAA8B;AAC9B,2CAAiD;AAEjD,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IAEvB,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;QAChC,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;YAChE,IAAA,aAAM,EAAC,8BAAkB,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACtE,IAAA,aAAM,EAAC,8BAAkB,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpF,IAAA,aAAM,EAAC,8BAAkB,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACjF,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;YACnC,IAAA,aAAM,EAAC,8BAAkB,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC7E,IAAA,aAAM,EAAC,8BAAkB,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|