pacman-debian 7.3.10 → 7.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -463
- package/README_zh-CN.md +50 -492
- package/dist/ar.d.ts +8 -0
- package/dist/cli/archlinux-java.d.ts +3 -0
- package/dist/cli/fix_default.d.ts +3 -0
- package/dist/cli/paclink.d.ts +3 -0
- package/dist/cli/pacman.d.ts +2 -0
- package/dist/cli/update-ca-trust.d.ts +3 -0
- package/dist/compress.d.ts +2 -0
- package/dist/config.d.ts +3 -0
- package/dist/control.d.ts +2 -0
- package/dist/core/ar.d.ts +7 -0
- package/dist/core/compress.d.ts +4 -0
- package/dist/core/control.d.ts +2 -0
- package/dist/core/deb.d.ts +4 -0
- package/dist/core/deps.d.ts +28 -0
- package/dist/core/options.d.ts +19 -0
- package/dist/core/pkgfile.d.ts +35 -0
- package/dist/core/tar.d.ts +13 -0
- package/dist/core/types.d.ts +83 -0
- package/dist/database.d.ts +20 -0
- package/dist/db/database.d.ts +17 -0
- package/dist/db/dpkg-compat.d.ts +19 -0
- package/dist/db/dpkg-compat.d.ts.map +1 -1
- package/dist/db/dpkg-compat.js +16 -1
- package/dist/db/dpkg-compat.js.map +1 -1
- package/dist/db/localdb.d.ts +9 -0
- package/dist/db/sqlite.d.ts +20 -0
- package/dist/deb.d.ts +5 -0
- package/dist/dpkg-compat.d.ts +18 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/i18n/paclink/en.d.ts +3 -0
- package/dist/i18n/paclink/zh-CN.d.ts +3 -0
- package/dist/i18n/setup/en.d.ts +3 -0
- package/dist/i18n/setup/zh-CN.d.ts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/install.d.ts +2 -0
- package/dist/makepkg/build.d.ts +19 -0
- package/dist/makepkg/index.d.ts +3 -0
- package/dist/makepkg/pkgbuild.d.ts +36 -0
- package/dist/ops/install.d.ts +5 -0
- package/dist/ops/query.d.ts +9 -0
- package/dist/ops/remove.d.ts +4 -0
- package/dist/ops/upgrade.d.ts +4 -0
- package/dist/pacman.d.ts +2 -0
- package/dist/query.d.ts +5 -0
- package/dist/remove.d.ts +2 -0
- package/dist/repo/config.d.ts +3 -0
- package/dist/repo/repository.d.ts +20 -0
- package/dist/repository.d.ts +10 -0
- package/dist/scripts/pacman-conf.d.ts +3 -0
- package/dist/scripts/setup.d.ts +3 -0
- package/dist/tar.d.ts +17 -0
- package/dist/types.d.ts +80 -0
- package/dist/ui/colors.d.ts +13 -0
- package/dist/ui/format.d.ts +3 -0
- package/dist/ui/progress.d.ts +8 -0
- package/dist/ui/prompt.d.ts +4 -0
- package/docs/en/architecture.md +188 -0
- package/docs/en/configuration.md +84 -0
- package/docs/en/installation.md +67 -0
- package/docs/en/makepkg.md +38 -0
- package/docs/en/paclink.md +73 -0
- package/docs/en/usage.md +91 -0
- package/docs/en/yay-aur.md +65 -0
- package/docs/zh-CN/architecture.md +171 -0
- package/docs/zh-CN/configuration.md +80 -0
- package/docs/zh-CN/installation.md +65 -0
- package/docs/zh-CN/makepkg.md +32 -0
- package/docs/zh-CN/paclink.md +70 -0
- package/docs/zh-CN/usage.md +90 -0
- package/docs/zh-CN/yay-aur.md +44 -0
- package/lib/pac4deb/Makefile +26 -0
- package/lib/pac4deb/README.md +47 -0
- package/lib/pac4deb/include/alpm.h +166 -0
- package/lib/pac4deb/include/alpm_list.h +43 -0
- package/lib/pac4deb/src/alpm_list.c +120 -0
- package/lib/pac4deb/src/genstubs.sh +51 -0
- package/lib/pac4deb/src/genstubs2.sh +72 -0
- package/lib/pac4deb/src/genstubs3.sh +43 -0
- package/lib/pac4deb/src/libalpm.c +964 -0
- package/lib/pac4deb/src/stubs_manual.c +452 -0
- package/package.json +19 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RepoPkg } from './types';
|
|
2
|
+
export interface Dep {
|
|
3
|
+
name: string;
|
|
4
|
+
version?: string;
|
|
5
|
+
operator?: string;
|
|
6
|
+
arch?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DepResult {
|
|
9
|
+
pkg: RepoPkg;
|
|
10
|
+
needed: boolean;
|
|
11
|
+
reason: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function parseDep(s: string): Dep[];
|
|
14
|
+
export interface ResolveDepsOptions {
|
|
15
|
+
upgradeMode?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function resolveDeps(targets: string[], opts?: ResolveDepsOptions): {
|
|
18
|
+
install: DepResult[];
|
|
19
|
+
errors: string[];
|
|
20
|
+
};
|
|
21
|
+
export declare function invalidateDepCache(): void;
|
|
22
|
+
export interface Conflict {
|
|
23
|
+
a: string;
|
|
24
|
+
b: string;
|
|
25
|
+
reason: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function detectConflicts(packages: RepoPkg[]): Conflict[];
|
|
28
|
+
//# sourceMappingURL=deps.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface InstallOptions {
|
|
2
|
+
needed?: boolean;
|
|
3
|
+
noscriptlet?: boolean;
|
|
4
|
+
asdeps?: boolean;
|
|
5
|
+
print?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface RemoveOptions {
|
|
8
|
+
recursive?: boolean;
|
|
9
|
+
noscriptlet?: boolean;
|
|
10
|
+
cascade?: boolean;
|
|
11
|
+
nodeps?: boolean;
|
|
12
|
+
nosave?: boolean;
|
|
13
|
+
print?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface DbOptions {
|
|
16
|
+
asdeps?: boolean;
|
|
17
|
+
asexplicit?: boolean;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface PkgInfo {
|
|
2
|
+
name: string;
|
|
3
|
+
version: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
depends?: string[];
|
|
6
|
+
conflicts?: string[];
|
|
7
|
+
provides?: string[];
|
|
8
|
+
url?: string;
|
|
9
|
+
license?: string[];
|
|
10
|
+
arch?: string;
|
|
11
|
+
installedSize?: number;
|
|
12
|
+
size?: number;
|
|
13
|
+
packager?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface InstallScript {
|
|
16
|
+
pre_install?: string;
|
|
17
|
+
post_install?: string;
|
|
18
|
+
pre_remove?: string;
|
|
19
|
+
post_remove?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function parsePkgTarZst(data: Buffer): {
|
|
22
|
+
info: PkgInfo;
|
|
23
|
+
install?: InstallScript;
|
|
24
|
+
files: string[];
|
|
25
|
+
dataBlocks: {
|
|
26
|
+
name: string;
|
|
27
|
+
data: Buffer | null;
|
|
28
|
+
}[];
|
|
29
|
+
};
|
|
30
|
+
export declare function extractArchTarEntry(name: string, dest: string, entries: {
|
|
31
|
+
name: string;
|
|
32
|
+
data: Buffer | null;
|
|
33
|
+
}[]): void;
|
|
34
|
+
export declare function parseDescFile(content: string): Record<string, string[]>;
|
|
35
|
+
//# sourceMappingURL=pkgfile.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface TarEntry {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
size: number;
|
|
5
|
+
data: Buffer | null;
|
|
6
|
+
linkname: string;
|
|
7
|
+
mode: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function iterateTar(buf: Buffer): Generator<TarEntry>;
|
|
10
|
+
export declare function readFileFromTar(buf: Buffer, filePath: string): Buffer | null;
|
|
11
|
+
export declare function extractTar(buf: Buffer, dest: string): string[];
|
|
12
|
+
export declare function listTarEntries(buf: Buffer): string[];
|
|
13
|
+
//# sourceMappingURL=tar.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export interface DebControl {
|
|
2
|
+
package: string;
|
|
3
|
+
version: string;
|
|
4
|
+
architecture: string;
|
|
5
|
+
maintainer?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
depends?: string;
|
|
8
|
+
'pre-depends'?: string;
|
|
9
|
+
conflicts?: string;
|
|
10
|
+
provides?: string;
|
|
11
|
+
'installed-size'?: string;
|
|
12
|
+
section?: string;
|
|
13
|
+
priority?: string;
|
|
14
|
+
homepage?: string;
|
|
15
|
+
[key: string]: string | undefined;
|
|
16
|
+
}
|
|
17
|
+
export interface DebPackage {
|
|
18
|
+
path: string;
|
|
19
|
+
control: DebControl;
|
|
20
|
+
controlTar: Buffer;
|
|
21
|
+
dataTar: Buffer;
|
|
22
|
+
}
|
|
23
|
+
export interface InstalledPackage {
|
|
24
|
+
name: string;
|
|
25
|
+
version: string;
|
|
26
|
+
architecture: string;
|
|
27
|
+
description: string;
|
|
28
|
+
depends?: string;
|
|
29
|
+
'pre-depends'?: string;
|
|
30
|
+
conflicts?: string;
|
|
31
|
+
provides?: string;
|
|
32
|
+
maintainer?: string;
|
|
33
|
+
homepage?: string;
|
|
34
|
+
controlSection?: string;
|
|
35
|
+
controlPriority?: string;
|
|
36
|
+
installedSize?: number;
|
|
37
|
+
installTime: number;
|
|
38
|
+
reason: 'explicit' | 'dependency';
|
|
39
|
+
files: string[];
|
|
40
|
+
repoType?: 'debian' | 'arch' | 'link';
|
|
41
|
+
}
|
|
42
|
+
export interface RepoPkg {
|
|
43
|
+
package: string;
|
|
44
|
+
version: string;
|
|
45
|
+
architecture: string;
|
|
46
|
+
description?: string;
|
|
47
|
+
depends?: string;
|
|
48
|
+
conflicts?: string;
|
|
49
|
+
provides?: string;
|
|
50
|
+
filename: string;
|
|
51
|
+
size?: number;
|
|
52
|
+
installedSize?: number;
|
|
53
|
+
sha256?: string;
|
|
54
|
+
repo: string;
|
|
55
|
+
repoType: 'debian' | 'arch';
|
|
56
|
+
}
|
|
57
|
+
export interface RepoConfig {
|
|
58
|
+
name: string;
|
|
59
|
+
type?: 'debian' | 'arch';
|
|
60
|
+
server: string;
|
|
61
|
+
dist?: string;
|
|
62
|
+
components?: string[];
|
|
63
|
+
dbFile?: string;
|
|
64
|
+
architecture?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface Config {
|
|
67
|
+
architecture: string;
|
|
68
|
+
color: boolean;
|
|
69
|
+
repos: RepoConfig[];
|
|
70
|
+
}
|
|
71
|
+
export interface Database {
|
|
72
|
+
packages: Map<string, InstalledPackage>;
|
|
73
|
+
fileIndex: Map<string, string>;
|
|
74
|
+
}
|
|
75
|
+
export interface Transaction {
|
|
76
|
+
id: string;
|
|
77
|
+
timestamp: number;
|
|
78
|
+
action: 'install' | 'remove';
|
|
79
|
+
package: string;
|
|
80
|
+
version: string;
|
|
81
|
+
completed: boolean;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { InstalledPackage, Database, Transaction } from './types';
|
|
2
|
+
export declare function initDb(): void;
|
|
3
|
+
export declare function loadDatabase(): Database;
|
|
4
|
+
export declare function saveDatabase(db: Database): void;
|
|
5
|
+
export declare function isInstalled(db: Database, name: string): boolean;
|
|
6
|
+
export declare function getPackage(db: Database, name: string): InstalledPackage | undefined;
|
|
7
|
+
export declare function addPackage(db: Database, pkg: InstalledPackage): void;
|
|
8
|
+
export declare function removePkg(db: Database, name: string): InstalledPackage | undefined;
|
|
9
|
+
export declare function saveScript(pkgName: string, name: string, content: string): void;
|
|
10
|
+
export declare function getScript(pkgName: string, name: string): string | null;
|
|
11
|
+
export declare function runScript(pkgName: string, name: string, args: string[]): boolean;
|
|
12
|
+
export declare function createTransaction(action: 'install' | 'remove', pkgName: string, version: string): Transaction;
|
|
13
|
+
export declare function completeTransaction(txId: string): void;
|
|
14
|
+
export interface DepEntry {
|
|
15
|
+
name: string;
|
|
16
|
+
constraint?: string;
|
|
17
|
+
version?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function parseDepends(depStr?: string): DepEntry[];
|
|
20
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { InstalledPackage, Database, Transaction } from '../core/types';
|
|
2
|
+
export declare function initDb(): void;
|
|
3
|
+
export declare function loadDatabase(): Database;
|
|
4
|
+
export declare function saveDatabase(_db: Database): void;
|
|
5
|
+
export declare function isInstalled(db: Database, name: string): boolean;
|
|
6
|
+
export declare function getPackage(db: Database, name: string): InstalledPackage | undefined;
|
|
7
|
+
export declare function addPackage(db: Database, pkg: InstalledPackage): void;
|
|
8
|
+
export declare function removePkg(db: Database, name: string): InstalledPackage | undefined;
|
|
9
|
+
export declare function saveScript(pkgName: string, name: string, content: string): void;
|
|
10
|
+
export declare function runScript(pkgName: string, name: string, args: string[]): boolean;
|
|
11
|
+
export declare function createTransaction(a: 'install' | 'remove', p: string, v: string): Transaction;
|
|
12
|
+
export declare function completeTransaction(id: string): void;
|
|
13
|
+
export interface DepEntry {
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function parseDepends(s?: string): DepEntry[];
|
|
17
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InstalledPackage } from '../core/types';
|
|
2
|
+
export interface DpkgEntry {
|
|
3
|
+
package: string;
|
|
4
|
+
version: string;
|
|
5
|
+
architecture: string;
|
|
6
|
+
status: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
maintainer?: string;
|
|
9
|
+
depends?: string;
|
|
10
|
+
installedSize?: number;
|
|
11
|
+
section?: string;
|
|
12
|
+
priority?: string;
|
|
13
|
+
homepage?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function readDpkgStatus(): Map<string, DpkgEntry>;
|
|
16
|
+
export declare function dpkgHasPackage(name: string): boolean;
|
|
17
|
+
export declare function writeDpkgEntry(pkg: InstalledPackage): void;
|
|
18
|
+
export declare function removeDpkgEntry(name: string): void;
|
|
19
|
+
//# sourceMappingURL=dpkg-compat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dpkg-compat.d.ts","sourceRoot":"","sources":["../../src/db/dpkg-compat.ts"],"names":[],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AAc,IAAI,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CA0BvD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAoBD,wBAAgB,cAAc,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CA4C1D;AAYD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAclD"}
|
package/dist/db/dpkg-compat.js
CHANGED
|
@@ -124,10 +124,25 @@ function writeDpkgEntry(pkg) {
|
|
|
124
124
|
_dpkgCache = null; // invalidate cache
|
|
125
125
|
if (fs.existsSync(DPKG_INFO)) {
|
|
126
126
|
const lp = `${DPKG_INFO}/${pkg.name}.list`;
|
|
127
|
+
const files = pkg.files.length > 0
|
|
128
|
+
? pkg.files
|
|
129
|
+
: (pkg.depends && /^[a-z]/.test(pkg.depends)
|
|
130
|
+
? loadFilesFromDpkg(pkg.depends.split(',')[0].trim().split(/\s/)[0])
|
|
131
|
+
: []);
|
|
127
132
|
const existing = fs.existsSync(lp)
|
|
128
133
|
? fs.readFileSync(lp, 'utf8').split('\n').filter(Boolean)
|
|
129
134
|
: [];
|
|
130
|
-
fs.writeFileSync(lp, [...new Set([...existing, ...
|
|
135
|
+
fs.writeFileSync(lp, [...new Set([...existing, ...files])].sort().join('\n') + '\n');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function loadFilesFromDpkg(name) {
|
|
139
|
+
try {
|
|
140
|
+
const { execSync } = require('node:child_process');
|
|
141
|
+
const out = execSync(`dpkg -L ${name} 2>/dev/null`, { encoding: 'utf8', timeout: 5000 });
|
|
142
|
+
return out.trim().split('\n').filter(Boolean);
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
return [];
|
|
131
146
|
}
|
|
132
147
|
}
|
|
133
148
|
function removeDpkgEntry(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dpkg-compat.js","sourceRoot":"","sources":["../../src/db/dpkg-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AI,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;QAAE,OAAO;IACxC,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7E,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAS,EAAE,EAAE;QACxC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI;YAAE,OAAO,KAAK,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;IACxD,UAAU,GAAG,IAAI,CAAC;IAElB,MAAM,EAAE,GAAG,GAAG,SAAS,IAAI,IAAI,OAAO,CAAC;IACvC,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;QAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InstalledPackage } from '../core/types';
|
|
2
|
+
export declare function addPackage(pkg: InstalledPackage): void;
|
|
3
|
+
export declare function removePackage(name: string, version?: string): void;
|
|
4
|
+
export declare function listPackageNames(): string[];
|
|
5
|
+
export declare function getPackage(name: string): InstalledPackage | undefined;
|
|
6
|
+
export declare function getAllPackages(): InstalledPackage[];
|
|
7
|
+
export declare function getFileOwner(filePath: string): string | undefined;
|
|
8
|
+
export declare function invalidateFileIndex(): void;
|
|
9
|
+
//# sourceMappingURL=localdb.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { InstalledPackage } from '../core/types';
|
|
2
|
+
export declare function loadAllPackages(): InstalledPackage[];
|
|
3
|
+
export declare function getFileOwner(filePath: string): string | undefined;
|
|
4
|
+
export declare function getPackageFiles(name: string): string[];
|
|
5
|
+
export declare function saveFileIndex(pkg: InstalledPackage): void;
|
|
6
|
+
export declare function removeFileIndex(pkg: InstalledPackage): void;
|
|
7
|
+
export declare function getPackage(name: string): InstalledPackage | undefined;
|
|
8
|
+
export declare function searchPackages(query: string): InstalledPackage[];
|
|
9
|
+
export declare function savePackage(pkg: InstalledPackage): void;
|
|
10
|
+
export declare function removePackage(name: string): void;
|
|
11
|
+
export declare function countPackages(): number;
|
|
12
|
+
export declare function refreshDpkgCache(): void;
|
|
13
|
+
export declare function dpkgHasPackage(name: string): boolean;
|
|
14
|
+
export declare function upsertDpkgEntry(name: string, version: string, architecture: string, description: string, installedSize: number): void;
|
|
15
|
+
export declare function removeDpkgCacheEntry(name: string): void;
|
|
16
|
+
export declare function syncDpkgCache(): void;
|
|
17
|
+
export declare function getDpkgPackage(name: string): Record<string, any> | undefined;
|
|
18
|
+
export declare function getAllDpkgPackages(): Record<string, any>[];
|
|
19
|
+
export declare function countDpkgPackages(): number;
|
|
20
|
+
//# sourceMappingURL=sqlite.d.ts.map
|
package/dist/deb.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DebPackage } from './types';
|
|
2
|
+
export declare function parseDeb(filePath: string): DebPackage;
|
|
3
|
+
export declare function listDebContents(filePath: string): string[];
|
|
4
|
+
export declare function readScript(pkg: DebPackage, name: string): string | null;
|
|
5
|
+
//# sourceMappingURL=deb.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { InstalledPackage } from './types';
|
|
2
|
+
export interface DpkgEntry {
|
|
3
|
+
package: string;
|
|
4
|
+
version: string;
|
|
5
|
+
architecture: string;
|
|
6
|
+
status: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
maintainer?: string;
|
|
9
|
+
depends?: string;
|
|
10
|
+
installedSize?: number;
|
|
11
|
+
section?: string;
|
|
12
|
+
priority?: string;
|
|
13
|
+
homepage?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function readDpkgStatus(): Map<string, DpkgEntry>;
|
|
16
|
+
export declare function writeDpkgEntry(pkg: InstalledPackage): void;
|
|
17
|
+
export declare function removeDpkgEntry(name: string): void;
|
|
18
|
+
//# sourceMappingURL=dpkg-compat.d.ts.map
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface BuildOptions {
|
|
2
|
+
install?: boolean;
|
|
3
|
+
clean?: boolean;
|
|
4
|
+
skipExtract?: boolean;
|
|
5
|
+
skipBuild?: boolean;
|
|
6
|
+
skipPackage?: boolean;
|
|
7
|
+
skipChecksum?: boolean;
|
|
8
|
+
nodeps?: boolean;
|
|
9
|
+
syncdeps?: boolean;
|
|
10
|
+
rmdeps?: boolean;
|
|
11
|
+
force?: boolean;
|
|
12
|
+
log?: boolean;
|
|
13
|
+
ignoreArch?: boolean;
|
|
14
|
+
pkgbuild?: string;
|
|
15
|
+
printsrcinfo?: boolean;
|
|
16
|
+
geninteg?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function buildPkgbuild(options: BuildOptions): Promise<string>;
|
|
19
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface PkgbuildInfo {
|
|
2
|
+
pkgbase?: string;
|
|
3
|
+
pkgname: string;
|
|
4
|
+
pkgver: string;
|
|
5
|
+
pkgrel: string;
|
|
6
|
+
epoch?: string;
|
|
7
|
+
pkgdesc: string;
|
|
8
|
+
arch: string[];
|
|
9
|
+
url?: string;
|
|
10
|
+
license: string[];
|
|
11
|
+
groups: string[];
|
|
12
|
+
depends: string[];
|
|
13
|
+
makedepends: string[];
|
|
14
|
+
optdepends: string[];
|
|
15
|
+
checkdepends: string[];
|
|
16
|
+
provides: string[];
|
|
17
|
+
conflicts: string[];
|
|
18
|
+
replaces: string[];
|
|
19
|
+
source: string[];
|
|
20
|
+
noextract: string[];
|
|
21
|
+
sha256sums: string[];
|
|
22
|
+
md5sums: string[];
|
|
23
|
+
validpgpkeys: string[];
|
|
24
|
+
install?: string;
|
|
25
|
+
options: string[];
|
|
26
|
+
backup: string[];
|
|
27
|
+
buildFn: string;
|
|
28
|
+
packageFn: string;
|
|
29
|
+
prepareFn: string;
|
|
30
|
+
checkFn: string;
|
|
31
|
+
validArch: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function parsePkgbuild(pkgbuildPath: string, ignoreArch?: boolean): PkgbuildInfo;
|
|
34
|
+
export declare function pkgFilename(info: PkgbuildInfo, archOverride?: string): string;
|
|
35
|
+
export declare function printSrcinfo(info: PkgbuildInfo): string;
|
|
36
|
+
//# sourceMappingURL=pkgbuild.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InstallOptions } from '../core/options';
|
|
2
|
+
export declare function installPkgFile(filePath: string, reason: 'explicit' | 'dependency', opts?: InstallOptions): Promise<boolean>;
|
|
3
|
+
export declare function installPkg(target: string, opts?: InstallOptions): Promise<boolean>;
|
|
4
|
+
export declare function installPackages(targets: string[], opts?: InstallOptions): Promise<number>;
|
|
5
|
+
//# sourceMappingURL=install.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function listInstalled(filter?: string, quiet?: boolean): void;
|
|
2
|
+
export declare function listExplicit(): void;
|
|
3
|
+
export declare function listDeps(): void;
|
|
4
|
+
export declare function listOrphans(): void;
|
|
5
|
+
export declare function checkIntegrity(name?: string): void;
|
|
6
|
+
export declare function showInfo(name: string, fromRepo: boolean): void;
|
|
7
|
+
export declare function queryFile(fp: string): void;
|
|
8
|
+
export declare function listFiles(name: string): void;
|
|
9
|
+
//# sourceMappingURL=query.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RemoveOptions } from '../core/options';
|
|
2
|
+
export declare function removeByName(name: string, opts?: RemoveOptions): Promise<boolean>;
|
|
3
|
+
export declare function removePackages(names: string[], opts?: RemoveOptions): Promise<boolean>;
|
|
4
|
+
//# sourceMappingURL=remove.d.ts.map
|
package/dist/pacman.d.ts
ADDED
package/dist/query.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function listInstalled(filter?: string): void;
|
|
2
|
+
export declare function showPackageInfo(name: string, fromRepo: boolean): void;
|
|
3
|
+
export declare function queryFile(filePath: string): void;
|
|
4
|
+
export declare function listPackageFiles(name: string): void;
|
|
5
|
+
//# sourceMappingURL=query.d.ts.map
|
package/dist/remove.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RepoPkg } from '../core/types';
|
|
2
|
+
export declare function invalidateIdxCache(): void;
|
|
3
|
+
export declare function syncRepos(force?: boolean): Promise<void>;
|
|
4
|
+
/** Read a pkg from JSONL by byte offset (shared helper) */
|
|
5
|
+
export declare function readPkgAt(pkgDir: string, chunkFile: string, byteOff: number): RepoPkg | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Batch-resolve package names via head-tail dual scan on the sorted index.
|
|
8
|
+
* Returns Map<packageName, RepoPkg> for all names found.
|
|
9
|
+
*/
|
|
10
|
+
export declare function batchFindInRepo(names: string[]): Map<string, RepoPkg>;
|
|
11
|
+
/** Look up a package by its Provides: virtual name via inverted index */
|
|
12
|
+
export declare function findProvides(name: string): RepoPkg | undefined;
|
|
13
|
+
export declare function getRepoCache(): RepoPkg[];
|
|
14
|
+
export declare function invalidateCache(): void;
|
|
15
|
+
export declare function searchRepo(query: string): RepoPkg[];
|
|
16
|
+
export declare function findInRepo(pkgName: string): RepoPkg | undefined;
|
|
17
|
+
/** Resolve the download URL for a package. */
|
|
18
|
+
export declare function getPkgUrl(rp: RepoPkg): string;
|
|
19
|
+
export declare function downloadPkg(rp: RepoPkg, dest?: string, onProgress?: (rec: number, tot: number) => void): Promise<string>;
|
|
20
|
+
//# sourceMappingURL=repository.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RepoPkg } from './types';
|
|
2
|
+
export declare function getRepoCache(): RepoPkg[];
|
|
3
|
+
export declare function invalidateCache(): void;
|
|
4
|
+
export declare function syncRepos(): Promise<void>;
|
|
5
|
+
export declare function searchRepo(query: string): RepoPkg[];
|
|
6
|
+
export declare function findInRepo(pkgName: string): RepoPkg | undefined;
|
|
7
|
+
export declare function findProvides(pkgName: string): RepoPkg[];
|
|
8
|
+
export declare function getDebDownloadUrl(pkg: RepoPkg): string;
|
|
9
|
+
export declare function ensureDebDownloaded(pkg: RepoPkg): Promise<string>;
|
|
10
|
+
//# sourceMappingURL=repository.d.ts.map
|
package/dist/tar.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface TarEntry {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
size: number;
|
|
5
|
+
data: Buffer | null;
|
|
6
|
+
linkname: string;
|
|
7
|
+
mode: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function iterateTar(buf: Buffer): Generator<TarEntry>;
|
|
10
|
+
export declare function listTarEntries(buf: Buffer): {
|
|
11
|
+
name: string;
|
|
12
|
+
type: string;
|
|
13
|
+
size: number;
|
|
14
|
+
}[];
|
|
15
|
+
export declare function readFileFromTar(buf: Buffer, filePath: string): Buffer | null;
|
|
16
|
+
export declare function extractTar(buf: Buffer, dest: string, filter?: (name: string) => boolean): string[];
|
|
17
|
+
//# sourceMappingURL=tar.d.ts.map
|