indraq_cli 1.5.5 → 1.5.7
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 +72 -22
- package/dist/cli/create-program.d.ts.map +1 -1
- package/dist/cli/create-program.js +23 -1
- package/dist/cli/create-program.js.map +1 -1
- package/dist/cli/help-content.d.ts +5 -0
- package/dist/cli/help-content.d.ts.map +1 -0
- package/dist/cli/help-content.js +223 -0
- package/dist/cli/help-content.js.map +1 -0
- package/dist/modules/deploy/commands/build.command.d.ts.map +1 -1
- package/dist/modules/deploy/commands/build.command.js +6 -15
- package/dist/modules/deploy/commands/build.command.js.map +1 -1
- package/dist/modules/deploy/services/docker.service.d.ts +0 -2
- package/dist/modules/deploy/services/docker.service.d.ts.map +1 -1
- package/dist/modules/deploy/services/docker.service.js +3 -18
- package/dist/modules/deploy/services/docker.service.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.7-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.7?](#what-changed-in-v155)
|
|
34
34
|
4. [Requirements](#requirements)
|
|
35
35
|
5. [Install Java 21](#install-java-21)
|
|
36
36
|
6. [Install IndraQ CLI](#install-indraq-cli)
|
|
@@ -59,6 +59,14 @@
|
|
|
59
59
|
|
|
60
60
|
---
|
|
61
61
|
|
|
62
|
+
## v1.5.7 — GHCR credential safety
|
|
63
|
+
|
|
64
|
+
Docker deployments now use the GHCR login already stored by Docker. IndraQ **never runs `docker login ghcr.io` during deploy** and never substitutes a Git/Git Credential Manager token for Docker's registry credential.
|
|
65
|
+
|
|
66
|
+
This distinction matters: a credential that can clone/push a GitHub repository does not automatically have GHCR `write:packages` permission. If `docker push ghcr.io/...` works manually, `indraq deploy:dev` / `indraq deploy:prod` now uses that same Docker credential state.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
62
70
|
## What is IndraQ CLI?
|
|
63
71
|
|
|
64
72
|
IndraQ CLI is a program you install once on a developer computer and then use from **any project folder**.
|
|
@@ -145,19 +153,19 @@ You do **not** need to give Jenkins a Git URL, Git branch, app subdirectory, or
|
|
|
145
153
|
|
|
146
154
|
---
|
|
147
155
|
|
|
148
|
-
## What changed in v1.5.
|
|
156
|
+
## What changed in v1.5.7?
|
|
149
157
|
|
|
150
|
-
v1.5.
|
|
158
|
+
v1.5.7 keeps the Android versioning and Jenkins/Git workflow from v1.5.x and hardens Android builds created from Windows source snapshots.
|
|
151
159
|
|
|
152
160
|
This patch fixes the mobile Jenkinsfile Groovy escaping error, makes the mobile Jenkins job name deterministic, makes project configuration Git-shareable, keeps Jenkins login credentials machine-local, and makes Docker deployments send the exact manual deployment parameters expected by the Jenkins pipeline.
|
|
153
161
|
|
|
154
162
|
|
|
155
|
-
### Jenkins-console-quality logs and server Gradle reuse in v1.5.
|
|
163
|
+
### Jenkins-console-quality logs and server Gradle reuse in v1.5.7
|
|
156
164
|
|
|
157
165
|
- 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.
|
|
158
166
|
- 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.
|
|
159
167
|
- Failed mobile builds now end with a short **Key Jenkins error lines** summary plus the direct Jenkins build URL.
|
|
160
|
-
- The mobile Jenkinsfile still normalizes Windows CRLF in `android/gradlew`, but v1.5.
|
|
168
|
+
- The mobile Jenkinsfile still normalizes Windows CRLF in `android/gradlew`, but v1.5.7 also restores the Jenkins server's shared Gradle cache at `$HOME/.gradle` instead of creating an empty per-project Gradle cache.
|
|
161
169
|
- 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.
|
|
162
170
|
- 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.
|
|
163
171
|
- `FULL_RESET` no longer deletes Jenkins' shared Gradle cache. It clears project-local npm/Expo caches and generated Android state only.
|
|
@@ -260,14 +268,15 @@ Existing `.indraq/mobile.json` files are upgraded automatically. Project type, a
|
|
|
260
268
|
|---|---|---|
|
|
261
269
|
| **Node.js 22+** | Runs IndraQ CLI | `node --version` |
|
|
262
270
|
| **npm** | Installs / updates the CLI | `npm --version` |
|
|
263
|
-
| **Git** |
|
|
271
|
+
| **Git** | GitHub identity/org discovery and optional source revision metadata | `git --version` |
|
|
272
|
+
| **Docker GHCR login** | Registry authentication used for image push | `docker login ghcr.io` (one-time, when needed) |
|
|
264
273
|
| **Docker** | Docker deployment module | `docker --version` |
|
|
265
274
|
| **Java** | Runs Jenkins CLI | `java -version` |
|
|
266
275
|
| **tar** | Packages the local mobile source snapshot | `tar --version` |
|
|
267
276
|
| **Jenkins account** | Starts Jenkins jobs | Jenkins username + API token |
|
|
268
277
|
|
|
269
278
|
> [!TIP]
|
|
270
|
-
> Node.js **24** is recommended for IndraQ developer machines, but v1.5.
|
|
279
|
+
> Node.js **24** is recommended for IndraQ developer machines, but v1.5.7 supports Node.js **22 and newer**.
|
|
271
280
|
|
|
272
281
|
### Jenkins mobile build machine
|
|
273
282
|
|
|
@@ -857,7 +866,7 @@ indraq build mobile:prod --output aab --profile clean --verbose --yes
|
|
|
857
866
|
|
|
858
867
|
## Android versioning and artifact names
|
|
859
868
|
|
|
860
|
-
IndraQ v1.5.
|
|
869
|
+
IndraQ v1.5.7 currently manages **Android** versioning only. iOS version/build-number management is intentionally out of scope for now.
|
|
861
870
|
|
|
862
871
|
### What value does a build use?
|
|
863
872
|
|
|
@@ -1110,7 +1119,7 @@ Project-local configuration:
|
|
|
1110
1119
|
The generated `.indraq/.gitignore` ignores **only machine-local files** such as `jenkins.local.json`. Shared project configuration is intentionally visible to Git.
|
|
1111
1120
|
|
|
1112
1121
|
> [!IMPORTANT]
|
|
1113
|
-
> Older IndraQ setups often ignored the whole `.indraq/` directory. v1.5.
|
|
1122
|
+
> Older IndraQ setups often ignored the whole `.indraq/` directory. v1.5.7 automatically appends safe re-include rules to the project root `.gitignore` so `jenkins.json`, `docker.json`, and `mobile.json` can be committed while `jenkins.local.json` remains ignored. Run `git status` after configuration and commit the three shared JSON files.
|
|
1114
1123
|
|
|
1115
1124
|
### `jenkins.json`
|
|
1116
1125
|
|
|
@@ -1196,7 +1205,7 @@ Expected for this release:
|
|
|
1196
1205
|
1.5.3
|
|
1197
1206
|
```
|
|
1198
1207
|
|
|
1199
|
-
v1.5.
|
|
1208
|
+
v1.5.7 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`.
|
|
1200
1209
|
|
|
1201
1210
|
For projects coming from pre-versioning releases, Android version settings initialize as:
|
|
1202
1211
|
|
|
@@ -1223,16 +1232,47 @@ Docker/GHCR and Jenkins configuration remain compatible.
|
|
|
1223
1232
|
|
|
1224
1233
|
## Command reference
|
|
1225
1234
|
|
|
1235
|
+
The CLI now has a complete built-in help system, so developers do not need to open this README just to remember syntax.
|
|
1236
|
+
|
|
1237
|
+
```bash
|
|
1238
|
+
indraq --help
|
|
1239
|
+
indraq help
|
|
1240
|
+
indraq help configure
|
|
1241
|
+
indraq help docker
|
|
1242
|
+
indraq help mobile
|
|
1243
|
+
indraq help doctor
|
|
1244
|
+
```
|
|
1245
|
+
|
|
1246
|
+
### Core commands
|
|
1247
|
+
|
|
1226
1248
|
| Command | Purpose |
|
|
1227
1249
|
|---|---|
|
|
1228
1250
|
| `indraq --version` | Show installed CLI version |
|
|
1229
|
-
| `indraq --help` | Show
|
|
1251
|
+
| `indraq --help` | Show the complete command catalog, aliases, flags, mappings and examples |
|
|
1252
|
+
| `indraq help` | Same complete command catalog |
|
|
1253
|
+
| `indraq help <topic>` | Focused help for `configure`, `docker`, `mobile`, or `doctor` |
|
|
1230
1254
|
| `indraq doctor` | Diagnose runtime / PATH prerequisites |
|
|
1231
1255
|
| `indraq configure` | Open configuration home |
|
|
1232
|
-
|
|
1256
|
+
|
|
1257
|
+
### Docker commands
|
|
1258
|
+
|
|
1259
|
+
| Command | Purpose |
|
|
1260
|
+
|---|---|
|
|
1261
|
+
| `indraq deploy:dev` | Docker Development build/push/deploy |
|
|
1233
1262
|
| `indraq deploy:development` | Alias of `deploy:dev` |
|
|
1234
|
-
| `indraq deploy:prod` | Docker Production
|
|
1263
|
+
| `indraq deploy:prod` | Docker Production build/push/deploy |
|
|
1235
1264
|
| `indraq deploy:production` | Alias of `deploy:prod` |
|
|
1265
|
+
| `indraq deploy build --env dev` | Long-form Development command |
|
|
1266
|
+
| `indraq deploy build --env development` | Long-form Development alias |
|
|
1267
|
+
| `indraq deploy build --env prod` | Long-form Production command |
|
|
1268
|
+
| `indraq deploy build --env production` | Long-form Production alias |
|
|
1269
|
+
| `indraq deploy configure` | Open configuration home |
|
|
1270
|
+
| `indraq deploy:configure` | Alias for `indraq configure` |
|
|
1271
|
+
|
|
1272
|
+
### Mobile commands
|
|
1273
|
+
|
|
1274
|
+
| Command | Purpose |
|
|
1275
|
+
|---|---|
|
|
1236
1276
|
| `indraq build mobile:dev` | Mobile Development build |
|
|
1237
1277
|
| `indraq build mobile:development` | Alias of `mobile:dev` |
|
|
1238
1278
|
| `indraq build mobile:staging` | Mobile Staging build |
|
|
@@ -1242,13 +1282,23 @@ Docker/GHCR and Jenkins configuration remain compatible.
|
|
|
1242
1282
|
Mobile flags:
|
|
1243
1283
|
|
|
1244
1284
|
```text
|
|
1245
|
-
--output <dev-client|debug-apk|apk|aab>
|
|
1285
|
+
--output <dev-client|development-client|client|debug|debug-apk|apk|release-apk|aab|release-aab>
|
|
1246
1286
|
--profile <fast|clean|full-reset>
|
|
1247
1287
|
--verbose
|
|
1248
1288
|
--dry-run
|
|
1249
1289
|
-y, --yes
|
|
1250
1290
|
```
|
|
1251
1291
|
|
|
1292
|
+
### Jenkins routing reminder
|
|
1293
|
+
|
|
1294
|
+
```text
|
|
1295
|
+
Docker Development → Development Jenkins
|
|
1296
|
+
Docker Production → Production Jenkins
|
|
1297
|
+
Mobile Development → Production Jenkins
|
|
1298
|
+
Mobile Staging → Production Jenkins
|
|
1299
|
+
Mobile Production → Production Jenkins
|
|
1300
|
+
```
|
|
1301
|
+
|
|
1252
1302
|
---
|
|
1253
1303
|
|
|
1254
1304
|
## Troubleshooting
|
|
@@ -1341,7 +1391,7 @@ Do not paste it into Jenkins.
|
|
|
1341
1391
|
Make sure:
|
|
1342
1392
|
|
|
1343
1393
|
1. Jenkins **File Parameter** plugin is installed;
|
|
1344
|
-
2. the job uses `templates/jenkins/Jenkinsfile-Mobile-App` from v1.5.
|
|
1394
|
+
2. the job uses `templates/jenkins/Jenkinsfile-Mobile-App` from v1.5.7;
|
|
1345
1395
|
3. Jenkins has registered the parameters;
|
|
1346
1396
|
4. the Jenkins job is named exactly `Mobile app Cli build`.
|
|
1347
1397
|
|
|
@@ -1409,15 +1459,15 @@ This restores the shared Gradle-cache behavior used by the earlier Git-checkout
|
|
|
1409
1459
|
|
|
1410
1460
|
### Gradle wrapper tries to download and times out
|
|
1411
1461
|
|
|
1412
|
-
v1.5.
|
|
1462
|
+
v1.5.7 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`.
|
|
1413
1463
|
|
|
1414
1464
|
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.
|
|
1415
1465
|
|
|
1416
1466
|
### Jenkins logs contain `ha:////...`, look diagonal, or are unreadable in VS Code
|
|
1417
1467
|
|
|
1418
|
-
The `ha:////...` strings are Jenkins `ConsoleNote` annotations embedded in raw `progressiveText`. The Jenkins browser UI renders/hides those annotations. v1.5.
|
|
1468
|
+
The `ha:////...` strings are Jenkins `ConsoleNote` annotations embedded in raw `progressiveText`. The Jenkins browser UI renders/hides those annotations. v1.5.7 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.
|
|
1419
1469
|
|
|
1420
|
-
The CLI also normalizes line endings and strips terminal control sequences. Upgrade to v1.5.
|
|
1470
|
+
The CLI also normalizes line endings and strips terminal control sequences. Upgrade to v1.5.7 or newer if you see raw `ha:////...` payloads or staircase/right-shifted output.
|
|
1421
1471
|
|
|
1422
1472
|
---
|
|
1423
1473
|
|
|
@@ -1586,7 +1636,7 @@ indraq diagnostics ...
|
|
|
1586
1636
|
- [ ] command is run from package.json root
|
|
1587
1637
|
- [ ] Production Jenkins connection configured (`indraq configure → Jenkins → Production`)
|
|
1588
1638
|
- [ ] Jenkins File Parameter plugin installed
|
|
1589
|
-
- [ ] Jenkins job uses the v1.5.
|
|
1639
|
+
- [ ] Jenkins job uses the v1.5.7 mobile Jenkinsfile
|
|
1590
1640
|
- [ ] Mobile project type configured
|
|
1591
1641
|
- [ ] Jenkins job is named exactly `Mobile app Cli build` and exists on Production Jenkins
|
|
1592
1642
|
- [ ] Development / Staging / Production defaults configured as needed
|
|
@@ -1611,6 +1661,6 @@ MIT License. See [`LICENSE`](LICENSE).
|
|
|
1611
1661
|
|
|
1612
1662
|
### Jenkins mobile upload returns HTTP 403
|
|
1613
1663
|
|
|
1614
|
-
IndraQ CLI v1.5.
|
|
1664
|
+
IndraQ CLI v1.5.7 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.
|
|
1615
1665
|
|
|
1616
|
-
If a mobile build still returns HTTP 403, v1.5.
|
|
1666
|
+
If a mobile build still returns HTTP 403, v1.5.7 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":"create-program.d.ts","sourceRoot":"","sources":["../../src/cli/create-program.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-program.d.ts","sourceRoot":"","sources":["../../src/cli/create-program.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwBpC,eAAO,MAAM,aAAa,QAAO,OA6ChC,CAAC"}
|
|
@@ -6,11 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.createProgram = void 0;
|
|
7
7
|
const node_fs_1 = require("node:fs");
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
10
|
const commander_1 = require("commander");
|
|
10
11
|
const deploy_1 = require("../modules/deploy");
|
|
11
12
|
const mobile_1 = require("../modules/mobile");
|
|
12
13
|
const configure_command_1 = require("../modules/configure/configure.command");
|
|
13
14
|
const doctor_command_1 = require("./doctor.command");
|
|
15
|
+
const help_content_1 = require("./help-content");
|
|
14
16
|
const readCliVersion = () => {
|
|
15
17
|
try {
|
|
16
18
|
const packageJsonPath = node_path_1.default.resolve(__dirname, '../../package.json');
|
|
@@ -29,7 +31,26 @@ const createProgram = () => {
|
|
|
29
31
|
program
|
|
30
32
|
.name('indraq')
|
|
31
33
|
.description('IndraQ internal engineering CLI.')
|
|
32
|
-
.version(readCliVersion())
|
|
34
|
+
.version(readCliVersion())
|
|
35
|
+
.showSuggestionAfterError()
|
|
36
|
+
.showHelpAfterError('\nRun `indraq --help` to see the complete command reference.');
|
|
37
|
+
// Commander normally adds a very small `help [command]` command. IndraQ replaces
|
|
38
|
+
// it with a useful topic-aware help command while keeping normal `--help` support
|
|
39
|
+
// on every command/subcommand.
|
|
40
|
+
program.addHelpCommand(false);
|
|
41
|
+
program
|
|
42
|
+
.command('help [topic]')
|
|
43
|
+
.description('Show complete help or focused help for configure, docker, mobile, or doctor.')
|
|
44
|
+
.action((topic) => {
|
|
45
|
+
const parsed = (0, help_content_1.parseHelpTopic)(topic);
|
|
46
|
+
if (!parsed) {
|
|
47
|
+
console.error(chalk_1.default.red(`\n✗ Unknown help topic: ${topic ?? ''}`));
|
|
48
|
+
console.log(chalk_1.default.gray('Available topics: configure, docker, mobile, doctor\n'));
|
|
49
|
+
process.exitCode = 1;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
console.log((0, help_content_1.helpForTopic)(parsed));
|
|
53
|
+
});
|
|
33
54
|
program
|
|
34
55
|
.command('doctor')
|
|
35
56
|
.description('Diagnose Node and command-resolution problems.')
|
|
@@ -40,6 +61,7 @@ const createProgram = () => {
|
|
|
40
61
|
.action(async () => (0, configure_command_1.configure)());
|
|
41
62
|
(0, deploy_1.registerDeployModule)(program);
|
|
42
63
|
(0, mobile_1.registerMobileModule)(program);
|
|
64
|
+
program.addHelpText('after', (0, help_content_1.fullCommandReference)());
|
|
43
65
|
return program;
|
|
44
66
|
};
|
|
45
67
|
exports.createProgram = createProgram;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-program.js","sourceRoot":"","sources":["../../src/cli/create-program.ts"],"names":[],"mappings":";;;;;;AAAA,qCAAuC;AACvC,0DAA6B;AAC7B,yCAAoC;AACpC,8CAAyD;AACzD,8CAAyD;AACzD,8EAAmE;AACnE,qDAA0C;
|
|
1
|
+
{"version":3,"file":"create-program.js","sourceRoot":"","sources":["../../src/cli/create-program.ts"],"names":[],"mappings":";;;;;;AAAA,qCAAuC;AACvC,0DAA6B;AAC7B,kDAA0B;AAC1B,yCAAoC;AACpC,8CAAyD;AACzD,8CAAyD;AACzD,8EAAmE;AACnE,qDAA0C;AAC1C,iDAAoF;AAIpF,MAAM,cAAc,GAAG,GAAW,EAAE;IAClC,IAAI,CAAC;QACH,MAAM,eAAe,GAAG,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;QACtE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,eAAe,EAAE,MAAM,CAAC,CAA0B,CAAC;QAE/F,IAAI,OAAO,WAAW,CAAC,OAAO,KAAK,QAAQ,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;YAC1E,OAAO,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACpC,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,gFAAgF;IAClF,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEK,MAAM,aAAa,GAAG,GAAY,EAAE;IACzC,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;IAE9B,OAAO;SACJ,IAAI,CAAC,QAAQ,CAAC;SACd,WAAW,CAAC,kCAAkC,CAAC;SAC/C,OA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C;AACjB,CAAC,CAAC;AA7CW,QAAA,aAAa,iBA6CxB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type HelpTopic = 'all' | 'configure' | 'docker' | 'mobile' | 'doctor';
|
|
2
|
+
export declare const fullCommandReference: () => string;
|
|
3
|
+
export declare const helpForTopic: (topic: HelpTopic) => string;
|
|
4
|
+
export declare const parseHelpTopic: (value?: string) => HelpTopic | undefined;
|
|
5
|
+
//# sourceMappingURL=help-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-content.d.ts","sourceRoot":"","sources":["../../src/cli/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"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.parseHelpTopic = exports.helpForTopic = exports.fullCommandReference = void 0;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const heading = (value) => chalk_1.default.bold(value);
|
|
9
|
+
const command = (value) => chalk_1.default.cyan(value);
|
|
10
|
+
const note = (value) => chalk_1.default.gray(value);
|
|
11
|
+
const fullCommandReference = () => `
|
|
12
|
+
${heading('Complete command reference')}
|
|
13
|
+
|
|
14
|
+
${heading('Core')}
|
|
15
|
+
${command('indraq --version')} Show installed CLI version
|
|
16
|
+
${command('indraq --help')} Show this complete help screen
|
|
17
|
+
${command('indraq help')} Show this complete help screen
|
|
18
|
+
${command('indraq help <topic>')} Help topic: configure, docker, mobile, doctor
|
|
19
|
+
${command('indraq doctor')} Diagnose Node, Java, Git, tar and PATH issues
|
|
20
|
+
${command('indraq configure')} Open the project configuration home
|
|
21
|
+
|
|
22
|
+
${heading('Docker / GHCR deployment')}
|
|
23
|
+
${command('indraq deploy:dev')} Build, push and deploy Development
|
|
24
|
+
${command('indraq deploy:development')} Alias for deploy:dev
|
|
25
|
+
${command('indraq deploy:prod')} Build, push and deploy Production
|
|
26
|
+
${command('indraq deploy:production')} Alias for deploy:prod
|
|
27
|
+
${command('indraq deploy build --env dev')} Long-form Development deployment
|
|
28
|
+
${command('indraq deploy build --env development')} Long-form Development alias
|
|
29
|
+
${command('indraq deploy build --env prod')} Long-form Production deployment
|
|
30
|
+
${command('indraq deploy build --env production')} Long-form Production alias
|
|
31
|
+
${command('indraq deploy configure')} Open the main configuration home
|
|
32
|
+
${command('indraq deploy:configure')} Alias for indraq configure
|
|
33
|
+
|
|
34
|
+
${heading('Mobile Android builds')}
|
|
35
|
+
${command('indraq build mobile:dev')} Mobile Development build
|
|
36
|
+
${command('indraq build mobile:development')} Alias for mobile:dev
|
|
37
|
+
${command('indraq build mobile:staging')} Mobile Staging build
|
|
38
|
+
${command('indraq build mobile:prod')} Mobile Production build
|
|
39
|
+
${command('indraq build mobile:production')} Alias for mobile:prod
|
|
40
|
+
|
|
41
|
+
${heading('Mobile build flags')}
|
|
42
|
+
${command('--output <output>')} One-build output override
|
|
43
|
+
dev-client | development-client | client
|
|
44
|
+
debug | debug-apk
|
|
45
|
+
apk | release-apk
|
|
46
|
+
aab | release-aab
|
|
47
|
+
|
|
48
|
+
${command('--profile <profile>')} One-build profile override
|
|
49
|
+
fast | clean | full-reset
|
|
50
|
+
|
|
51
|
+
${command('--verbose')} Verbose Gradle/Jenkins output
|
|
52
|
+
${command('--dry-run')} Validate and print plan; do not start Jenkins
|
|
53
|
+
${command('-y, --yes')} Skip final build confirmation
|
|
54
|
+
|
|
55
|
+
${heading('Configuration home')}
|
|
56
|
+
${command('indraq configure')}
|
|
57
|
+
Jenkins
|
|
58
|
+
Development → Docker Development deployments
|
|
59
|
+
Production → Docker Production + ALL mobile builds
|
|
60
|
+
|
|
61
|
+
Docker / GHCR
|
|
62
|
+
Development
|
|
63
|
+
Production
|
|
64
|
+
|
|
65
|
+
Mobile App
|
|
66
|
+
Project settings
|
|
67
|
+
Version & versionCode
|
|
68
|
+
Development
|
|
69
|
+
Staging
|
|
70
|
+
Production
|
|
71
|
+
|
|
72
|
+
Review current project configuration
|
|
73
|
+
Exit
|
|
74
|
+
|
|
75
|
+
${heading('Environment routing')}
|
|
76
|
+
Docker Development → Development Jenkins
|
|
77
|
+
Docker Production → Production Jenkins
|
|
78
|
+
Mobile Development → Production Jenkins
|
|
79
|
+
Mobile Staging → Production Jenkins
|
|
80
|
+
Mobile Production → Production Jenkins
|
|
81
|
+
|
|
82
|
+
${heading('Examples')}
|
|
83
|
+
${command('indraq configure')}
|
|
84
|
+
${command('indraq deploy:dev')}
|
|
85
|
+
${command('indraq deploy:prod')}
|
|
86
|
+
${command('indraq build mobile:dev --dry-run')}
|
|
87
|
+
${command('indraq build mobile:staging --output apk')}
|
|
88
|
+
${command('indraq build mobile:prod --output aab --profile clean --verbose')}
|
|
89
|
+
|
|
90
|
+
${note('Tip: use `indraq help mobile` or `indraq help docker` for focused help.')}
|
|
91
|
+
`;
|
|
92
|
+
exports.fullCommandReference = fullCommandReference;
|
|
93
|
+
const configureHelp = () => `
|
|
94
|
+
${heading('IndraQ configuration')}
|
|
95
|
+
|
|
96
|
+
${command('indraq configure')}
|
|
97
|
+
|
|
98
|
+
The configuration home lets you change only the section you need and always returns to the home screen after a change.
|
|
99
|
+
|
|
100
|
+
${heading('Sections')}
|
|
101
|
+
Jenkins
|
|
102
|
+
Development → Docker Development deployments
|
|
103
|
+
Production → Docker Production + ALL mobile builds
|
|
104
|
+
|
|
105
|
+
Docker / GHCR
|
|
106
|
+
Development image + Dockerfile
|
|
107
|
+
Production image + Dockerfile
|
|
108
|
+
GitHub personal/organization GHCR owner
|
|
109
|
+
|
|
110
|
+
Mobile App
|
|
111
|
+
App name + project type
|
|
112
|
+
Android Version + versionCode + auto-increment switches
|
|
113
|
+
Development output/profile
|
|
114
|
+
Staging output/profile
|
|
115
|
+
Production output/profile
|
|
116
|
+
|
|
117
|
+
Review current project configuration
|
|
118
|
+
Exit
|
|
119
|
+
|
|
120
|
+
${note('Jenkins credentials are local-only. Safe project configuration is stored under .indraq/ and can survive Git.')}
|
|
121
|
+
`;
|
|
122
|
+
const dockerHelp = () => `
|
|
123
|
+
${heading('Docker / GHCR deployment')}
|
|
124
|
+
|
|
125
|
+
${heading('Commands')}
|
|
126
|
+
${command('indraq deploy:dev')} Development
|
|
127
|
+
${command('indraq deploy:development')} Development alias
|
|
128
|
+
${command('indraq deploy:prod')} Production
|
|
129
|
+
${command('indraq deploy:production')} Production alias
|
|
130
|
+
${command('indraq deploy build --env dev')} Long form
|
|
131
|
+
${command('indraq deploy build --env prod')} Long form
|
|
132
|
+
|
|
133
|
+
${heading('Flow')}
|
|
134
|
+
Docker build → existing Docker GHCR credentials → GHCR push → Jenkins deployment
|
|
135
|
+
|
|
136
|
+
${heading('Jenkins mapping')}
|
|
137
|
+
Development → Development Jenkins
|
|
138
|
+
Production → Production Jenkins
|
|
139
|
+
|
|
140
|
+
${heading('Important')}
|
|
141
|
+
IndraQ does not run docker login during deployment. It preserves Docker's existing GHCR credential store.
|
|
142
|
+
`;
|
|
143
|
+
const mobileHelp = () => `
|
|
144
|
+
${heading('Mobile Android builds')}
|
|
145
|
+
|
|
146
|
+
${heading('Commands')}
|
|
147
|
+
${command('indraq build mobile:dev')} Development
|
|
148
|
+
${command('indraq build mobile:development')} Development alias
|
|
149
|
+
${command('indraq build mobile:staging')} Staging
|
|
150
|
+
${command('indraq build mobile:prod')} Production
|
|
151
|
+
${command('indraq build mobile:production')} Production alias
|
|
152
|
+
|
|
153
|
+
${heading('Flags')}
|
|
154
|
+
${command('--output <output>')} dev-client | debug-apk | apk | aab
|
|
155
|
+
${command('--profile <profile>')} fast | clean | full-reset
|
|
156
|
+
${command('--verbose')} Verbose Gradle/Jenkins output
|
|
157
|
+
${command('--dry-run')} Validate only; do not upload/build
|
|
158
|
+
${command('-y, --yes')} Skip final confirmation
|
|
159
|
+
|
|
160
|
+
${heading('Allowed build matrix')}
|
|
161
|
+
Expo / Development → Development Client
|
|
162
|
+
Expo / Staging → Release APK or Release AAB
|
|
163
|
+
Expo / Production → Release APK or Release AAB
|
|
164
|
+
React Native / Development → Debug APK
|
|
165
|
+
React Native / Staging → Release APK or Release AAB
|
|
166
|
+
React Native / Production → Release APK or Release AAB
|
|
167
|
+
|
|
168
|
+
${heading('Jenkins')}
|
|
169
|
+
ALL mobile environments use Production Jenkins.
|
|
170
|
+
Jenkins job: Mobile app Cli build
|
|
171
|
+
|
|
172
|
+
${heading('Versioning')}
|
|
173
|
+
Android Version and versionCode are configured through:
|
|
174
|
+
${command('indraq configure')} → Mobile App → Version & versionCode
|
|
175
|
+
|
|
176
|
+
${heading('Examples')}
|
|
177
|
+
${command('indraq build mobile:dev --dry-run')}
|
|
178
|
+
${command('indraq build mobile:staging --output apk')}
|
|
179
|
+
${command('indraq build mobile:prod --output aab --profile clean --verbose --yes')}
|
|
180
|
+
`;
|
|
181
|
+
const doctorHelp = () => `
|
|
182
|
+
${heading('IndraQ doctor')}
|
|
183
|
+
|
|
184
|
+
${command('indraq doctor')}
|
|
185
|
+
|
|
186
|
+
Checks:
|
|
187
|
+
• Node.js version
|
|
188
|
+
• Java availability
|
|
189
|
+
• Git availability
|
|
190
|
+
• tar availability
|
|
191
|
+
• Windows command-resolution order
|
|
192
|
+
• whether another file/app is shadowing the indraq command
|
|
193
|
+
`;
|
|
194
|
+
const helpForTopic = (topic) => {
|
|
195
|
+
if (topic === 'configure')
|
|
196
|
+
return configureHelp();
|
|
197
|
+
if (topic === 'docker')
|
|
198
|
+
return dockerHelp();
|
|
199
|
+
if (topic === 'mobile')
|
|
200
|
+
return mobileHelp();
|
|
201
|
+
if (topic === 'doctor')
|
|
202
|
+
return doctorHelp();
|
|
203
|
+
return (0, exports.fullCommandReference)();
|
|
204
|
+
};
|
|
205
|
+
exports.helpForTopic = helpForTopic;
|
|
206
|
+
const parseHelpTopic = (value) => {
|
|
207
|
+
if (!value)
|
|
208
|
+
return 'all';
|
|
209
|
+
const normalized = value.trim().toLowerCase();
|
|
210
|
+
if (normalized === 'all')
|
|
211
|
+
return 'all';
|
|
212
|
+
if (normalized === 'configure' || normalized === 'config')
|
|
213
|
+
return 'configure';
|
|
214
|
+
if (normalized === 'docker' || normalized === 'deploy' || normalized === 'ghcr')
|
|
215
|
+
return 'docker';
|
|
216
|
+
if (normalized === 'mobile' || normalized === 'android' || normalized === 'build')
|
|
217
|
+
return 'mobile';
|
|
218
|
+
if (normalized === 'doctor' || normalized === 'diagnostics' || normalized === 'diagnostic')
|
|
219
|
+
return 'doctor';
|
|
220
|
+
return undefined;
|
|
221
|
+
};
|
|
222
|
+
exports.parseHelpTopic = parseHelpTopic;
|
|
223
|
+
//# sourceMappingURL=help-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-content.js","sourceRoot":"","sources":["../../src/cli/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;EACh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,KAAK,QAAQ,IAAI,UAAU,KAAK,MAAM;QAAE,OAAO,QAAQ,CAAC;IACjG,IAAI,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,OAAO;QAAE,OAAO,QAAQ,CAAC;IACnG,IAAI,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,aAAa,IAAI,UAAU,KAAK,YAAY;QAAE,OAAO,QAAQ,CAAC;IAC5G,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AATW,QAAA,cAAc,kBASzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.command.d.ts","sourceRoot":"","sources":["../../../../src/modules/deploy/commands/build.command.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"build.command.d.ts","sourceRoot":"","sources":["../../../../src/modules/deploy/commands/build.command.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;AAiBjC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,qBAAqB,CAAC;CAC5B;AA2BD,eAAO,MAAM,KAAK,GAAU,SAAS,YAAY,KAAG,OAAO,CAAC,IAAI,CAyJ/D,CAAC"}
|
|
@@ -9,7 +9,6 @@ const chalk_1 = __importDefault(require("chalk"));
|
|
|
9
9
|
const node_fs_1 = require("node:fs");
|
|
10
10
|
const docker_config_1 = require("../config/docker-config");
|
|
11
11
|
const jenkins_config_1 = require("../../../shared/config/jenkins-config");
|
|
12
|
-
const github_auth_service_1 = require("../../../shared/github/github-auth.service");
|
|
13
12
|
const docker_service_1 = require("../services/docker.service");
|
|
14
13
|
const jenkins_service_1 = require("../../../shared/jenkins/jenkins.service");
|
|
15
14
|
const TAG_PATTERN = /^[A-Za-z0-9_][A-Za-z0-9_.-]{0,127}$/;
|
|
@@ -53,10 +52,6 @@ const build = async (options) => {
|
|
|
53
52
|
}
|
|
54
53
|
(0, docker_service_1.assertDockerAvailable)();
|
|
55
54
|
(0, jenkins_service_1.assertJavaAvailable)();
|
|
56
|
-
const githubAuth = (0, github_auth_service_1.detectGitHubAuthentication)();
|
|
57
|
-
if (!githubAuth) {
|
|
58
|
-
throw new Error('No authenticated GitHub session was found. Sign in using Git/Git Bash (Git Credential Manager or SSH), or authenticate the optional GitHub CLI.');
|
|
59
|
-
}
|
|
60
55
|
if (!(0, node_fs_1.existsSync)(dockerfilePath)) {
|
|
61
56
|
throw new Error(`Dockerfile not found: ${dockerfilePath}`);
|
|
62
57
|
}
|
|
@@ -67,7 +62,9 @@ const build = async (options) => {
|
|
|
67
62
|
throw new Error('Jenkins credentials are missing. Run `indraq configure` again.');
|
|
68
63
|
}
|
|
69
64
|
console.log(chalk_1.default.blue.bold('🔎 Preflight Checks\n'));
|
|
70
|
-
console.log(chalk_1.default.green(
|
|
65
|
+
console.log(chalk_1.default.green('✓ Docker available'));
|
|
66
|
+
console.log(chalk_1.default.green("✓ GHCR authentication will use Docker's existing credential store"));
|
|
67
|
+
console.log(chalk_1.default.gray(' IndraQ will not run `docker login` or replace your working GHCR credentials.'));
|
|
71
68
|
console.log(chalk_1.default.gray(`✓ Registry owner: ${config.github.owner} (${config.github.ownerType === 'personal' ? 'personal account' : 'organization'})`));
|
|
72
69
|
const authResult = (0, jenkins_service_1.validateJenkinsAuthentication)(jenkins);
|
|
73
70
|
if (authResult.connectionMode !== jenkins.connectionMode) {
|
|
@@ -112,15 +109,9 @@ const build = async (options) => {
|
|
|
112
109
|
console.log(chalk_1.default.gray(`Tags: ${tags.join(', ')}\n`));
|
|
113
110
|
(0, docker_service_1.buildDockerImage)(imageName, tags, dockerfilePath);
|
|
114
111
|
console.log(chalk_1.default.green('\n✓ Docker image built successfully\n'));
|
|
115
|
-
console.log(chalk_1.default.blue.bold('🔐 Step 3:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
console.log(chalk_1.default.green('\n✓ GHCR login completed using the detected GitHub credential\n'));
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
console.log(chalk_1.default.yellow('⚠ GitHub SSH authentication is valid, but GHCR does not accept SSH keys. Using any GHCR credentials already stored by Docker.'));
|
|
122
|
-
console.log(chalk_1.default.gray(' If the push fails, run `docker login ghcr.io` once and retry.\n'));
|
|
123
|
-
}
|
|
112
|
+
console.log(chalk_1.default.blue.bold('🔐 Step 3: Using Existing GHCR Authentication\n'));
|
|
113
|
+
console.log(chalk_1.default.green('✓ Using the GHCR credentials already stored by Docker'));
|
|
114
|
+
console.log(chalk_1.default.gray(' Git/GitHub credentials are not reused for GHCR and Docker login state is left untouched.\n'));
|
|
124
115
|
console.log(chalk_1.default.blue.bold('📤 Step 4: Pushing Image to GHCR\n'));
|
|
125
116
|
for (const tag of tags) {
|
|
126
117
|
const imageWithTag = `${imageName}:${tag}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.command.js","sourceRoot":"","sources":["../../../../src/modules/deploy/commands/build.command.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAChC,kDAA0B;AAC1B,qCAAqC;AACrC,2DAIiC;AACjC,0EAAgJ;AAChJ
|
|
1
|
+
{"version":3,"file":"build.command.js","sourceRoot":"","sources":["../../../../src/modules/deploy/commands/build.command.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAChC,kDAA0B;AAC1B,qCAAqC;AACrC,2DAIiC;AACjC,0EAAgJ;AAChJ,+DAKoC;AACpC,6EAOiD;AAUjD,MAAM,WAAW,GAAG,qCAAqC,CAAC;AAE1D,MAAM,kCAAkC,GAAG,CAAC,mBAA2B,EAAU,EAAE,CACjF,mBAAmB,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AAEnF,MAAM,gBAAgB,GAAG,CAAC,MAAoB,EAAE,mBAA2B,EAAU,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AK,CAAC,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,YAAY,MAAM,CAAC,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IACxF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,YAAY,SAAS,EAAE,CAAC,CAAC,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,kBAAkB,cAAc,EAAE,CAAC,CAAC,CAAC;IAC5D,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,aAAa,MAAM,EAAE,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC,CAAC;AAzJW,QAAA,KAAK,SAyJhB"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { GitHubAuthState } from '../../../shared/github/github-auth.service';
|
|
2
1
|
export declare const assertDockerAvailable: () => void;
|
|
3
2
|
export declare const buildDockerImage: (imageName: string, tags: string[], dockerfilePath: string) => void;
|
|
4
|
-
export declare const authenticateGhcr: (auth: GitHubAuthState) => boolean;
|
|
5
3
|
export declare const pushDockerImage: (imageWithTag: string) => void;
|
|
6
4
|
export declare const getDockerImageDigest: (imageWithTag: string) => string;
|
|
7
5
|
//# sourceMappingURL=docker.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/deploy/services/docker.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"docker.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/deploy/services/docker.service.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,QAAO,IAMxC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,WAAW,MAAM,EACjB,MAAM,MAAM,EAAE,EACd,gBAAgB,MAAM,KACrB,IAYF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,cAAc,MAAM,KAAG,IAStD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,KAAG,MAgB3D,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDockerImageDigest = exports.pushDockerImage = exports.
|
|
3
|
+
exports.getDockerImageDigest = exports.pushDockerImage = exports.buildDockerImage = exports.assertDockerAvailable = void 0;
|
|
4
4
|
const node_child_process_1 = require("node:child_process");
|
|
5
5
|
const assertDockerAvailable = () => {
|
|
6
6
|
try {
|
|
@@ -25,28 +25,13 @@ const buildDockerImage = (imageName, tags, dockerfilePath) => {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
exports.buildDockerImage = buildDockerImage;
|
|
28
|
-
const authenticateGhcr = (auth) => {
|
|
29
|
-
if (!auth.username || !auth.token) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
try {
|
|
33
|
-
(0, node_child_process_1.execFileSync)('docker', ['login', 'ghcr.io', '-u', auth.username, '--password-stdin'], {
|
|
34
|
-
input: `${auth.token}\n`,
|
|
35
|
-
stdio: ['pipe', 'inherit', 'inherit']
|
|
36
|
-
});
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
throw new Error('GitHub authentication was found, but GHCR rejected the credential. Make sure it has package write access, or run `docker login ghcr.io` once.');
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
exports.authenticateGhcr = authenticateGhcr;
|
|
44
28
|
const pushDockerImage = (imageWithTag) => {
|
|
45
29
|
try {
|
|
46
30
|
(0, node_child_process_1.execFileSync)('docker', ['push', imageWithTag], { stdio: 'inherit' });
|
|
47
31
|
}
|
|
48
32
|
catch {
|
|
49
|
-
throw new Error(`Failed to push ${imageWithTag}.
|
|
33
|
+
throw new Error(`Failed to push ${imageWithTag}. IndraQ preserved Docker's existing GHCR login and did not run docker login. ` +
|
|
34
|
+
'If a manual `docker push` of the same image succeeds, report this as an IndraQ CLI bug. Otherwise verify the Docker GHCR credential has package write access.');
|
|
50
35
|
}
|
|
51
36
|
};
|
|
52
37
|
exports.pushDockerImage = pushDockerImage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.service.js","sourceRoot":"","sources":["../../../../src/modules/deploy/services/docker.service.ts"],"names":[],"mappings":";;;AAAA,2DAAkD;
|
|
1
|
+
{"version":3,"file":"docker.service.js","sourceRoot":"","sources":["../../../../src/modules/deploy/services/docker.service.ts"],"names":[],"mappings":";;;AAAA,2DAAkD;AAE3C,MAAM,qBAAqB,GAAG,GAAS,EAAE;IAC9C,IAAI,CAAC;QACH,IAAA,iCAAY,EAAC,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IAC3D,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;AACH,CAAC,CAAC;AANW,QAAA,qBAAqB,yBAMhC;AAEK,MAAM,gBAAgB,GAAG,CAC9B,SAAiB,EACjB,IAAc,EACd,cAAsB,EAChB,EAAE;IACR,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IACvD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,SAAS,IAAI,GAAG,EAAE,CAAC,CAAC;IACnD,CAA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