@theia/plugin-ext 1.28.0-next.40 → 1.28.0-next.43

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.
@@ -5,10 +5,6 @@ export declare class PluginTheiaFileHandler implements PluginDeployerFileHandler
5
5
  protected readonly environment: PluginTheiaEnvironment;
6
6
  accept(resolvedPlugin: PluginDeployerEntry): boolean;
7
7
  handle(context: PluginDeployerFileHandlerContext): Promise<void>;
8
- /**
9
- * Ensures that a user-installed plugin file is transferred to the user extension folder.
10
- */
11
- protected ensureDiscoverability(context: PluginDeployerFileHandlerContext): Promise<void>;
12
8
  protected getPluginDir(context: PluginDeployerFileHandlerContext): Promise<string>;
13
9
  }
14
10
  //# sourceMappingURL=plugin-theia-file-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-theia-file-handler.d.ts","sourceRoot":"","sources":["../../../../src/main/node/handlers/plugin-theia-file-handler.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,gCAAgC,EAAc,MAAM,iCAAiC,CAAC;AAM/I,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAG/E,qBACa,sBAAuB,YAAW,yBAAyB;IAEpE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAgD;IAGpF,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,sBAAsB,CAAC;IAEvD,MAAM,CAAC,cAAc,EAAE,mBAAmB,GAAG,OAAO;IAI9C,MAAM,CAAC,OAAO,EAAE,gCAAgC,GAAG,OAAO,CAAC,IAAI,CAAC;IAetE;;OAEG;cACa,qBAAqB,CAAC,OAAO,EAAE,gCAAgC,GAAG,OAAO,CAAC,IAAI,CAAC;cAoB/E,YAAY,CAAC,OAAO,EAAE,gCAAgC,GAAG,OAAO,CAAC,MAAM,CAAC;CAG3F"}
1
+ {"version":3,"file":"plugin-theia-file-handler.d.ts","sourceRoot":"","sources":["../../../../src/main/node/handlers/plugin-theia-file-handler.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,gCAAgC,EAAc,MAAM,iCAAiC,CAAC;AAM/I,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E,qBACa,sBAAuB,YAAW,yBAAyB;IAEpE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAgD;IAGpF,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,sBAAsB,CAAC;IAEvD,MAAM,CAAC,cAAc,EAAE,mBAAmB,GAAG,OAAO;IAI9C,MAAM,CAAC,OAAO,EAAE,gCAAgC,GAAG,OAAO,CAAC,IAAI,CAAC;cActD,YAAY,CAAC,OAAO,EAAE,gCAAgC,GAAG,OAAO,CAAC,MAAM,CAAC;CAG3F"}
@@ -25,7 +25,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
25
25
  };
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
27
  exports.PluginTheiaFileHandler = void 0;
28
- const path = require("path");
29
28
  const plugin_protocol_1 = require("../../../common/plugin-protocol");
30
29
  const inversify_1 = require("@theia/core/shared/inversify");
31
30
  const temp_dir_util_1 = require("../temp-dir-util");
@@ -33,7 +32,6 @@ const fs = require("@theia/core/shared/fs-extra");
33
32
  const filenamify = require("filenamify");
34
33
  const file_uri_1 = require("@theia/core/lib/node/file-uri");
35
34
  const plugin_theia_environment_1 = require("../../common/plugin-theia-environment");
36
- const uri_1 = require("@theia/core/lib/common/uri");
37
35
  let PluginTheiaFileHandler = class PluginTheiaFileHandler {
38
36
  constructor() {
39
37
  this.systemPluginsDirUri = file_uri_1.FileUri.create((0, temp_dir_util_1.getTempDir)('theia-unpacked'));
@@ -42,7 +40,6 @@ let PluginTheiaFileHandler = class PluginTheiaFileHandler {
42
40
  return resolvedPlugin.isFile() && resolvedPlugin.path() !== null && resolvedPlugin.path().endsWith('.theia');
43
41
  }
44
42
  async handle(context) {
45
- await this.ensureDiscoverability(context);
46
43
  const id = context.pluginEntry().id();
47
44
  const pluginDir = await this.getPluginDir(context);
48
45
  console.log(`[${id}]: trying to decompress into "${pluginDir}"...`);
@@ -55,29 +52,6 @@ let PluginTheiaFileHandler = class PluginTheiaFileHandler {
55
52
  console.log(`[${id}]: decompressed`);
56
53
  context.pluginEntry().updatePath(pluginDir);
57
54
  }
58
- /**
59
- * Ensures that a user-installed plugin file is transferred to the user extension folder.
60
- */
61
- async ensureDiscoverability(context) {
62
- if (context.pluginEntry().type === plugin_protocol_1.PluginType.User) {
63
- const userExtensionsDir = await this.environment.getPluginsDirUri();
64
- const currentPath = context.pluginEntry().path();
65
- if (!userExtensionsDir.isEqualOrParent(new uri_1.default(currentPath)) && !userExtensionsDir.isEqualOrParent(new uri_1.default(context.pluginEntry().originalPath()))) {
66
- try {
67
- const newPath = file_uri_1.FileUri.fsPath(userExtensionsDir.resolve(path.basename(currentPath)));
68
- await fs.mkdirp(file_uri_1.FileUri.fsPath(userExtensionsDir));
69
- await new Promise((resolve, reject) => {
70
- fs.copyFile(currentPath, newPath, error => error ? reject(error) : resolve());
71
- });
72
- context.pluginEntry().updatePath(newPath);
73
- context.pluginEntry().storeValue('sourceLocations', [newPath]);
74
- }
75
- catch (e) {
76
- console.error(`[${context.pluginEntry().id}]: Failed to copy to user directory. Future sessions may not have access to this plugin.`);
77
- }
78
- }
79
- }
80
- }
81
55
  async getPluginDir(context) {
82
56
  return file_uri_1.FileUri.fsPath(this.systemPluginsDirUri.resolve(filenamify(context.pluginEntry().id(), { replacement: '_' })));
83
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-theia-file-handler.js","sourceRoot":"","sources":["../../../../src/main/node/handlers/plugin-theia-file-handler.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;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AE,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;iBAClE;gBAAC,OAAO,CAAC,EAAE;oBACR,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,0FAA0F,CAAC,CAAC;iBACzI;aACJ;SACJ;IACL,CAAC;IAES,KAAK,CAAC,YAAY,CAAC,OAAyC;QAClE,OAAO,kBAAO,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;IAC1H,CAAC;CACJ,CAAA;AA/CG;IADC,IAAA,kBAAM,EAAC,iDAAsB,CAAC;8BACC,iDAAsB;2DAAC;AAL9C,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CAoDlC;AApDY,wDAAsB"}
1
+ {"version":3,"file":"plugin-theia-file-handler.js","sourceRoot":"","sources":["../../../../src/main/node/handlers/plugin-theia-file-handler.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;;;;;;;;;;AAEhF,qEAA+I;AAC/I,4DAAkE;AAClE,oDAA8C;AAC9C,kDAAkD;AAClD,yCAAyC;AACzC,4DAAwD;AACxD,oFAA+E;AAG/E,IAAa,sBAAsB,GAAnC,MAAa,sBAAsB;IAAnC;QAEqB,wBAAmB,GAAG,kBAAO,CAAC,MAAM,CAAC,IAAA,0BAAU,EAAC,gBAAgB,CAAC,CAAC,CAAC;IA0BxF,CAAC;IArBG,MAAM,CAAC,cAAmC;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C,iDAAsB;2DAAC;AAL9C,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CA4BlC;AA5BY,wDAAsB"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-ext-backend-module.d.ts","sourceRoot":"","sources":["../../../src/main/node/plugin-ext-backend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AA2B1D,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CA8C3D"}
1
+ {"version":3,"file":"plugin-ext-backend-module.d.ts","sourceRoot":"","sources":["../../../src/main/node/plugin-ext-backend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AA0B1D,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CA6C3D"}
@@ -23,7 +23,6 @@ const plugins_key_value_storage_1 = require("./plugins-key-value-storage");
23
23
  const plugin_deployer_contribution_1 = require("./plugin-deployer-contribution");
24
24
  const plugin_protocol_1 = require("../../common/plugin-protocol");
25
25
  const plugin_deployer_impl_1 = require("./plugin-deployer-impl");
26
- const local_file_plugin_deployer_resolver_1 = require("./resolvers/local-file-plugin-deployer-resolver");
27
26
  const local_directory_plugin_deployer_resolver_1 = require("./resolvers/local-directory-plugin-deployer-resolver");
28
27
  const plugin_theia_file_handler_1 = require("./handlers/plugin-theia-file-handler");
29
28
  const plugin_theia_directory_handler_1 = require("./handlers/plugin-theia-directory-handler");
@@ -48,7 +47,6 @@ function bindMainBackend(bind) {
48
47
  bind(node_1.BackendApplicationContribution).toService(plugin_deployer_contribution_1.PluginDeployerContribution);
49
48
  bind(plugin_uninstallation_manager_1.PluginUninstallationManager).toSelf().inSingletonScope();
50
49
  bind(plugin_protocol_1.PluginDeployerResolver).to(local_directory_plugin_deployer_resolver_1.LocalDirectoryPluginDeployerResolver).inSingletonScope();
51
- bind(plugin_protocol_1.PluginDeployerResolver).to(local_file_plugin_deployer_resolver_1.LocalFilePluginDeployerResolver).inSingletonScope();
52
50
  bind(plugin_protocol_1.PluginDeployerResolver).to(plugin_github_resolver_1.GithubPluginDeployerResolver).inSingletonScope();
53
51
  bind(plugin_protocol_1.PluginDeployerResolver).to(plugin_http_resolver_1.HttpPluginDeployerResolver).inSingletonScope();
54
52
  bind(plugin_theia_environment_1.PluginTheiaEnvironment).toSelf().inSingletonScope();
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-ext-backend-module.js","sourceRoot":"","sources":["../../../src/main/node/plugin-ext-backend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;AAGhF,qDAAyD;AACzD,+CAAuF;AACvF,sFAA4F;AAC5F,2EAAqE;AACrE,iFAA4E;AAC5E,kEAGsC;AACtC,iEAA4D;AAC5D,yGAAkG;AAClG,mHAA4G;AAC5G,oFAA8E;AAC9E,8FAAwF;AACxF,qEAAwE;AACxE,iEAAoE;AACpE,sCAAoG;AACpG,2EAA6F;AAC7F,uEAAsE;AACtE,mEAA8D;AAC9D,uEAAkE;AAClE,iFAA4E;AAC5E,2FAAqF;AACrF,2FAAqF;AACrF,mFAA8E;AAE9E,SAAgB,eAAe,CAAC,IAAqB;IACjD,IAAI,CAAC,sCAAqB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACxD,IAAI,CAAC,qCAA8B,CAAC,CAAC,SAAS,CAAC,sCAAqB,CAAC,CAAC;IACtE,IAAI,CAAC,sDAA8B,CAAC,CAAC,SAAS,CAAC,sCAAqB,CAAC,CAAC;IAEtE,IAAA,+BAAwB,EAAC,IAAI,EA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kDAAsB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAEzD,IAAI,CAAC,0CAAkB,CAAC,CAAC,EAAE,CAAC,6CAAsB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACvE,IAAI,CAAC,wBAAiB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CACzC,IAAI,+BAAwB,CAAC,8CAAsB,EAAE,GAAG,EAAE,CACtD,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,0CAAkB,CAAC,CACxC,CACJ,CAAC,gBAAgB,EAAE,CAAC;IAErB,IAAI,CAAC,wBAAiB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CACzC,IAAI,+BAAwB,CAAC,yCAAuB,EAAE,GAAG,EAAE,CACvD,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,8BAAY,CAAC,CAClC,CACJ,CAAC,gBAAgB,EAAE,CAAC;IAErB,IAAI,CAAC,+CAAqB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACxD,IAAI,CAAC,sBAAe,CAAC,CAAC,SAAS,CAAC,+CAAqB,CAAC,CAAC;IAEvD,IAAI,CAAC,kEAA8B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACjE,IAAI,CAAC,qCAA8B,CAAC,CAAC,SAAS,CAAC,kEAA8B,CAAC,CAAC;AACnF,CAAC;AA9CD,0CA8CC"}
1
+ {"version":3,"file":"plugin-ext-backend-module.js","sourceRoot":"","sources":["../../../src/main/node/plugin-ext-backend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;AAGhF,qDAAyD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D,IAAI,CAAC,kEAA8B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACjE,IAAI,CAAC,qCAA8B,CAAC,CAAC,SAAS,CAAC,kEAA8B,CAAC,CAAC;AACnF,CAAC;AA7CD,0CA6CC"}
@@ -1 +1 @@
1
- {"version":3,"file":"local-plugin-deployer-resolver.d.ts","sourceRoot":"","sources":["../../../../src/main/node/resolvers/local-plugin-deployer-resolver.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAMxG,8BACsB,2BAA4B,YAAW,sBAAsB;IAClE,OAAO,CAAC,qBAAqB,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC;IASlF,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIxC,SAAS,CAAC,QAAQ,KAAK,eAAe,IAAI,MAAM,CAAC;IAEjD,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,qBAAqB,EAAE,6BAA6B,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAEjH,sBAAsB;CAiBvC"}
1
+ {"version":3,"file":"local-plugin-deployer-resolver.d.ts","sourceRoot":"","sources":["../../../../src/main/node/resolvers/local-plugin-deployer-resolver.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAMxG,8BACsB,2BAA4B,YAAW,sBAAsB;IACzE,OAAO,CAAC,qBAAqB,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlF,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIjC,SAAS,CAAC,QAAQ,KAAK,eAAe,IAAI,MAAM,CAAC;IAEjD,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,qBAAqB,EAAE,6BAA6B,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAEjH,sBAAsB;CAevC"}
@@ -1 +1 @@
1
- {"version":3,"file":"local-plugin-deployer-resolver.js","sourceRoot":"","sources":["../../../../src/main/node/resolvers/local-plugin-deployer-resolver.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;;;;;;;AAEhF,4DAA0D;AAE1D,kDAAkD;AAClD,6BAA6B;AAC7B,+CAA+C;AAC/C,oDAA6C;AAG7C,IAAsB,2BAA2B,GAAjD,MAAsB,2BAA2B;IACtC,KAAK,CAAC,OAAO,CAAC,qBAAoD;QACrE,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAC/C,qBAAqB,EACrB,IAAI,CAAC,eAAe,CAAC,CAAC;QAC1B,IAAI,SAAS,EAAE;YACX,MAAM,IAAI,CAAC,oBAAoB,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC;SACrE;IACL,CAAC;IAEM,MAAM,CAAC,QAAgB;QAC1B,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACrD,CAAC;IAMO,KAAK,CAAC,sBAAsB,CAChC,qBAAoD,EACpD,cAAsB;QACtB,MAAM,QAAQ,GAAG,IAAI,aAAG,CAAC,qBAAqB,CAAC,WAAW,EAAE,CAAC,CAAC;QAC9D,IAAI,QAAQ,CAAC,MAAM,KAAK,cAAc,EAAE;YACpC,OAAO,IAAI,CAAC;SACf;QACD,IAAI,MAAM,GAAG,cAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YAC1B,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;SAChD;QACD,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YAC9B,OAAO,CAAC,IAAI,CAAC,kCAAkC,qBAAqB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;YACtG,OAAO,IAAI,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;AAnCqB,2BAA2B;IADhD,IAAA,sBAAU,GAAE;GACS,2BAA2B,CAmChD;AAnCqB,kEAA2B"}
1
+ {"version":3,"file":"local-plugin-deployer-resolver.js","sourceRoot":"","sources":["../../../../src/main/node/resolvers/local-plugin-deployer-resolver.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;;;;;;;AAEhF,4DAA0D;AAE1D,kDAAkD;AAClD,6BAA6B;AAC7B,+CAA+C;AAC/C,oDAA6C;AAG7C,IAAsB,2BAA2B,GAAjD,MAAsB,2BAA2B;IAC7C,KAAK,CAAC,OAAO,CAAC,qBAAoD;QAC9D,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,qBAAqB,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QACjG,IAAI,SAAS,EAAE;YACX,MAAM,IAAI,CAAC,oBAAoB,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC;SACrE;IACL,CAAC;IAED,MAAM,CAAC,QAAgB;QACnB,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACrD,CAAC;IAMO,KAAK,CAAC,sBAAsB,CAAC,qBAAoD,EAAE,cAAsB;QAC7G,MAAM,QAAQ,GAAG,IAAI,aAAG,CAAC,qBAAqB,CAAC,WAAW,EAAE,CAAC,CAAC;QAC9D,IAAI,QAAQ,CAAC,MAAM,KAAK,cAAc,EAAE;YACpC,OAAO,IAAI,CAAC;SACf;QACD,IAAI,MAAM,GAAG,cAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YAC1B,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;SAChD;QACD,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YAC9B,OAAO,CAAC,IAAI,CAAC,kCAAkC,qBAAqB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;YACtG,OAAO,IAAI,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;AA/BqB,2BAA2B;IADhD,IAAA,sBAAU,GAAE;GACS,2BAA2B,CA+BhD;AA/BqB,kEAA2B"}
package/package.json CHANGED
@@ -1,33 +1,33 @@
1
1
  {
2
2
  "name": "@theia/plugin-ext",
3
- "version": "1.28.0-next.40+f4327c2f0c0",
3
+ "version": "1.28.0-next.43+4e6b73913be",
4
4
  "description": "Theia - Plugin Extension",
5
5
  "main": "lib/common/index.js",
6
6
  "typings": "lib/common/index.d.ts",
7
7
  "dependencies": {
8
- "@theia/bulk-edit": "1.28.0-next.40+f4327c2f0c0",
9
- "@theia/callhierarchy": "1.28.0-next.40+f4327c2f0c0",
10
- "@theia/console": "1.28.0-next.40+f4327c2f0c0",
11
- "@theia/core": "1.28.0-next.40+f4327c2f0c0",
12
- "@theia/debug": "1.28.0-next.40+f4327c2f0c0",
13
- "@theia/editor": "1.28.0-next.40+f4327c2f0c0",
14
- "@theia/file-search": "1.28.0-next.40+f4327c2f0c0",
15
- "@theia/filesystem": "1.28.0-next.40+f4327c2f0c0",
16
- "@theia/markers": "1.28.0-next.40+f4327c2f0c0",
17
- "@theia/messages": "1.28.0-next.40+f4327c2f0c0",
18
- "@theia/monaco": "1.28.0-next.40+f4327c2f0c0",
8
+ "@theia/bulk-edit": "1.28.0-next.43+4e6b73913be",
9
+ "@theia/callhierarchy": "1.28.0-next.43+4e6b73913be",
10
+ "@theia/console": "1.28.0-next.43+4e6b73913be",
11
+ "@theia/core": "1.28.0-next.43+4e6b73913be",
12
+ "@theia/debug": "1.28.0-next.43+4e6b73913be",
13
+ "@theia/editor": "1.28.0-next.43+4e6b73913be",
14
+ "@theia/file-search": "1.28.0-next.43+4e6b73913be",
15
+ "@theia/filesystem": "1.28.0-next.43+4e6b73913be",
16
+ "@theia/markers": "1.28.0-next.43+4e6b73913be",
17
+ "@theia/messages": "1.28.0-next.43+4e6b73913be",
18
+ "@theia/monaco": "1.28.0-next.43+4e6b73913be",
19
19
  "@theia/monaco-editor-core": "1.67.2",
20
- "@theia/navigator": "1.28.0-next.40+f4327c2f0c0",
21
- "@theia/output": "1.28.0-next.40+f4327c2f0c0",
22
- "@theia/plugin": "1.28.0-next.40+f4327c2f0c0",
23
- "@theia/preferences": "1.28.0-next.40+f4327c2f0c0",
24
- "@theia/scm": "1.28.0-next.40+f4327c2f0c0",
25
- "@theia/search-in-workspace": "1.28.0-next.40+f4327c2f0c0",
26
- "@theia/task": "1.28.0-next.40+f4327c2f0c0",
27
- "@theia/terminal": "1.28.0-next.40+f4327c2f0c0",
28
- "@theia/timeline": "1.28.0-next.40+f4327c2f0c0",
29
- "@theia/variable-resolver": "1.28.0-next.40+f4327c2f0c0",
30
- "@theia/workspace": "1.28.0-next.40+f4327c2f0c0",
20
+ "@theia/navigator": "1.28.0-next.43+4e6b73913be",
21
+ "@theia/output": "1.28.0-next.43+4e6b73913be",
22
+ "@theia/plugin": "1.28.0-next.43+4e6b73913be",
23
+ "@theia/preferences": "1.28.0-next.43+4e6b73913be",
24
+ "@theia/scm": "1.28.0-next.43+4e6b73913be",
25
+ "@theia/search-in-workspace": "1.28.0-next.43+4e6b73913be",
26
+ "@theia/task": "1.28.0-next.43+4e6b73913be",
27
+ "@theia/terminal": "1.28.0-next.43+4e6b73913be",
28
+ "@theia/timeline": "1.28.0-next.43+4e6b73913be",
29
+ "@theia/variable-resolver": "1.28.0-next.43+4e6b73913be",
30
+ "@theia/workspace": "1.28.0-next.43+4e6b73913be",
31
31
  "@types/mime": "^2.0.1",
32
32
  "decompress": "^4.2.1",
33
33
  "escape-html": "^1.0.3",
@@ -94,5 +94,5 @@
94
94
  "nyc": {
95
95
  "extends": "../../configs/nyc.json"
96
96
  },
97
- "gitHead": "f4327c2f0c0f47f960a302590a51698879357841"
97
+ "gitHead": "4e6b73913bed4e1b93178f295a41b1b8d6c36010"
98
98
  }
@@ -14,7 +14,6 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import * as path from 'path';
18
17
  import { PluginDeployerFileHandler, PluginDeployerEntry, PluginDeployerFileHandlerContext, PluginType } from '../../../common/plugin-protocol';
19
18
  import { injectable, inject } from '@theia/core/shared/inversify';
20
19
  import { getTempDir } from '../temp-dir-util';
@@ -22,7 +21,6 @@ import * as fs from '@theia/core/shared/fs-extra';
22
21
  import * as filenamify from 'filenamify';
23
22
  import { FileUri } from '@theia/core/lib/node/file-uri';
24
23
  import { PluginTheiaEnvironment } from '../../common/plugin-theia-environment';
25
- import URI from '@theia/core/lib/common/uri';
26
24
 
27
25
  @injectable()
28
26
  export class PluginTheiaFileHandler implements PluginDeployerFileHandler {
@@ -37,7 +35,6 @@ export class PluginTheiaFileHandler implements PluginDeployerFileHandler {
37
35
  }
38
36
 
39
37
  async handle(context: PluginDeployerFileHandlerContext): Promise<void> {
40
- await this.ensureDiscoverability(context);
41
38
  const id = context.pluginEntry().id();
42
39
  const pluginDir = await this.getPluginDir(context);
43
40
  console.log(`[${id}]: trying to decompress into "${pluginDir}"...`);
@@ -51,29 +48,6 @@ export class PluginTheiaFileHandler implements PluginDeployerFileHandler {
51
48
  context.pluginEntry().updatePath(pluginDir);
52
49
  }
53
50
 
54
- /**
55
- * Ensures that a user-installed plugin file is transferred to the user extension folder.
56
- */
57
- protected async ensureDiscoverability(context: PluginDeployerFileHandlerContext): Promise<void> {
58
- if (context.pluginEntry().type === PluginType.User) {
59
- const userExtensionsDir = await this.environment.getPluginsDirUri();
60
- const currentPath = context.pluginEntry().path();
61
- if (!userExtensionsDir.isEqualOrParent(new URI(currentPath)) && !userExtensionsDir.isEqualOrParent(new URI(context.pluginEntry().originalPath()))) {
62
- try {
63
- const newPath = FileUri.fsPath(userExtensionsDir.resolve(path.basename(currentPath)));
64
- await fs.mkdirp(FileUri.fsPath(userExtensionsDir));
65
- await new Promise<void>((resolve, reject) => {
66
- fs.copyFile(currentPath, newPath, error => error ? reject(error) : resolve());
67
- });
68
- context.pluginEntry().updatePath(newPath);
69
- context.pluginEntry().storeValue('sourceLocations', [newPath]);
70
- } catch (e) {
71
- console.error(`[${context.pluginEntry().id}]: Failed to copy to user directory. Future sessions may not have access to this plugin.`);
72
- }
73
- }
74
- }
75
- }
76
-
77
51
  protected async getPluginDir(context: PluginDeployerFileHandlerContext): Promise<string> {
78
52
  return FileUri.fsPath(this.systemPluginsDirUri.resolve(filenamify(context.pluginEntry().id(), { replacement: '_' })));
79
53
  }
@@ -25,7 +25,6 @@ import {
25
25
  PluginDeployerDirectoryHandler, PluginServer, pluginServerJsonRpcPath, PluginDeployerParticipant
26
26
  } from '../../common/plugin-protocol';
27
27
  import { PluginDeployerImpl } from './plugin-deployer-impl';
28
- import { LocalFilePluginDeployerResolver } from './resolvers/local-file-plugin-deployer-resolver';
29
28
  import { LocalDirectoryPluginDeployerResolver } from './resolvers/local-directory-plugin-deployer-resolver';
30
29
  import { PluginTheiaFileHandler } from './handlers/plugin-theia-file-handler';
31
30
  import { PluginTheiaDirectoryHandler } from './handlers/plugin-theia-directory-handler';
@@ -54,7 +53,6 @@ export function bindMainBackend(bind: interfaces.Bind): void {
54
53
  bind(PluginUninstallationManager).toSelf().inSingletonScope();
55
54
 
56
55
  bind(PluginDeployerResolver).to(LocalDirectoryPluginDeployerResolver).inSingletonScope();
57
- bind(PluginDeployerResolver).to(LocalFilePluginDeployerResolver).inSingletonScope();
58
56
  bind(PluginDeployerResolver).to(GithubPluginDeployerResolver).inSingletonScope();
59
57
  bind(PluginDeployerResolver).to(HttpPluginDeployerResolver).inSingletonScope();
60
58
 
@@ -23,16 +23,14 @@ import URI from '@theia/core/lib/common/uri';
23
23
 
24
24
  @injectable()
25
25
  export abstract class LocalPluginDeployerResolver implements PluginDeployerResolver {
26
- public async resolve(pluginResolverContext: PluginDeployerResolverContext): Promise<void> {
27
- const localPath = await this.resolveLocalPluginPath(
28
- pluginResolverContext,
29
- this.supportedScheme);
26
+ async resolve(pluginResolverContext: PluginDeployerResolverContext): Promise<void> {
27
+ const localPath = await this.resolveLocalPluginPath(pluginResolverContext, this.supportedScheme);
30
28
  if (localPath) {
31
29
  await this.resolveFromLocalPath(pluginResolverContext, localPath);
32
30
  }
33
31
  }
34
32
 
35
- public accept(pluginId: string): boolean {
33
+ accept(pluginId: string): boolean {
36
34
  return pluginId.startsWith(this.supportedScheme);
37
35
  }
38
36
 
@@ -40,9 +38,7 @@ export abstract class LocalPluginDeployerResolver implements PluginDeployerResol
40
38
 
41
39
  protected abstract resolveFromLocalPath(pluginResolverContext: PluginDeployerResolverContext, localPath: string): Promise<void>;
42
40
 
43
- private async resolveLocalPluginPath(
44
- pluginResolverContext: PluginDeployerResolverContext,
45
- expectedScheme: string): Promise<string | null> {
41
+ private async resolveLocalPluginPath(pluginResolverContext: PluginDeployerResolverContext, expectedScheme: string): Promise<string | null> {
46
42
  const localUri = new URI(pluginResolverContext.getOriginId());
47
43
  if (localUri.scheme !== expectedScheme) {
48
44
  return null;
@@ -1,8 +0,0 @@
1
- import { PluginDeployerResolverContext } from '../../../common/plugin-protocol';
2
- import { LocalPluginDeployerResolver } from './local-plugin-deployer-resolver';
3
- export declare class LocalFilePluginDeployerResolver extends LocalPluginDeployerResolver {
4
- static LOCAL_FILE: string;
5
- protected get supportedScheme(): string;
6
- resolveFromLocalPath(pluginResolverContext: PluginDeployerResolverContext, localPath: string): Promise<void>;
7
- }
8
- //# sourceMappingURL=local-file-plugin-deployer-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-file-plugin-deployer-resolver.d.ts","sourceRoot":"","sources":["../../../../src/main/node/resolvers/local-file-plugin-deployer-resolver.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAGhF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,qBACa,+BAAgC,SAAQ,2BAA2B;IAC5E,MAAM,CAAC,UAAU,SAAgB;IAEjC,SAAS,KAAK,eAAe,IAAI,MAAM,CAEtC;IAEK,oBAAoB,CAAC,qBAAqB,EAAE,6BAA6B,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAIrH"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Red Hat, Inc. 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 WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var LocalFilePluginDeployerResolver_1;
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.LocalFilePluginDeployerResolver = void 0;
26
- const inversify_1 = require("@theia/core/shared/inversify");
27
- const path = require("path");
28
- const local_plugin_deployer_resolver_1 = require("./local-plugin-deployer-resolver");
29
- let LocalFilePluginDeployerResolver = LocalFilePluginDeployerResolver_1 = class LocalFilePluginDeployerResolver extends local_plugin_deployer_resolver_1.LocalPluginDeployerResolver {
30
- get supportedScheme() {
31
- return LocalFilePluginDeployerResolver_1.LOCAL_FILE;
32
- }
33
- async resolveFromLocalPath(pluginResolverContext, localPath) {
34
- const fileName = path.basename(localPath);
35
- pluginResolverContext.addPlugin(fileName, localPath);
36
- }
37
- };
38
- LocalFilePluginDeployerResolver.LOCAL_FILE = 'local-file';
39
- LocalFilePluginDeployerResolver = LocalFilePluginDeployerResolver_1 = __decorate([
40
- (0, inversify_1.injectable)()
41
- ], LocalFilePluginDeployerResolver);
42
- exports.LocalFilePluginDeployerResolver = LocalFilePluginDeployerResolver;
43
- //# sourceMappingURL=local-file-plugin-deployer-resolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-file-plugin-deployer-resolver.js","sourceRoot":"","sources":["../../../../src/main/node/resolvers/local-file-plugin-deployer-resolver.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;;;;;;;;AAGhF,4DAA0D;AAC1D,6BAA6B;AAC7B,qFAA+E;AAG/E,IAAa,+BAA+B,uCAA5C,MAAa,+BAAgC,SAAQ,4DAA2B;IAG5E,IAAc,eAAe;QACzB,OAAO,iCAA+B,CAAC,UAAU,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,qBAAoD,EAAE,SAAiB;QAC9F,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC1C,qBAAqB,CAAC,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACzD,CAAC;CACJ,CAAA;AAVU,0CAAU,GAAG,YAAY,CAAC;AADxB,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;GACA,+BAA+B,CAW3C;AAXY,0EAA+B"}
@@ -1,34 +0,0 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2018 Red Hat, Inc. and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { PluginDeployerResolverContext } from '../../../common/plugin-protocol';
18
- import { injectable } from '@theia/core/shared/inversify';
19
- import * as path from 'path';
20
- import { LocalPluginDeployerResolver } from './local-plugin-deployer-resolver';
21
-
22
- @injectable()
23
- export class LocalFilePluginDeployerResolver extends LocalPluginDeployerResolver {
24
- static LOCAL_FILE = 'local-file';
25
-
26
- protected get supportedScheme(): string {
27
- return LocalFilePluginDeployerResolver.LOCAL_FILE;
28
- }
29
-
30
- async resolveFromLocalPath(pluginResolverContext: PluginDeployerResolverContext, localPath: string): Promise<void> {
31
- const fileName = path.basename(localPath);
32
- pluginResolverContext.addPlugin(fileName, localPath);
33
- }
34
- }