Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
tohhsinpei committed Mar 15, 2022
1 parent 7c67512 commit 4575d14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/emulator/storage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface StorageEmulatorArgs {
port?: number;
host?: string;

// Either a single rules file or an array of resource/rules pairs
// Either a single set of rules to be applied to all resources or a mapping of resource to rules
rules: SourceFile | RulesConfig[];

auto_download?: boolean;
Expand Down
12 changes: 6 additions & 6 deletions src/emulator/storage/rules/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { StorageRulesIssues, StorageRulesRuntime, StorageRulesetInstance } from
import { RulesConfig } from "..";

/**
* Keeps track of the rules source file and maintains a generated ruleset for one or more storage
* resources.
* Keeps track of rules source file(s) and generated ruleset(s), either one for all storage
* resources or different rules for different resources.
*
* Example usage:
*
Expand All @@ -19,7 +19,7 @@ import { RulesConfig } from "..";
* ```
*/
export interface StorageRulesManager {
/** Sets source file for each resource using the rules previously passed in the constructor. */
/** Sets source file for each resource using the most recent rules. */
start(): Promise<StorageRulesIssues>;

/**
Expand All @@ -34,13 +34,13 @@ export interface StorageRulesManager {
*/
updateSourceFile(rules: SourceFile, resource: string): Promise<StorageRulesIssues>;

/** Removes listeners from all files for all resources. */
/** Removes listeners from all files for all managed resources. */
stop(): Promise<void>;
}

/**
* Creates either a {@link DefaultStorageRulesManager} to manage rules for a single resource
* or a {@link ResourceBasedStorageRulesManager} for multiple resources.
* Creates either a {@link DefaultStorageRulesManager} to manage rules for all resources or a
* {@link ResourceBasedStorageRulesManager} for a subset of them, keyed by resource name.
*/
export function createStorageRulesManager(
rules: SourceFile | RulesConfig[],
Expand Down

0 comments on commit 4575d14

Please sign in to comment.