[feat] PkgVersion

This commit is contained in:
2024-11-22 15:39:14 +08:00
parent e434c33afb
commit 4e99e723c9
2 changed files with 25 additions and 1 deletions

16
base/pkg_version.go Normal file
View File

@@ -0,0 +1,16 @@
package base
type PkgVersion struct {
Name string `db:"pkg"`
Bundle string `db:"bundle"`
Hash string `db:"hash"`
FileName string `db:"filename"`
SourceMapFileName string `db:"sourcemapFileName"`
Imports []string `db:"imports"`
VersionAt string `db:"version_at"`
}
func (this PkgVersion) GetFile() []byte
func (this PkgVersion) GetSourceMap() []byte
type GetPkgVersion func(pkg string) (PkgVersion, bool)