indraq_cli 1.5.7 → 1.5.8
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 +41 -21
- package/dist/cli/help-content.d.ts.map +1 -1
- package/dist/cli/help-content.js +1 -1
- package/dist/cli/help-content.js.map +1 -1
- package/dist/modules/mobile/services/project.service.d.ts +2 -2
- package/dist/modules/mobile/services/project.service.d.ts.map +1 -1
- package/dist/shared/config/config-files.d.ts.map +1 -1
- package/dist/shared/config/config-files.js +82 -35
- package/dist/shared/config/config-files.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<img alt="Java 21" src="https://img.shields.io/badge/Java-21%20recommended-ED8B00?logo=openjdk&logoColor=white" />
|
|
19
19
|
<img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-strict-3178C6?logo=typescript&logoColor=white" />
|
|
20
20
|
<img alt="License" src="https://img.shields.io/npm/l/indraq_cli" />
|
|
21
|
-
<img alt="Version" src="https://img.shields.io/badge/version-1.5.
|
|
21
|
+
<img alt="Version" src="https://img.shields.io/badge/version-1.5.8-264B63" />
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
> [!IMPORTANT]
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
1. [What is IndraQ CLI?](#what-is-indraq-cli)
|
|
32
32
|
2. [Explain it like I am new](#explain-it-like-i-am-new)
|
|
33
|
-
3. [What changed in v1.5.
|
|
33
|
+
3. [What changed in v1.5.8?](#what-changed-in-v158)
|
|
34
34
|
4. [Requirements](#requirements)
|
|
35
35
|
5. [Install Java 21](#install-java-21)
|
|
36
36
|
6. [Install IndraQ CLI](#install-indraq-cli)
|
|
@@ -59,11 +59,23 @@
|
|
|
59
59
|
|
|
60
60
|
---
|
|
61
61
|
|
|
62
|
-
## v1.5.
|
|
62
|
+
## v1.5.8 — Git-safe shared configuration
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
Project configuration is now intentionally shareable without exposing Jenkins credentials:
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
```text
|
|
67
|
+
COMMIT / SHARE
|
|
68
|
+
.indraq/jenkins.json
|
|
69
|
+
.indraq/docker.json
|
|
70
|
+
.indraq/mobile.json
|
|
71
|
+
|
|
72
|
+
LOCAL ONLY / IGNORE
|
|
73
|
+
.indraq/jenkins.local.json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
IndraQ reuses an existing project `.gitignore`, adds `.indraq/jenkins.local.json` only when the exact rule is missing, and does not add an ignore-all `.indraq/` rule. Re-running configuration is idempotent, so the same ignore entry is never appended repeatedly. Actual Jenkins username/token/password data stays outside the repository under the user's home directory.
|
|
77
|
+
|
|
78
|
+
Docker deployments also continue to preserve Docker's existing GHCR credential store; IndraQ does not run `docker login ghcr.io` during deployment.
|
|
67
79
|
|
|
68
80
|
---
|
|
69
81
|
|
|
@@ -153,19 +165,27 @@ You do **not** need to give Jenkins a Git URL, Git branch, app subdirectory, or
|
|
|
153
165
|
|
|
154
166
|
---
|
|
155
167
|
|
|
156
|
-
## What changed in v1.5.
|
|
168
|
+
## What changed in v1.5.8?
|
|
169
|
+
|
|
170
|
+
v1.5.8 keeps the working Jenkins, mobile-build, GHCR, and complete-help behavior from v1.5.7 and tightens project configuration sharing.
|
|
157
171
|
|
|
158
|
-
|
|
172
|
+
### Git-safe project configuration in v1.5.8
|
|
159
173
|
|
|
160
|
-
|
|
174
|
+
- IndraQ no longer adds `.indraq/` to the project `.gitignore`.
|
|
175
|
+
- Only `.indraq/jenkins.local.json` is added at the project root as the machine-local Jenkins binding.
|
|
176
|
+
- Existing `.gitignore` files are reused rather than replaced.
|
|
177
|
+
- Existing exact ignore entries are detected, so repeated configuration does not duplicate them.
|
|
178
|
+
- `.indraq/jenkins.json`, `.indraq/docker.json`, and `.indraq/mobile.json` remain available to Git and can be shared with another developer.
|
|
179
|
+
- Jenkins username/token/password remain outside the repo under `~/.indraq/jenkins/...`; another developer receives server/config metadata but not your login credential.
|
|
180
|
+
- Known old IndraQ-generated ignore-all rules are migrated carefully; unrelated user-authored Git rules are preserved.
|
|
161
181
|
|
|
162
182
|
|
|
163
|
-
### Jenkins-console-quality logs and server Gradle reuse in v1.5.
|
|
183
|
+
### Jenkins-console-quality logs and server Gradle reuse in v1.5.8
|
|
164
184
|
|
|
165
185
|
- The terminal log streamer now reads Jenkins **`logText/progressiveHtml`**, the same progressive endpoint used by the classic Jenkins web console. Jenkins therefore removes/renders hidden `ConsoleNote` annotations before the CLI displays the text, so internal `ha:////...` payloads no longer pollute VS Code output.
|
|
166
186
|
- HTML markup is converted back to plain terminal text while preserving usernames, timestamps, Pipeline lines, errors, and normal line spacing. `progressiveText` remains only as a compatibility fallback with explicit ConsoleNote filtering.
|
|
167
187
|
- Failed mobile builds now end with a short **Key Jenkins error lines** summary plus the direct Jenkins build URL.
|
|
168
|
-
- The mobile Jenkinsfile still normalizes Windows CRLF in `android/gradlew`, but v1.5.
|
|
188
|
+
- The mobile Jenkinsfile still normalizes Windows CRLF in `android/gradlew`, but v1.5.8 also restores the Jenkins server's shared Gradle cache at `$HOME/.gradle` instead of creating an empty per-project Gradle cache.
|
|
169
189
|
- Gradle execution prefers the exact cached project-wrapper distribution. If no exact wrapper distribution is cached, an installed Jenkins-server Gradle from the same major version can be reused. The project wrapper remains the final fallback.
|
|
170
190
|
- If a wrapper download is genuinely necessary, the temporary Jenkins copy of `gradle-wrapper.properties` gets `networkTimeout=120000` (120 seconds) instead of failing at Gradle's short default timeout.
|
|
171
191
|
- `FULL_RESET` no longer deletes Jenkins' shared Gradle cache. It clears project-local npm/Expo caches and generated Android state only.
|
|
@@ -276,7 +296,7 @@ Existing `.indraq/mobile.json` files are upgraded automatically. Project type, a
|
|
|
276
296
|
| **Jenkins account** | Starts Jenkins jobs | Jenkins username + API token |
|
|
277
297
|
|
|
278
298
|
> [!TIP]
|
|
279
|
-
> Node.js **24** is recommended for IndraQ developer machines, but v1.5.
|
|
299
|
+
> Node.js **24** is recommended for IndraQ developer machines, but v1.5.8 supports Node.js **22 and newer**.
|
|
280
300
|
|
|
281
301
|
### Jenkins mobile build machine
|
|
282
302
|
|
|
@@ -866,7 +886,7 @@ indraq build mobile:prod --output aab --profile clean --verbose --yes
|
|
|
866
886
|
|
|
867
887
|
## Android versioning and artifact names
|
|
868
888
|
|
|
869
|
-
IndraQ v1.5.
|
|
889
|
+
IndraQ v1.5.8 currently manages **Android** versioning only. iOS version/build-number management is intentionally out of scope for now.
|
|
870
890
|
|
|
871
891
|
### What value does a build use?
|
|
872
892
|
|
|
@@ -1119,7 +1139,7 @@ Project-local configuration:
|
|
|
1119
1139
|
The generated `.indraq/.gitignore` ignores **only machine-local files** such as `jenkins.local.json`. Shared project configuration is intentionally visible to Git.
|
|
1120
1140
|
|
|
1121
1141
|
> [!IMPORTANT]
|
|
1122
|
-
>
|
|
1142
|
+
> v1.5.8 never adds `.indraq/` as an ignore-all rule. If a project already has a root `.gitignore`, IndraQ reuses that same file and adds `.indraq/jenkins.local.json` only when that exact rule is missing. Re-running `indraq configure` does not duplicate the entry. Known ignore-all rules created by older IndraQ versions are migrated while unrelated user ignore rules are preserved.
|
|
1123
1143
|
|
|
1124
1144
|
### `jenkins.json`
|
|
1125
1145
|
|
|
@@ -1205,7 +1225,7 @@ Expected for this release:
|
|
|
1205
1225
|
1.5.3
|
|
1206
1226
|
```
|
|
1207
1227
|
|
|
1208
|
-
v1.5.
|
|
1228
|
+
v1.5.8 automatically migrates older `.indraq/mobile.json` and Jenkins config layouts. Existing mobile environment/version settings are preserved. Older Jenkins username/server binding fields are split so only non-secret server metadata remains in tracked `jenkins.json`; the current machine binding is written to ignored `jenkins.local.json`.
|
|
1209
1229
|
|
|
1210
1230
|
For projects coming from pre-versioning releases, Android version settings initialize as:
|
|
1211
1231
|
|
|
@@ -1391,7 +1411,7 @@ Do not paste it into Jenkins.
|
|
|
1391
1411
|
Make sure:
|
|
1392
1412
|
|
|
1393
1413
|
1. Jenkins **File Parameter** plugin is installed;
|
|
1394
|
-
2. the job uses `templates/jenkins/Jenkinsfile-Mobile-App` from v1.5.
|
|
1414
|
+
2. the job uses `templates/jenkins/Jenkinsfile-Mobile-App` from v1.5.8;
|
|
1395
1415
|
3. Jenkins has registered the parameters;
|
|
1396
1416
|
4. the Jenkins job is named exactly `Mobile app Cli build`.
|
|
1397
1417
|
|
|
@@ -1459,15 +1479,15 @@ This restores the shared Gradle-cache behavior used by the earlier Git-checkout
|
|
|
1459
1479
|
|
|
1460
1480
|
### Gradle wrapper tries to download and times out
|
|
1461
1481
|
|
|
1462
|
-
v1.5.
|
|
1482
|
+
v1.5.8 first checks the Jenkins server's shared wrapper cache. If the requested distribution is already cached, the wrapper uses it without internet access. If there is no exact cached wrapper but Jenkins has a system Gradle from the same major version, IndraQ reuses the server Gradle. Only when neither option exists does the project wrapper attempt a download, with `networkTimeout=120000` applied to the temporary Jenkins copy of `gradle-wrapper.properties`.
|
|
1463
1483
|
|
|
1464
1484
|
If the Jenkins machine has neither a compatible installed Gradle nor the requested wrapper cached and it has no outbound access to Gradle distributions, install/cache the required Gradle version on that Jenkins machine once.
|
|
1465
1485
|
|
|
1466
1486
|
### Jenkins logs contain `ha:////...`, look diagonal, or are unreadable in VS Code
|
|
1467
1487
|
|
|
1468
|
-
The `ha:////...` strings are Jenkins `ConsoleNote` annotations embedded in raw `progressiveText`. The Jenkins browser UI renders/hides those annotations. v1.5.
|
|
1488
|
+
The `ha:////...` strings are Jenkins `ConsoleNote` annotations embedded in raw `progressiveText`. The Jenkins browser UI renders/hides those annotations. v1.5.8 now consumes Jenkins `logText/progressiveHtml`—the same progressive endpoint used by the classic web console—and converts the rendered output back to plain terminal text.
|
|
1469
1489
|
|
|
1470
|
-
The CLI also normalizes line endings and strips terminal control sequences. Upgrade to v1.5.
|
|
1490
|
+
The CLI also normalizes line endings and strips terminal control sequences. Upgrade to v1.5.8 or newer if you see raw `ha:////...` payloads or staircase/right-shifted output.
|
|
1471
1491
|
|
|
1472
1492
|
---
|
|
1473
1493
|
|
|
@@ -1636,7 +1656,7 @@ indraq diagnostics ...
|
|
|
1636
1656
|
- [ ] command is run from package.json root
|
|
1637
1657
|
- [ ] Production Jenkins connection configured (`indraq configure → Jenkins → Production`)
|
|
1638
1658
|
- [ ] Jenkins File Parameter plugin installed
|
|
1639
|
-
- [ ] Jenkins job uses the v1.5.
|
|
1659
|
+
- [ ] Jenkins job uses the v1.5.8 mobile Jenkinsfile
|
|
1640
1660
|
- [ ] Mobile project type configured
|
|
1641
1661
|
- [ ] Jenkins job is named exactly `Mobile app Cli build` and exists on Production Jenkins
|
|
1642
1662
|
- [ ] Development / Staging / Production defaults configured as needed
|
|
@@ -1661,6 +1681,6 @@ MIT License. See [`LICENSE`](LICENSE).
|
|
|
1661
1681
|
|
|
1662
1682
|
### Jenkins mobile upload returns HTTP 403
|
|
1663
1683
|
|
|
1664
|
-
IndraQ CLI v1.5.
|
|
1684
|
+
IndraQ CLI v1.5.8 preserves the Jenkins web-session cookie together with the CSRF crumb when a Jenkins username/password is used. Jenkins ties crumbs to the session that created them, so both values must travel together. API-token authentication is exempt from the crumb requirement.
|
|
1665
1685
|
|
|
1666
|
-
If a mobile build still returns HTTP 403, v1.5.
|
|
1686
|
+
If a mobile build still returns HTTP 403, v1.5.8 prints Jenkins' own response message. A permission error means the configured Jenkins user needs **Job/Read** and **Job/Build** on the `Mobile app Cli build` job. A CSRF error means the Jenkins controller or reverse proxy is rejecting the crumb/session and the printed Jenkins message should be used for diagnosis.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-content.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"help-content.d.ts","sourceRoot":"","sources":["help-content.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAM7E,eAAO,MAAM,oBAAoB,QAAO,MAgFvC,CAAC;AA2GF,eAAO,MAAM,YAAY,GAAI,OAAO,SAAS,KAAG,MAM/C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,KAAG,SAAS,GAAG,SAS3D,CAAC"}
|
package/dist/cli/help-content.js
CHANGED
|
@@ -117,7 +117,7 @@ ${heading('Sections')}
|
|
|
117
117
|
Review current project configuration
|
|
118
118
|
Exit
|
|
119
119
|
|
|
120
|
-
${note('
|
|
120
|
+
${note('Git sharing: commit .indraq/jenkins.json, docker.json and mobile.json. Only .indraq/jenkins.local.json is machine-local/ignored; actual Jenkins credentials stay under the user home directory.')}
|
|
121
121
|
`;
|
|
122
122
|
const dockerHelp = () => `
|
|
123
123
|
${heading('Docker / GHCR deployment')}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-content.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"help-content.js","sourceRoot":"","sources":["help-content.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAI1B,MAAM,OAAO,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7D,MAAM,OAAO,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7D,MAAM,IAAI,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAEnD,MAAM,oBAAoB,GAAG,GAAW,EAAE,CAAC;EAChD,OAAO,CAAC,4BAA4B,CAAC;;EAErC,OAAO,CAAC,MAAM,CAAC;IACb,OAAO,CAAC,kBAAkB,CAAC;IAC3B,OAAO,CAAC,eAAe,CAAC;IACxB,OAAO,CAAC,aAAa,CAAC;IACtB,OAAO,CAAC,qBAAqB,CAAC;IAC9B,OAAO,CAAC,eAAe,CAAC;IACxB,OAAO,CAAC,kBAAkB,CAAC;;EAE7B,OAAO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AQ,CAAC;IAC5G,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AATW,QAAA,cAAc,kBASzB"}
|
|
@@ -6,6 +6,6 @@ export interface MobileProjectInfo {
|
|
|
6
6
|
gitCommit?: string;
|
|
7
7
|
gitDirty: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const validateMobileProjectRoot: (projectType: MobileProjectType, root?:
|
|
10
|
-
export declare const assertExpoDevelopmentClientInstalled: (root?:
|
|
9
|
+
export declare const validateMobileProjectRoot: (projectType: MobileProjectType, root?: any) => MobileProjectInfo;
|
|
10
|
+
export declare const assertExpoDevelopmentClientInstalled: (root?: any) => void;
|
|
11
11
|
//# sourceMappingURL=project.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/mobile/services/project.service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAyCD,eAAO,MAAM,yBAAyB,GACpC,aAAa,iBAAiB,EAC9B,
|
|
1
|
+
{"version":3,"file":"project.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/mobile/services/project.service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAyCD,eAAO,MAAM,yBAAyB,GACpC,aAAa,iBAAiB,EAC9B,UAAoB,KACnB,iBAiCF,CAAC;AAEF,eAAO,MAAM,oCAAoC,GAAI,UAAoB,KAAG,IAQ3E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-files.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"config-files.d.ts","sourceRoot":"","sources":["config-files.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,wBAAwB,QAAO,MAAwC,CAAC;AAErF,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,KAAG,MACX,CAAC;AAwH7C,eAAO,MAAM,2BAA2B,QAAO,MAO9C,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,UAAU,MAAM,KAAG,OAM7D,CAAC"}
|
|
@@ -8,16 +8,19 @@ const getIndraqConfigDirectory = () => (0, node_path_1.join)(process.cwd(), '.in
|
|
|
8
8
|
exports.getIndraqConfigDirectory = getIndraqConfigDirectory;
|
|
9
9
|
const getIndraqConfigPath = (filename) => (0, node_path_1.join)((0, exports.getIndraqConfigDirectory)(), filename);
|
|
10
10
|
exports.getIndraqConfigPath = getIndraqConfigPath;
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*.secret
|
|
15
|
-
auth
|
|
16
|
-
jenkins-cli.jar
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
11
|
+
const INDRAQ_LOCAL_GITIGNORE_HEADER = '# IndraQ CLI machine-local files';
|
|
12
|
+
const INDRAQ_LOCAL_GITIGNORE_RULES = [
|
|
13
|
+
'jenkins.local.json',
|
|
14
|
+
'*.secret',
|
|
15
|
+
'auth',
|
|
16
|
+
'jenkins-cli.jar'
|
|
17
|
+
];
|
|
18
|
+
const ROOT_GITIGNORE_HEADER = '# IndraQ CLI machine-local Jenkins binding';
|
|
19
|
+
const ROOT_JENKINS_LOCAL_RULE = '.indraq/jenkins.local.json';
|
|
20
|
+
// This was generated by older IndraQ CLI releases. It ignored every file in
|
|
21
|
+
// .indraq/, which prevented safe project configuration from being shared.
|
|
22
|
+
const LEGACY_INNER_GITIGNORE = '*\n!.gitignore\n';
|
|
23
|
+
const LEGACY_ROOT_SHARED_BLOCK = `# IndraQ CLI shared project configuration
|
|
21
24
|
# These files are safe and intentionally shared with the project.
|
|
22
25
|
!.indraq/
|
|
23
26
|
!.indraq/.gitignore
|
|
@@ -25,7 +28,46 @@ ${ROOT_GITIGNORE_MARKER}
|
|
|
25
28
|
!.indraq/docker.json
|
|
26
29
|
!.indraq/mobile.json
|
|
27
30
|
`;
|
|
28
|
-
const
|
|
31
|
+
const normaliseLines = (content) => content.replace(/\r\n/g, '\n').split('\n');
|
|
32
|
+
const hasExactRule = (lines, rule) => lines.some((line) => line.trim() === rule);
|
|
33
|
+
const appendMissingBlock = (content, header, rules) => {
|
|
34
|
+
const lines = normaliseLines(content);
|
|
35
|
+
const missing = rules.filter((rule) => !hasExactRule(lines, rule));
|
|
36
|
+
if (missing.length === 0)
|
|
37
|
+
return content;
|
|
38
|
+
const output = [...lines];
|
|
39
|
+
while (output.length > 0 && output[output.length - 1] === '')
|
|
40
|
+
output.pop();
|
|
41
|
+
if (output.length > 0)
|
|
42
|
+
output.push('');
|
|
43
|
+
if (!hasExactRule(output, header))
|
|
44
|
+
output.push(header);
|
|
45
|
+
output.push(...missing);
|
|
46
|
+
return `${output.join('\n')}\n`;
|
|
47
|
+
};
|
|
48
|
+
const removeLegacyRootSharedBlock = (content) => {
|
|
49
|
+
const normalised = content.replace(/\r\n/g, '\n');
|
|
50
|
+
return normalised.replace(LEGACY_ROOT_SHARED_BLOCK, '').replace(/\n{3,}/g, '\n\n');
|
|
51
|
+
};
|
|
52
|
+
const removeKnownLegacyIndraqDirectoryRule = (content) => {
|
|
53
|
+
const lines = normaliseLines(content);
|
|
54
|
+
const output = [];
|
|
55
|
+
for (let index = 0; index < lines.length; index += 1) {
|
|
56
|
+
const line = lines[index];
|
|
57
|
+
if (line.trim() !== '.indraq/') {
|
|
58
|
+
output.push(line);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
// Only remove an ignore-all rule when it is clearly part of an IndraQ
|
|
62
|
+
// generated/commented section. Never delete an unrelated user rule blindly.
|
|
63
|
+
const previousNonBlank = [...output].reverse().find((candidate) => candidate.trim() !== '')?.trim() ?? '';
|
|
64
|
+
if (/^#.*indraq/i.test(previousNonBlank))
|
|
65
|
+
continue;
|
|
66
|
+
output.push(line);
|
|
67
|
+
}
|
|
68
|
+
return output.join('\n');
|
|
69
|
+
};
|
|
70
|
+
const ensureRootGitignoreProtectsOnlyLocalJenkinsBinding = () => {
|
|
29
71
|
const gitCheck = (0, node_child_process_1.spawnSync)('git', ['rev-parse', '--is-inside-work-tree'], {
|
|
30
72
|
cwd: process.cwd(),
|
|
31
73
|
encoding: 'utf8',
|
|
@@ -41,39 +83,44 @@ const ensureRootGitignoreAllowsSharedConfig = () => {
|
|
|
41
83
|
catch {
|
|
42
84
|
return;
|
|
43
85
|
}
|
|
44
|
-
|
|
86
|
+
// Migrate only rules that previous IndraQ versions generated. User-owned
|
|
87
|
+
// ignore rules are preserved.
|
|
88
|
+
let next = removeLegacyRootSharedBlock(content);
|
|
89
|
+
next = removeKnownLegacyIndraqDirectoryRule(next);
|
|
90
|
+
next = appendMissingBlock(next, ROOT_GITIGNORE_HEADER, [ROOT_JENKINS_LOCAL_RULE]);
|
|
91
|
+
if (next === content)
|
|
45
92
|
return;
|
|
46
|
-
// Earlier IndraQ CLI releases recommended ignoring the whole .indraq directory.
|
|
47
|
-
// Appending explicit re-includes makes the safe shared config trackable while the
|
|
48
|
-
// .indraq/.gitignore file continues to exclude machine-local bindings/secrets.
|
|
49
|
-
const separator = content.length > 0 && !content.endsWith('\n') ? '\n' : '';
|
|
50
93
|
try {
|
|
51
|
-
(0, node_fs_1.writeFileSync)(rootGitignore,
|
|
94
|
+
(0, node_fs_1.writeFileSync)(rootGitignore, next, 'utf8');
|
|
52
95
|
}
|
|
53
96
|
catch {
|
|
54
|
-
//
|
|
55
|
-
//
|
|
97
|
+
// Saving actual config files will surface any filesystem problem. Git
|
|
98
|
+
// visibility checks below will still warn if shared config is blocked.
|
|
56
99
|
}
|
|
57
100
|
};
|
|
58
|
-
const
|
|
59
|
-
const directory = (0, exports.getIndraqConfigDirectory)();
|
|
60
|
-
(0, node_fs_1.mkdirSync)(directory, { recursive: true });
|
|
101
|
+
const ensureInnerGitignore = (directory) => {
|
|
61
102
|
const gitignore = (0, node_path_1.join)(directory, '.gitignore');
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
(0, node_fs_1.
|
|
103
|
+
let content = '';
|
|
104
|
+
try {
|
|
105
|
+
content = (0, node_fs_1.existsSync)(gitignore) ? (0, node_fs_1.readFileSync)(gitignore, 'utf8') : '';
|
|
65
106
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if ((0, node_fs_1.readFileSync)(gitignore, 'utf8') === legacyContent) {
|
|
69
|
-
(0, node_fs_1.writeFileSync)(gitignore, SHARED_CONFIG_GITIGNORE, 'utf8');
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
catch {
|
|
73
|
-
// Saving the actual config will surface any filesystem problem.
|
|
74
|
-
}
|
|
107
|
+
catch {
|
|
108
|
+
return;
|
|
75
109
|
}
|
|
76
|
-
|
|
110
|
+
// Exact legacy file was generated by old IndraQ versions and is safe to
|
|
111
|
+
// replace because it intentionally ignored the entire directory.
|
|
112
|
+
if (content.replace(/\r\n/g, '\n') === LEGACY_INNER_GITIGNORE)
|
|
113
|
+
content = '';
|
|
114
|
+
const next = appendMissingBlock(content, INDRAQ_LOCAL_GITIGNORE_HEADER, INDRAQ_LOCAL_GITIGNORE_RULES);
|
|
115
|
+
if (next === content)
|
|
116
|
+
return;
|
|
117
|
+
(0, node_fs_1.writeFileSync)(gitignore, next, 'utf8');
|
|
118
|
+
};
|
|
119
|
+
const ensureIndraqConfigDirectory = () => {
|
|
120
|
+
const directory = (0, exports.getIndraqConfigDirectory)();
|
|
121
|
+
(0, node_fs_1.mkdirSync)(directory, { recursive: true });
|
|
122
|
+
ensureInnerGitignore(directory);
|
|
123
|
+
ensureRootGitignoreProtectsOnlyLocalJenkinsBinding();
|
|
77
124
|
return directory;
|
|
78
125
|
};
|
|
79
126
|
exports.ensureIndraqConfigDirectory = ensureIndraqConfigDirectory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-files.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"config-files.js","sourceRoot":"","sources":["config-files.ts"],"names":[],"mappings":";;;AAAA,qCAA6E;AAC7E,yCAAiC;AACjC,2DAA+C;AAExC,MAAM,wBAAwB,GAAG,GAAW,EAAE,CAAC,IAAA,gBAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC;AAAxE,QAAA,wBAAwB,4BAAgD;AAE9E,MAAM,mBAAmB,GAAG,CAAC,QAAgB,EAAU,EAAE,CAC9D,IAAA,gBAAI,EAAC,IAAA,gCAAwB,GAAE,EAAE,QAAQ,CAAC,CAAC;AADhC,QAAA,mBAAmB,uBACa;AAE7C,MAAM,6BAA6B,GAAG,kCAAkC,CAAC;AACzE,MAAM,4BAA4B,GAAG;IACnC,oBAAoB;IACpB,UAAU;IACV,MAAM;IACN,iBAAiB;CAClB,CAAC;AAEF,MAAM,qBAAqB,GAAG,4CAA4C,CAAC;AAC3E,MAAM,uBAAuB,GAAG,4BAA4B,CAAC;AAE7D,4EAA4E;AAC5E,0EAA0E;AAC1E,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAClD,MAAM,wBAAwB,GAAG;;;;;;;CAOhC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAe,EAAY,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACjG,MAAM,YAAY,GAAG,CAAC,KAAe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