@papillon6814/copi 0.1.0 → 0.2.0
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/LICENSE.unicode +39 -0
- package/README.md +57 -5
- package/dist/native/rename-exclusive-arm64 +0 -0
- package/dist/native/rename-exclusive-arm64.manifest.json +12 -0
- package/dist/src/apply.d.ts +9 -0
- package/dist/src/apply.js +110 -9
- package/dist/src/catalog.d.ts +21 -4
- package/dist/src/catalog.js +265 -133
- package/dist/src/cli.d.ts +2 -1
- package/dist/src/cli.js +73 -3
- package/dist/src/groups.js +8 -3
- package/dist/src/inspect.d.ts +3 -1
- package/dist/src/inspect.js +16 -6
- package/dist/src/instruction-reference.d.ts +6 -0
- package/dist/src/instruction-reference.js +21 -0
- package/dist/src/manage.d.ts +2 -0
- package/dist/src/manage.js +329 -0
- package/dist/src/migrate.d.ts +25 -0
- package/dist/src/migrate.js +171 -0
- package/dist/src/migration-backup.d.ts +22 -0
- package/dist/src/migration-backup.js +403 -0
- package/dist/src/migration-inventory.d.ts +9 -0
- package/dist/src/migration-inventory.js +237 -0
- package/dist/src/migration-resolution.d.ts +28 -0
- package/dist/src/migration-resolution.js +1618 -0
- package/dist/src/migration.d.ts +49 -0
- package/dist/src/migration.js +1004 -0
- package/dist/src/names.d.ts +11 -0
- package/dist/src/names.js +40 -0
- package/dist/src/native-placement.d.ts +16 -0
- package/dist/src/native-placement.js +557 -0
- package/dist/src/refresh.d.ts +20 -0
- package/dist/src/refresh.js +143 -0
- package/dist/src/resource-mutations.d.ts +45 -0
- package/dist/src/resource-mutations.js +225 -0
- package/dist/src/source-content.d.ts +4 -0
- package/dist/src/source-content.js +208 -0
- package/dist/src/storage-journal.d.ts +111 -0
- package/dist/src/storage-journal.js +613 -0
- package/dist/src/storage-root-lease.d.ts +7 -0
- package/dist/src/storage-root-lease.js +92 -0
- package/dist/src/storage-transaction.d.ts +100 -0
- package/dist/src/storage-transaction.js +3951 -0
- package/dist/src/terminal-editor.d.ts +8 -0
- package/dist/src/terminal-editor.js +391 -0
- package/dist/src/types.d.ts +18 -2
- package/dist/src/unicode-case-folding-data.d.ts +1 -0
- package/dist/src/unicode-case-folding-data.js +1596 -0
- package/dist/src/unicode-case-folding.d.ts +2 -0
- package/dist/src/unicode-case-folding.js +9 -0
- package/dist/src/wizard.d.ts +11 -3
- package/dist/src/wizard.js +274 -18
- package/package.json +5 -3
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { Catalog, LegacyCatalog } from "./types.ts";
|
|
2
|
+
export interface LegacyStorageJournal {
|
|
3
|
+
version: 1;
|
|
4
|
+
root: string;
|
|
5
|
+
token: string;
|
|
6
|
+
oldCatalog: string | null;
|
|
7
|
+
newCatalog: string;
|
|
8
|
+
operations: {
|
|
9
|
+
itemId: string;
|
|
10
|
+
oldTree: string | null;
|
|
11
|
+
newTree: string;
|
|
12
|
+
}[];
|
|
13
|
+
}
|
|
14
|
+
export interface SourcesStorageJournal {
|
|
15
|
+
version: 2;
|
|
16
|
+
root: string;
|
|
17
|
+
token: string;
|
|
18
|
+
oldCatalog: string | null;
|
|
19
|
+
newCatalog: string;
|
|
20
|
+
stableSourcesTree: string;
|
|
21
|
+
stableSourcesTreeNext?: string;
|
|
22
|
+
nextSourcesTree?: string;
|
|
23
|
+
ownedDirectories?: {
|
|
24
|
+
path: string;
|
|
25
|
+
stage: string;
|
|
26
|
+
dev: number;
|
|
27
|
+
ino: number;
|
|
28
|
+
}[];
|
|
29
|
+
operations: {
|
|
30
|
+
itemId: string;
|
|
31
|
+
target: string;
|
|
32
|
+
kind: "file" | "tree";
|
|
33
|
+
oldTree: string | null;
|
|
34
|
+
newTree: string;
|
|
35
|
+
}[];
|
|
36
|
+
}
|
|
37
|
+
export interface CatalogOnlyStorageJournal {
|
|
38
|
+
version: 3;
|
|
39
|
+
mode: "catalog-only";
|
|
40
|
+
root: string;
|
|
41
|
+
token: string;
|
|
42
|
+
oldCatalog: string | null;
|
|
43
|
+
newCatalog: string;
|
|
44
|
+
stableSourcesTree: string;
|
|
45
|
+
operations: [];
|
|
46
|
+
}
|
|
47
|
+
export interface MigrationInventoryNode {
|
|
48
|
+
path: string;
|
|
49
|
+
kind: "file" | "directory";
|
|
50
|
+
mode: number;
|
|
51
|
+
dev: string;
|
|
52
|
+
ino: string;
|
|
53
|
+
bytesHash: string;
|
|
54
|
+
}
|
|
55
|
+
export interface MigrationStartInventory {
|
|
56
|
+
version: 1;
|
|
57
|
+
nodes: MigrationInventoryNode[];
|
|
58
|
+
hash: string;
|
|
59
|
+
}
|
|
60
|
+
export interface LegacyMigrationStorageJournalV5 {
|
|
61
|
+
version: 5;
|
|
62
|
+
mode: "legacy-migration";
|
|
63
|
+
root: string;
|
|
64
|
+
token: string;
|
|
65
|
+
oldCatalog: string;
|
|
66
|
+
newCatalog: string;
|
|
67
|
+
stableItemsTree: string;
|
|
68
|
+
stableSourcesTree: string;
|
|
69
|
+
stableSourcesTreeNext: string;
|
|
70
|
+
backupDir: string;
|
|
71
|
+
backupManifest: string;
|
|
72
|
+
operations: [];
|
|
73
|
+
ownedDirectories: [];
|
|
74
|
+
startInventory: MigrationStartInventory;
|
|
75
|
+
}
|
|
76
|
+
export interface LegacyMigrationStorageJournal {
|
|
77
|
+
version: 4;
|
|
78
|
+
mode: "legacy-migration";
|
|
79
|
+
root: string;
|
|
80
|
+
token: string;
|
|
81
|
+
oldCatalog: string;
|
|
82
|
+
newCatalog: string;
|
|
83
|
+
stableItemsTree: string;
|
|
84
|
+
stableSourcesTree: string;
|
|
85
|
+
stableSourcesTreeNext: string;
|
|
86
|
+
backupDir: string;
|
|
87
|
+
backupManifest: string;
|
|
88
|
+
operations: {
|
|
89
|
+
itemId: string;
|
|
90
|
+
target: string;
|
|
91
|
+
kind: "file" | "tree";
|
|
92
|
+
oldTree: null;
|
|
93
|
+
newTree: string;
|
|
94
|
+
}[];
|
|
95
|
+
ownedDirectories: {
|
|
96
|
+
path: string;
|
|
97
|
+
stage: string;
|
|
98
|
+
dev: string;
|
|
99
|
+
ino: string;
|
|
100
|
+
}[];
|
|
101
|
+
nextSourcesTree?: string;
|
|
102
|
+
}
|
|
103
|
+
export type StorageJournal = LegacyStorageJournal | SourcesStorageJournal | CatalogOnlyStorageJournal | LegacyMigrationStorageJournal | LegacyMigrationStorageJournalV5;
|
|
104
|
+
export declare function canonicalStorageJournalJson(value: unknown): string;
|
|
105
|
+
export declare function parseMigrationStartInventory(value: unknown): MigrationStartInventory;
|
|
106
|
+
export declare function parseStorageJournal(value: unknown, expected: {
|
|
107
|
+
root: string;
|
|
108
|
+
token: string;
|
|
109
|
+
}): StorageJournal;
|
|
110
|
+
export declare function validateLegacyMigrationJournalTargets(journal: LegacyMigrationStorageJournal | LegacyMigrationStorageJournalV5, previous: LegacyCatalog, next: Catalog): void;
|
|
111
|
+
export declare function validateSourcesJournalTargets(journal: SourcesStorageJournal, previous: Catalog | null, next: Catalog): void;
|