-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
…o chore/open-response-tab-always
- Loading branch information
Showing
41 changed files
with
1,337 additions
and
386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
import { getTimeStampInISO } from "./index"; | ||
|
||
export class BackupState { | ||
readonly args: string[]; | ||
readonly initAt: string = getTimeStampInISO(); | ||
readonly args: readonly string[]; | ||
readonly initAt: string = new Date().toISOString().replace(/:/g, "-"); | ||
readonly errors: string[] = []; | ||
|
||
backupRootPath: string = ""; | ||
archivePath: string = ""; | ||
|
||
encryptionPassword: string = ""; | ||
isEncryptionEnabled: boolean = false; | ||
|
||
constructor(args: string[]) { | ||
this.args = args; | ||
this.args = Object.freeze([...args]); | ||
|
||
// We seal `this` so that no link in the chain can "add" new properties to the state. This is intentional. If any | ||
// link wants to save data in the `BackupState`, which shouldn't even be needed in most cases, it should do so by | ||
// explicitly declaring a property in this class. No surprises. | ||
Object.seal(this); | ||
} | ||
|
||
isEncryptionEnabled() { | ||
return !!this.encryptionPassword; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.