Keep Theia config out of home dotfolder
This commit is contained in:
@@ -39,6 +39,11 @@
|
|||||||
},
|
},
|
||||||
"theia": {
|
"theia": {
|
||||||
"target": "browser",
|
"target": "browser",
|
||||||
|
"backend": {
|
||||||
|
"config": {
|
||||||
|
"configurationFolder": ".git.zone/ide/theia"
|
||||||
|
}
|
||||||
|
},
|
||||||
"frontend": {
|
"frontend": {
|
||||||
"config": {
|
"config": {
|
||||||
"applicationName": "Git.Zone IDE",
|
"applicationName": "Git.Zone IDE",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const main = require('@theia/core/lib/node/main');
|
|||||||
BackendApplicationConfigProvider.set({
|
BackendApplicationConfigProvider.set({
|
||||||
"singleInstance": true,
|
"singleInstance": true,
|
||||||
"frontendConnectionTimeout": 0,
|
"frontendConnectionTimeout": 0,
|
||||||
"configurationFolder": ".theia"
|
"configurationFolder": ".git.zone/ide/theia"
|
||||||
});
|
});
|
||||||
|
|
||||||
globalThis.extensionInfo = [
|
globalThis.extensionInfo = [
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||||
|
import * as fs from 'node:fs/promises';
|
||||||
|
import * as path from 'node:path';
|
||||||
|
|
||||||
|
const gitZoneWorkspacePreferenceFolder = '.git.zone/ide/workspace';
|
||||||
|
|
||||||
|
tap.test('should keep Theia backend config under Git.Zone IDE home path', async () => {
|
||||||
|
const packageJsonPath = path.join(process.cwd(), 'applications', 'remote-theia', 'package.json');
|
||||||
|
const packageJson = JSON.parse(await fs.readFile(packageJsonPath, 'utf8'));
|
||||||
|
|
||||||
|
expect(packageJson.theia.backend.config.configurationFolder).toEqual('.git.zone/ide/theia');
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.test('should avoid legacy .theia workspace preference folders', async () => {
|
||||||
|
const sourcePath = path.join(
|
||||||
|
process.cwd(),
|
||||||
|
'theia-extensions',
|
||||||
|
'gitzone-remote',
|
||||||
|
'src',
|
||||||
|
'common',
|
||||||
|
'gitzone-preference-configurations.ts',
|
||||||
|
);
|
||||||
|
const sourceText = await fs.readFile(sourcePath, 'utf8');
|
||||||
|
|
||||||
|
expect(sourceText).toInclude(gitZoneWorkspacePreferenceFolder);
|
||||||
|
expect(sourceText).toInclude("return [gitZoneWorkspacePreferenceFolder, '.vscode']");
|
||||||
|
expect(sourceText).not.toInclude("'.theia'");
|
||||||
|
});
|
||||||
|
|
||||||
|
export default tap.start();
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"gitzone-remote-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/gitzone-remote-frontend-module.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAsB,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,sCAAsC,CAAC;AAE9C,eAAO,MAAM,+BAA+B;;;CAG3C,CAAC;AAEF,qBACa,yBAA0B,YAAW,mBAAmB,EAAE,gBAAgB;IAErF,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAG,oBAAoB,CAAC;IAGvD,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAG,cAAc,CAAC;IAE7C,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IASjD,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;CAM9C;;AAED,wBAWG"}
|
{"version":3,"file":"gitzone-remote-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/gitzone-remote-frontend-module.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAsB,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,sCAAsC,CAAC;AAG9C,eAAO,MAAM,+BAA+B;;;CAG3C,CAAC;AAEF,qBACa,yBAA0B,YAAW,mBAAmB,EAAE,gBAAgB;IAErF,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAG,oBAAoB,CAAC;IAGvD,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAG,cAAc,CAAC;IAE7C,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IASjD,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;CAM9C;;AAED,wBAaG"}
|
||||||
@@ -15,8 +15,10 @@ const common_menus_js_1 = require("@theia/core/lib/browser/common-menus.js");
|
|||||||
const command_js_1 = require("@theia/core/lib/common/command.js");
|
const command_js_1 = require("@theia/core/lib/common/command.js");
|
||||||
const menu_model_registry_js_1 = require("@theia/core/lib/common/menu/menu-model-registry.js");
|
const menu_model_registry_js_1 = require("@theia/core/lib/common/menu/menu-model-registry.js");
|
||||||
const message_service_js_1 = require("@theia/core/lib/common/message-service.js");
|
const message_service_js_1 = require("@theia/core/lib/common/message-service.js");
|
||||||
|
const preference_configurations_js_1 = require("@theia/core/lib/common/preferences/preference-configurations.js");
|
||||||
const index_js_1 = require("@theia/core/shared/inversify/index.js");
|
const index_js_1 = require("@theia/core/shared/inversify/index.js");
|
||||||
const gitzone_remote_protocol_js_1 = require("../common/gitzone-remote-protocol.js");
|
const gitzone_remote_protocol_js_1 = require("../common/gitzone-remote-protocol.js");
|
||||||
|
const gitzone_preference_configurations_js_1 = require("../common/gitzone-preference-configurations.js");
|
||||||
exports.GitZoneRemoteEnvironmentCommand = {
|
exports.GitZoneRemoteEnvironmentCommand = {
|
||||||
id: 'gitzone.remote.environment',
|
id: 'gitzone.remote.environment',
|
||||||
label: 'Git.Zone: Show Remote Environment',
|
label: 'Git.Zone: Show Remote Environment',
|
||||||
@@ -51,7 +53,9 @@ __decorate([
|
|||||||
exports.GitZoneRemoteContribution = GitZoneRemoteContribution = __decorate([
|
exports.GitZoneRemoteContribution = GitZoneRemoteContribution = __decorate([
|
||||||
(0, index_js_1.injectable)()
|
(0, index_js_1.injectable)()
|
||||||
], GitZoneRemoteContribution);
|
], GitZoneRemoteContribution);
|
||||||
exports.default = new index_js_1.ContainerModule((bind) => {
|
exports.default = new index_js_1.ContainerModule((bind, _unbind, isBound, rebind) => {
|
||||||
|
const preferenceBinding = isBound(preference_configurations_js_1.PreferenceConfigurations) ? rebind(preference_configurations_js_1.PreferenceConfigurations) : bind(preference_configurations_js_1.PreferenceConfigurations);
|
||||||
|
preferenceBinding.to(gitzone_preference_configurations_js_1.GitZonePreferenceConfigurations).inSingletonScope();
|
||||||
bind(gitzone_remote_protocol_js_1.GitZoneRemoteServer)
|
bind(gitzone_remote_protocol_js_1.GitZoneRemoteServer)
|
||||||
.toDynamicValue((context) => context.container
|
.toDynamicValue((context) => context.container
|
||||||
.get(ws_connection_provider_js_1.WebSocketConnectionProvider)
|
.get(ws_connection_provider_js_1.WebSocketConnectionProvider)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"gitzone-remote-frontend-module.js","sourceRoot":"","sources":["../../src/browser/gitzone-remote-frontend-module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2GAA0G;AAC1G,6EAAsE;AACtE,kEAAyF;AACzF,+FAAyG;AACzG,kFAA2E;AAC3E,oEAA4F;AAC5F,qFAI8C;AAEjC,QAAA,+BAA+B,GAAG;IAC7C,EAAE,EAAE,4BAA4B;IAChC,KAAK,EAAE,mCAAmC;CAC3C,CAAC;AAGK,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAEjB,YAAY,CAAwB;IAGpC,QAAQ,CAAkB;IAE7C,gBAAgB,CAAC,QAAyB;QACxC,QAAQ,CAAC,eAAe,CAAC,uCAA+B,EAAE;YACxD,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;gBAC7D,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,qBAAqB,WAAW,CAAC,aAAa,EAAE,CAAC,CAAC;YAC7E,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,KAAwB;QACpC,KAAK,CAAC,kBAAkB,CAAC,6BAAW,CAAC,SAAS,EAAE;YAC9C,SAAS,EAAE,uCAA+B,CAAC,EAAE;YAC7C,KAAK,EAAE,uCAA+B,CAAC,KAAK;SAC7C,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAtBY,8DAAyB;AAEjB;IADlB,IAAA,iBAAM,EAAC,gDAAmB,CAAC;;+DAC2B;AAGpC;IADlB,IAAA,iBAAM,EAAC,mCAAc,CAAC;8BACO,mCAAc;2DAAC;oCALlC,yBAAyB;IADrC,IAAA,qBAAU,GAAE;GACA,yBAAyB,CAsBrC;AAED,kBAAe,IAAI,0BAAe,CAAC,CAAC,IAAI,EAAE,EAAE;IAC1C,IAAI,CAAC,gDAAmB,CAAC;SACtB,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE,CAC1B,OAAO,CAAC,SAAS;SACd,GAAG,CAAC,uDAA2B,CAAC;SAChC,WAAW,CAAuB,8CAAiB,CAAC,CACxD;SACA,gBAAgB,EAAE,CAAC;IACtB,IAAI,CAAC,yBAAyB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC5D,IAAI,CAAC,gCAAmB,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;IAC/D,IAAI,CAAC,yCAAgB,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC"}
|
{"version":3,"file":"gitzone-remote-frontend-module.js","sourceRoot":"","sources":["../../src/browser/gitzone-remote-frontend-module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2GAA0G;AAC1G,6EAAsE;AACtE,kEAAyF;AACzF,+FAAyG;AACzG,kFAA2E;AAC3E,kHAA2G;AAC3G,oEAA4F;AAC5F,qFAI8C;AAC9C,yGAAiG;AAEpF,QAAA,+BAA+B,GAAG;IAC7C,EAAE,EAAE,4BAA4B;IAChC,KAAK,EAAE,mCAAmC;CAC3C,CAAC;AAGK,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAEjB,YAAY,CAAwB;IAGpC,QAAQ,CAAkB;IAE7C,gBAAgB,CAAC,QAAyB;QACxC,QAAQ,CAAC,eAAe,CAAC,uCAA+B,EAAE;YACxD,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;gBAC7D,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,qBAAqB,WAAW,CAAC,aAAa,EAAE,CAAC,CAAC;YAC7E,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,KAAwB;QACpC,KAAK,CAAC,kBAAkB,CAAC,6BAAW,CAAC,SAAS,EAAE;YAC9C,SAAS,EAAE,uCAA+B,CAAC,EAAE;YAC7C,KAAK,EAAE,uCAA+B,CAAC,KAAK;SAC7C,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAtBY,8DAAyB;AAEjB;IADlB,IAAA,iBAAM,EAAC,gDAAmB,CAAC;;+DAC2B;AAGpC;IADlB,IAAA,iBAAM,EAAC,mCAAc,CAAC;8BACO,mCAAc;2DAAC;oCALlC,yBAAyB;IADrC,IAAA,qBAAU,GAAE;GACA,yBAAyB,CAsBrC;AAED,kBAAe,IAAI,0BAAe,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACpE,MAAM,iBAAiB,GAAG,OAAO,CAAC,uDAAwB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,uDAAwB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,uDAAwB,CAAC,CAAC;IAChI,iBAAiB,CAAC,EAAE,CAAC,sEAA+B,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACzE,IAAI,CAAC,gDAAmB,CAAC;SACtB,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE,CAC1B,OAAO,CAAC,SAAS;SACd,GAAG,CAAC,uDAA2B,CAAC;SAChC,WAAW,CAAuB,8CAAiB,CAAC,CACxD;SACA,gBAAgB,EAAE,CAAC;IACtB,IAAI,CAAC,yBAAyB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC5D,IAAI,CAAC,gCAAmB,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;IAC/D,IAAI,CAAC,yCAAgB,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC"}
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
import { PreferenceConfigurations } from '@theia/core/lib/common/preferences/preference-configurations.js';
|
||||||
|
export declare const gitZoneWorkspacePreferenceFolder = ".git.zone/ide/workspace";
|
||||||
|
export declare class GitZonePreferenceConfigurations extends PreferenceConfigurations {
|
||||||
|
getPaths(): string[];
|
||||||
|
}
|
||||||
|
//# sourceMappingURL=gitzone-preference-configurations.d.ts.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"gitzone-preference-configurations.d.ts","sourceRoot":"","sources":["../../src/common/gitzone-preference-configurations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iEAAiE,CAAC;AAG3G,eAAO,MAAM,gCAAgC,4BAA4B,CAAC;AAE1E,qBACa,+BAAgC,SAAQ,wBAAwB;IAC3E,QAAQ,IAAI,MAAM,EAAE;CAGrB"}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
"use strict";
|
||||||
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||||
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||||
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||||
|
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;
|
||||||
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.GitZonePreferenceConfigurations = exports.gitZoneWorkspacePreferenceFolder = void 0;
|
||||||
|
const preference_configurations_js_1 = require("@theia/core/lib/common/preferences/preference-configurations.js");
|
||||||
|
const index_js_1 = require("@theia/core/shared/inversify/index.js");
|
||||||
|
exports.gitZoneWorkspacePreferenceFolder = '.git.zone/ide/workspace';
|
||||||
|
let GitZonePreferenceConfigurations = class GitZonePreferenceConfigurations extends preference_configurations_js_1.PreferenceConfigurations {
|
||||||
|
getPaths() {
|
||||||
|
return [exports.gitZoneWorkspacePreferenceFolder, '.vscode'];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
exports.GitZonePreferenceConfigurations = GitZonePreferenceConfigurations;
|
||||||
|
exports.GitZonePreferenceConfigurations = GitZonePreferenceConfigurations = __decorate([
|
||||||
|
(0, index_js_1.injectable)()
|
||||||
|
], GitZonePreferenceConfigurations);
|
||||||
|
//# sourceMappingURL=gitzone-preference-configurations.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"gitzone-preference-configurations.js","sourceRoot":"","sources":["../../src/common/gitzone-preference-configurations.ts"],"names":[],"mappings":";;;;;;;;;AAAA,kHAA2G;AAC3G,oEAAmE;AAEtD,QAAA,gCAAgC,GAAG,yBAAyB,CAAC;AAGnE,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,uDAAwB;IAC3E,QAAQ;QACN,OAAO,CAAC,wCAAgC,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;CACF,CAAA;AAJY,0EAA+B;0CAA/B,+BAA+B;IAD3C,IAAA,qBAAU,GAAE;GACA,+BAA+B,CAI3C"}
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"gitzone-remote-backend-module.d.ts","sourceRoot":"","sources":["../../src/node/gitzone-remote-backend-module.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;;AAQxE,wBAUG"}
|
{"version":3,"file":"gitzone-remote-backend-module.d.ts","sourceRoot":"","sources":["../../src/node/gitzone-remote-backend-module.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;;AASxE,wBAYG"}
|
||||||
@@ -2,10 +2,14 @@
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const handler_js_1 = require("@theia/core/lib/common/messaging/handler.js");
|
const handler_js_1 = require("@theia/core/lib/common/messaging/handler.js");
|
||||||
const proxy_factory_js_1 = require("@theia/core/lib/common/messaging/proxy-factory.js");
|
const proxy_factory_js_1 = require("@theia/core/lib/common/messaging/proxy-factory.js");
|
||||||
|
const preference_configurations_js_1 = require("@theia/core/lib/common/preferences/preference-configurations.js");
|
||||||
const index_js_1 = require("@theia/core/shared/inversify/index.js");
|
const index_js_1 = require("@theia/core/shared/inversify/index.js");
|
||||||
|
const gitzone_preference_configurations_js_1 = require("../common/gitzone-preference-configurations.js");
|
||||||
const gitzone_remote_protocol_js_1 = require("../common/gitzone-remote-protocol.js");
|
const gitzone_remote_protocol_js_1 = require("../common/gitzone-remote-protocol.js");
|
||||||
const gitzone_remote_node_service_js_1 = require("./gitzone-remote-node-service.js");
|
const gitzone_remote_node_service_js_1 = require("./gitzone-remote-node-service.js");
|
||||||
exports.default = new index_js_1.ContainerModule((bind) => {
|
exports.default = new index_js_1.ContainerModule((bind, _unbind, isBound, rebind) => {
|
||||||
|
const preferenceBinding = isBound(preference_configurations_js_1.PreferenceConfigurations) ? rebind(preference_configurations_js_1.PreferenceConfigurations) : bind(preference_configurations_js_1.PreferenceConfigurations);
|
||||||
|
preferenceBinding.to(gitzone_preference_configurations_js_1.GitZonePreferenceConfigurations).inSingletonScope();
|
||||||
bind(gitzone_remote_node_service_js_1.GitZoneRemoteNodeService).toSelf().inSingletonScope();
|
bind(gitzone_remote_node_service_js_1.GitZoneRemoteNodeService).toSelf().inSingletonScope();
|
||||||
bind(gitzone_remote_protocol_js_1.GitZoneRemoteServer).toService(gitzone_remote_node_service_js_1.GitZoneRemoteNodeService);
|
bind(gitzone_remote_protocol_js_1.GitZoneRemoteServer).toService(gitzone_remote_node_service_js_1.GitZoneRemoteNodeService);
|
||||||
bind(handler_js_1.ConnectionHandler)
|
bind(handler_js_1.ConnectionHandler)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"gitzone-remote-backend-module.js","sourceRoot":"","sources":["../../src/node/gitzone-remote-backend-module.ts"],"names":[],"mappings":";;AAAA,4EAAgF;AAChF,wFAAyF;AACzF,oEAAwE;AACxE,qFAI8C;AAC9C,qFAA4E;AAE5E,kBAAe,IAAI,0BAAe,CAAC,CAAC,IAAI,EAAE,EAAE;IAC1C,IAAI,CAAC,yDAAwB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC3D,IAAI,CAAC,gDAAmB,CAAC,CAAC,SAAS,CAAC,yDAAwB,CAAC,CAAC;IAC9D,IAAI,CAAC,8BAAiB,CAAC;SACpB,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE,CAC1B,IAAI,uCAAoB,CAAQ,8CAAiB,EAAE,GAAG,EAAE,CACtD,OAAO,CAAC,SAAS,CAAC,GAAG,CAAuB,gDAAmB,CAAC,CACjE,CACF;SACA,gBAAgB,EAAE,CAAC;AACxB,CAAC,CAAC,CAAC"}
|
{"version":3,"file":"gitzone-remote-backend-module.js","sourceRoot":"","sources":["../../src/node/gitzone-remote-backend-module.ts"],"names":[],"mappings":";;AAAA,4EAAgF;AAChF,wFAAyF;AACzF,kHAA2G;AAC3G,oEAAwE;AACxE,yGAAiG;AACjG,qFAI8C;AAC9C,qFAA4E;AAE5E,kBAAe,IAAI,0BAAe,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACpE,MAAM,iBAAiB,GAAG,OAAO,CAAC,uDAAwB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,uDAAwB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,uDAAwB,CAAC,CAAC;IAChI,iBAAiB,CAAC,EAAE,CAAC,sEAA+B,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACzE,IAAI,CAAC,yDAAwB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC3D,IAAI,CAAC,gDAAmB,CAAC,CAAC,SAAS,CAAC,yDAAwB,CAAC,CAAC;IAC9D,IAAI,CAAC,8BAAiB,CAAC;SACpB,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE,CAC1B,IAAI,uCAAoB,CAAQ,8CAAiB,EAAE,GAAG,EAAE,CACtD,OAAO,CAAC,SAAS,CAAC,GAAG,CAAuB,gDAAmB,CAAC,CACjE,CACF;SACA,gBAAgB,EAAE,CAAC;AACxB,CAAC,CAAC,CAAC"}
|
||||||
@@ -3,12 +3,14 @@ import { CommonMenus } from '@theia/core/lib/browser/common-menus.js';
|
|||||||
import { CommandContribution, CommandRegistry } from '@theia/core/lib/common/command.js';
|
import { CommandContribution, CommandRegistry } from '@theia/core/lib/common/command.js';
|
||||||
import { MenuContribution, MenuModelRegistry } from '@theia/core/lib/common/menu/menu-model-registry.js';
|
import { MenuContribution, MenuModelRegistry } from '@theia/core/lib/common/menu/menu-model-registry.js';
|
||||||
import { MessageService } from '@theia/core/lib/common/message-service.js';
|
import { MessageService } from '@theia/core/lib/common/message-service.js';
|
||||||
|
import { PreferenceConfigurations } from '@theia/core/lib/common/preferences/preference-configurations.js';
|
||||||
import { ContainerModule, inject, injectable } from '@theia/core/shared/inversify/index.js';
|
import { ContainerModule, inject, injectable } from '@theia/core/shared/inversify/index.js';
|
||||||
import {
|
import {
|
||||||
GitZoneRemoteServer,
|
GitZoneRemoteServer,
|
||||||
gitZoneRemotePath,
|
gitZoneRemotePath,
|
||||||
type IGitZoneRemoteServer,
|
type IGitZoneRemoteServer,
|
||||||
} from '../common/gitzone-remote-protocol.js';
|
} from '../common/gitzone-remote-protocol.js';
|
||||||
|
import { GitZonePreferenceConfigurations } from '../common/gitzone-preference-configurations.js';
|
||||||
|
|
||||||
export const GitZoneRemoteEnvironmentCommand = {
|
export const GitZoneRemoteEnvironmentCommand = {
|
||||||
id: 'gitzone.remote.environment',
|
id: 'gitzone.remote.environment',
|
||||||
@@ -40,7 +42,9 @@ export class GitZoneRemoteContribution implements CommandContribution, MenuContr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new ContainerModule((bind) => {
|
export default new ContainerModule((bind, _unbind, isBound, rebind) => {
|
||||||
|
const preferenceBinding = isBound(PreferenceConfigurations) ? rebind(PreferenceConfigurations) : bind(PreferenceConfigurations);
|
||||||
|
preferenceBinding.to(GitZonePreferenceConfigurations).inSingletonScope();
|
||||||
bind(GitZoneRemoteServer)
|
bind(GitZoneRemoteServer)
|
||||||
.toDynamicValue((context) =>
|
.toDynamicValue((context) =>
|
||||||
context.container
|
context.container
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { PreferenceConfigurations } from '@theia/core/lib/common/preferences/preference-configurations.js';
|
||||||
|
import { injectable } from '@theia/core/shared/inversify/index.js';
|
||||||
|
|
||||||
|
export const gitZoneWorkspacePreferenceFolder = '.git.zone/ide/workspace';
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class GitZonePreferenceConfigurations extends PreferenceConfigurations {
|
||||||
|
getPaths(): string[] {
|
||||||
|
return [gitZoneWorkspacePreferenceFolder, '.vscode'];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
import { ConnectionHandler } from '@theia/core/lib/common/messaging/handler.js';
|
import { ConnectionHandler } from '@theia/core/lib/common/messaging/handler.js';
|
||||||
import { RpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory.js';
|
import { RpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory.js';
|
||||||
|
import { PreferenceConfigurations } from '@theia/core/lib/common/preferences/preference-configurations.js';
|
||||||
import { ContainerModule } from '@theia/core/shared/inversify/index.js';
|
import { ContainerModule } from '@theia/core/shared/inversify/index.js';
|
||||||
|
import { GitZonePreferenceConfigurations } from '../common/gitzone-preference-configurations.js';
|
||||||
import {
|
import {
|
||||||
GitZoneRemoteServer,
|
GitZoneRemoteServer,
|
||||||
gitZoneRemotePath,
|
gitZoneRemotePath,
|
||||||
@@ -8,7 +10,9 @@ import {
|
|||||||
} from '../common/gitzone-remote-protocol.js';
|
} from '../common/gitzone-remote-protocol.js';
|
||||||
import { GitZoneRemoteNodeService } from './gitzone-remote-node-service.js';
|
import { GitZoneRemoteNodeService } from './gitzone-remote-node-service.js';
|
||||||
|
|
||||||
export default new ContainerModule((bind) => {
|
export default new ContainerModule((bind, _unbind, isBound, rebind) => {
|
||||||
|
const preferenceBinding = isBound(PreferenceConfigurations) ? rebind(PreferenceConfigurations) : bind(PreferenceConfigurations);
|
||||||
|
preferenceBinding.to(GitZonePreferenceConfigurations).inSingletonScope();
|
||||||
bind(GitZoneRemoteNodeService).toSelf().inSingletonScope();
|
bind(GitZoneRemoteNodeService).toSelf().inSingletonScope();
|
||||||
bind(GitZoneRemoteServer).toService(GitZoneRemoteNodeService);
|
bind(GitZoneRemoteServer).toService(GitZoneRemoteNodeService);
|
||||||
bind(ConnectionHandler)
|
bind(ConnectionHandler)
|
||||||
|
|||||||
Reference in New Issue
Block a user