indraq_cli 2.2.4 → 2.4.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/README.md +158 -21
- package/cloud-api/.env.example +10 -0
- package/cloud-api/README.md +32 -3
- package/cloud-api/dist/index.js +840 -13
- package/cloud-api/package.json +5 -3
- package/cloud-api/scripts/check-dev-deps.mjs +11 -0
- package/cloud-api/sql/011_environment_internal_ipv4.sql +14 -0
- package/cloud-api/sql/012_mobile_ota.sql +139 -0
- package/cloud-api/src/index.ts +629 -13
- package/dist/cli/create-program.d.ts +1 -1
- package/dist/cli/create-program.d.ts.map +1 -1
- package/dist/cli/create-program.js +126 -46
- package/dist/cli/create-program.js.map +1 -1
- package/dist/cli/help-content.d.ts +1 -1
- package/dist/cli/help-content.d.ts.map +1 -1
- package/dist/cli/help-content.js +150 -32
- package/dist/cli/help-content.js.map +1 -1
- package/dist/index.js +55 -14
- package/dist/index.js.map +1 -1
- package/dist/modules/access/index.d.ts +1 -1
- package/dist/modules/access/index.d.ts.map +1 -1
- package/dist/modules/access/index.js +2 -3
- package/dist/modules/access/index.js.map +1 -1
- package/dist/modules/aws/commands/dns.command.js +4 -4
- package/dist/modules/aws/commands/dns.command.js.map +1 -1
- package/dist/modules/aws/index.d.ts +1 -1
- package/dist/modules/aws/index.d.ts.map +1 -1
- package/dist/modules/aws/index.js +18 -42
- package/dist/modules/aws/index.js.map +1 -1
- package/dist/modules/aws/services/route53-lookup.service.d.ts.map +1 -1
- package/dist/modules/aws/services/route53-lookup.service.js +2 -3
- package/dist/modules/aws/services/route53-lookup.service.js.map +1 -1
- package/dist/modules/aws/services/route53-sdk.d.ts +2 -0
- package/dist/modules/aws/services/route53-sdk.d.ts.map +1 -0
- package/dist/modules/aws/services/route53-sdk.js +12 -0
- package/dist/modules/aws/services/route53-sdk.js.map +1 -0
- package/dist/modules/cloud/commands/cloud.command.d.ts +2 -0
- package/dist/modules/cloud/commands/cloud.command.d.ts.map +1 -1
- package/dist/modules/cloud/commands/cloud.command.js +165 -17
- package/dist/modules/cloud/commands/cloud.command.js.map +1 -1
- package/dist/modules/cloud/commands/environment.command.d.ts.map +1 -1
- package/dist/modules/cloud/commands/environment.command.js +10 -6
- package/dist/modules/cloud/commands/environment.command.js.map +1 -1
- package/dist/modules/cloud/index.d.ts +1 -1
- package/dist/modules/cloud/index.d.ts.map +1 -1
- package/dist/modules/cloud/index.js +48 -52
- package/dist/modules/cloud/index.js.map +1 -1
- package/dist/modules/cloud/services/cloud-api.service.d.ts +1 -0
- package/dist/modules/cloud/services/cloud-api.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/cloud-api.service.js +41 -1
- package/dist/modules/cloud/services/cloud-api.service.js.map +1 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.d.ts +1 -0
- package/dist/modules/cloud/services/cloud-jenkins.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.js +5 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.js.map +1 -1
- package/dist/modules/cloud/services/environment.service.d.ts +7 -1
- package/dist/modules/cloud/services/environment.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/environment.service.js +5 -1
- package/dist/modules/cloud/services/environment.service.js.map +1 -1
- package/dist/modules/cloud/services/project-cloud.service.d.ts +2 -1
- package/dist/modules/cloud/services/project-cloud.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/project-cloud.service.js +9 -1
- package/dist/modules/cloud/services/project-cloud.service.js.map +1 -1
- package/dist/modules/deploy/commands/build.command.d.ts +2 -1
- package/dist/modules/deploy/commands/build.command.d.ts.map +1 -1
- package/dist/modules/deploy/commands/build.command.js +120 -75
- package/dist/modules/deploy/commands/build.command.js.map +1 -1
- package/dist/modules/deploy/index.d.ts +1 -1
- package/dist/modules/deploy/index.d.ts.map +1 -1
- package/dist/modules/deploy/index.js +67 -36
- package/dist/modules/deploy/index.js.map +1 -1
- package/dist/modules/dockerfile/index.d.ts +1 -1
- package/dist/modules/dockerfile/index.d.ts.map +1 -1
- package/dist/modules/dockerfile/index.js +3 -2
- package/dist/modules/dockerfile/index.js.map +1 -1
- package/dist/modules/jenkins/commands/create-deployment.command.d.ts.map +1 -1
- package/dist/modules/jenkins/commands/create-deployment.command.js +7 -11
- package/dist/modules/jenkins/commands/create-deployment.command.js.map +1 -1
- package/dist/modules/jenkins/index.d.ts +1 -1
- package/dist/modules/jenkins/index.d.ts.map +1 -1
- package/dist/modules/jenkins/index.js +13 -22
- package/dist/modules/jenkins/index.js.map +1 -1
- package/dist/modules/mobile/commands/build-mobile.command.d.ts.map +1 -1
- package/dist/modules/mobile/commands/build-mobile.command.js +44 -5
- package/dist/modules/mobile/commands/build-mobile.command.js.map +1 -1
- package/dist/modules/mobile/commands/configure-mobile.command.d.ts.map +1 -1
- package/dist/modules/mobile/commands/configure-mobile.command.js +3 -12
- package/dist/modules/mobile/commands/configure-mobile.command.js.map +1 -1
- package/dist/modules/mobile/commands/mobile-environment.command.d.ts +5 -0
- package/dist/modules/mobile/commands/mobile-environment.command.d.ts.map +1 -0
- package/dist/modules/mobile/commands/mobile-environment.command.js +67 -0
- package/dist/modules/mobile/commands/mobile-environment.command.js.map +1 -0
- package/dist/modules/mobile/commands/mobile-prebuild.command.d.ts +6 -0
- package/dist/modules/mobile/commands/mobile-prebuild.command.d.ts.map +1 -0
- package/dist/modules/mobile/commands/mobile-prebuild.command.js +134 -0
- package/dist/modules/mobile/commands/mobile-prebuild.command.js.map +1 -0
- package/dist/modules/mobile/commands/ota.command.d.ts +8 -0
- package/dist/modules/mobile/commands/ota.command.d.ts.map +1 -0
- package/dist/modules/mobile/commands/ota.command.js +190 -0
- package/dist/modules/mobile/commands/ota.command.js.map +1 -0
- package/dist/modules/mobile/config/mobile-config.d.ts +26 -1
- package/dist/modules/mobile/config/mobile-config.d.ts.map +1 -1
- package/dist/modules/mobile/config/mobile-config.js +52 -9
- package/dist/modules/mobile/config/mobile-config.js.map +1 -1
- package/dist/modules/mobile/index.d.ts.map +1 -1
- package/dist/modules/mobile/index.js +27 -18
- package/dist/modules/mobile/index.js.map +1 -1
- package/dist/modules/mobile/services/jenkins-mobile.service.js +1 -1
- package/dist/modules/mobile/services/jenkins-mobile.service.js.map +1 -1
- package/dist/modules/mobile/services/mobile-cloud.service.d.ts +120 -0
- package/dist/modules/mobile/services/mobile-cloud.service.d.ts.map +1 -0
- package/dist/modules/mobile/services/mobile-cloud.service.js +53 -0
- package/dist/modules/mobile/services/mobile-cloud.service.js.map +1 -0
- package/dist/modules/mobile/services/ota-export.service.d.ts +14 -0
- package/dist/modules/mobile/services/ota-export.service.d.ts.map +1 -0
- package/dist/modules/mobile/services/ota-export.service.js +68 -0
- package/dist/modules/mobile/services/ota-export.service.js.map +1 -0
- package/dist/modules/mobile/services/ota-setup.service.d.ts +18 -0
- package/dist/modules/mobile/services/ota-setup.service.d.ts.map +1 -0
- package/dist/modules/mobile/services/ota-setup.service.js +374 -0
- package/dist/modules/mobile/services/ota-setup.service.js.map +1 -0
- package/dist/modules/prebuild/commands/prebuild.command.d.ts +3 -2
- package/dist/modules/prebuild/commands/prebuild.command.d.ts.map +1 -1
- package/dist/modules/prebuild/commands/prebuild.command.js +79 -56
- package/dist/modules/prebuild/commands/prebuild.command.js.map +1 -1
- package/dist/modules/prebuild/index.d.ts +1 -1
- package/dist/modules/prebuild/index.d.ts.map +1 -1
- package/dist/modules/prebuild/index.js +3 -2
- package/dist/modules/prebuild/index.js.map +1 -1
- package/dist/modules/proxy/commands/proxy.command.js +3 -3
- package/dist/modules/proxy/commands/proxy.command.js.map +1 -1
- package/dist/modules/proxy/index.d.ts +1 -1
- package/dist/modules/proxy/index.d.ts.map +1 -1
- package/dist/modules/proxy/index.js +8 -10
- package/dist/modules/proxy/index.js.map +1 -1
- package/dist/modules/scaffold/commands/init.command.d.ts.map +1 -1
- package/dist/modules/scaffold/commands/init.command.js +52 -18
- package/dist/modules/scaffold/commands/init.command.js.map +1 -1
- package/dist/modules/scaffold/index.d.ts +1 -1
- package/dist/modules/scaffold/index.d.ts.map +1 -1
- package/dist/modules/scaffold/index.js +4 -2
- package/dist/modules/scaffold/index.js.map +1 -1
- package/dist/modules/scaffold/project-topology.d.ts +14 -0
- package/dist/modules/scaffold/project-topology.d.ts.map +1 -0
- package/dist/modules/scaffold/project-topology.js +59 -0
- package/dist/modules/scaffold/project-topology.js.map +1 -0
- package/dist/modules/scaffold/types.d.ts +14 -1
- package/dist/modules/scaffold/types.d.ts.map +1 -1
- package/dist/modules/scopes/commands/scope.command.d.ts.map +1 -1
- package/dist/modules/scopes/commands/scope.command.js +18 -11
- package/dist/modules/scopes/commands/scope.command.js.map +1 -1
- package/dist/modules/scopes/index.d.ts +1 -1
- package/dist/modules/scopes/index.d.ts.map +1 -1
- package/dist/modules/scopes/index.js +15 -15
- package/dist/modules/scopes/index.js.map +1 -1
- package/dist/modules/setup/commands/setup.command.d.ts +2 -0
- package/dist/modules/setup/commands/setup.command.d.ts.map +1 -0
- package/dist/modules/setup/commands/setup.command.js +107 -0
- package/dist/modules/setup/commands/setup.command.js.map +1 -0
- package/dist/modules/setup/index.d.ts +3 -0
- package/dist/modules/setup/index.d.ts.map +1 -0
- package/dist/modules/setup/index.js +9 -0
- package/dist/modules/setup/index.js.map +1 -0
- package/dist/modules/users/index.d.ts +1 -1
- package/dist/modules/users/index.d.ts.map +1 -1
- package/dist/modules/users/index.js +10 -25
- package/dist/modules/users/index.js.map +1 -1
- package/dist/modules/users/providers/aws-user.provider.js +1 -1
- package/dist/modules/users/providers/aws-user.provider.js.map +1 -1
- package/docs/ARCHITECTURE.md +85 -29
- package/package.json +21 -5
- package/cloud-api/package-lock.json +0 -2250
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -1,29 +1,85 @@
|
|
|
1
|
-
# IndraQ Architecture
|
|
2
|
-
|
|
3
|
-
## Control plane
|
|
4
|
-
|
|
5
|
-
IndraQ CLI communicates with IndraQ Cloud API. PostgreSQL stores identities, roles, projects, shared environments, encrypted user
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
# IndraQ Architecture — v2.3
|
|
2
|
+
|
|
3
|
+
## Control plane
|
|
4
|
+
|
|
5
|
+
IndraQ CLI communicates with the IndraQ Cloud API. PostgreSQL stores identities, roles, projects, shared environments, provider scopes, encrypted per-user scope credentials, project/environment scope bindings, infrastructure associations, managed AWS IAM credentials, persistent sessions, and audit logs.
|
|
6
|
+
|
|
7
|
+
## Project components — what is built
|
|
8
|
+
|
|
9
|
+
A project may contain one or multiple independently deployable components. Legacy frontend/backend/fullstack metadata is normalized at runtime, so older projects remain compatible.
|
|
10
|
+
|
|
11
|
+
Supported presets include:
|
|
12
|
+
|
|
13
|
+
- frontend
|
|
14
|
+
- backend
|
|
15
|
+
- frontend + backend
|
|
16
|
+
- user frontend + admin frontend + backend (`multiweb`)
|
|
17
|
+
- mobile
|
|
18
|
+
|
|
19
|
+
Each web component has its own path, framework, image name, ports and health endpoint. GHCR/Jenkins resources are keyed by component and environment.
|
|
20
|
+
|
|
21
|
+
## Deployment topology — where it runs
|
|
22
|
+
|
|
23
|
+
Deployment topology is separate from project type. A project can target one shared environment/server or several. Topology is stored in the existing `projects.config` JSONB document; v2.3 does not require a new SQL migration.
|
|
24
|
+
|
|
25
|
+
Each target stores:
|
|
26
|
+
|
|
27
|
+
- shared environment name
|
|
28
|
+
- topology role: primary / secondary / replica
|
|
29
|
+
- Jenkins stage: dev / prod
|
|
30
|
+
|
|
31
|
+
The Jenkins stage is explicit so a production backup named `backup-server` cannot accidentally resolve to Jenkins DEV.
|
|
32
|
+
|
|
33
|
+
## Provider scopes and credentials
|
|
34
|
+
|
|
35
|
+
AWS, NPM, Jenkins and GHCR are organization provider scopes. Users see/use only assigned scopes. Their native/provider credentials are resolved only when required and are not copied into project folders.
|
|
36
|
+
|
|
37
|
+
A project can bind different provider scopes for each environment. This allows the same component/pipeline name to exist on Jenkins A for the primary server and Jenkins B for the backup server, with separate NPM instances as well.
|
|
38
|
+
|
|
39
|
+
## Shared environments
|
|
40
|
+
|
|
41
|
+
Admins can create any number of shared environments with arbitrary names. Each environment contains:
|
|
42
|
+
|
|
43
|
+
- external/public IPv4 — used by Route53/DNS
|
|
44
|
+
- internal/private IPv4 — used by Nginx Proxy Manager upstreams
|
|
45
|
+
- optional region/metadata
|
|
46
|
+
|
|
47
|
+
Route53 PRIMARY/SECONDARY remains a DNS-resource decision. Project topology primary/secondary describes intended deployment ordering/relationship and does not silently rewrite DNS policy.
|
|
48
|
+
|
|
49
|
+
## Multi-environment deployment
|
|
50
|
+
|
|
51
|
+
For one or more selected components, IndraQ:
|
|
52
|
+
|
|
53
|
+
1. builds the component image once
|
|
54
|
+
2. pushes the selected tag(s) once to GHCR
|
|
55
|
+
3. resolves the immutable image digest
|
|
56
|
+
4. verifies all selected environments point at the same logical GHCR image
|
|
57
|
+
5. triggers each environment's own Jenkins controller sequentially with the same tag + digest
|
|
58
|
+
6. stops on the first failed target and reports that environment
|
|
59
|
+
|
|
60
|
+
This prevents primary/backup servers from receiving different image bytes during one CLI deployment.
|
|
61
|
+
|
|
62
|
+
## Project resources
|
|
63
|
+
|
|
64
|
+
Projects keep intent and external-resource associations, including GHCR image repositories, Jenkins jobs, Route53 routing/health checks, and NPM proxy hosts. Project membership controls who can discover/re-link a project. Resource grants record access to individual AWS, NPM, and Jenkins resources and are audited.
|
|
65
|
+
|
|
66
|
+
## Prebuild
|
|
67
|
+
|
|
68
|
+
Prebuild reconciles rather than blindly creates. Required infrastructure is GHCR + Jenkins. Route53/NPM remain optional.
|
|
69
|
+
|
|
70
|
+
v2.3 adds:
|
|
71
|
+
|
|
72
|
+
- `--required-only` — reconcile GHCR/Jenkins only
|
|
73
|
+
- `--all-targets` — reconcile every configured project deployment environment
|
|
74
|
+
|
|
75
|
+
Provider scope selection is environment-specific. If there is one unambiguous eligible missing scope, it can be linked directly; real choices are still presented interactively.
|
|
76
|
+
|
|
77
|
+
## Startup/performance model
|
|
78
|
+
|
|
79
|
+
The CLI router loads only the requested command family. Command-family indexes then lazy-load implementation modules only when an action executes. Large providers such as the AWS SDK are kept behind lazy boundaries when possible.
|
|
80
|
+
|
|
81
|
+
`indraq -V` remains a zero-initialization fast path. Lightweight help commands do not initialize Cloud/provider clients.
|
|
82
|
+
|
|
83
|
+
## Local state
|
|
84
|
+
|
|
85
|
+
The project folder stores the Cloud project ID in `.indraq/project.json`. Reusable provider secrets and project topology live in the Cloud control plane, not in application source.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "indraq_cli",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "IndraQ
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"description": "IndraQ cloud/devops CLI with component deployments, mobile Jenkins environments, and self-hosted OTA updates",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"indraq": "dist/index.js"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dev": "ts-node src/index.ts",
|
|
14
14
|
"watch": "nodemon --exec ts-node src/index.ts",
|
|
15
15
|
"build:cloud": "npm --prefix cloud-api install --no-audit --no-fund && npm --prefix cloud-api run build",
|
|
16
|
-
"test": "npm run test:cloud-endpoint && npm run test:user-credentials && npm run test:infrastructure && npm run test:platform && npm run test:project-access && npm run test:project-create && npm run test:jenkins-crumb && npm run test:jenkins-port && npm run test:prebuild && npm run test:docker-context && npm run test:identity-security && npm run test:user-lifecycle-jenkins && npm run test:v2-lifecycle && npm run test:v21-scopes && npm run test:v22 && npm run test:v221 && npm run test:v222 && npm run test:v222-runtime && npm run test:v223 && npm run test:v224",
|
|
16
|
+
"test": "npm run test:cloud-endpoint && npm run test:user-credentials && npm run test:infrastructure && npm run test:platform && npm run test:project-access && npm run test:project-create && npm run test:jenkins-crumb && npm run test:jenkins-port && npm run test:prebuild && npm run test:docker-context && npm run test:identity-security && npm run test:user-lifecycle-jenkins && npm run test:v2-lifecycle && npm run test:v21-scopes && npm run test:v22 && npm run test:v221 && npm run test:v222 && npm run test:v222-runtime && npm run test:v223 && npm run test:v224 && npm run test:v225 && npm run test:v226 && npm run test:v230 && npm run test:v240",
|
|
17
17
|
"test:user-credentials": "node tests/cloud-user-credential-regression.cjs",
|
|
18
18
|
"test:prebuild": "node tests/prebuild-cloud-regression.cjs",
|
|
19
19
|
"test:jenkins-port": "node tests/jenkins-port-regression.cjs",
|
|
@@ -33,7 +33,11 @@
|
|
|
33
33
|
"test:v222": "node tests/v222-persistent-session-regression.cjs",
|
|
34
34
|
"test:v222-runtime": "node tests/v222-persistent-session-runtime-regression.cjs",
|
|
35
35
|
"test:v223": "node tests/v223-logical-fixes-regression.cjs && node tests/v223-normal-user-route53-regression.cjs && node tests/v223-jenkins-build-runtime-regression.cjs",
|
|
36
|
-
"test:v224": "node tests/v224-jenkins-build-regression.cjs"
|
|
36
|
+
"test:v224": "node tests/v224-jenkins-build-regression.cjs",
|
|
37
|
+
"test:v225": "node tests/v225-environment-addressing-regression.cjs",
|
|
38
|
+
"test:v226": "node tests/v226-help-version-fastpath-regression.cjs",
|
|
39
|
+
"test:v230": "node tests/v230-component-multienv-regression.cjs && node tests/v230-multienv-deploy-runtime.cjs",
|
|
40
|
+
"test:v240": "node tests/v240-mobile-ota-regression.cjs"
|
|
37
41
|
},
|
|
38
42
|
"keywords": [
|
|
39
43
|
"indraq",
|
|
@@ -92,7 +96,19 @@
|
|
|
92
96
|
"RELEASE_CHECKS_v2.2.3.md",
|
|
93
97
|
"CHANGELOG_v2.2.4.md",
|
|
94
98
|
"RELEASE_CHECKS_v2.2.4.md",
|
|
95
|
-
"TEST_RESULTS_v2.2.4.txt"
|
|
99
|
+
"TEST_RESULTS_v2.2.4.txt",
|
|
100
|
+
"CHANGELOG_v2.2.5.md",
|
|
101
|
+
"RELEASE_CHECKS_v2.2.5.md",
|
|
102
|
+
"TEST_RESULTS_v2.2.5.txt",
|
|
103
|
+
"CHANGELOG_v2.2.6.md",
|
|
104
|
+
"RELEASE_CHECKS_v2.2.6.md",
|
|
105
|
+
"TEST_RESULTS_v2.2.6.txt",
|
|
106
|
+
"CHANGELOG_v2.3.0.md",
|
|
107
|
+
"RELEASE_CHECKS_v2.3.0.md",
|
|
108
|
+
"TEST_RESULTS_v2.3.0.txt",
|
|
109
|
+
"CHANGELOG_v2.4.0.md",
|
|
110
|
+
"RELEASE_CHECKS_v2.4.0.md",
|
|
111
|
+
"TEST_RESULTS_v2.4.0.txt"
|
|
96
112
|
],
|
|
97
113
|
"publishConfig": {
|
|
98
114
|
"access": "public",
|