Skip to content

Commit 540aea8

Browse files
authored
Merge branch 'main' into website/wording
2 parents 75ea10e + 5aa63a3 commit 540aea8

File tree

43 files changed

+372
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+372
-91
lines changed

packages/cli/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# rock
22

3+
## 0.11.5
4+
5+
### Patch Changes
6+
7+
- 94e2fba: chore: add missing description fields to package.jsons
8+
- Updated dependencies [3be5269]
9+
- Updated dependencies [94e2fba]
10+
- @rock-js/tools@0.11.5
11+
- @rock-js/config@0.11.5
12+
13+
## 0.11.4
14+
15+
### Patch Changes
16+
17+
- c904ec9: fix: properly take env value into account; hash sensitive data
18+
- Updated dependencies [c904ec9]
19+
- @rock-js/tools@0.11.4
20+
- @rock-js/config@0.11.4
21+
322
## 0.11.3
423

524
### Patch Changes

packages/cli/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "rock",
3-
"version": "0.11.3",
3+
"version": "0.11.5",
4+
"description": "Command-line interface for Rock - a React Native development toolkit",
45
"type": "module",
56
"types": "./dist/src/index.d.ts",
67
"exports": {
@@ -24,8 +25,8 @@
2425
},
2526
"dependencies": {
2627
"@react-native-community/cli-config": "^20.0.0",
27-
"@rock-js/config": "^0.11.3",
28-
"@rock-js/tools": "^0.11.3",
28+
"@rock-js/config": "^0.11.5",
29+
"@rock-js/tools": "^0.11.5",
2930
"adm-zip": "^0.5.16",
3031
"commander": "^12.1.0",
3132
"tar": "^7.5.1",

packages/cli/src/lib/plugins/fingerprint.ts

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { createHash } from 'node:crypto';
12
import { performance } from 'node:perf_hooks';
23
import type { PluginApi } from '@rock-js/config';
3-
import type { FingerprintSources } from '@rock-js/tools';
4+
import type { FingerprintInputHash, FingerprintSources } from '@rock-js/tools';
45
import {
56
color,
67
intro,
@@ -12,6 +13,25 @@ import {
1213
spinner,
1314
} from '@rock-js/tools';
1415

16+
const hashValue = (value: string) =>
17+
`[HASHED:${createHash('sha256').update(value).digest('hex').substring(0, 8)}]`;
18+
19+
/**
20+
* Redacts sensitive environment variables from fingerprint sources by hashing their values
21+
*/
22+
function redactSensitiveSources(sources: FingerprintInputHash[]) {
23+
return sources.map((source) => {
24+
if (source.key === 'json:env' && 'json' in source) {
25+
const env = source.json as Record<string, string>;
26+
const redactedEnv = Object.fromEntries(
27+
Object.entries(env).map(([key, value]) => [key, hashValue(value)]),
28+
);
29+
return { ...source, json: redactedEnv };
30+
}
31+
return source;
32+
});
33+
}
34+
1535
type NativeFingerprintCommandOptions = {
1636
platform: 'ios' | 'android';
1737
raw?: boolean;
@@ -39,7 +59,9 @@ export async function nativeFingerprintCommand(
3959
JSON.stringify(
4060
{
4161
hash: fingerprint.hash,
42-
sources: fingerprint.inputs.filter((source) => source.hash != null),
62+
sources: redactSensitiveSources(
63+
fingerprint.inputs.filter((source) => source.hash != null),
64+
),
4365
},
4466
null,
4567
2,
@@ -69,7 +91,9 @@ export async function nativeFingerprintCommand(
6991
logger.debug(
7092
'Sources:',
7193
JSON.stringify(
72-
fingerprint.inputs.filter((source) => source.hash != null),
94+
redactSensitiveSources(
95+
fingerprint.inputs.filter((source) => source.hash != null),
96+
),
7397
null,
7498
2,
7599
),

packages/config/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# @rnef/config
22

3+
## 0.11.5
4+
5+
### Patch Changes
6+
7+
- 94e2fba: chore: add missing description fields to package.jsons
8+
- Updated dependencies [3be5269]
9+
- Updated dependencies [94e2fba]
10+
- @rock-js/tools@0.11.5
11+
- @rock-js/provider-github@0.11.5
12+
13+
## 0.11.4
14+
15+
### Patch Changes
16+
17+
- Updated dependencies [c904ec9]
18+
- @rock-js/tools@0.11.4
19+
- @rock-js/provider-github@0.11.4
20+
321
## 0.11.3
422

523
### Patch Changes

packages/config/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@rock-js/config",
3-
"version": "0.11.3",
3+
"version": "0.11.5",
4+
"description": "Configuration management utilities for Rock projects",
45
"type": "module",
56
"types": "./dist/src/index.d.ts",
67
"exports": {
@@ -18,14 +19,14 @@
1819
},
1920
"dependencies": {
2021
"@babel/code-frame": "^7.26.2",
21-
"@rock-js/provider-github": "^0.11.3",
22-
"@rock-js/tools": "^0.11.3",
22+
"@rock-js/provider-github": "^0.11.5",
23+
"@rock-js/tools": "^0.11.5",
2324
"joi": "^17.13.3",
2425
"tslib": "^2.3.0"
2526
},
2627
"devDependencies": {
2728
"@types/babel__code-frame": "^7.0.6",
28-
"@rock-js/test-helpers": "^0.11.3"
29+
"@rock-js/test-helpers": "^0.11.5"
2930
},
3031
"publishConfig": {
3132
"access": "public"

packages/create-app/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# create-rock
22

3+
## 0.11.5
4+
5+
### Patch Changes
6+
7+
- 2788d2f: bump create-rock
8+
- 94e2fba: chore: add missing description fields to package.jsons
9+
310
## 0.11.3
411

512
### Patch Changes

packages/create-app/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "create-rock",
3-
"version": "0.11.3",
3+
"version": "0.11.5",
4+
"description": "Scaffolding tool for creating new React Native applications with Rock",
45
"type": "module",
56
"types": "./dist/src/index.d.ts",
67
"exports": {
@@ -21,8 +22,8 @@
2122
"create-rock": "./dist/src/bin.js"
2223
},
2324
"devDependencies": {
24-
"@rock-js/test-helpers": "^0.11.3",
25-
"@rock-js/tools": "^0.11.3",
25+
"@rock-js/test-helpers": "^0.11.5",
26+
"@rock-js/tools": "^0.11.5",
2627
"@rslib/core": "^0.13.0",
2728
"@types/gradient-string": "^1.1.6",
2829
"@types/minimist": "^1.2.5",

packages/platform-android/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# @rnef/platform-android
22

3+
## 0.11.5
4+
5+
### Patch Changes
6+
7+
- 94e2fba: chore: add missing description fields to package.jsons
8+
- Updated dependencies [3be5269]
9+
- Updated dependencies [94e2fba]
10+
- @rock-js/tools@0.11.5
11+
12+
## 0.11.4
13+
14+
### Patch Changes
15+
16+
- Updated dependencies [c904ec9]
17+
- @rock-js/tools@0.11.4
18+
319
## 0.11.3
420

521
### Patch Changes

packages/platform-android/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@rock-js/platform-android",
3-
"version": "0.11.3",
3+
"version": "0.11.5",
4+
"description": "Android platform support and configuration for Rock",
45
"type": "module",
56
"types": "./dist/src/index.d.ts",
67
"exports": {
@@ -20,13 +21,13 @@
2021
},
2122
"dependencies": {
2223
"@react-native-community/cli-config-android": "^20.0.0",
23-
"@rock-js/tools": "^0.11.3",
24+
"@rock-js/tools": "^0.11.5",
2425
"adm-zip": "^0.5.16",
2526
"tslib": "^2.3.0"
2627
},
2728
"devDependencies": {
2829
"@react-native-community/cli-types": "^20.0.0",
29-
"@rock-js/config": "^0.11.3",
30+
"@rock-js/config": "^0.11.5",
3031
"@types/adm-zip": "^0.5.7"
3132
},
3233
"publishConfig": {

packages/platform-android/template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"android": "rock run:android"
55
},
66
"devDependencies": {
7-
"@rock-js/platform-android": "^0.11.3"
7+
"@rock-js/platform-android": "^0.11.5"
88
}
99
}

0 commit comments

Comments
 (0)