mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-30 12:21:57 +00:00
feat: Utils to do bindLan and have ipv4 and ipv6 if need be
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
import { ManifestVersion } from "../../manifest/ManifestTypes";
|
||||
import { Effects } from "../../types";
|
||||
import { Utils } from "../../util";
|
||||
import { ManifestVersion } from "../../manifest/ManifestTypes"
|
||||
import { Effects } from "../../types"
|
||||
import { Utils } from "../../util"
|
||||
|
||||
export class Migration<Version extends ManifestVersion> {
|
||||
constructor(
|
||||
readonly options: {
|
||||
version: Version;
|
||||
up: (opts: { effects: Effects }) => Promise<void>;
|
||||
down: (opts: { effects: Effects }) => Promise<void>;
|
||||
version: Version
|
||||
up: (opts: { effects: Effects }) => Promise<void>
|
||||
down: (opts: { effects: Effects }) => Promise<void>
|
||||
},
|
||||
) {}
|
||||
static of<Version extends ManifestVersion>(options: {
|
||||
version: Version;
|
||||
up: (opts: { effects: Effects }) => Promise<void>;
|
||||
down: (opts: { effects: Effects }) => Promise<void>;
|
||||
version: Version
|
||||
up: (opts: { effects: Effects }) => Promise<void>
|
||||
down: (opts: { effects: Effects }) => Promise<void>
|
||||
}) {
|
||||
return new Migration(options);
|
||||
return new Migration(options)
|
||||
}
|
||||
|
||||
async up(opts: { effects: Effects }) {
|
||||
this.up(opts);
|
||||
this.up(opts)
|
||||
}
|
||||
|
||||
async down(opts: { effects: Effects }) {
|
||||
this.down(opts);
|
||||
this.down(opts)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user