@rock-js/tools 0.11.0 → 0.11.1
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.
|
@@ -68,13 +68,13 @@ export interface RemoteBuildCache {
|
|
|
68
68
|
* - rock-ios-simulator-debug-1234567890
|
|
69
69
|
* - rock-ios-device-debug-1234567890
|
|
70
70
|
*/
|
|
71
|
-
export declare function formatArtifactName({ platform, traits, root, fingerprintOptions, raw,
|
|
71
|
+
export declare function formatArtifactName({ platform, traits, root, fingerprintOptions, raw, type, }: {
|
|
72
72
|
platform?: 'ios' | 'android';
|
|
73
73
|
traits?: string[];
|
|
74
74
|
root: string;
|
|
75
75
|
fingerprintOptions: FingerprintSources;
|
|
76
76
|
raw?: boolean;
|
|
77
|
-
|
|
77
|
+
type?: 'create' | 'update';
|
|
78
78
|
}): Promise<string>;
|
|
79
79
|
export declare function getLocalArtifactPath(artifactName: string): string;
|
|
80
80
|
export declare function getLocalBinaryPath(artifactPath: string): string | null;
|
|
@@ -3,7 +3,6 @@ import path from 'node:path';
|
|
|
3
3
|
import { color } from '../color.js';
|
|
4
4
|
import { nativeFingerprint } from '../fingerprint/index.js';
|
|
5
5
|
import { isInteractive } from '../isInteractive.js';
|
|
6
|
-
import logger from '../logger.js';
|
|
7
6
|
import { getCacheRootPath } from '../project.js';
|
|
8
7
|
import { spinner } from '../prompts.js';
|
|
9
8
|
export const BUILD_CACHE_DIR = 'remote-build';
|
|
@@ -13,7 +12,7 @@ export const BUILD_CACHE_DIR = 'remote-build';
|
|
|
13
12
|
* - rock-ios-simulator-debug-1234567890
|
|
14
13
|
* - rock-ios-device-debug-1234567890
|
|
15
14
|
*/
|
|
16
|
-
export async function formatArtifactName({ platform, traits, root, fingerprintOptions, raw,
|
|
15
|
+
export async function formatArtifactName({ platform, traits, root, fingerprintOptions, raw, type, }) {
|
|
17
16
|
if (!platform || !traits) {
|
|
18
17
|
return '';
|
|
19
18
|
}
|
|
@@ -24,16 +23,15 @@ export async function formatArtifactName({ platform, traits, root, fingerprintOp
|
|
|
24
23
|
});
|
|
25
24
|
return `rock-${platform}-${traits.join('-')}-${hash}`;
|
|
26
25
|
}
|
|
27
|
-
const
|
|
28
|
-
|
|
26
|
+
const startMessage = type === 'update' ? 'Updating' : 'Calculating';
|
|
27
|
+
const stopMessage = type === 'update' ? 'Updated' : 'Calculated';
|
|
28
|
+
const loader = spinner();
|
|
29
|
+
loader.start(`${startMessage} project fingerprint`);
|
|
29
30
|
const { hash } = await nativeFingerprint(root, {
|
|
30
31
|
...fingerprintOptions,
|
|
31
32
|
platform,
|
|
32
33
|
});
|
|
33
|
-
loader.stop(
|
|
34
|
-
if (silent) {
|
|
35
|
-
logger.debug(`Calculated project fingerprint: ${hash}`);
|
|
36
|
-
}
|
|
34
|
+
loader.stop(`${stopMessage} project fingerprint: ${color.bold(color.magenta(hash))}`);
|
|
37
35
|
return `rock-${platform}-${traits.join('-')}-${hash}`;
|
|
38
36
|
}
|
|
39
37
|
export function getLocalArtifactPath(artifactName) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/lib/build-cache/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/lib/build-cache/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yB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AC,IAAI,CAAC,CAAC,EAAE,CACzE,CAAC;IACF,OAAO,QAAQ,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,YAAoB;IACvD,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,eAAe,EAAE,YAAY,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,YAAoB;IACrD,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC3C,8CAA8C;IAC9C,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IACvE,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rock-js/tools",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/src/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"tslib": "^2.3.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@rock-js/test-helpers": "^0.11.
|
|
34
|
+
"@rock-js/test-helpers": "^0.11.1"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|