@theia/workspace 1.68.0-next.34 → 1.68.0-next.48

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.
Files changed (26) hide show
  1. package/lib/browser/workspace-commands.d.ts +1 -0
  2. package/lib/browser/workspace-commands.d.ts.map +1 -1
  3. package/lib/browser/workspace-commands.js +5 -0
  4. package/lib/browser/workspace-commands.js.map +1 -1
  5. package/lib/browser/workspace-frontend-contribution.d.ts +5 -1
  6. package/lib/browser/workspace-frontend-contribution.d.ts.map +1 -1
  7. package/lib/browser/workspace-frontend-contribution.js +41 -0
  8. package/lib/browser/workspace-frontend-contribution.js.map +1 -1
  9. package/lib/browser/workspace-trust-service.d.ts +21 -1
  10. package/lib/browser/workspace-trust-service.d.ts.map +1 -1
  11. package/lib/browser/workspace-trust-service.js +179 -9
  12. package/lib/browser/workspace-trust-service.js.map +1 -1
  13. package/lib/browser/workspace-trust-service.spec.d.ts +2 -0
  14. package/lib/browser/workspace-trust-service.spec.d.ts.map +1 -0
  15. package/lib/browser/workspace-trust-service.spec.js +204 -0
  16. package/lib/browser/workspace-trust-service.spec.js.map +1 -0
  17. package/lib/common/workspace-trust-preferences.d.ts +2 -0
  18. package/lib/common/workspace-trust-preferences.d.ts.map +1 -1
  19. package/lib/common/workspace-trust-preferences.js +11 -1
  20. package/lib/common/workspace-trust-preferences.js.map +1 -1
  21. package/package.json +5 -5
  22. package/src/browser/workspace-commands.ts +5 -0
  23. package/src/browser/workspace-frontend-contribution.ts +43 -2
  24. package/src/browser/workspace-trust-service.spec.ts +259 -0
  25. package/src/browser/workspace-trust-service.ts +206 -13
  26. package/src/common/workspace-trust-preferences.ts +11 -0
@@ -21,6 +21,7 @@ import { interfaces } from '@theia/core/shared/inversify';
21
21
  export const WORKSPACE_TRUST_ENABLED = 'security.workspace.trust.enabled';
22
22
  export const WORKSPACE_TRUST_STARTUP_PROMPT = 'security.workspace.trust.startupPrompt';
23
23
  export const WORKSPACE_TRUST_EMPTY_WINDOW = 'security.workspace.trust.emptyWindow';
24
+ export const WORKSPACE_TRUST_TRUSTED_FOLDERS = 'security.workspace.trust.trustedFolders';
24
25
 
25
26
  export enum WorkspaceTrustPrompt {
26
27
  ALWAYS = 'always',
@@ -45,6 +46,15 @@ export const workspaceTrustPreferenceSchema: PreferenceSchema = {
45
46
  description: nls.localize('theia/workspace/trustEmptyWindow', 'Controls whether or not the empty workspace is trusted by default.'),
46
47
  type: 'boolean',
47
48
  default: true
49
+ },
50
+ [WORKSPACE_TRUST_TRUSTED_FOLDERS]: {
51
+ description: nls.localize('theia/workspace/trustTrustedFolders', 'List of folder URIs that are trusted without prompting.'),
52
+ type: 'array',
53
+ items: {
54
+ type: 'string'
55
+ },
56
+ default: [],
57
+ scope: PreferenceScope.User
48
58
  }
49
59
  }
50
60
  };
@@ -53,6 +63,7 @@ export interface WorkspaceTrustConfiguration {
53
63
  [WORKSPACE_TRUST_ENABLED]: boolean,
54
64
  [WORKSPACE_TRUST_STARTUP_PROMPT]: WorkspaceTrustPrompt;
55
65
  [WORKSPACE_TRUST_EMPTY_WINDOW]: boolean;
66
+ [WORKSPACE_TRUST_TRUSTED_FOLDERS]: string[];
56
67
  }
57
68
 
58
69
  export const WorkspaceTrustPreferenceContribution = Symbol('WorkspaceTrustPreferenceContribution');