indraq_cli 2.1.0 → 2.2.0
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/CHANGELOG_v2.1.0.md +27 -27
- package/CHANGELOG_v2.2.0.md +52 -0
- package/LICENSE +21 -21
- package/README.md +27 -14
- package/RELEASE_CHECKS_v2.2.0.md +27 -0
- package/UPGRADE_v2.0_to_v2.1.md +68 -68
- package/UPGRADE_v2.1_to_v2.2.md +62 -0
- package/cloud-api/.dockerignore +18 -18
- package/cloud-api/.env.example +14 -14
- package/cloud-api/Dockerfile +19 -19
- package/cloud-api/README.md +93 -93
- package/cloud-api/dist/index.js +265 -27
- package/cloud-api/node_modules/.package-lock.json +1 -1
- package/cloud-api/package-lock.json +2 -2
- package/cloud-api/package.json +1 -1
- package/cloud-api/sql/001_init.sql +8 -8
- package/cloud-api/sql/002_user_providers_and_project_resources.sql +40 -40
- package/cloud-api/sql/003_environment_infrastructure.sql +19 -19
- package/cloud-api/sql/004_managed_aws_credentials.sql +20 -20
- package/cloud-api/sql/005_project_members_and_resource_grants.sql +22 -22
- package/cloud-api/sql/006_catalog_identity_password_security.sql +96 -96
- package/cloud-api/sql/007_aws_access_key_rotation.sql +16 -16
- package/cloud-api/sql/008_provider_scopes.sql +91 -91
- package/cloud-api/sql/009_scope_user_secrets_and_project_lifecycle.sql +13 -0
- package/cloud-api/src/index.ts +164 -27
- package/cloud-api/tsconfig.json +18 -18
- package/dist/cli/help-content.d.ts.map +1 -1
- package/dist/cli/help-content.js +11 -5
- package/dist/cli/help-content.js.map +1 -1
- package/dist/modules/access/commands/access.command.js +30 -30
- package/dist/modules/aws/services/route53-lookup.service.js.map +1 -1
- package/dist/modules/cloud/commands/cloud.command.d.ts +4 -0
- package/dist/modules/cloud/commands/cloud.command.d.ts.map +1 -1
- package/dist/modules/cloud/commands/cloud.command.js +52 -1
- package/dist/modules/cloud/commands/cloud.command.js.map +1 -1
- package/dist/modules/cloud/index.d.ts.map +1 -1
- package/dist/modules/cloud/index.js +4 -1
- package/dist/modules/cloud/index.js.map +1 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.js +71 -71
- package/dist/modules/cloud/services/user-provider.service.d.ts +2 -8
- package/dist/modules/cloud/services/user-provider.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/user-provider.service.js +7 -35
- package/dist/modules/cloud/services/user-provider.service.js.map +1 -1
- package/dist/modules/deploy/commands/build.command.d.ts +1 -0
- package/dist/modules/deploy/commands/build.command.d.ts.map +1 -1
- package/dist/modules/deploy/commands/build.command.js +12 -5
- package/dist/modules/deploy/commands/build.command.js.map +1 -1
- package/dist/modules/deploy/index.d.ts.map +1 -1
- package/dist/modules/deploy/index.js +11 -4
- package/dist/modules/deploy/index.js.map +1 -1
- package/dist/modules/prebuild/commands/prebuild.command.d.ts +0 -4
- package/dist/modules/prebuild/commands/prebuild.command.d.ts.map +1 -1
- package/dist/modules/prebuild/commands/prebuild.command.js +34 -38
- package/dist/modules/prebuild/commands/prebuild.command.js.map +1 -1
- package/dist/modules/prebuild/index.d.ts.map +1 -1
- package/dist/modules/prebuild/index.js +4 -8
- package/dist/modules/prebuild/index.js.map +1 -1
- package/dist/modules/scaffold/services/docker-template.service.js +95 -95
- package/dist/modules/scopes/commands/scope.command.d.ts.map +1 -1
- package/dist/modules/scopes/commands/scope.command.js +3 -47
- package/dist/modules/scopes/commands/scope.command.js.map +1 -1
- package/dist/modules/scopes/services/scope-native.service.js +2 -2
- package/dist/modules/scopes/services/scope-native.service.js.map +1 -1
- package/dist/modules/users/commands/user.command.d.ts +1 -0
- package/dist/modules/users/commands/user.command.d.ts.map +1 -1
- package/dist/modules/users/commands/user.command.js +15 -1
- package/dist/modules/users/commands/user.command.js.map +1 -1
- package/dist/modules/users/index.d.ts.map +1 -1
- package/dist/modules/users/index.js +1 -0
- package/dist/modules/users/index.js.map +1 -1
- package/dist/modules/users/providers/jenkins-user.provider.js +95 -95
- package/dist/shared/config/config-files.js +7 -7
- package/dist/shared/jenkins/jenkins.service.d.ts.map +1 -1
- package/dist/shared/jenkins/jenkins.service.js +13 -8
- package/dist/shared/jenkins/jenkins.service.js.map +1 -1
- package/dist/shared/jenkins/role-strategy-groovy.js +84 -84
- package/docs/ARCHITECTURE.md +29 -29
- package/docs/CREATE-DEPLOYMENT-reference.groovy +1105 -1105
- package/package.json +9 -5
- package/templates/jenkins/CREATE-DEPLOYMENT.groovy +1105 -1105
- package/templates/jenkins/Jenkinsfile-Mobile-App +759 -759
- package/cloud-api/dist/index.js.map +0 -1
package/CHANGELOG_v2.1.0.md
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
# IndraQ CLI v2.1.0
|
|
2
|
-
|
|
3
|
-
## Highlights
|
|
4
|
-
|
|
5
|
-
- Added unlimited named provider scopes for AWS, NPM, Jenkins DEV/PROD and GHCR.
|
|
6
|
-
- Provider scopes are organization-owned and created only by admins.
|
|
7
|
-
- Added USE/MANAGE scope membership with manager-limited delegation.
|
|
8
|
-
- User creation now asks which manageable scopes to provision and supports multiple scopes at once.
|
|
9
|
-
- Users see only assigned scopes and can safely describe account/server metadata without secrets.
|
|
10
|
-
- Added per-user provider defaults and per-project/environment scope links.
|
|
11
|
-
- Added self-service AWS key rotation and NPM/Jenkins password rotation.
|
|
12
|
-
- Added audited scope add/remove/default/credential operations with mandatory reasons.
|
|
13
|
-
- Jenkins project access uses exact Role Strategy Item Roles with Discover/Read/Build/Cancel/Workspace only.
|
|
14
|
-
- Jenkins + GHCR are mandatory for deploy; Route53 and NPM are optional.
|
|
15
|
-
- Optional DNS/NPM supports Skip, Create/reconcile and Link existing.
|
|
16
|
-
- `--env` is explicitly an IndraQ project/resource environment selector, not a `.env` loader.
|
|
17
|
-
- Cloud API endpoint changed to `https://cli.indraq.com`.
|
|
18
|
-
- NPM networking/TLS/auth errors provide actionable diagnostics instead of only `fetch failed`.
|
|
19
|
-
- Rewritten README and command help around the scope model.
|
|
20
|
-
|
|
21
|
-
## Database
|
|
22
|
-
|
|
23
|
-
Adds `cloud-api/sql/008_provider_scopes.sql`.
|
|
24
|
-
|
|
25
|
-
## Compatibility
|
|
26
|
-
|
|
27
|
-
`indraq provider configure` remains as an admin compatibility alias for `indraq scope create`.
|
|
1
|
+
# IndraQ CLI v2.1.0
|
|
2
|
+
|
|
3
|
+
## Highlights
|
|
4
|
+
|
|
5
|
+
- Added unlimited named provider scopes for AWS, NPM, Jenkins DEV/PROD and GHCR.
|
|
6
|
+
- Provider scopes are organization-owned and created only by admins.
|
|
7
|
+
- Added USE/MANAGE scope membership with manager-limited delegation.
|
|
8
|
+
- User creation now asks which manageable scopes to provision and supports multiple scopes at once.
|
|
9
|
+
- Users see only assigned scopes and can safely describe account/server metadata without secrets.
|
|
10
|
+
- Added per-user provider defaults and per-project/environment scope links.
|
|
11
|
+
- Added self-service AWS key rotation and NPM/Jenkins password rotation.
|
|
12
|
+
- Added audited scope add/remove/default/credential operations with mandatory reasons.
|
|
13
|
+
- Jenkins project access uses exact Role Strategy Item Roles with Discover/Read/Build/Cancel/Workspace only.
|
|
14
|
+
- Jenkins + GHCR are mandatory for deploy; Route53 and NPM are optional.
|
|
15
|
+
- Optional DNS/NPM supports Skip, Create/reconcile and Link existing.
|
|
16
|
+
- `--env` is explicitly an IndraQ project/resource environment selector, not a `.env` loader.
|
|
17
|
+
- Cloud API endpoint changed to `https://cli.indraq.com`.
|
|
18
|
+
- NPM networking/TLS/auth errors provide actionable diagnostics instead of only `fetch failed`.
|
|
19
|
+
- Rewritten README and command help around the scope model.
|
|
20
|
+
|
|
21
|
+
## Database
|
|
22
|
+
|
|
23
|
+
Adds `cloud-api/sql/008_provider_scopes.sql`.
|
|
24
|
+
|
|
25
|
+
## Compatibility
|
|
26
|
+
|
|
27
|
+
`indraq provider configure` remains as an admin compatibility alias for `indraq scope create`.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# IndraQ CLI v2.2.0
|
|
2
|
+
|
|
3
|
+
## Scope-first deployment completion
|
|
4
|
+
|
|
5
|
+
- Prebuild now requires shared admin-created environments; the project-local custom IPv4 deployment target path was removed.
|
|
6
|
+
- `prebuild` no longer exposes legacy `--host-port`, `--networks`, `--volumes`, or `--flags` options.
|
|
7
|
+
- Required GHCR and Jenkins scopes are linked to `project_environment_scopes` during setup and reused afterwards.
|
|
8
|
+
- `indraq deploy --env <env>` uses saved scope bindings without prompting on every deployment.
|
|
9
|
+
- `--select-scopes` is the explicit deployment-time override.
|
|
10
|
+
|
|
11
|
+
## Credential security
|
|
12
|
+
|
|
13
|
+
- `USE` members can no longer resolve the organization AWS/NPM/Jenkins management credential.
|
|
14
|
+
- AWS resolution returns the user's own IndraQ-managed IAM access key.
|
|
15
|
+
- NPM/Jenkins resolution returns the user's own encrypted native-account password.
|
|
16
|
+
- AWS key rotation and NPM/Jenkins password rotation are performed server-side with the scope management credential.
|
|
17
|
+
- GHCR remains a deliberate shared deployment credential scoped to assigned members and used by the CLI through an isolated temporary Docker login.
|
|
18
|
+
|
|
19
|
+
## Projects and authorization
|
|
20
|
+
|
|
21
|
+
- Managers are no longer implicit WRITE users for every organization project.
|
|
22
|
+
- Non-admin project visibility is limited to the creator or explicit project membership.
|
|
23
|
+
- Added `project rename`, `project archive`, `project restore`, and permanent `project delete`.
|
|
24
|
+
- Archived projects are blocked from scope mutation, infrastructure mutation, credential resolution for deployment, prebuild, and deploy until restored.
|
|
25
|
+
- Manager resource-grant inspection is limited to projects the manager can actually manage.
|
|
26
|
+
|
|
27
|
+
## User/scope operations
|
|
28
|
+
|
|
29
|
+
- Added `indraq user scopes [username]`.
|
|
30
|
+
- NPM/Jenkins scope-native account records now retain the user's encrypted password for personal resolution and self-rotation.
|
|
31
|
+
- Existing Jenkins Role Strategy Item Role synchronization remains the project-pipeline authorization mechanism.
|
|
32
|
+
|
|
33
|
+
## Database
|
|
34
|
+
|
|
35
|
+
Added `cloud-api/sql/009_scope_user_secrets_and_project_lifecycle.sql`:
|
|
36
|
+
|
|
37
|
+
- `scope_external_accounts.encrypted_secret`
|
|
38
|
+
- `projects.archived_at`
|
|
39
|
+
- `projects.archived_by`
|
|
40
|
+
|
|
41
|
+
## Strict TypeScript build compatibility fix — 2026-09-10
|
|
42
|
+
|
|
43
|
+
- Fixed 12 `exactOptionalPropertyTypes` build errors reported with the real AWS SDK 3.1123.0 declarations.
|
|
44
|
+
- Removed hand-written callback parameter shapes for AWS SDK `ResourceRecord`, `Tag`, `HostedZone`, and `AttachedPolicy` values and now let TypeScript infer the SDK-native callback types.
|
|
45
|
+
- Affected files:
|
|
46
|
+
- `src/modules/aws/commands/dns.command.ts`
|
|
47
|
+
- `src/modules/aws/commands/healthcheck.command.ts`
|
|
48
|
+
- `src/modules/aws/services/route53-lookup.service.ts`
|
|
49
|
+
- `src/modules/prebuild/commands/prebuild.command.ts`
|
|
50
|
+
- `src/modules/scopes/commands/scope.command.ts`
|
|
51
|
+
- `src/modules/users/providers/aws-user.provider.ts`
|
|
52
|
+
- Runtime behavior is unchanged; this is a source/type compatibility correction.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 IndraQ Innovations
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 IndraQ Innovations
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
**One CLI for provider access, project infrastructure and deployments.**
|
|
7
7
|
|
|
8
|
-

|
|
9
9
|

|
|
10
10
|

|
|
11
11
|

|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
IndraQ is an internal engineering CLI that connects your team to shared infrastructure without making every developer carry organization administrator credentials.
|
|
21
21
|
|
|
22
|
-
Instead of configuring “one AWS”, “one Jenkins”, or “one NPM” globally, v2.
|
|
22
|
+
Instead of configuring “one AWS”, “one Jenkins”, or “one NPM” globally, v2.2 uses **provider scopes** as the only normal deployment credential path. A scope is one named account or server such as:
|
|
23
23
|
|
|
24
24
|
- `AWS — IndraQ Production`
|
|
25
25
|
- `AWS — Client ABC`
|
|
@@ -55,7 +55,7 @@ flowchart LR
|
|
|
55
55
|
|
|
56
56
|
Teams often manage several servers, customers and cloud accounts at once. A single provider credential creates ambiguity and unnecessary privilege. Scopes solve both problems.
|
|
57
57
|
|
|
58
|
-
| Problem | v2.
|
|
58
|
+
| Problem | v2.2 behavior |
|
|
59
59
|
|---|---|
|
|
60
60
|
| Several AWS accounts | Unlimited named AWS scopes |
|
|
61
61
|
| Several Jenkins servers | Unlimited named DEV/PROD Jenkins scopes |
|
|
@@ -228,7 +228,13 @@ indraq prebuild --env dev
|
|
|
228
228
|
```bash
|
|
229
229
|
indraq deploy:dev
|
|
230
230
|
# or
|
|
231
|
-
indraq deploy
|
|
231
|
+
indraq deploy --env staging
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Normal deploys reuse the scopes already saved for that project/environment. Use `--select-scopes` only when you intentionally want to review or change those bindings:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
indraq deploy --env dev --select-scopes
|
|
232
238
|
```
|
|
233
239
|
|
|
234
240
|
---
|
|
@@ -352,7 +358,7 @@ indraq project scopes --env prod
|
|
|
352
358
|
|
|
353
359
|
## Prebuild and deploy
|
|
354
360
|
|
|
355
|
-
`prebuild` reconciles the project before deployment.
|
|
361
|
+
`prebuild` reconciles the project before deployment. It uses an admin-defined shared environment and saved project scope bindings; it does not offer a project-local custom IPv4 fallback.
|
|
356
362
|
|
|
357
363
|
```mermaid
|
|
358
364
|
flowchart TD
|
|
@@ -398,9 +404,9 @@ This is useful for projects that existed before IndraQ or where DNS/proxy is man
|
|
|
398
404
|
## What `--env` means
|
|
399
405
|
|
|
400
406
|
```bash
|
|
401
|
-
indraq deploy
|
|
402
|
-
indraq deploy
|
|
403
|
-
indraq deploy
|
|
407
|
+
indraq deploy --env dev
|
|
408
|
+
indraq deploy --env staging
|
|
409
|
+
indraq deploy --env prod
|
|
404
410
|
```
|
|
405
411
|
|
|
406
412
|
The flag selects **IndraQ resource state**:
|
|
@@ -523,6 +529,7 @@ Provider identities are removed first. Cloud identity is deleted last. Projects
|
|
|
523
529
|
| Command | Use |
|
|
524
530
|
|---|---|
|
|
525
531
|
| `indraq user list` | List organization users |
|
|
532
|
+
| `indraq user scopes [email]` | Show your own or a manageable user's assigned scopes |
|
|
526
533
|
| `indraq user create [username]` | Create user + select scopes |
|
|
527
534
|
| `indraq user update [username]` | Password/role operations |
|
|
528
535
|
| `indraq user delete [username]` | Hard delete after scope cleanup |
|
|
@@ -540,6 +547,10 @@ Provider identities are removed first. Cloud identity is deleted last. Projects
|
|
|
540
547
|
| `indraq project scopes --env <env>` | Select project provider scopes |
|
|
541
548
|
| `indraq project add user` | Add project member + synchronize access |
|
|
542
549
|
| `indraq project delete user` | Remove project member |
|
|
550
|
+
| `indraq project rename [name]` | Rename the current project |
|
|
551
|
+
| `indraq project archive` | Archive the current project and block normal deployment access |
|
|
552
|
+
| `indraq project restore` | Restore an archived project |
|
|
553
|
+
| `indraq project delete` | Permanently delete current project metadata |
|
|
543
554
|
| `indraq access add user` | Add selected resource grants |
|
|
544
555
|
| `indraq access delete user` | Remove selected resource grants |
|
|
545
556
|
|
|
@@ -550,7 +561,8 @@ Provider identities are removed first. Cloud identity is deleted last. Projects
|
|
|
550
561
|
| `indraq prebuild --env <env>` | Reconcile infrastructure |
|
|
551
562
|
| `indraq deploy:dev` | Dev deploy |
|
|
552
563
|
| `indraq deploy:prod` | Prod deploy |
|
|
553
|
-
| `indraq deploy
|
|
564
|
+
| `indraq deploy --env <env>` | Named environment deploy using saved scope bindings |
|
|
565
|
+
| `indraq deploy --env <env> --select-scopes` | Explicitly review/change project scope bindings before deploy |
|
|
554
566
|
| `indraq jenkins pipelines --stage dev` | List visible pipelines |
|
|
555
567
|
| `indraq jenkins run [job] --stage dev` | Run pipeline with discovered parameters |
|
|
556
568
|
| `indraq jenkins create-deployment` | Bootstrap deployment pipeline |
|
|
@@ -633,7 +645,7 @@ Key rules:
|
|
|
633
645
|
|
|
634
646
|
### `fetch failed` while configuring NPM
|
|
635
647
|
|
|
636
|
-
v2.
|
|
648
|
+
v2.2 surfaces the underlying network/TLS/authentication error where possible. Verify the URL uses the correct scheme and hostname, then compare with the web login. A browser login does not necessarily prove Node.js trusts the same TLS certificate chain.
|
|
637
649
|
|
|
638
650
|
### Jenkins says Role Strategy is not active
|
|
639
651
|
|
|
@@ -661,7 +673,7 @@ Run prebuild and choose **Skip** for Route53.
|
|
|
661
673
|
|
|
662
674
|
---
|
|
663
675
|
|
|
664
|
-
## Cloud API upgrade for v2.
|
|
676
|
+
## Cloud API upgrade for v2.2
|
|
665
677
|
|
|
666
678
|
The CLI and Cloud API must be upgraded together.
|
|
667
679
|
|
|
@@ -671,11 +683,12 @@ Apply migrations through:
|
|
|
671
683
|
cloud-api/sql/001_*.sql
|
|
672
684
|
...
|
|
673
685
|
cloud-api/sql/008_provider_scopes.sql
|
|
686
|
+
cloud-api/sql/009_scope_user_secrets_and_project_lifecycle.sql
|
|
674
687
|
```
|
|
675
688
|
|
|
676
|
-
|
|
689
|
+
Migration `009` adds encrypted per-user NPM/Jenkins secrets and project archive metadata (`archived_at`, `archived_by`). v2.2 also hardens project/resource authorization and prevents normal `USE` members from resolving shared provider-management credentials.
|
|
677
690
|
|
|
678
|
-
See [UPGRADE_v2.
|
|
691
|
+
See [UPGRADE_v2.1_to_v2.2.md](UPGRADE_v2.1_to_v2.2.md) and [RELEASE_CHECKS_v2.2.0.md](RELEASE_CHECKS_v2.2.0.md).
|
|
679
692
|
|
|
680
693
|
---
|
|
681
694
|
|
|
@@ -700,7 +713,7 @@ npm --prefix cloud-api run build
|
|
|
700
713
|
<div align="center">
|
|
701
714
|
<img src="docs/assets/indraq-mark.png" alt="IndraQ mark" width="70" />
|
|
702
715
|
|
|
703
|
-
**IndraQ CLI v2.
|
|
716
|
+
**IndraQ CLI v2.2.0**
|
|
704
717
|
|
|
705
718
|
Scope-based infrastructure access. Durable projects. Safer deployments.
|
|
706
719
|
</div>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# IndraQ CLI v2.2.0 Release Checks
|
|
2
|
+
|
|
3
|
+
## Completed in the release workspace
|
|
4
|
+
|
|
5
|
+
- `npm run build` passed under the project's real strict TypeScript configuration. The sandbox used declaration-only shims for unavailable package typings because DNS could not reach `registry.npmjs.org`; strictness was not disabled for this final build.
|
|
6
|
+
- `npm --prefix cloud-api run build` passed under its real TypeScript configuration using the same temporary declaration-only offline shim approach.
|
|
7
|
+
- `npm test` passed all configured regression suites after rebuilding `dist/`.
|
|
8
|
+
- The prebuild integration regression executes the rebuilt `dist/modules/prebuild/...` implementation and validates create/reuse/repair behavior.
|
|
9
|
+
- v2.2 regression checks cover the scope-secret boundary, personal AWS/NPM/Jenkins credential paths, project membership visibility, archive blocking, project lifecycle commands, saved scope deployment, and Jenkins Item Role preservation.
|
|
10
|
+
- `npm pack --dry-run` completed successfully in the offline build workspace before temporary shims were removed.
|
|
11
|
+
- All emitted CLI + Cloud API JavaScript is syntax-checked during final packaging.
|
|
12
|
+
|
|
13
|
+
## Publication / deployment gate
|
|
14
|
+
|
|
15
|
+
On a machine with npm registry access, run one clean dependency-backed verification before publishing:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
rm -rf node_modules cloud-api/node_modules
|
|
19
|
+
npm ci
|
|
20
|
+
npm --prefix cloud-api ci
|
|
21
|
+
npm run build
|
|
22
|
+
npm run build:cloud
|
|
23
|
+
npm test
|
|
24
|
+
npm pack --dry-run
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The registry-access check is an environment/reproducibility gate; it does not change the v2.2 source included in this archive.
|
package/UPGRADE_v2.0_to_v2.1.md
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
# Upgrade: IndraQ CLI v2.0 → v2.1
|
|
2
|
-
|
|
3
|
-
v2.1 changes provider credentials from one-user/one-provider assumptions to organization provider scopes.
|
|
4
|
-
|
|
5
|
-
## 1. Back up Cloud DB
|
|
6
|
-
|
|
7
|
-
Back up the production IndraQ Cloud database before applying the migration.
|
|
8
|
-
|
|
9
|
-
## 2. Deploy the v2.1 Cloud API
|
|
10
|
-
|
|
11
|
-
Apply migrations in numeric order, including:
|
|
12
|
-
|
|
13
|
-
```text
|
|
14
|
-
cloud-api/sql/008_provider_scopes.sql
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Build and restart the Cloud API.
|
|
18
|
-
|
|
19
|
-
## 3. Install/link CLI v2.1
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm install
|
|
23
|
-
npm run build
|
|
24
|
-
npm test
|
|
25
|
-
npm link
|
|
26
|
-
indraq --version
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Expected: `2.1.0`.
|
|
30
|
-
|
|
31
|
-
## 4. Create scopes
|
|
32
|
-
|
|
33
|
-
Admins create named scopes for each real provider account/server:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
indraq scope create aws
|
|
37
|
-
indraq scope create npm
|
|
38
|
-
indraq scope create jenkins-dev
|
|
39
|
-
indraq scope create jenkins-prod
|
|
40
|
-
indraq scope create ghcr
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## 5. Add managers/users
|
|
44
|
-
|
|
45
|
-
Use `indraq scope add-user`. Admins may grant MANAGE to managers. Managers may grant USE to normal users only inside scopes they manage.
|
|
46
|
-
|
|
47
|
-
## 6. Link project environments
|
|
48
|
-
|
|
49
|
-
For every actively deployed project/environment:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
indraq project scopes --env dev
|
|
53
|
-
indraq project scopes --env prod
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Jenkins and GHCR are required. AWS/NPM can stay unlinked.
|
|
57
|
-
|
|
58
|
-
## 7. Reconcile
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
indraq prebuild --env dev
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
For existing DNS/proxy resources choose Link existing or Skip instead of creating duplicates.
|
|
65
|
-
|
|
66
|
-
## 8. Jenkins
|
|
67
|
-
|
|
68
|
-
Jenkins must use Role-Based Strategy. IndraQ grants project pipelines through Item Roles; do not manually give normal users Overall/Administer.
|
|
1
|
+
# Upgrade: IndraQ CLI v2.0 → v2.1
|
|
2
|
+
|
|
3
|
+
v2.1 changes provider credentials from one-user/one-provider assumptions to organization provider scopes.
|
|
4
|
+
|
|
5
|
+
## 1. Back up Cloud DB
|
|
6
|
+
|
|
7
|
+
Back up the production IndraQ Cloud database before applying the migration.
|
|
8
|
+
|
|
9
|
+
## 2. Deploy the v2.1 Cloud API
|
|
10
|
+
|
|
11
|
+
Apply migrations in numeric order, including:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
cloud-api/sql/008_provider_scopes.sql
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Build and restart the Cloud API.
|
|
18
|
+
|
|
19
|
+
## 3. Install/link CLI v2.1
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install
|
|
23
|
+
npm run build
|
|
24
|
+
npm test
|
|
25
|
+
npm link
|
|
26
|
+
indraq --version
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Expected: `2.1.0`.
|
|
30
|
+
|
|
31
|
+
## 4. Create scopes
|
|
32
|
+
|
|
33
|
+
Admins create named scopes for each real provider account/server:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
indraq scope create aws
|
|
37
|
+
indraq scope create npm
|
|
38
|
+
indraq scope create jenkins-dev
|
|
39
|
+
indraq scope create jenkins-prod
|
|
40
|
+
indraq scope create ghcr
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 5. Add managers/users
|
|
44
|
+
|
|
45
|
+
Use `indraq scope add-user`. Admins may grant MANAGE to managers. Managers may grant USE to normal users only inside scopes they manage.
|
|
46
|
+
|
|
47
|
+
## 6. Link project environments
|
|
48
|
+
|
|
49
|
+
For every actively deployed project/environment:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
indraq project scopes --env dev
|
|
53
|
+
indraq project scopes --env prod
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Jenkins and GHCR are required. AWS/NPM can stay unlinked.
|
|
57
|
+
|
|
58
|
+
## 7. Reconcile
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
indraq prebuild --env dev
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
For existing DNS/proxy resources choose Link existing or Skip instead of creating duplicates.
|
|
65
|
+
|
|
66
|
+
## 8. Jenkins
|
|
67
|
+
|
|
68
|
+
Jenkins must use Role-Based Strategy. IndraQ grants project pipelines through Item Roles; do not manually give normal users Overall/Administer.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Upgrade: IndraQ CLI v2.1 → v2.2
|
|
2
|
+
|
|
3
|
+
Upgrade the CLI and Cloud API together.
|
|
4
|
+
|
|
5
|
+
## 1. Back up the Cloud database
|
|
6
|
+
|
|
7
|
+
Take a PostgreSQL backup before deploying the new Cloud API.
|
|
8
|
+
|
|
9
|
+
## 2. Deploy Cloud API v0.7.0
|
|
10
|
+
|
|
11
|
+
The Cloud API migration runner automatically applies SQL files in numeric order. On first v0.7.0 startup it will apply:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
009_scope_user_secrets_and_project_lifecycle.sql
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This adds encrypted per-user NPM/Jenkins scope secrets and project archive metadata.
|
|
18
|
+
|
|
19
|
+
## 3. Upgrade the CLI
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install
|
|
23
|
+
npm run build
|
|
24
|
+
npm link
|
|
25
|
+
indraq --version
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Expected CLI version: `2.2.0`.
|
|
29
|
+
|
|
30
|
+
## 4. Re-provision old NPM/Jenkins memberships when necessary
|
|
31
|
+
|
|
32
|
+
v2.1 scope-native NPM/Jenkins rows did not store a personal encrypted password. If a v2.1 member receives an "identity is not fully provisioned" message after upgrade, a scope manager should remove and re-add that member, or have the member rotate the password after the native account is repaired.
|
|
33
|
+
|
|
34
|
+
AWS scope credentials already have a dedicated encrypted per-user credential table and do not require this migration step.
|
|
35
|
+
|
|
36
|
+
## 5. Save project scope bindings
|
|
37
|
+
|
|
38
|
+
For each environment, run once if bindings are missing:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
indraq project scopes --env dev
|
|
42
|
+
indraq prebuild --env dev
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Normal deploys then use:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
indraq deploy --env dev
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Use `--select-scopes` only when intentionally changing the saved bindings.
|
|
52
|
+
|
|
53
|
+
## 6. Project lifecycle
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
indraq project rename <name>
|
|
57
|
+
indraq project archive
|
|
58
|
+
indraq project restore
|
|
59
|
+
indraq project delete
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Archive blocks infrastructure/deployment mutation until the project is restored. Permanent delete remains manager/admin restricted and requires WRITE access to the project.
|
package/cloud-api/.dockerignore
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
node_modules
|
|
2
|
-
npm-debug.log*
|
|
3
|
-
yarn-debug.log*
|
|
4
|
-
yarn-error.log*
|
|
5
|
-
pnpm-debug.log*
|
|
6
|
-
*.log
|
|
7
|
-
.git
|
|
8
|
-
.gitignore
|
|
9
|
-
.indraq
|
|
10
|
-
dist
|
|
11
|
-
build
|
|
12
|
-
.next
|
|
13
|
-
coverage
|
|
14
|
-
.cache
|
|
15
|
-
.vite
|
|
16
|
-
.turbo
|
|
17
|
-
.DS_Store
|
|
18
|
-
Thumbs.db
|
|
1
|
+
node_modules
|
|
2
|
+
npm-debug.log*
|
|
3
|
+
yarn-debug.log*
|
|
4
|
+
yarn-error.log*
|
|
5
|
+
pnpm-debug.log*
|
|
6
|
+
*.log
|
|
7
|
+
.git
|
|
8
|
+
.gitignore
|
|
9
|
+
.indraq
|
|
10
|
+
dist
|
|
11
|
+
build
|
|
12
|
+
.next
|
|
13
|
+
coverage
|
|
14
|
+
.cache
|
|
15
|
+
.vite
|
|
16
|
+
.turbo
|
|
17
|
+
.DS_Store
|
|
18
|
+
Thumbs.db
|
package/cloud-api/.env.example
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
PORT=4010
|
|
2
|
-
DATABASE_URL=postgresql://indraq:change-me@127.0.0.1:5432/indraq_cloud
|
|
3
|
-
JWT_SECRET=replace-with-64-random-characters
|
|
4
|
-
MASTER_KEY=replace-with-64-hex-characters
|
|
5
|
-
BOOTSTRAP_ADMIN_EMAIL=admin@example.com
|
|
6
|
-
BOOTSTRAP_ADMIN_PASSWORD=change-this-immediately
|
|
7
|
-
|
|
8
|
-
# Password-reset email (required for `indraq password reset`)
|
|
9
|
-
SMTP_HOST=smtp.example.com
|
|
10
|
-
SMTP_PORT=587
|
|
11
|
-
SMTP_SECURE=false
|
|
12
|
-
SMTP_USER=
|
|
13
|
-
SMTP_PASS=
|
|
14
|
-
SMTP_FROM=IndraQ <no-reply@example.com>
|
|
1
|
+
PORT=4010
|
|
2
|
+
DATABASE_URL=postgresql://indraq:change-me@127.0.0.1:5432/indraq_cloud
|
|
3
|
+
JWT_SECRET=replace-with-64-random-characters
|
|
4
|
+
MASTER_KEY=replace-with-64-hex-characters
|
|
5
|
+
BOOTSTRAP_ADMIN_EMAIL=admin@example.com
|
|
6
|
+
BOOTSTRAP_ADMIN_PASSWORD=change-this-immediately
|
|
7
|
+
|
|
8
|
+
# Password-reset email (required for `indraq password reset`)
|
|
9
|
+
SMTP_HOST=smtp.example.com
|
|
10
|
+
SMTP_PORT=587
|
|
11
|
+
SMTP_SECURE=false
|
|
12
|
+
SMTP_USER=
|
|
13
|
+
SMTP_PASS=
|
|
14
|
+
SMTP_FROM=IndraQ <no-reply@example.com>
|
package/cloud-api/Dockerfile
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
FROM node:22-alpine AS build
|
|
2
|
-
WORKDIR /myapp
|
|
3
|
-
# Copy the complete project context. .dockerignore controls all exclusions.
|
|
4
|
-
COPY . .
|
|
5
|
-
RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi
|
|
6
|
-
RUN npm run build
|
|
7
|
-
RUN npm prune --omit=dev
|
|
8
|
-
|
|
9
|
-
FROM node:22-alpine AS runtime
|
|
10
|
-
WORKDIR /myapp
|
|
11
|
-
RUN apk add --no-cache curl
|
|
12
|
-
ENV NODE_ENV=production PORT=4010
|
|
13
|
-
# Copy the complete filtered project from the build stage, including generated
|
|
14
|
-
# build output and production node_modules. No project filenames are guessed.
|
|
15
|
-
COPY --from=build --chown=node:node /myapp ./
|
|
16
|
-
USER node
|
|
17
|
-
EXPOSE 4010
|
|
18
|
-
HEALTHCHECK --interval=30s --timeout=3s CMD curl -fsS http://127.0.0.1:4010/health >/dev/null || exit 1
|
|
19
|
-
CMD ["npm", "start"]
|
|
1
|
+
FROM node:22-alpine AS build
|
|
2
|
+
WORKDIR /myapp
|
|
3
|
+
# Copy the complete project context. .dockerignore controls all exclusions.
|
|
4
|
+
COPY . .
|
|
5
|
+
RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi
|
|
6
|
+
RUN npm run build
|
|
7
|
+
RUN npm prune --omit=dev
|
|
8
|
+
|
|
9
|
+
FROM node:22-alpine AS runtime
|
|
10
|
+
WORKDIR /myapp
|
|
11
|
+
RUN apk add --no-cache curl
|
|
12
|
+
ENV NODE_ENV=production PORT=4010
|
|
13
|
+
# Copy the complete filtered project from the build stage, including generated
|
|
14
|
+
# build output and production node_modules. No project filenames are guessed.
|
|
15
|
+
COPY --from=build --chown=node:node /myapp ./
|
|
16
|
+
USER node
|
|
17
|
+
EXPOSE 4010
|
|
18
|
+
HEALTHCHECK --interval=30s --timeout=3s CMD curl -fsS http://127.0.0.1:4010/health >/dev/null || exit 1
|
|
19
|
+
CMD ["npm", "start"]
|