@datatruck/cli 0.36.3 → 0.36.4
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.
|
@@ -151,9 +151,8 @@ class CopyAction {
|
|
|
151
151
|
async copyCrossRepository(options) {
|
|
152
152
|
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
153
153
|
try {
|
|
154
|
-
const { repo,
|
|
154
|
+
const { repo, mirrorRepo, mirrorConfig, snapshot } = options;
|
|
155
155
|
const tmp = __addDisposableResource(env_1, await (0, temp_1.useTempDir)("copy", "restore"), true);
|
|
156
|
-
const pkg = (0, config_1.findPackageOrFail)(this.config, snapshot.packageName);
|
|
157
156
|
await repo.restore({
|
|
158
157
|
options: {
|
|
159
158
|
verbose: this.options.verbose,
|
|
@@ -161,7 +160,7 @@ class CopyAction {
|
|
|
161
160
|
},
|
|
162
161
|
snapshot: { id: snapshot.id, date: snapshot.date },
|
|
163
162
|
package: { name: snapshot.packageName },
|
|
164
|
-
packageConfig:
|
|
163
|
+
packageConfig: undefined,
|
|
165
164
|
snapshotPath: tmp.path,
|
|
166
165
|
onProgress: options.onProgress,
|
|
167
166
|
});
|
|
@@ -178,7 +177,7 @@ class CopyAction {
|
|
|
178
177
|
name: snapshot.packageName,
|
|
179
178
|
path: tmp.path,
|
|
180
179
|
},
|
|
181
|
-
packageConfig:
|
|
180
|
+
packageConfig: undefined,
|
|
182
181
|
onProgress: options.onProgress,
|
|
183
182
|
});
|
|
184
183
|
}
|
|
@@ -27,7 +27,7 @@ export type RepoFetchSnapshotsData = {
|
|
|
27
27
|
export type RepoCopyData<TRepositoryConfig> = {
|
|
28
28
|
options: BackupActionOptions;
|
|
29
29
|
snapshot: PreSnapshot;
|
|
30
|
-
package: PackageConfig
|
|
30
|
+
package: Pick<PackageConfig, "name">;
|
|
31
31
|
mirrorRepositoryConfig: TRepositoryConfig;
|
|
32
32
|
onProgress: (data: Progress) => void;
|
|
33
33
|
};
|
|
@@ -35,8 +35,9 @@ export type RepoBackupData<TPackageConfig> = {
|
|
|
35
35
|
options: BackupActionOptions;
|
|
36
36
|
snapshot: PreSnapshot;
|
|
37
37
|
hostname: string;
|
|
38
|
-
package:
|
|
39
|
-
path:
|
|
38
|
+
package: Pick<PackageConfig, "name" | "include" | "exclude"> & {
|
|
39
|
+
path: NonNullable<PackageConfig["path"]>;
|
|
40
|
+
task?: Pick<NonNullable<PackageConfig["task"]>, "name">;
|
|
40
41
|
};
|
|
41
42
|
packageConfig: TPackageConfig | undefined;
|
|
42
43
|
onProgress: (data: Progress) => void;
|
|
@@ -44,9 +45,9 @@ export type RepoBackupData<TPackageConfig> = {
|
|
|
44
45
|
export type RepoRestoreData<TPackageConfig> = {
|
|
45
46
|
options: RestoreActionOptions;
|
|
46
47
|
snapshot: PreSnapshot;
|
|
47
|
-
package: PackageConfig
|
|
48
|
+
package: Pick<PackageConfig, "name">;
|
|
48
49
|
snapshotPath: string;
|
|
49
|
-
packageConfig: TPackageConfig;
|
|
50
|
+
packageConfig: TPackageConfig | undefined;
|
|
50
51
|
onProgress: (data: Progress) => void;
|
|
51
52
|
};
|
|
52
53
|
export type RepoPruneData = {
|
package/lib/utils/cli.js
CHANGED
|
@@ -173,10 +173,11 @@ function colorizeObject(input) {
|
|
|
173
173
|
const object = {};
|
|
174
174
|
for (const key in input) {
|
|
175
175
|
const value = input[key];
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
if (value !== undefined)
|
|
177
|
+
object[colorizeValue(key)] =
|
|
178
|
+
typeof value === "object" && !!value && !Array.isArray(value)
|
|
179
|
+
? colorizeObject(value)
|
|
180
|
+
: colorizeValue(value, "green");
|
|
180
181
|
}
|
|
181
182
|
const values = Object.entries(object)
|
|
182
183
|
.map(([key, value]) => `${key}: ${value}`)
|
|
@@ -9,7 +9,7 @@ export type ParsePathsOptions = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare function parsePaths(values: (string | SpawnStep)[], options: ParsePathsOptions): Promise<string[]>;
|
|
11
11
|
export type BackupPathsOptions = {
|
|
12
|
-
package: PackageConfig
|
|
12
|
+
package: Pick<PackageConfig, "name" | "path" | "include" | "exclude">;
|
|
13
13
|
snapshot: PreSnapshot;
|
|
14
14
|
path: string;
|
|
15
15
|
verbose?: boolean;
|