Commit c68c13c0 authored by Tim van der Lippe's avatar Tim van der Lippe Committed by Commit Bot

Migrate persistence/ to ESM

- Rename Persistence.js to PersistenceImpl to avoid a name clash with
the namespace

Bug: 1006759
Change-Id: I330bd680c8a92984c4a75a0614efa78b4f1e1ea2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845715
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: default avatarPaul Lewis <aerotwist@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704200}
parent f19b3bfa
...@@ -466,20 +466,9 @@ if (!external_devtools_frontend) { ...@@ -466,20 +466,9 @@ if (!external_devtools_frontend) {
"front_end/performance_test_runner/module.json", "front_end/performance_test_runner/module.json",
"front_end/performance_test_runner/TimelineDataTestRunner.js", "front_end/performance_test_runner/TimelineDataTestRunner.js",
"front_end/performance_test_runner/TimelineTestRunner.js", "front_end/performance_test_runner/TimelineTestRunner.js",
"front_end/persistence/Automapping.js",
"front_end/persistence/editFileSystemView.css", "front_end/persistence/editFileSystemView.css",
"front_end/persistence/EditFileSystemView.js",
"front_end/persistence/FileSystemWorkspaceBinding.js",
"front_end/persistence/IsolatedFileSystem.js",
"front_end/persistence/IsolatedFileSystemManager.js",
"front_end/persistence/module.json", "front_end/persistence/module.json",
"front_end/persistence/NetworkPersistenceManager.js",
"front_end/persistence/Persistence.js",
"front_end/persistence/PersistenceActions.js",
"front_end/persistence/PersistenceUtils.js",
"front_end/persistence/PlatformFileSystem.js",
"front_end/persistence/workspaceSettingsTab.css", "front_end/persistence/workspaceSettingsTab.css",
"front_end/persistence/WorkspaceSettingsTab.js",
"front_end/platform/module.json", "front_end/platform/module.json",
"front_end/product_registry/BadgePool.js", "front_end/product_registry/BadgePool.js",
"front_end/product_registry/ProductRegistry.js", "front_end/product_registry/ProductRegistry.js",
...@@ -832,6 +821,18 @@ if (!external_devtools_frontend) { ...@@ -832,6 +821,18 @@ if (!external_devtools_frontend) {
all_devtools_files += lighthouse_locale_files all_devtools_files += lighthouse_locale_files
all_devtools_modules = [ all_devtools_modules = [
"front_end/persistence/persistence.js",
"front_end/persistence/WorkspaceSettingsTab.js",
"front_end/persistence/PlatformFileSystem.js",
"front_end/persistence/PersistenceUtils.js",
"front_end/persistence/PersistenceImpl.js",
"front_end/persistence/PersistenceActions.js",
"front_end/persistence/NetworkPersistenceManager.js",
"front_end/persistence/IsolatedFileSystemManager.js",
"front_end/persistence/IsolatedFileSystem.js",
"front_end/persistence/FileSystemWorkspaceBinding.js",
"front_end/persistence/EditFileSystemView.js",
"front_end/persistence/Automapping.js",
"front_end/components/components.js", "front_end/components/components.js",
"front_end/components/TargetDetachedDialog.js", "front_end/components/TargetDetachedDialog.js",
"front_end/components/Reload.js", "front_end/components/Reload.js",
...@@ -1208,6 +1209,18 @@ if (!external_devtools_frontend) { ...@@ -1208,6 +1209,18 @@ if (!external_devtools_frontend) {
] ]
copied_devtools_modules = [ copied_devtools_modules = [
"$resources_out_dir/persistence/persistence.js",
"$resources_out_dir/persistence/WorkspaceSettingsTab.js",
"$resources_out_dir/persistence/PlatformFileSystem.js",
"$resources_out_dir/persistence/PersistenceUtils.js",
"$resources_out_dir/persistence/PersistenceImpl.js",
"$resources_out_dir/persistence/PersistenceActions.js",
"$resources_out_dir/persistence/NetworkPersistenceManager.js",
"$resources_out_dir/persistence/IsolatedFileSystemManager.js",
"$resources_out_dir/persistence/IsolatedFileSystem.js",
"$resources_out_dir/persistence/FileSystemWorkspaceBinding.js",
"$resources_out_dir/persistence/EditFileSystemView.js",
"$resources_out_dir/persistence/Automapping.js",
"$resources_out_dir/components/components.js", "$resources_out_dir/components/components.js",
"$resources_out_dir/components/TargetDetachedDialog.js", "$resources_out_dir/components/TargetDetachedDialog.js",
"$resources_out_dir/components/Reload.js", "$resources_out_dir/components/Reload.js",
......
...@@ -2,18 +2,18 @@ ...@@ -2,18 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
Persistence.Automapping = class { export default class Automapping {
/** /**
* @param {!Workspace.Workspace} workspace * @param {!Workspace.Workspace} workspace
* @param {function(!Persistence.AutomappingStatus)} onStatusAdded * @param {function(!AutomappingStatus)} onStatusAdded
* @param {function(!Persistence.AutomappingStatus)} onStatusRemoved * @param {function(!AutomappingStatus)} onStatusRemoved
*/ */
constructor(workspace, onStatusAdded, onStatusRemoved) { constructor(workspace, onStatusAdded, onStatusRemoved) {
this._workspace = workspace; this._workspace = workspace;
this._onStatusAdded = onStatusAdded; this._onStatusAdded = onStatusAdded;
this._onStatusRemoved = onStatusRemoved; this._onStatusRemoved = onStatusRemoved;
/** @type {!Set<!Persistence.AutomappingStatus>} */ /** @type {!Set<!AutomappingStatus>} */
this._statuses = new Set(); this._statuses = new Set();
this._statusSymbol = Symbol('Automapping.Status'); this._statusSymbol = Symbol('Automapping.Status');
this._processingPromiseSymbol = Symbol('Automapping.ProcessingPromise'); this._processingPromiseSymbol = Symbol('Automapping.ProcessingPromise');
...@@ -25,9 +25,9 @@ Persistence.Automapping = class { ...@@ -25,9 +25,9 @@ Persistence.Automapping = class {
this._sweepThrottler = new Common.Throttler(100); this._sweepThrottler = new Common.Throttler(100);
const pathEncoder = new Persistence.PathEncoder(); const pathEncoder = new Persistence.PathEncoder();
this._filesIndex = new Persistence.Automapping.FilePathIndex(pathEncoder); this._filesIndex = new FilePathIndex(pathEncoder);
this._projectFoldersIndex = new Persistence.Automapping.FolderIndex(pathEncoder); this._projectFoldersIndex = new FolderIndex(pathEncoder);
this._activeFoldersIndex = new Persistence.Automapping.FolderIndex(pathEncoder); this._activeFoldersIndex = new FolderIndex(pathEncoder);
/** @type {!Array<function(!Workspace.UISourceCode):boolean>} */ /** @type {!Array<function(!Workspace.UISourceCode):boolean>} */
this._interceptors = []; this._interceptors = [];
...@@ -73,7 +73,7 @@ Persistence.Automapping = class { ...@@ -73,7 +73,7 @@ Persistence.Automapping = class {
this._sweepThrottler.schedule(sweepUnmapped.bind(this)); this._sweepThrottler.schedule(sweepUnmapped.bind(this));
/** /**
* @this {Persistence.Automapping} * @this {Automapping}
* @return {!Promise} * @return {!Promise}
*/ */
function sweepUnmapped() { function sweepUnmapped() {
...@@ -198,9 +198,9 @@ Persistence.Automapping = class { ...@@ -198,9 +198,9 @@ Persistence.Automapping = class {
networkSourceCode[this._processingPromiseSymbol] = createBindingPromise; networkSourceCode[this._processingPromiseSymbol] = createBindingPromise;
/** /**
* @param {?Persistence.AutomappingStatus} status * @param {?AutomappingStatus} status
* @return {!Promise<?Persistence.AutomappingStatus>} * @return {!Promise<?AutomappingStatus>}
* @this {Persistence.Automapping} * @this {Automapping}
*/ */
async function validateStatus(status) { async function validateStatus(status) {
if (!status) { if (!status) {
...@@ -266,8 +266,8 @@ Persistence.Automapping = class { ...@@ -266,8 +266,8 @@ Persistence.Automapping = class {
} }
/** /**
* @param {?Persistence.AutomappingStatus} status * @param {?AutomappingStatus} status
* @this {Persistence.Automapping} * @this {Automapping}
*/ */
function onStatus(status) { function onStatus(status) {
if (networkSourceCode[this._processingPromiseSymbol] !== createBindingPromise) { if (networkSourceCode[this._processingPromiseSymbol] !== createBindingPromise) {
...@@ -298,7 +298,7 @@ Persistence.Automapping = class { ...@@ -298,7 +298,7 @@ Persistence.Automapping = class {
} }
/** /**
* @param {!Persistence.AutomappingStatus} binding * @param {!AutomappingStatus} binding
*/ */
_prevalidationFailedForTest(binding) { _prevalidationFailedForTest(binding) {
} }
...@@ -333,20 +333,19 @@ Persistence.Automapping = class { ...@@ -333,20 +333,19 @@ Persistence.Automapping = class {
/** /**
* @param {!Workspace.UISourceCode} networkSourceCode * @param {!Workspace.UISourceCode} networkSourceCode
* @return {!Promise<?Persistence.AutomappingStatus>} * @return {!Promise<?AutomappingStatus>}
*/ */
_createBinding(networkSourceCode) { _createBinding(networkSourceCode) {
if (networkSourceCode.url().startsWith('file://') || networkSourceCode.url().startsWith('snippet://')) { if (networkSourceCode.url().startsWith('file://') || networkSourceCode.url().startsWith('snippet://')) {
const decodedUrl = decodeURI(networkSourceCode.url()); const decodedUrl = decodeURI(networkSourceCode.url());
const fileSourceCode = this._fileSystemUISourceCodes.get(decodedUrl); const fileSourceCode = this._fileSystemUISourceCodes.get(decodedUrl);
const status = const status = fileSourceCode ? new AutomappingStatus(networkSourceCode, fileSourceCode, false) : null;
fileSourceCode ? new Persistence.AutomappingStatus(networkSourceCode, fileSourceCode, false) : null;
return Promise.resolve(status); return Promise.resolve(status);
} }
let networkPath = Common.ParsedURL.extractPath(networkSourceCode.url()); let networkPath = Common.ParsedURL.extractPath(networkSourceCode.url());
if (networkPath === null) { if (networkPath === null) {
return Promise.resolve(/** @type {?Persistence.AutomappingStatus} */ (null)); return Promise.resolve(/** @type {?AutomappingStatus} */ (null));
} }
if (networkPath.endsWith('/')) { if (networkPath.endsWith('/')) {
...@@ -356,13 +355,13 @@ Persistence.Automapping = class { ...@@ -356,13 +355,13 @@ Persistence.Automapping = class {
const similarFiles = const similarFiles =
this._filesIndex.similarFiles(urlDecodedNetworkPath).map(path => this._fileSystemUISourceCodes.get(path)); this._filesIndex.similarFiles(urlDecodedNetworkPath).map(path => this._fileSystemUISourceCodes.get(path));
if (!similarFiles.length) { if (!similarFiles.length) {
return Promise.resolve(/** @type {?Persistence.AutomappingStatus} */ (null)); return Promise.resolve(/** @type {?AutomappingStatus} */ (null));
} }
return this._pullMetadatas(similarFiles.concat(networkSourceCode)).then(onMetadatas.bind(this)); return this._pullMetadatas(similarFiles.concat(networkSourceCode)).then(onMetadatas.bind(this));
/** /**
* @this {Persistence.Automapping} * @this {Automapping}
*/ */
function onMetadatas() { function onMetadatas() {
const activeFiles = similarFiles.filter(file => !!this._activeFoldersIndex.closestParentFolder(file.url())); const activeFiles = similarFiles.filter(file => !!this._activeFoldersIndex.closestParentFolder(file.url()));
...@@ -372,7 +371,7 @@ Persistence.Automapping = class { ...@@ -372,7 +371,7 @@ Persistence.Automapping = class {
if (activeFiles.length !== 1) { if (activeFiles.length !== 1) {
return null; return null;
} }
return new Persistence.AutomappingStatus(networkSourceCode, activeFiles[0], false); return new AutomappingStatus(networkSourceCode, activeFiles[0], false);
} }
// Try to find exact matches, prioritizing active folders. // Try to find exact matches, prioritizing active folders.
...@@ -383,7 +382,7 @@ Persistence.Automapping = class { ...@@ -383,7 +382,7 @@ Persistence.Automapping = class {
if (exactMatches.length !== 1) { if (exactMatches.length !== 1) {
return null; return null;
} }
return new Persistence.AutomappingStatus(networkSourceCode, exactMatches[0], true); return new AutomappingStatus(networkSourceCode, exactMatches[0], true);
} }
} }
...@@ -415,12 +414,12 @@ Persistence.Automapping = class { ...@@ -415,12 +414,12 @@ Persistence.Automapping = class {
return timeMatches && contentMatches; return timeMatches && contentMatches;
}); });
} }
}; }
/** /**
* @unrestricted * @unrestricted
*/ */
Persistence.Automapping.FilePathIndex = class { export class FilePathIndex {
/** /**
* @param {!Persistence.PathEncoder} encoder * @param {!Persistence.PathEncoder} encoder
*/ */
...@@ -458,12 +457,12 @@ Persistence.Automapping.FilePathIndex = class { ...@@ -458,12 +457,12 @@ Persistence.Automapping.FilePathIndex = class {
return this._reversedIndex.words(longestCommonPrefix) return this._reversedIndex.words(longestCommonPrefix)
.map(encodedPath => this._encoder.decode(encodedPath.reverse())); .map(encodedPath => this._encoder.decode(encodedPath.reverse()));
} }
}; }
/** /**
* @unrestricted * @unrestricted
*/ */
Persistence.Automapping.FolderIndex = class { export class FolderIndex {
/** /**
* @param {!Persistence.PathEncoder} encoder * @param {!Persistence.PathEncoder} encoder
*/ */
...@@ -520,12 +519,12 @@ Persistence.Automapping.FolderIndex = class { ...@@ -520,12 +519,12 @@ Persistence.Automapping.FolderIndex = class {
const commonPrefix = this._index.longestPrefix(encodedPath, true); const commonPrefix = this._index.longestPrefix(encodedPath, true);
return this._encoder.decode(commonPrefix); return this._encoder.decode(commonPrefix);
} }
}; }
/** /**
* @unrestricted * @unrestricted
*/ */
Persistence.AutomappingStatus = class { export class AutomappingStatus {
/** /**
* @param {!Workspace.UISourceCode} network * @param {!Workspace.UISourceCode} network
* @param {!Workspace.UISourceCode} fileSystem * @param {!Workspace.UISourceCode} fileSystem
...@@ -536,4 +535,22 @@ Persistence.AutomappingStatus = class { ...@@ -536,4 +535,22 @@ Persistence.AutomappingStatus = class {
this.fileSystem = fileSystem; this.fileSystem = fileSystem;
this.exactMatch = exactMatch; this.exactMatch = exactMatch;
} }
}; }
/* Legacy exported object */
self.Persistence = self.Persistence || {};
/* Legacy exported object */
Persistence = Persistence || {};
/** @constructor */
Persistence.Automapping = Automapping;
/** @constructor */
Persistence.Automapping.FilePathIndex = FilePathIndex;
/** @constructor */
Persistence.Automapping.FolderIndex = FolderIndex;
/** @constructor */
Persistence.AutomappingStatus = AutomappingStatus;
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* @implements {UI.ListWidget.Delegate} * @implements {UI.ListWidget.Delegate}
* @unrestricted * @unrestricted
*/ */
Persistence.EditFileSystemView = class extends UI.VBox { export default class EditFileSystemView extends UI.VBox {
/** /**
* @param {string} fileSystemPath * @param {string} fileSystemPath
*/ */
...@@ -166,7 +166,7 @@ Persistence.EditFileSystemView = class extends UI.VBox { ...@@ -166,7 +166,7 @@ Persistence.EditFileSystemView = class extends UI.VBox {
* @param {number} index * @param {number} index
* @param {!HTMLInputElement|!HTMLSelectElement} input * @param {!HTMLInputElement|!HTMLSelectElement} input
* @return {!UI.ListWidget.ValidatorResult} * @return {!UI.ListWidget.ValidatorResult}
* @this {Persistence.EditFileSystemView} * @this {EditFileSystemView}
*/ */
function pathPrefixValidator(item, index, input) { function pathPrefixValidator(item, index, input) {
const prefix = this._normalizePrefix(input.value.trim()); const prefix = this._normalizePrefix(input.value.trim());
...@@ -196,4 +196,13 @@ Persistence.EditFileSystemView = class extends UI.VBox { ...@@ -196,4 +196,13 @@ Persistence.EditFileSystemView = class extends UI.VBox {
} }
return prefix + (prefix[prefix.length - 1] === '/' ? '' : '/'); return prefix + (prefix[prefix.length - 1] === '/' ? '' : '/');
} }
}; }
/* Legacy exported object */
self.Persistence = self.Persistence || {};
/* Legacy exported object */
Persistence = Persistence || {};
/** @constructor */
Persistence.EditFileSystemView = EditFileSystemView;
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
/** /**
* @unrestricted * @unrestricted
*/ */
Persistence.FileSystemWorkspaceBinding = class { export default class FileSystemWorkspaceBinding {
/** /**
* @param {!Persistence.IsolatedFileSystemManager} isolatedFileSystemManager * @param {!Persistence.IsolatedFileSystemManager} isolatedFileSystemManager
* @param {!Workspace.Workspace} workspace * @param {!Workspace.Workspace} workspace
...@@ -47,7 +47,7 @@ Persistence.FileSystemWorkspaceBinding = class { ...@@ -47,7 +47,7 @@ Persistence.FileSystemWorkspaceBinding = class {
this._isolatedFileSystemManager.addEventListener( this._isolatedFileSystemManager.addEventListener(
Persistence.IsolatedFileSystemManager.Events.FileSystemFilesChanged, this._fileSystemFilesChanged, this) Persistence.IsolatedFileSystemManager.Events.FileSystemFilesChanged, this._fileSystemFilesChanged, this)
]; ];
/** @type {!Map.<string, !Persistence.FileSystemWorkspaceBinding.FileSystem>} */ /** @type {!Map.<string, !FileSystem>} */
this._boundFileSystems = new Map(); this._boundFileSystems = new Map();
this._isolatedFileSystemManager.waitForFileSystems().then(this._onFileSystemsLoaded.bind(this)); this._isolatedFileSystemManager.waitForFileSystems().then(this._onFileSystemsLoaded.bind(this));
} }
...@@ -66,7 +66,7 @@ Persistence.FileSystemWorkspaceBinding = class { ...@@ -66,7 +66,7 @@ Persistence.FileSystemWorkspaceBinding = class {
*/ */
static relativePath(uiSourceCode) { static relativePath(uiSourceCode) {
const baseURL = const baseURL =
/** @type {!Persistence.FileSystemWorkspaceBinding.FileSystem}*/ (uiSourceCode.project())._fileSystemBaseURL; /** @type {!FileSystem}*/ (uiSourceCode.project())._fileSystemBaseURL;
return uiSourceCode.url().substring(baseURL.length).split('/'); return uiSourceCode.url().substring(baseURL.length).split('/');
} }
...@@ -76,7 +76,7 @@ Persistence.FileSystemWorkspaceBinding = class { ...@@ -76,7 +76,7 @@ Persistence.FileSystemWorkspaceBinding = class {
*/ */
static tooltipForUISourceCode(uiSourceCode) { static tooltipForUISourceCode(uiSourceCode) {
const fileSystem = const fileSystem =
/** @type {!Persistence.FileSystemWorkspaceBinding.FileSystem}*/ (uiSourceCode.project())._fileSystem; /** @type {!FileSystem}*/ (uiSourceCode.project())._fileSystem;
return fileSystem.tooltipForURL(uiSourceCode.url()); return fileSystem.tooltipForURL(uiSourceCode.url());
} }
...@@ -86,7 +86,7 @@ Persistence.FileSystemWorkspaceBinding = class { ...@@ -86,7 +86,7 @@ Persistence.FileSystemWorkspaceBinding = class {
*/ */
static fileSystemType(project) { static fileSystemType(project) {
const fileSystem = const fileSystem =
/** @type {!Persistence.FileSystemWorkspaceBinding.FileSystem}*/ (project)._fileSystem; /** @type {!FileSystem}*/ (project)._fileSystem;
return fileSystem.type(); return fileSystem.type();
} }
...@@ -96,7 +96,7 @@ Persistence.FileSystemWorkspaceBinding = class { ...@@ -96,7 +96,7 @@ Persistence.FileSystemWorkspaceBinding = class {
*/ */
static fileSystemSupportsAutomapping(project) { static fileSystemSupportsAutomapping(project) {
const fileSystem = const fileSystem =
/** @type {!Persistence.FileSystemWorkspaceBinding.FileSystem}*/ (project)._fileSystem; /** @type {!FileSystem}*/ (project)._fileSystem;
return fileSystem.supportsAutomapping(); return fileSystem.supportsAutomapping();
} }
...@@ -106,7 +106,7 @@ Persistence.FileSystemWorkspaceBinding = class { ...@@ -106,7 +106,7 @@ Persistence.FileSystemWorkspaceBinding = class {
* @return {string} * @return {string}
*/ */
static completeURL(project, relativePath) { static completeURL(project, relativePath) {
const fsProject = /** @type {!Persistence.FileSystemWorkspaceBinding.FileSystem}*/ (project); const fsProject = /** @type {!FileSystem}*/ (project);
return fsProject._fileSystemBaseURL + relativePath; return fsProject._fileSystemBaseURL + relativePath;
} }
...@@ -146,7 +146,7 @@ Persistence.FileSystemWorkspaceBinding = class { ...@@ -146,7 +146,7 @@ Persistence.FileSystemWorkspaceBinding = class {
* @param {!Persistence.PlatformFileSystem} fileSystem * @param {!Persistence.PlatformFileSystem} fileSystem
*/ */
_addFileSystem(fileSystem) { _addFileSystem(fileSystem) {
const boundFileSystem = new Persistence.FileSystemWorkspaceBinding.FileSystem(this, fileSystem, this._workspace); const boundFileSystem = new FileSystem(this, fileSystem, this._workspace);
this._boundFileSystems.set(fileSystem.path(), boundFileSystem); this._boundFileSystems.set(fileSystem.path(), boundFileSystem);
} }
...@@ -197,21 +197,21 @@ Persistence.FileSystemWorkspaceBinding = class { ...@@ -197,21 +197,21 @@ Persistence.FileSystemWorkspaceBinding = class {
this._boundFileSystems.remove(fileSystem._fileSystem.path()); this._boundFileSystems.remove(fileSystem._fileSystem.path());
} }
} }
}; }
/** /**
* @implements {Workspace.Project} * @implements {Workspace.Project}
* @unrestricted * @unrestricted
*/ */
Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.ProjectStore { export class FileSystem extends Workspace.ProjectStore {
/** /**
* @param {!Persistence.FileSystemWorkspaceBinding} fileSystemWorkspaceBinding * @param {!FileSystemWorkspaceBinding} fileSystemWorkspaceBinding
* @param {!Persistence.PlatformFileSystem} isolatedFileSystem * @param {!Persistence.PlatformFileSystem} isolatedFileSystem
* @param {!Workspace.Workspace} workspace * @param {!Workspace.Workspace} workspace
*/ */
constructor(fileSystemWorkspaceBinding, isolatedFileSystem, workspace) { constructor(fileSystemWorkspaceBinding, isolatedFileSystem, workspace) {
const fileSystemPath = isolatedFileSystem.path(); const fileSystemPath = isolatedFileSystem.path();
const id = Persistence.FileSystemWorkspaceBinding.projectId(fileSystemPath); const id = FileSystemWorkspaceBinding.projectId(fileSystemPath);
console.assert(!workspace.project(id)); console.assert(!workspace.project(id));
const displayName = fileSystemPath.substr(fileSystemPath.lastIndexOf('/') + 1); const displayName = fileSystemPath.substr(fileSystemPath.lastIndexOf('/') + 1);
...@@ -274,12 +274,12 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj ...@@ -274,12 +274,12 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj
* @return {!Promise<?Workspace.UISourceCodeMetadata>} * @return {!Promise<?Workspace.UISourceCodeMetadata>}
*/ */
requestMetadata(uiSourceCode) { requestMetadata(uiSourceCode) {
if (uiSourceCode[Persistence.FileSystemWorkspaceBinding._metadata]) { if (uiSourceCode[_metadata]) {
return uiSourceCode[Persistence.FileSystemWorkspaceBinding._metadata]; return uiSourceCode[_metadata];
} }
const relativePath = this._filePathForUISourceCode(uiSourceCode); const relativePath = this._filePathForUISourceCode(uiSourceCode);
const promise = this._fileSystem.getMetadata(relativePath).then(onMetadata); const promise = this._fileSystem.getMetadata(relativePath).then(onMetadata);
uiSourceCode[Persistence.FileSystemWorkspaceBinding._metadata] = promise; uiSourceCode[_metadata] = promise;
return promise; return promise;
/** /**
...@@ -339,7 +339,7 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj ...@@ -339,7 +339,7 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj
*/ */
fullDisplayName(uiSourceCode) { fullDisplayName(uiSourceCode) {
const baseURL = const baseURL =
/** @type {!Persistence.FileSystemWorkspaceBinding.FileSystem}*/ (uiSourceCode.project())._fileSystemParentURL; /** @type {!FileSystem}*/ (uiSourceCode.project())._fileSystemParentURL;
return uiSourceCode.url().substring(baseURL.length); return uiSourceCode.url().substring(baseURL.length);
} }
...@@ -369,7 +369,7 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj ...@@ -369,7 +369,7 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj
/** /**
* @param {boolean} success * @param {boolean} success
* @param {string=} newName * @param {string=} newName
* @this {Persistence.FileSystemWorkspaceBinding.FileSystem} * @this {FileSystem}
*/ */
function innerCallback(success, newName) { function innerCallback(success, newName) {
if (!success || !newName) { if (!success || !newName) {
...@@ -450,7 +450,7 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj ...@@ -450,7 +450,7 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj
/** /**
* @param {number} from * @param {number} from
* @this {Persistence.FileSystemWorkspaceBinding.FileSystem} * @this {FileSystem}
*/ */
function reportFileChunk(from) { function reportFileChunk(from) {
const to = Math.min(from + chunkSize, filePaths.length); const to = Math.min(from + chunkSize, filePaths.length);
...@@ -569,7 +569,7 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj ...@@ -569,7 +569,7 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj
this.addUISourceCode(this.createUISourceCode(path, contentType)); this.addUISourceCode(this.createUISourceCode(path, contentType));
return; return;
} }
uiSourceCode[Persistence.FileSystemWorkspaceBinding._metadata] = null; uiSourceCode[_metadata] = null;
uiSourceCode.checkContentUpdated(); uiSourceCode.checkContentUpdated();
} }
...@@ -584,6 +584,20 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj ...@@ -584,6 +584,20 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj
dispose() { dispose() {
this.removeProject(); this.removeProject();
} }
}; }
Persistence.FileSystemWorkspaceBinding._metadata = Symbol('FileSystemWorkspaceBinding.Metadata'); export const _metadata = Symbol('FileSystemWorkspaceBinding.Metadata');
/* Legacy exported object */
self.Persistence = self.Persistence || {};
/* Legacy exported object */
Persistence = Persistence || {};
/** @constructor */
Persistence.FileSystemWorkspaceBinding = FileSystemWorkspaceBinding;
/** @constructor */
Persistence.FileSystemWorkspaceBinding.FileSystem = FileSystem;
Persistence.FileSystemWorkspaceBinding._metadata = _metadata;
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
/** /**
* @unrestricted * @unrestricted
*/ */
Persistence.IsolatedFileSystemManager = class extends Common.Object { export default class IsolatedFileSystemManager extends Common.Object {
constructor() { constructor() {
super(); super();
...@@ -77,7 +77,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object { ...@@ -77,7 +77,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object {
/** /**
* @param {!Common.Event} event * @param {!Common.Event} event
* @this {Persistence.IsolatedFileSystemManager} * @this {IsolatedFileSystemManager}
*/ */
function onFileSystemsLoaded(event) { function onFileSystemsLoaded(event) {
const fileSystems = /** @type {!Array.<!Persistence.IsolatedFileSystemManager.FileSystem>} */ (event.data); const fileSystems = /** @type {!Array.<!Persistence.IsolatedFileSystemManager.FileSystem>} */ (event.data);
...@@ -135,7 +135,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object { ...@@ -135,7 +135,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object {
/** /**
* @param {?Persistence.PlatformFileSystem} fileSystem * @param {?Persistence.PlatformFileSystem} fileSystem
* @this {Persistence.IsolatedFileSystemManager} * @this {IsolatedFileSystemManager}
*/ */
function storeFileSystem(fileSystem) { function storeFileSystem(fileSystem) {
if (!fileSystem) { if (!fileSystem) {
...@@ -143,7 +143,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object { ...@@ -143,7 +143,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object {
} }
this._fileSystems.set(fileSystemURL, fileSystem); this._fileSystems.set(fileSystemURL, fileSystem);
if (dispatchEvent) { if (dispatchEvent) {
this.dispatchEventToListeners(Persistence.IsolatedFileSystemManager.Events.FileSystemAdded, fileSystem); this.dispatchEventToListeners(Events.FileSystemAdded, fileSystem);
} }
return fileSystem; return fileSystem;
} }
...@@ -155,7 +155,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object { ...@@ -155,7 +155,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object {
*/ */
addPlatformFileSystem(fileSystemURL, fileSystem) { addPlatformFileSystem(fileSystemURL, fileSystem) {
this._fileSystems.set(fileSystemURL, fileSystem); this._fileSystems.set(fileSystemURL, fileSystem);
this.dispatchEventToListeners(Persistence.IsolatedFileSystemManager.Events.FileSystemAdded, fileSystem); this.dispatchEventToListeners(Events.FileSystemAdded, fileSystem);
} }
/** /**
...@@ -192,7 +192,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object { ...@@ -192,7 +192,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object {
} }
this._fileSystems.delete(fileSystemPath); this._fileSystems.delete(fileSystemPath);
isolatedFileSystem.fileSystemRemoved(); isolatedFileSystem.fileSystemRemoved();
this.dispatchEventToListeners(Persistence.IsolatedFileSystemManager.Events.FileSystemRemoved, isolatedFileSystem); this.dispatchEventToListeners(Events.FileSystemRemoved, isolatedFileSystem);
} }
/** /**
...@@ -205,12 +205,12 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object { ...@@ -205,12 +205,12 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object {
removed: groupFilePathsIntoFileSystemPaths.call(this, event.data.removed) removed: groupFilePathsIntoFileSystemPaths.call(this, event.data.removed)
}; };
this.dispatchEventToListeners(Persistence.IsolatedFileSystemManager.Events.FileSystemFilesChanged, urlPaths); this.dispatchEventToListeners(Events.FileSystemFilesChanged, urlPaths);
/** /**
* @param {!Array<string>} embedderPaths * @param {!Array<string>} embedderPaths
* @return {!Platform.Multimap<string, string>} * @return {!Platform.Multimap<string, string>}
* @this {Persistence.IsolatedFileSystemManager} * @this {IsolatedFileSystemManager}
*/ */
function groupFilePathsIntoFileSystemPaths(embedderPaths) { function groupFilePathsIntoFileSystemPaths(embedderPaths) {
const paths = new Platform.Multimap(); const paths = new Platform.Multimap();
...@@ -282,7 +282,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object { ...@@ -282,7 +282,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object {
* @return {number} * @return {number}
*/ */
registerCallback(callback) { registerCallback(callback) {
const requestId = ++Persistence.IsolatedFileSystemManager._lastRequestId; const requestId = ++_lastRequestId;
this._callbacks.set(requestId, callback); this._callbacks.set(requestId, callback);
return requestId; return requestId;
} }
...@@ -292,7 +292,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object { ...@@ -292,7 +292,7 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object {
* @return {number} * @return {number}
*/ */
registerProgress(progress) { registerProgress(progress) {
const requestId = ++Persistence.IsolatedFileSystemManager._lastRequestId; const requestId = ++_lastRequestId;
this._progresses.set(requestId, progress); this._progresses.set(requestId, progress);
return requestId; return requestId;
} }
...@@ -357,16 +357,10 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object { ...@@ -357,16 +357,10 @@ Persistence.IsolatedFileSystemManager = class extends Common.Object {
callback.call(null, files); callback.call(null, files);
this._callbacks.delete(requestId); this._callbacks.delete(requestId);
} }
}; }
/** @typedef {!{type: string, fileSystemName: string, rootURL: string, fileSystemPath: string}} */
Persistence.IsolatedFileSystemManager.FileSystem;
/** @typedef {!{changed:!Platform.Multimap<string, string>, added:!Platform.Multimap<string, string>, removed:!Platform.Multimap<string, string>}} */
Persistence.IsolatedFileSystemManager.FilesChangedData;
/** @enum {symbol} */ /** @enum {symbol} */
Persistence.IsolatedFileSystemManager.Events = { export const Events = {
FileSystemAdded: Symbol('FileSystemAdded'), FileSystemAdded: Symbol('FileSystemAdded'),
FileSystemRemoved: Symbol('FileSystemRemoved'), FileSystemRemoved: Symbol('FileSystemRemoved'),
FileSystemFilesChanged: Symbol('FileSystemFilesChanged'), FileSystemFilesChanged: Symbol('FileSystemFilesChanged'),
...@@ -374,9 +368,28 @@ Persistence.IsolatedFileSystemManager.Events = { ...@@ -374,9 +368,28 @@ Persistence.IsolatedFileSystemManager.Events = {
ExcludedFolderRemoved: Symbol('ExcludedFolderRemoved') ExcludedFolderRemoved: Symbol('ExcludedFolderRemoved')
}; };
Persistence.IsolatedFileSystemManager._lastRequestId = 0; export let _lastRequestId = 0;
/* Legacy exported object */
self.Persistence = self.Persistence || {};
/* Legacy exported object */
Persistence = Persistence || {};
/** @constructor */
Persistence.IsolatedFileSystemManager = IsolatedFileSystemManager;
/** @enum {symbol} */
Persistence.IsolatedFileSystemManager.Events = Events;
Persistence.IsolatedFileSystemManager._lastRequestId = _lastRequestId;
/** @typedef {!{type: string, fileSystemName: string, rootURL: string, fileSystemPath: string}} */
Persistence.IsolatedFileSystemManager.FileSystem;
/** @typedef {!{changed:!Platform.Multimap<string, string>, added:!Platform.Multimap<string, string>, removed:!Platform.Multimap<string, string>}} */
Persistence.IsolatedFileSystemManager.FilesChangedData;
/** /**
* @type {!Persistence.IsolatedFileSystemManager} * @type {!IsolatedFileSystemManager}
*/ */
Persistence.isolatedFileSystemManager; Persistence.isolatedFileSystemManager;
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
Persistence.NetworkPersistenceManager = class extends Common.Object { export default class NetworkPersistenceManager extends Common.Object {
/** /**
* @param {!Workspace.Workspace} workspace * @param {!Workspace.Workspace} workspace
*/ */
...@@ -162,7 +162,7 @@ Persistence.NetworkPersistenceManager = class extends Common.Object { ...@@ -162,7 +162,7 @@ Persistence.NetworkPersistenceManager = class extends Common.Object {
// encodeURI() escapes all the unsafe filename characters except /:?* // encodeURI() escapes all the unsafe filename characters except /:?*
let encodedName = encodeURI(pathPart).replace(/[\/:\?\*]/g, match => '%' + match[0].charCodeAt(0).toString(16)); let encodedName = encodeURI(pathPart).replace(/[\/:\?\*]/g, match => '%' + match[0].charCodeAt(0).toString(16));
// Windows does not allow a small set of filenames. // Windows does not allow a small set of filenames.
if (Persistence.NetworkPersistenceManager._reservedFileNames.has(encodedName.toLowerCase())) { if (_reservedFileNames.has(encodedName.toLowerCase())) {
encodedName = encodedName.split('').map(char => '%' + char.charCodeAt(0).toString(16)).join(''); encodedName = encodedName.split('').map(char => '%' + char.charCodeAt(0).toString(16)).join('');
} }
// Windows does not allow the file to end in a space or dot (space should already be encoded). // Windows does not allow the file to end in a space or dot (space should already be encoded).
...@@ -353,7 +353,7 @@ Persistence.NetworkPersistenceManager = class extends Common.Object { ...@@ -353,7 +353,7 @@ Persistence.NetworkPersistenceManager = class extends Common.Object {
this._updateInterceptionThrottler.schedule(innerUpdateInterceptionPatterns.bind(this)); this._updateInterceptionThrottler.schedule(innerUpdateInterceptionPatterns.bind(this));
/** /**
* @this {Persistence.NetworkPersistenceManager} * @this {NetworkPersistenceManager}
* @return {!Promise} * @return {!Promise}
*/ */
function innerUpdateInterceptionPatterns() { function innerUpdateInterceptionPatterns() {
...@@ -425,7 +425,7 @@ Persistence.NetworkPersistenceManager = class extends Common.Object { ...@@ -425,7 +425,7 @@ Persistence.NetworkPersistenceManager = class extends Common.Object {
} }
this._updateActiveProject(); this._updateActiveProject();
this.dispatchEventToListeners(Persistence.NetworkPersistenceManager.Events.ProjectChanged, this._project); this.dispatchEventToListeners(Events.ProjectChanged, this._project);
} }
/** /**
...@@ -500,16 +500,28 @@ Persistence.NetworkPersistenceManager = class extends Common.Object { ...@@ -500,16 +500,28 @@ Persistence.NetworkPersistenceManager = class extends Common.Object {
const blob = await project.requestFileBlob(fileSystemUISourceCode); const blob = await project.requestFileBlob(fileSystemUISourceCode);
interceptedRequest.continueRequestWithContent(new Blob([blob], {type: mimeType})); interceptedRequest.continueRequestWithContent(new Blob([blob], {type: mimeType}));
} }
}; }
Persistence.NetworkPersistenceManager._reservedFileNames = new Set([ export const _reservedFileNames = new Set([
'con', 'prn', 'aux', 'nul', 'com1', 'com2', 'com3', 'com4', 'com5', 'com6', 'com7', 'con', 'prn', 'aux', 'nul', 'com1', 'com2', 'com3', 'com4', 'com5', 'com6', 'com7',
'com8', 'com9', 'lpt1', 'lpt2', 'lpt3', 'lpt4', 'lpt5', 'lpt6', 'lpt7', 'lpt8', 'lpt9' 'com8', 'com9', 'lpt1', 'lpt2', 'lpt3', 'lpt4', 'lpt5', 'lpt6', 'lpt7', 'lpt8', 'lpt9'
]); ]);
Persistence.NetworkPersistenceManager.Events = { export const Events = {
ProjectChanged: Symbol('ProjectChanged') ProjectChanged: Symbol('ProjectChanged')
}; };
/** @type {!Persistence.NetworkPersistenceManager} */ /* Legacy exported object */
self.Persistence = self.Persistence || {};
/* Legacy exported object */
Persistence = Persistence || {};
/** @constructor */
Persistence.NetworkPersistenceManager = NetworkPersistenceManager;
Persistence.NetworkPersistenceManager._reservedFileNames = _reservedFileNames;
Persistence.NetworkPersistenceManager.Events = Events;
/** @type {!NetworkPersistenceManager} */
Persistence.networkPersistenceManager; Persistence.networkPersistenceManager;
...@@ -2,13 +2,11 @@ ...@@ -2,13 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
Persistence.PersistenceActions = {};
/** /**
* @implements {UI.ContextMenu.Provider} * @implements {UI.ContextMenu.Provider}
* @unrestricted * @unrestricted
*/ */
Persistence.PersistenceActions.ContextMenuProvider = class { export class ContextMenuProvider {
/** /**
* @override * @override
* @param {!Event} event * @param {!Event} event
...@@ -53,4 +51,15 @@ Persistence.PersistenceActions.ContextMenuProvider = class { ...@@ -53,4 +51,15 @@ Persistence.PersistenceActions.ContextMenuProvider = class {
Common.UIString('Open in containing folder'), () => Host.InspectorFrontendHost.showItemInFolder(path)); Common.UIString('Open in containing folder'), () => Host.InspectorFrontendHost.showItemInFolder(path));
} }
} }
}; }
/* Legacy exported object */
self.Persistence = self.Persistence || {};
/* Legacy exported object */
Persistence = Persistence || {};
Persistence.PersistenceActions = {};
/** @constructor */
Persistence.PersistenceActions.ContextMenuProvider = ContextMenuProvider;
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
Persistence.PersistenceUtils = class { export default class PersistenceUtils {
/** /**
* @param {!Workspace.UISourceCode} uiSourceCode * @param {!Workspace.UISourceCode} uiSourceCode
* @return {string} * @return {string}
...@@ -32,7 +32,7 @@ Persistence.PersistenceUtils = class { ...@@ -32,7 +32,7 @@ Persistence.PersistenceUtils = class {
return null; return null;
} }
const icon = UI.Icon.create('mediumicon-file-sync'); const icon = UI.Icon.create('mediumicon-file-sync');
icon.title = Persistence.PersistenceUtils.tooltipForUISourceCode(binding.network); icon.title = PersistenceUtils.tooltipForUISourceCode(binding.network);
// TODO(allada) This will not work properly with dark theme. // TODO(allada) This will not work properly with dark theme.
if (Persistence.networkPersistenceManager.project() === binding.fileSystem.project()) { if (Persistence.networkPersistenceManager.project() === binding.fileSystem.project()) {
icon.style.filter = 'hue-rotate(160deg)'; icon.style.filter = 'hue-rotate(160deg)';
...@@ -45,16 +45,16 @@ Persistence.PersistenceUtils = class { ...@@ -45,16 +45,16 @@ Persistence.PersistenceUtils = class {
} }
const icon = UI.Icon.create('mediumicon-file'); const icon = UI.Icon.create('mediumicon-file');
icon.title = Persistence.PersistenceUtils.tooltipForUISourceCode(uiSourceCode); icon.title = PersistenceUtils.tooltipForUISourceCode(uiSourceCode);
return icon; return icon;
} }
}; }
/** /**
* @extends {Common.Object} * @extends {Common.Object}
* @implements {Components.LinkDecorator} * @implements {Components.LinkDecorator}
*/ */
Persistence.PersistenceUtils.LinkDecorator = class extends Common.Object { export class LinkDecorator extends Common.Object {
/** /**
* @param {!Persistence.Persistence} persistence * @param {!Persistence.Persistence} persistence
*/ */
...@@ -78,6 +78,18 @@ Persistence.PersistenceUtils.LinkDecorator = class extends Common.Object { ...@@ -78,6 +78,18 @@ Persistence.PersistenceUtils.LinkDecorator = class extends Common.Object {
* @return {?UI.Icon} * @return {?UI.Icon}
*/ */
linkIcon(uiSourceCode) { linkIcon(uiSourceCode) {
return Persistence.PersistenceUtils.iconForUISourceCode(uiSourceCode); return PersistenceUtils.iconForUISourceCode(uiSourceCode);
} }
}; }
\ No newline at end of file
/* Legacy exported object */
self.Persistence = self.Persistence || {};
/* Legacy exported object */
Persistence = Persistence || {};
/** @constructor */
Persistence.PersistenceUtils = PersistenceUtils;
/** @constructor */
Persistence.PersistenceUtils.LinkDecorator = LinkDecorator;
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
Persistence.PlatformFileSystem = class { export default class PlatformFileSystem {
/** /**
* @param {string} path * @param {string} path
* @param {string} type * @param {string} type
...@@ -191,4 +191,13 @@ Persistence.PlatformFileSystem = class { ...@@ -191,4 +191,13 @@ Persistence.PlatformFileSystem = class {
supportsAutomapping() { supportsAutomapping() {
throw new Error('Not implemented'); throw new Error('Not implemented');
} }
}; }
/* Legacy exported object */
self.Persistence = self.Persistence || {};
/* Legacy exported object */
Persistence = Persistence || {};
/** @constructor */
Persistence.PlatformFileSystem = PlatformFileSystem;
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
Persistence.WorkspaceSettingsTab = class extends UI.VBox { export default class WorkspaceSettingsTab extends UI.VBox {
constructor() { constructor() {
super(); super();
this.registerRequiredCSS('persistence/workspaceSettingsTab.css'); this.registerRequiredCSS('persistence/workspaceSettingsTab.css');
...@@ -166,4 +166,13 @@ Persistence.WorkspaceSettingsTab = class extends UI.VBox { ...@@ -166,4 +166,13 @@ Persistence.WorkspaceSettingsTab = class extends UI.VBox {
element.remove(); element.remove();
} }
} }
}; }
/* Legacy exported object */
self.Persistence = self.Persistence || {};
/* Legacy exported object */
Persistence = Persistence || {};
/** @constructor */
Persistence.WorkspaceSettingsTab = WorkspaceSettingsTab;
...@@ -43,14 +43,16 @@ ...@@ -43,14 +43,16 @@
"className": "Persistence.PersistenceActions.ContextMenuProvider" "className": "Persistence.PersistenceActions.ContextMenuProvider"
} }
], ],
"scripts": [ "scripts": [],
"modules": [
"persistence.js",
"PlatformFileSystem.js", "PlatformFileSystem.js",
"IsolatedFileSystem.js", "IsolatedFileSystem.js",
"IsolatedFileSystemManager.js", "IsolatedFileSystemManager.js",
"FileSystemWorkspaceBinding.js", "FileSystemWorkspaceBinding.js",
"Automapping.js", "Automapping.js",
"NetworkPersistenceManager.js", "NetworkPersistenceManager.js",
"Persistence.js", "PersistenceImpl.js",
"PersistenceActions.js", "PersistenceActions.js",
"PersistenceUtils.js", "PersistenceUtils.js",
"EditFileSystemView.js", "EditFileSystemView.js",
......
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import './PlatformFileSystem.js';
import * as Automapping from './Automapping.js';
import * as EditFileSystemView from './EditFileSystemView.js';
import * as FileSystemWorkspaceBinding from './FileSystemWorkspaceBinding.js';
import * as IsolatedFileSystem from './IsolatedFileSystem.js';
import * as IsolatedFileSystemManager from './IsolatedFileSystemManager.js';
import * as NetworkPersistenceManager from './NetworkPersistenceManager.js';
import * as PersistenceActions from './PersistenceActions.js';
import * as Persistence from './PersistenceImpl.js';
import * as PersistenceUtils from './PersistenceUtils.js';
import * as PlatformFileSystem from './PlatformFileSystem.js';
import * as WorkspaceSettingsTab from './WorkspaceSettingsTab.js';
export {
Automapping,
EditFileSystemView,
FileSystemWorkspaceBinding,
IsolatedFileSystem,
IsolatedFileSystemManager,
NetworkPersistenceManager,
Persistence,
PersistenceActions,
PersistenceUtils,
PlatformFileSystem,
WorkspaceSettingsTab,
};
...@@ -15,3 +15,4 @@ import './services/services.js'; ...@@ -15,3 +15,4 @@ import './services/services.js';
import './workspace/workspace.js'; import './workspace/workspace.js';
import './bindings/bindings.js'; import './bindings/bindings.js';
import './components/components.js'; import './components/components.js';
import './persistence/persistence.js';
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment