indraq_cli 1.3.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.
Files changed (57) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1191 -0
  3. package/dist/cli/create-program.d.ts +3 -0
  4. package/dist/cli/create-program.d.ts.map +1 -0
  5. package/dist/cli/create-program.js +28 -0
  6. package/dist/cli/create-program.js.map +1 -0
  7. package/dist/cli/doctor.command.d.ts +2 -0
  8. package/dist/cli/doctor.command.d.ts.map +1 -0
  9. package/dist/cli/doctor.command.js +32 -0
  10. package/dist/cli/doctor.command.js.map +1 -0
  11. package/dist/index.d.ts +3 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +15 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/modules/deploy/commands/build.command.d.ts +6 -0
  16. package/dist/modules/deploy/commands/build.command.d.ts.map +1 -0
  17. package/dist/modules/deploy/commands/build.command.js +127 -0
  18. package/dist/modules/deploy/commands/build.command.js.map +1 -0
  19. package/dist/modules/deploy/commands/configure.command.d.ts +2 -0
  20. package/dist/modules/deploy/commands/configure.command.d.ts.map +1 -0
  21. package/dist/modules/deploy/commands/configure.command.js +404 -0
  22. package/dist/modules/deploy/commands/configure.command.js.map +1 -0
  23. package/dist/modules/deploy/config/deployment-config.d.ts +29 -0
  24. package/dist/modules/deploy/config/deployment-config.d.ts.map +1 -0
  25. package/dist/modules/deploy/config/deployment-config.js +164 -0
  26. package/dist/modules/deploy/config/deployment-config.js.map +1 -0
  27. package/dist/modules/deploy/index.d.ts +3 -0
  28. package/dist/modules/deploy/index.d.ts.map +1 -0
  29. package/dist/modules/deploy/index.js +57 -0
  30. package/dist/modules/deploy/index.js.map +1 -0
  31. package/dist/modules/deploy/services/docker.service.d.ts +7 -0
  32. package/dist/modules/deploy/services/docker.service.d.ts.map +1 -0
  33. package/dist/modules/deploy/services/docker.service.js +67 -0
  34. package/dist/modules/deploy/services/docker.service.js.map +1 -0
  35. package/dist/modules/deploy/services/jenkins.service.d.ts +23 -0
  36. package/dist/modules/deploy/services/jenkins.service.d.ts.map +1 -0
  37. package/dist/modules/deploy/services/jenkins.service.js +273 -0
  38. package/dist/modules/deploy/services/jenkins.service.js.map +1 -0
  39. package/dist/shared/git/git.service.d.ts +11 -0
  40. package/dist/shared/git/git.service.d.ts.map +1 -0
  41. package/dist/shared/git/git.service.js +110 -0
  42. package/dist/shared/git/git.service.js.map +1 -0
  43. package/dist/shared/github/github-api.service.d.ts +8 -0
  44. package/dist/shared/github/github-api.service.d.ts.map +1 -0
  45. package/dist/shared/github/github-api.service.js +77 -0
  46. package/dist/shared/github/github-api.service.js.map +1 -0
  47. package/dist/shared/github/github-auth.service.d.ts +10 -0
  48. package/dist/shared/github/github-auth.service.d.ts.map +1 -0
  49. package/dist/shared/github/github-auth.service.js +79 -0
  50. package/dist/shared/github/github-auth.service.js.map +1 -0
  51. package/dist/shared/runtime/runtime-doctor.d.ts +8 -0
  52. package/dist/shared/runtime/runtime-doctor.d.ts.map +1 -0
  53. package/dist/shared/runtime/runtime-doctor.js +31 -0
  54. package/dist/shared/runtime/runtime-doctor.js.map +1 -0
  55. package/docs/assets/indraq-logo.png +0 -0
  56. package/docs/assets/indraq-mark.png +0 -0
  57. package/package.json +54 -0
@@ -0,0 +1,77 @@
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.getGitHubIdentity = void 0;
7
+ const axios_1 = __importDefault(require("axios"));
8
+ const createGitHubApi = (token) => axios_1.default.create({
9
+ baseURL: 'https://api.github.com',
10
+ timeout: 10_000,
11
+ headers: {
12
+ Accept: 'application/vnd.github+json',
13
+ 'X-GitHub-Api-Version': '2022-11-28',
14
+ 'User-Agent': 'indraq_cli',
15
+ ...(token ? { Authorization: `Bearer ${token}` } : {})
16
+ }
17
+ });
18
+ const listOrganizations = async (api, endpoint) => {
19
+ const organizations = [];
20
+ const perPage = 100;
21
+ for (let page = 1; page <= 10; page += 1) {
22
+ const response = await api.get(endpoint, {
23
+ params: { per_page: perPage, page }
24
+ });
25
+ const pageOrganizations = response.data
26
+ .map((organization) => organization.login?.trim())
27
+ .filter((login) => Boolean(login));
28
+ organizations.push(...pageOrganizations);
29
+ if (response.data.length < perPage) {
30
+ break;
31
+ }
32
+ }
33
+ return Array.from(new Set(organizations)).sort((a, b) => a.localeCompare(b));
34
+ };
35
+ const getGitHubIdentity = async (auth) => {
36
+ if (auth.token) {
37
+ try {
38
+ const api = createGitHubApi(auth.token);
39
+ const [userResponse, organizations] = await Promise.all([
40
+ api.get('/user'),
41
+ listOrganizations(api, '/user/orgs')
42
+ ]);
43
+ const username = userResponse.data.login || auth.username;
44
+ return {
45
+ ...(username ? { username } : {}),
46
+ organizations,
47
+ organizationDiscovery: 'authenticated'
48
+ };
49
+ }
50
+ catch {
51
+ // Fall through. Git credentials can be valid for Git operations even when
52
+ // the token does not have enough API scope to enumerate organizations.
53
+ }
54
+ }
55
+ const username = auth.username;
56
+ if (username) {
57
+ try {
58
+ const api = createGitHubApi();
59
+ const organizations = await listOrganizations(api, `/users/${encodeURIComponent(username)}/orgs`);
60
+ return {
61
+ username,
62
+ organizations,
63
+ organizationDiscovery: 'public'
64
+ };
65
+ }
66
+ catch {
67
+ // Keep the authenticated Git username and let the caller provide a manual fallback.
68
+ }
69
+ }
70
+ return {
71
+ ...(username ? { username } : {}),
72
+ organizations: [],
73
+ organizationDiscovery: 'unavailable'
74
+ };
75
+ };
76
+ exports.getGitHubIdentity = getGitHubIdentity;
77
+ //# sourceMappingURL=github-api.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-api.service.js","sourceRoot":"","sources":["../../../src/shared/github/github-api.service.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAkD;AAiBlD,MAAM,eAAe,GAAG,CAAC,KAAc,EAAiB,EAAE,CACxD,eAAK,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aAAa,EAAE,EAAE;QACjB,qBAAqB,EAAE,aAAa;KACrC,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,iBAAiB,qBAyC5B"}
@@ -0,0 +1,10 @@
1
+ export type GitHubAuthMethod = 'gh' | 'git-credential' | 'git-ssh';
2
+ export interface GitHubAuthState {
3
+ method: GitHubAuthMethod;
4
+ username?: string;
5
+ token?: string;
6
+ remoteOwner?: string;
7
+ }
8
+ export declare const detectGitHubAuthentication: () => GitHubAuthState | null;
9
+ export declare const describeGitHubAuthentication: (auth: GitHubAuthState) => string;
10
+ //# sourceMappingURL=github-auth.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-auth.service.d.ts","sourceRoot":"","sources":["../../../src/shared/github/github-auth.service.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAkED,eAAO,MAAM,0BAA0B,QAAO,eAAe,GAAG,IAM/D,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,MAAM,eAAe,KAAG,MAUpE,CAAC"}
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.describeGitHubAuthentication = exports.detectGitHubAuthentication = void 0;
4
+ const node_child_process_1 = require("node:child_process");
5
+ const git_service_1 = require("../git/git.service");
6
+ const tryGitHubCli = () => {
7
+ try {
8
+ (0, node_child_process_1.execFileSync)('gh', ['auth', 'status'], {
9
+ stdio: ['ignore', 'pipe', 'pipe'],
10
+ timeout: 5_000
11
+ });
12
+ const username = (0, node_child_process_1.execFileSync)('gh', ['api', 'user', '--jq', '.login'], {
13
+ encoding: 'utf8',
14
+ stdio: ['ignore', 'pipe', 'pipe'],
15
+ timeout: 5_000
16
+ }).trim();
17
+ const token = (0, node_child_process_1.execFileSync)('gh', ['auth', 'token'], {
18
+ encoding: 'utf8',
19
+ stdio: ['ignore', 'pipe', 'pipe'],
20
+ timeout: 5_000
21
+ }).trim();
22
+ if (!username || !token) {
23
+ return null;
24
+ }
25
+ const remoteOwner = (0, git_service_1.getGitRemoteOwner)();
26
+ return {
27
+ method: 'gh',
28
+ username,
29
+ token,
30
+ ...(remoteOwner ? { remoteOwner } : {})
31
+ };
32
+ }
33
+ catch {
34
+ return null;
35
+ }
36
+ };
37
+ const tryGitCredentialManager = () => {
38
+ const credential = (0, git_service_1.getGitHubHttpsCredential)();
39
+ if (!credential?.username || !credential.password) {
40
+ return null;
41
+ }
42
+ const remoteOwner = (0, git_service_1.getGitRemoteOwner)();
43
+ return {
44
+ method: 'git-credential',
45
+ username: credential.username,
46
+ token: credential.password,
47
+ ...(remoteOwner ? { remoteOwner } : {})
48
+ };
49
+ };
50
+ const tryGitHubSsh = () => {
51
+ const ssh = (0, git_service_1.getGitHubSshAuthentication)();
52
+ if (!ssh) {
53
+ return null;
54
+ }
55
+ const remoteOwner = (0, git_service_1.getGitRemoteOwner)();
56
+ return {
57
+ method: 'git-ssh',
58
+ ...(ssh.username ? { username: ssh.username } : {}),
59
+ ...(remoteOwner ? { remoteOwner } : {})
60
+ };
61
+ };
62
+ const detectGitHubAuthentication = () => {
63
+ (0, git_service_1.assertGitAvailable)();
64
+ // Prefer the normal Git/Git Bash credential path. GitHub CLI is only a
65
+ // fallback so installing `gh` can never unexpectedly replace a working Git login.
66
+ return tryGitCredentialManager() ?? tryGitHubCli() ?? tryGitHubSsh();
67
+ };
68
+ exports.detectGitHubAuthentication = detectGitHubAuthentication;
69
+ const describeGitHubAuthentication = (auth) => {
70
+ if (auth.method === 'gh') {
71
+ return 'GitHub CLI';
72
+ }
73
+ if (auth.method === 'git-credential') {
74
+ return 'Git/Git Credential Manager';
75
+ }
76
+ return 'Git SSH';
77
+ };
78
+ exports.describeGitHubAuthentication = describeGitHubAuthentication;
79
+ //# sourceMappingURL=github-auth.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-auth.service.js","sourceRoot":"","sources":["../../../src/shared/github/github-auth.service.ts"],"names":[],"mappings":";;;AAAA,2DAAkD;AAClD,oDAK4B;AAW5B,MAAM,YAAY,GAAG,GAA2B,EAAE;IAChD,IAAI,CAAC;QACH,IAAA,iCAAY,EAAC,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE;YACrC,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;YACjC,OAAO,EAAE,KAAK;SACf,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,IAAA,iCAAY,EAAC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE;YACrE,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;YACjC,OAAO,EAAE,KAAK;SACf,CAAC,CAAC,IAAI,EAAE,CAAC;QAEV,MAAM,KAAK,GAAG,IAAA,iCAAY,EAAC,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;YAClD,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;YACjC,OAAO,EAAE,KAAK;SACf,CAAC,CAAC,IAAI,EAAE,CAAC;QAEV,IAAI,CAAC,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,WAAW,GAAG,IAAA,+BAAiB,GAAE,CAAC;QACxC,OAAO;YACL,MAAM,EAAE,IAAI;YACZ,QAAQ;YACR,KAAK;YACL,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CA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,EAAE,IAAI,YAAY,EAAE,CAAC;AACvE,CAAC,CAAC;AANW,QAAA,0BAA0B,8BAMrC;AAEK,MAAM,4BAA4B,GAAG,CAAC,IAAqB,EAAU,EAAE;IAC5E,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QACzB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,gBAAgB,EAAE,CAAC;QACrC,OAAO,4BAA4B,CAAC;IACtC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAVW,QAAA,4BAA4B,gCAUvC"}
@@ -0,0 +1,8 @@
1
+ export interface CommandResolution {
2
+ command: string;
3
+ paths: string[];
4
+ shadowed: boolean;
5
+ expectedNpmLauncher?: string;
6
+ }
7
+ export declare const resolveCommand: (command: string) => CommandResolution;
8
+ //# sourceMappingURL=runtime-doctor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-doctor.d.ts","sourceRoot":"","sources":["../../../src/shared/runtime/runtime-doctor.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAID,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,KAAG,iBAsBhD,CAAC"}
@@ -0,0 +1,31 @@
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.resolveCommand = void 0;
7
+ const node_child_process_1 = require("node:child_process");
8
+ const node_path_1 = __importDefault(require("node:path"));
9
+ const normalized = (value) => node_path_1.default.normalize(value).toLowerCase();
10
+ const resolveCommand = (command) => {
11
+ const locator = process.platform === 'win32' ? 'where.exe' : 'which';
12
+ let paths = [];
13
+ try {
14
+ const output = (0, node_child_process_1.execFileSync)(locator, [command], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] });
15
+ paths = output.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
16
+ }
17
+ catch {
18
+ paths = [];
19
+ }
20
+ const npmBin = process.platform === 'win32' && process.env.APPDATA
21
+ ? node_path_1.default.join(process.env.APPDATA, 'npm')
22
+ : undefined;
23
+ const expectedNpmLauncher = npmBin ? node_path_1.default.join(npmBin, `${command}.cmd`) : undefined;
24
+ const shadowed = Boolean(process.platform === 'win32' &&
25
+ npmBin &&
26
+ paths[0] &&
27
+ !normalized(paths[0]).startsWith(`${normalized(npmBin)}${node_path_1.default.sep}`));
28
+ return { command, paths, shadowed, ...(expectedNpmLauncher ? { expectedNpmLauncher } : {}) };
29
+ };
30
+ exports.resolveCommand = resolveCommand;
31
+ //# sourceMappingURL=runtime-doctor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-doctor.js","sourceRoot":"","sources":["../../../src/shared/runtime/runtime-doctor.ts"],"names":[],"mappings":";;;;;;AAAA,2DAAkD;AAClD,0DAA6B;AAS7B,MAAM,UAAU,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,mBAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AAE3E,MAAM,cAAc,GAAG,CAAC,OAAe,EAAqB,EAAE;IACnE,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC;IACrE,IAAI,KAAK,GAAa,EAAE,CAAC;IACzB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,iCAAY,EAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC3G,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3E,CAAC;IAAC,MAAM,CAAC;QACP,KAAK,GAAG,EAAE,CAAC;IACb,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO;QAChE,CAAC,CAAC,mBAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC;QACvC,CAAC,CAAC,SAAS,CAAC;IACd,MAAM,mBAAmB,GAAG,MAAM,CAAC,CAAC,CAAC,mBAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACrF,MAAM,QAAQ,GAAG,OAAO,CACtB,OAAO,CAAC,QAAQ,KAAK,OAAO;QAC5B,MAAM;QACN,KAAK,CAAC,CAAC,CAAC;QACR,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,mBAAI,CAAC,GAAG,EAAE,CAAC,CACrE,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC/F,CAAC,CAAC;AAtBW,QAAA,cAAc,kBAsBzB"}
Binary file
Binary file
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "indraq_cli",
3
+ "version": "1.3.0",
4
+ "description": "IndraQ CLI for Docker, GHCR, Jenkins deployments, and engineering automation",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "indraq": "dist/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "prepack": "npm run build",
12
+ "start": "node dist/index.js",
13
+ "dev": "ts-node src/index.ts",
14
+ "watch": "nodemon --exec ts-node src/index.ts"
15
+ },
16
+ "keywords": [
17
+ "indraq",
18
+ "cli",
19
+ "docker",
20
+ "ghcr",
21
+ "jenkins",
22
+ "deployment",
23
+ "devops",
24
+ "automation"
25
+ ],
26
+ "author": "IndraQ Innovations",
27
+ "license": "MIT",
28
+ "dependencies": {
29
+ "chalk": "^4.1.2",
30
+ "commander": "^9.5.0",
31
+ "inquirer": "^8.2.5",
32
+ "axios": "^1.6.0"
33
+ },
34
+ "devDependencies": {
35
+ "@types/inquirer": "^8.2.10",
36
+ "@types/node": "^24.13.3",
37
+ "nodemon": "^3.0.2",
38
+ "ts-node": "^10.9.2",
39
+ "typescript": "^5.9.3"
40
+ },
41
+ "engines": {
42
+ "node": ">=24.0.0 <25"
43
+ },
44
+ "files": [
45
+ "dist",
46
+ "README.md",
47
+ "LICENSE",
48
+ "docs/assets"
49
+ ],
50
+ "publishConfig": {
51
+ "access": "public",
52
+ "registry": "https://registry.npmjs.org/"
53
+ }
54
+ }