@theia/variable-resolver 1.77.0-next.95 → 1.77.0
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/lib/browser/common-variable-contribution.d.ts +1 -1
- package/lib/browser/common-variable-contribution.d.ts.map +1 -1
- package/lib/browser/common-variable-contribution.js +35 -44
- package/lib/browser/common-variable-contribution.js.map +1 -1
- package/lib/browser/common-variable-contribution.spec.js +36 -39
- package/lib/browser/common-variable-contribution.spec.js.map +1 -1
- package/lib/browser/index.d.ts +3 -3
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +3 -6
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/variable-input-schema.js +1 -4
- package/lib/browser/variable-input-schema.js.map +1 -1
- package/lib/browser/variable-input.js +1 -2
- package/lib/browser/variable-quick-open-service.d.ts +2 -2
- package/lib/browser/variable-quick-open-service.d.ts.map +1 -1
- package/lib/browser/variable-quick-open-service.js +17 -24
- package/lib/browser/variable-quick-open-service.js.map +1 -1
- package/lib/browser/variable-resolver-frontend-contribution.d.ts +2 -2
- package/lib/browser/variable-resolver-frontend-contribution.d.ts.map +1 -1
- package/lib/browser/variable-resolver-frontend-contribution.js +14 -19
- package/lib/browser/variable-resolver-frontend-contribution.js.map +1 -1
- package/lib/browser/variable-resolver-frontend-contribution.spec.d.ts +1 -1
- package/lib/browser/variable-resolver-frontend-contribution.spec.d.ts.map +1 -1
- package/lib/browser/variable-resolver-frontend-contribution.spec.js +23 -28
- package/lib/browser/variable-resolver-frontend-contribution.spec.js.map +1 -1
- package/lib/browser/variable-resolver-frontend-module.js +18 -20
- package/lib/browser/variable-resolver-frontend-module.js.map +1 -1
- package/lib/browser/variable-resolver-service.d.ts +2 -2
- package/lib/browser/variable-resolver-service.d.ts.map +1 -1
- package/lib/browser/variable-resolver-service.js +12 -16
- package/lib/browser/variable-resolver-service.js.map +1 -1
- package/lib/browser/variable-resolver-service.spec.js +14 -17
- package/lib/browser/variable-resolver-service.spec.js.map +1 -1
- package/lib/browser/variable.d.ts +1 -1
- package/lib/browser/variable.d.ts.map +1 -1
- package/lib/browser/variable.js +12 -16
- package/lib/browser/variable.js.map +1 -1
- package/lib/browser/variable.spec.js +10 -13
- package/lib/browser/variable.spec.js.map +1 -1
- package/lib/common/variable-types.js +1 -2
- package/lib/common/variable-types.js.map +1 -1
- package/package.json +13 -4
- package/src/browser/common-variable-contribution.spec.ts +3 -3
- package/src/browser/common-variable-contribution.ts +4 -4
- package/src/browser/index.ts +3 -3
- package/src/browser/variable-quick-open-service.ts +2 -2
- package/src/browser/variable-resolver-frontend-contribution.spec.ts +3 -3
- package/src/browser/variable-resolver-frontend-contribution.ts +2 -2
- package/src/browser/variable-resolver-frontend-module.ts +5 -5
- package/src/browser/variable-resolver-service.spec.ts +2 -2
- package/src/browser/variable-resolver-service.ts +2 -2
- package/src/browser/variable.spec.ts +1 -1
- package/src/browser/variable.ts +1 -1
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { injectable, inject, optional } from '@theia/core/shared/inversify';
|
|
18
|
-
import { VariableContribution, VariableRegistry } from './variable';
|
|
18
|
+
import { VariableContribution, VariableRegistry } from './variable.js';
|
|
19
19
|
import { ApplicationServer } from '@theia/core/lib/common/application-protocol';
|
|
20
20
|
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
|
21
21
|
import { CommandService } from '@theia/core/lib/common/command';
|
|
22
22
|
import { OS } from '@theia/core/lib/common/os';
|
|
23
23
|
import { PreferenceService } from '@theia/core/lib/common/preferences/preference-service';
|
|
24
24
|
import { ResourceContextKey } from '@theia/core/lib/browser/resource-context-key';
|
|
25
|
-
import { VariableInput } from './variable-input';
|
|
25
|
+
import { VariableInput } from './variable-input.js';
|
|
26
26
|
import { QuickInputService, QuickPickValue } from '@theia/core/lib/browser';
|
|
27
27
|
import { MaybeArray, RecursivePartial } from '@theia/core/lib/common/types';
|
|
28
28
|
import { cancelled } from '@theia/core/lib/common/cancellation';
|
|
@@ -73,7 +73,7 @@ export class CommonVariableContribution implements VariableContribution {
|
|
|
73
73
|
if (!preferenceName) {
|
|
74
74
|
return undefined;
|
|
75
75
|
}
|
|
76
|
-
return this.preferences.get(preferenceName,
|
|
76
|
+
return this.preferences.get(preferenceName, { resource: resourceUri && resourceUri.toString() });
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
variables.registerVariable({
|
|
@@ -98,7 +98,7 @@ export class CommonVariableContribution implements VariableContribution {
|
|
|
98
98
|
if (!variable || !section) {
|
|
99
99
|
return undefined;
|
|
100
100
|
}
|
|
101
|
-
const configuration = this.preferences.get<RecursivePartial<{ inputs: MaybeArray<VariableInput> }>>(section,
|
|
101
|
+
const configuration = this.preferences.get<RecursivePartial<{ inputs: MaybeArray<VariableInput> }>>(section, { resource: resourceUri && resourceUri.toString() });
|
|
102
102
|
const inputs = !!configuration && 'inputs' in configuration ? configuration.inputs : undefined;
|
|
103
103
|
const input = Array.isArray(inputs) && inputs.find(item => !!item && item.id === variable);
|
|
104
104
|
if (!input) {
|
package/src/browser/index.ts
CHANGED
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
export * from './variable';
|
|
18
|
-
export * from './variable-quick-open-service';
|
|
19
|
-
export * from './variable-resolver-service';
|
|
17
|
+
export * from './variable.js';
|
|
18
|
+
export * from './variable-quick-open-service.js';
|
|
19
|
+
export * from './variable-resolver-service.js';
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
import { inject, injectable, optional } from '@theia/core/shared/inversify';
|
|
18
18
|
import { MessageService } from '@theia/core/lib/common/message-service';
|
|
19
|
-
import { VariableRegistry, Variable } from './variable';
|
|
20
|
-
import { VariableResolverService } from './variable-resolver-service';
|
|
19
|
+
import { VariableRegistry, Variable } from './variable.js';
|
|
20
|
+
import { VariableResolverService } from './variable-resolver-service.js';
|
|
21
21
|
import { QuickPickItem, QuickInputService } from '@theia/core/lib/browser';
|
|
22
22
|
|
|
23
23
|
@injectable()
|
|
@@ -25,9 +25,9 @@ import * as chai from 'chai';
|
|
|
25
25
|
import { Container, ContainerModule } from '@theia/core/shared/inversify';
|
|
26
26
|
import { ILogger, bindContributionProvider } from '@theia/core/lib/common';
|
|
27
27
|
import { MockLogger } from '@theia/core/lib/common/test/mock-logger';
|
|
28
|
-
import { VariableContribution, VariableRegistry } from './variable';
|
|
29
|
-
import { VariableQuickOpenService } from './variable-quick-open-service';
|
|
30
|
-
import { VariableResolverFrontendContribution } from './variable-resolver-frontend-contribution';
|
|
28
|
+
import { VariableContribution, VariableRegistry } from './variable.js';
|
|
29
|
+
import { VariableQuickOpenService } from './variable-quick-open-service.js';
|
|
30
|
+
import { VariableResolverFrontendContribution } from './variable-resolver-frontend-contribution.js';
|
|
31
31
|
|
|
32
32
|
disableJSDOM();
|
|
33
33
|
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
|
18
18
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
|
|
19
19
|
import { Command, CommandContribution, CommandRegistry, ContributionProvider } from '@theia/core/lib/common';
|
|
20
|
-
import { VariableContribution, VariableRegistry } from './variable';
|
|
21
|
-
import { VariableQuickOpenService } from './variable-quick-open-service';
|
|
20
|
+
import { VariableContribution, VariableRegistry } from './variable.js';
|
|
21
|
+
import { VariableQuickOpenService } from './variable-quick-open-service.js';
|
|
22
22
|
|
|
23
23
|
export const LIST_VARIABLES: Command = Command.toLocalizedCommand({
|
|
24
24
|
id: 'variable.list',
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
18
18
|
import { bindRootContributionProvider, CommandContribution } from '@theia/core';
|
|
19
19
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
|
|
20
|
-
import { VariableRegistry, VariableContribution } from './variable';
|
|
21
|
-
import { VariableQuickOpenService } from './variable-quick-open-service';
|
|
22
|
-
import { VariableResolverFrontendContribution } from './variable-resolver-frontend-contribution';
|
|
23
|
-
import { VariableResolverService } from './variable-resolver-service';
|
|
24
|
-
import { CommonVariableContribution } from './common-variable-contribution';
|
|
20
|
+
import { VariableRegistry, VariableContribution } from './variable.js';
|
|
21
|
+
import { VariableQuickOpenService } from './variable-quick-open-service.js';
|
|
22
|
+
import { VariableResolverFrontendContribution } from './variable-resolver-frontend-contribution.js';
|
|
23
|
+
import { VariableResolverService } from './variable-resolver-service.js';
|
|
24
|
+
import { CommonVariableContribution } from './common-variable-contribution.js';
|
|
25
25
|
|
|
26
26
|
export default new ContainerModule(bind => {
|
|
27
27
|
bind(VariableRegistry).toSelf().inSingletonScope();
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
import * as chai from 'chai';
|
|
18
18
|
import { Container } from '@theia/core/shared/inversify';
|
|
19
19
|
import { cancelled } from '@theia/core/lib/common';
|
|
20
|
-
import { VariableRegistry } from './variable';
|
|
21
|
-
import { VariableResolverService } from './variable-resolver-service';
|
|
20
|
+
import { VariableRegistry } from './variable.js';
|
|
21
|
+
import { VariableResolverService } from './variable-resolver-service.js';
|
|
22
22
|
import { ILogger } from '@theia/core';
|
|
23
23
|
import { MockLogger } from '@theia/core/lib/common/test/mock-logger';
|
|
24
24
|
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
18
18
|
|
|
19
19
|
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
20
|
-
import { VariableRegistry } from './variable';
|
|
20
|
+
import { VariableRegistry } from './variable.js';
|
|
21
21
|
import URI from '@theia/core/lib/common/uri';
|
|
22
|
-
import { CommandIdVariables } from '../common/variable-types';
|
|
22
|
+
import { CommandIdVariables } from '../common/variable-types.js';
|
|
23
23
|
import { isCancelled } from '@theia/core';
|
|
24
24
|
|
|
25
25
|
export interface VariableResolveOptions {
|
|
@@ -18,7 +18,7 @@ import * as chai from 'chai';
|
|
|
18
18
|
import { Container, ContainerModule } from '@theia/core/shared/inversify';
|
|
19
19
|
import { ILogger, Disposable } from '@theia/core/lib/common';
|
|
20
20
|
import { MockLogger } from '@theia/core/lib/common/test/mock-logger';
|
|
21
|
-
import { Variable, VariableRegistry } from './variable';
|
|
21
|
+
import { Variable, VariableRegistry } from './variable.js';
|
|
22
22
|
|
|
23
23
|
const expect = chai.expect;
|
|
24
24
|
let variableRegistry: VariableRegistry;
|
package/src/browser/variable.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
|
18
18
|
import { Disposable, DisposableCollection, MaybePromise, ILogger } from '@theia/core';
|
|
19
19
|
import URI from '@theia/core/lib/common/uri';
|
|
20
|
-
import { CommandIdVariables } from '../common/variable-types';
|
|
20
|
+
import { CommandIdVariables } from '../common/variable-types.js';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Variable can be used inside of strings using ${variableName} syntax.
|