indraq_cli 2.5.0 → 2.7.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 +84 -3
- package/cloud-api/.env.example +15 -15
- package/cloud-api/README.md +1 -1
- package/cloud-api/dist/index.js +78 -4
- package/cloud-api/dist/index.js.map +1 -0
- package/cloud-api/package.json +1 -1
- package/cloud-api/src/index.ts +54 -3
- package/dist/cli/help-content.d.ts.map +1 -1
- package/dist/cli/help-content.js +3 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/modules/cloud/commands/cloud.command.d.ts.map +1 -1
- package/dist/modules/cloud/commands/cloud.command.js +124 -15
- package/dist/modules/cloud/commands/cloud.command.js.map +1 -1
- package/dist/modules/cloud/index.js +1 -1
- package/dist/modules/cloud/index.js.map +1 -1
- package/dist/modules/cloud/services/cloud-aws.service.d.ts +1 -1
- package/dist/modules/cloud/services/cloud-aws.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/cloud-aws.service.js +2 -2
- package/dist/modules/cloud/services/cloud-aws.service.js.map +1 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.d.ts +1 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.js +2 -2
- package/dist/modules/cloud/services/cloud-jenkins.service.js.map +1 -1
- package/dist/modules/cloud/services/cloud-npm.service.d.ts +1 -1
- package/dist/modules/cloud/services/cloud-npm.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/cloud-npm.service.js +2 -2
- package/dist/modules/cloud/services/cloud-npm.service.js.map +1 -1
- package/dist/modules/cloud/services/github-packages.service.d.ts +5 -0
- package/dist/modules/cloud/services/github-packages.service.d.ts.map +1 -0
- package/dist/modules/cloud/services/github-packages.service.js +38 -0
- package/dist/modules/cloud/services/github-packages.service.js.map +1 -0
- package/dist/modules/cloud/services/project-cleanup.service.d.ts +24 -0
- package/dist/modules/cloud/services/project-cleanup.service.d.ts.map +1 -0
- package/dist/modules/cloud/services/project-cleanup.service.js +143 -0
- package/dist/modules/cloud/services/project-cleanup.service.js.map +1 -0
- package/dist/modules/cloud/services/user-provider.service.d.ts +1 -1
- package/dist/modules/cloud/services/user-provider.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/user-provider.service.js +3 -3
- package/dist/modules/cloud/services/user-provider.service.js.map +1 -1
- package/dist/modules/configure/configure.command.js +4 -2
- package/dist/modules/configure/configure.command.js.map +1 -1
- package/dist/modules/mobile/commands/ota.command.js +3 -3
- package/dist/modules/mobile/commands/ota.command.js.map +1 -1
- package/dist/modules/mobile/index.d.ts.map +1 -1
- package/dist/modules/mobile/index.js +8 -7
- package/dist/modules/mobile/index.js.map +1 -1
- package/dist/modules/mobile/services/mobile-project-directory.d.ts +8 -0
- package/dist/modules/mobile/services/mobile-project-directory.d.ts.map +1 -0
- package/dist/modules/mobile/services/mobile-project-directory.js +46 -0
- package/dist/modules/mobile/services/mobile-project-directory.js.map +1 -0
- package/dist/modules/mobile/services/ota-setup.service.d.ts.map +1 -1
- package/dist/modules/mobile/services/ota-setup.service.js +5 -3
- package/dist/modules/mobile/services/ota-setup.service.js.map +1 -1
- package/dist/modules/prebuild/commands/prebuild.command.d.ts +1 -0
- package/dist/modules/prebuild/commands/prebuild.command.d.ts.map +1 -1
- package/dist/modules/prebuild/commands/prebuild.command.js +92 -15
- package/dist/modules/prebuild/commands/prebuild.command.js.map +1 -1
- package/dist/modules/scaffold/commands/init.command.d.ts.map +1 -1
- package/dist/modules/scaffold/commands/init.command.js +32 -10
- package/dist/modules/scaffold/commands/init.command.js.map +1 -1
- package/dist/modules/scaffold/types.d.ts +3 -1
- package/dist/modules/scaffold/types.d.ts.map +1 -1
- package/dist/modules/setup/commands/setup.command.d.ts.map +1 -1
- package/dist/modules/setup/commands/setup.command.js +11 -3
- package/dist/modules/setup/commands/setup.command.js.map +1 -1
- package/dist/shared/process/run-npx.d.ts +4 -0
- package/dist/shared/process/run-npx.d.ts.map +1 -0
- package/dist/shared/process/run-npx.js +31 -0
- package/dist/shared/process/run-npx.js.map +1 -0
- package/docs/README_v2.6.0_DETAILED.md +1021 -0
- package/package.json +11 -4
- package/CHANGELOG_v2.5.0.md +0 -67
- package/RELEASE_CHECKS_v2.5.0.md +0 -93
- package/TEST_RESULTS_v2.5.0.txt +0 -46
package/cloud-api/package.json
CHANGED
package/cloud-api/src/index.ts
CHANGED
|
@@ -1144,6 +1144,42 @@ app.put('/projects/:id/deployment-topology', auth, async (req: AuthedRequest, re
|
|
|
1144
1144
|
res.json({ ...result.rows[0], effective_access: 'write' });
|
|
1145
1145
|
});
|
|
1146
1146
|
|
|
1147
|
+
// Inventory of exact project-owned provider resources before destructive project deletion.
|
|
1148
|
+
// The CLI uses this authoritative list, not guesses based on project names or DNS.
|
|
1149
|
+
app.get('/projects/:id/cleanup-inventory', ...allow('manager', 'admin'), async (req: AuthedRequest, res) => {
|
|
1150
|
+
const id = ensureUuid(routeParam(req.params.id), 'Project ID');
|
|
1151
|
+
if ((await projectAccessLevel(id, req.auth!, true)) !== 'write') { res.status(403).json({ error: 'WRITE access to the project is required.' }); return; }
|
|
1152
|
+
const rows = await pool.query(`SELECT id,environment,resource_type,provider,external_id,config
|
|
1153
|
+
FROM project_resources WHERE project_id=$1 ORDER BY provider,environment,resource_type`, [id]);
|
|
1154
|
+
const response = [];
|
|
1155
|
+
for (const row of rows.rows) {
|
|
1156
|
+
// A provider identifier alone is not enough when scopes may point to different accounts.
|
|
1157
|
+
// Treat same provider + resource identity anywhere in another project as shared; this
|
|
1158
|
+
// intentionally errs on the side of refusing destructive cleanup.
|
|
1159
|
+
const config = row.config || {};
|
|
1160
|
+
let shared = false;
|
|
1161
|
+
if (row.provider === 'ghcr' && typeof config.fullImage === 'string') {
|
|
1162
|
+
const result = await pool.query(`SELECT 1 FROM project_resources
|
|
1163
|
+
WHERE project_id<>$1 AND provider='ghcr' AND lower(config->>'fullImage')=lower($2) LIMIT 1`, [id, config.fullImage]);
|
|
1164
|
+
shared = !!result.rowCount;
|
|
1165
|
+
} else if (row.provider === 'aws' && config.zoneId && config.domain) {
|
|
1166
|
+
const result = await pool.query(`SELECT 1 FROM project_resources
|
|
1167
|
+
WHERE project_id<>$1 AND provider='aws' AND config->>'zoneId'=$2 AND lower(trim(trailing '.' from config->>'domain'))=lower(trim(trailing '.' from $3::text)) LIMIT 1`, [id, String(config.zoneId), String(config.domain)]);
|
|
1168
|
+
shared = !!result.rowCount;
|
|
1169
|
+
} else if (row.provider === 'npm' && config.proxyHostId) {
|
|
1170
|
+
const result = await pool.query(`SELECT 1 FROM project_resources
|
|
1171
|
+
WHERE project_id<>$1 AND provider='npm' AND config->>'proxyHostId'=$2 LIMIT 1`, [id, String(config.proxyHostId)]);
|
|
1172
|
+
shared = !!result.rowCount;
|
|
1173
|
+
} else if (String(row.provider).startsWith('jenkins-') && (config.jobName || row.external_id)) {
|
|
1174
|
+
const result = await pool.query(`SELECT 1 FROM project_resources
|
|
1175
|
+
WHERE project_id<>$1 AND provider=$2 AND coalesce(config->>'jobName',external_id)=$3 LIMIT 1`, [id, row.provider, String(config.jobName || row.external_id)]);
|
|
1176
|
+
shared = !!result.rowCount;
|
|
1177
|
+
}
|
|
1178
|
+
response.push({ ...row, shared_elsewhere: shared });
|
|
1179
|
+
}
|
|
1180
|
+
res.json(response);
|
|
1181
|
+
});
|
|
1182
|
+
|
|
1147
1183
|
app.delete('/projects/:id', ...allow('manager', 'admin'), async (req: AuthedRequest, res) => {
|
|
1148
1184
|
const reason = requireReason(req, res); if (!reason) return;
|
|
1149
1185
|
const id = ensureUuid(routeParam(req.params.id), 'Project ID');
|
|
@@ -1544,13 +1580,25 @@ app.post('/me/scopes/:provider/resolve', auth, async (req: AuthedRequest, res) =
|
|
|
1544
1580
|
catch { res.status(400).json({ error: 'Invalid provider.' }); return; }
|
|
1545
1581
|
const projectId = req.body?.projectId ? ensureUuid(String(req.body.projectId), 'Project ID') : '';
|
|
1546
1582
|
const environment = req.body?.environment ? environmentName(req.body.environment) : '';
|
|
1547
|
-
|
|
1583
|
+
const mayCleanupArchived = req.body?.forCleanup === true && ['manager','admin'].includes(req.auth!.role);
|
|
1584
|
+
const requestedScopeId = req.body?.scopeId ? ensureUuid(String(req.body.scopeId), 'Scope ID') : '';
|
|
1585
|
+
if (req.body?.forCleanup === true && !mayCleanupArchived) { res.status(403).json({ error: 'Provider deletion requires a manager or admin.' }); return; }
|
|
1586
|
+
if (requestedScopeId && !mayCleanupArchived) { res.status(403).json({ error: 'Explicit scope selection is only permitted for authorized cleanup.' }); return; }
|
|
1587
|
+
if (mayCleanupArchived && (!projectId || !environment)) { res.status(400).json({ error: 'Cleanup requires the project ID and associated environment.' }); return; }
|
|
1588
|
+
const allowedProject = projectId && (mayCleanupArchived
|
|
1589
|
+
? (await projectAccessLevel(projectId, req.auth!, true)) === 'write'
|
|
1590
|
+
: await hasProjectAccess(projectId, req.auth!));
|
|
1591
|
+
if (projectId && !allowedProject) { res.status(404).json({ error: 'Project not found or access denied' }); return; }
|
|
1548
1592
|
|
|
1549
1593
|
let scopeId = '';
|
|
1550
1594
|
if (projectId && environment) {
|
|
1551
1595
|
const linked = await pool.query('SELECT scope_id FROM project_environment_scopes WHERE project_id=$1 AND environment=$2 AND provider=$3', [projectId, environment, provider]);
|
|
1552
1596
|
if (linked.rowCount) scopeId = linked.rows[0].scope_id;
|
|
1553
1597
|
}
|
|
1598
|
+
if (requestedScopeId) {
|
|
1599
|
+
if (scopeId && scopeId !== requestedScopeId) { res.status(409).json({ error: 'Selected scope conflicts with the existing project environment link.' }); return; }
|
|
1600
|
+
scopeId = requestedScopeId;
|
|
1601
|
+
}
|
|
1554
1602
|
if (!scopeId) {
|
|
1555
1603
|
const preferred = await pool.query('SELECT scope_id FROM user_scope_defaults WHERE user_id=$1 AND provider=$2', [req.auth!.id, provider]);
|
|
1556
1604
|
if (preferred.rowCount) scopeId = preferred.rows[0].scope_id;
|
|
@@ -1564,7 +1612,9 @@ app.post('/me/scopes/:provider/resolve', auth, async (req: AuthedRequest, res) =
|
|
|
1564
1612
|
}
|
|
1565
1613
|
const access = scopeId ? await scopeAccessFor(scopeId, req.auth!) : null;
|
|
1566
1614
|
if (!scopeId || !access) { res.status(404).json({ error: `No ${provider} scope is assigned to your account.` }); return; }
|
|
1615
|
+
if (mayCleanupArchived && access !== 'manage' && access !== 'admin') { res.status(403).json({ error: 'Provider deletion requires MANAGE permission on the selected provider scope.' }); return; }
|
|
1567
1616
|
const row = (await pool.query('SELECT id,provider,name,description,company,config,encrypted_secret FROM provider_scopes WHERE id=$1 AND is_active=true', [scopeId])).rows[0];
|
|
1617
|
+
if (!row || row.provider !== provider) { res.status(400).json({ error: 'Selected scope is inactive or belongs to a different provider.' }); return; }
|
|
1568
1618
|
let secret: any = null;
|
|
1569
1619
|
let credentialSource = 'scope-management';
|
|
1570
1620
|
if (req.auth!.role !== 'admin' && provider === 'aws') {
|
|
@@ -1592,7 +1642,8 @@ app.post('/me/scopes/:provider/resolve', auth, async (req: AuthedRequest, res) =
|
|
|
1592
1642
|
|
|
1593
1643
|
app.get('/projects/:projectId/environment-scopes', auth, async (req: AuthedRequest, res) => {
|
|
1594
1644
|
const projectId = ensureUuid(routeParam(req.params.projectId), 'Project ID');
|
|
1595
|
-
|
|
1645
|
+
const hasAccess = await hasProjectAccess(projectId, req.auth!) || (['manager','admin'].includes(req.auth!.role) && (await projectAccessLevel(projectId, req.auth!, true)) === 'write');
|
|
1646
|
+
if (!hasAccess) { res.status(404).json({ error: 'Project not found or access denied' }); return; }
|
|
1596
1647
|
const environment = typeof req.query.environment === 'string' && req.query.environment.trim() ? environmentName(req.query.environment) : '';
|
|
1597
1648
|
const result = await pool.query(
|
|
1598
1649
|
`SELECT pes.project_id,pes.environment,pes.provider,pes.scope_id,ps.name,ps.company,ps.description,ps.config
|
|
@@ -2542,7 +2593,7 @@ app.post('/projects/:projectId/mobile/register', auth, async (req: AuthedRequest
|
|
|
2542
2593
|
const projectId = ensureUuid(routeParam(req.params.projectId),'Project ID');
|
|
2543
2594
|
if (!(await hasProjectWriteAccess(projectId,req.auth!))) { res.status(403).json({error:'WRITE access to the project is required.'}); return; }
|
|
2544
2595
|
const project = (await pool.query('SELECT id,kind FROM projects WHERE id=$1',[projectId])).rows[0];
|
|
2545
|
-
if (!project || project.kind
|
|
2596
|
+
if (!project || !['mobile','backend-mobile'].includes(project.kind)) { res.status(400).json({error:'OTA registration requires a mobile or backend-mobile project.'}); return; }
|
|
2546
2597
|
const appName=textValue(req.body?.appName,'App name',100);
|
|
2547
2598
|
const projectType=String(req.body?.projectType||'').trim();
|
|
2548
2599
|
if (!['expo','react-native'].includes(projectType)) { res.status(400).json({error:'projectType must be expo or react-native.'}); return; }
|
|
@@ -1 +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,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAM1J,eAAO,MAAM,oBAAoB,QAAO,MAgIvC,CAAC;
|
|
1
|
+
{"version":3,"file":"help-content.d.ts","sourceRoot":"","sources":["../../src/cli/help-content.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAM1J,eAAO,MAAM,oBAAoB,QAAO,MAgIvC,CAAC;AAuOF,eAAO,MAAM,YAAY,GAAI,OAAO,SAAS,KAAG,MAY/C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,KAAG,SAAS,GAAG,SAgB3D,CAAC"}
|
package/dist/cli/help-content.js
CHANGED
|
@@ -9,7 +9,7 @@ const heading = (value) => chalk_1.default.bold(value);
|
|
|
9
9
|
const command = (value) => chalk_1.default.cyan(value);
|
|
10
10
|
const note = (value) => chalk_1.default.gray(value);
|
|
11
11
|
const fullCommandReference = () => `
|
|
12
|
-
${heading('IndraQ CLI v2.
|
|
12
|
+
${heading('IndraQ CLI v2.7.0 — web + mobile deployment and self-hosted OTA')}
|
|
13
13
|
|
|
14
14
|
${heading('Start here')}
|
|
15
15
|
${command('indraq setup')} Guided first-time project onboarding
|
|
@@ -277,6 +277,7 @@ Project structure choices:
|
|
|
277
277
|
Frontend + Backend
|
|
278
278
|
User Frontend + Admin Frontend + Backend
|
|
279
279
|
Mobile App
|
|
280
|
+
Backend + Mobile App
|
|
280
281
|
|
|
281
282
|
The 3-web-component type stores independent components for user frontend, admin frontend and backend.
|
|
282
283
|
Each component gets its own Docker/GitHub Packages/Jenkins identity and can be deployed independently or together.
|
|
@@ -290,7 +291,7 @@ Older frontend/backend/fullstack projects remain compatible; if they have no sav
|
|
|
290
291
|
legacy environment selection continues until you run \`indraq project environments\`.
|
|
291
292
|
`;
|
|
292
293
|
const configureHelp = () => `
|
|
293
|
-
${heading('Configuration in v2.
|
|
294
|
+
${heading('Configuration in v2.7.0')}
|
|
294
295
|
|
|
295
296
|
Organization provider credentials are configured once as named scopes by an ADMIN.
|
|
296
297
|
Managers and users do not create organization AWS/Nginx Proxy Manager/Jenkins/GitHub Packages credentials.
|
|
@@ -1 +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,CAA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|| (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'server', 'package.json'));
|
|
189
189
|
const hasUserFrontend = (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'frontend', 'package.json')) || (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'client', 'package.json')) || (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'web', 'package.json'));
|
|
190
190
|
const hasAdminFrontend = (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'admin', 'package.json')) || (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'admin-frontend', 'package.json'));
|
|
191
|
+
if (hasBackend && ((0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'mobile', 'package.json')) || (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'app', 'package.json'))))
|
|
192
|
+
return 'backend-mobile';
|
|
191
193
|
if (hasBackend && hasUserFrontend && hasAdminFrontend)
|
|
192
194
|
return 'multiweb';
|
|
193
195
|
if (hasBackend && hasUserFrontend)
|
|
@@ -230,11 +232,11 @@ const ensureProjectCreateLogin = async () => {
|
|
|
230
232
|
}
|
|
231
233
|
};
|
|
232
234
|
const chooseProjectKind = async (requested, detected) => {
|
|
233
|
-
const allowed = ['frontend', 'backend', 'fullstack', 'multiweb', 'mobile'];
|
|
235
|
+
const allowed = ['frontend', 'backend', 'fullstack', 'multiweb', 'mobile', 'backend-mobile'];
|
|
234
236
|
if (requested) {
|
|
235
237
|
const normalized = requested.trim().toLowerCase();
|
|
236
238
|
if (!allowed.includes(normalized))
|
|
237
|
-
throw new Error(`Unsupported project kind: ${requested}. Use frontend, backend, fullstack, multiweb, or mobile.`);
|
|
239
|
+
throw new Error(`Unsupported project kind: ${requested}. Use frontend, backend, fullstack, multiweb, mobile, or backend-mobile.`);
|
|
238
240
|
return normalized;
|
|
239
241
|
}
|
|
240
242
|
return (await inquirer_1.default.prompt([{
|
|
@@ -244,7 +246,8 @@ const chooseProjectKind = async (requested, detected) => {
|
|
|
244
246
|
{ name: 'Backend', value: 'backend' },
|
|
245
247
|
{ name: 'Frontend + Backend', value: 'fullstack' },
|
|
246
248
|
{ name: 'User Frontend + Admin Frontend + Backend', value: 'multiweb' },
|
|
247
|
-
{ name: 'Mobile App', value: 'mobile' }
|
|
249
|
+
{ name: 'Mobile App', value: 'mobile' },
|
|
250
|
+
{ name: 'Backend + Mobile App', value: 'backend-mobile' }
|
|
248
251
|
]
|
|
249
252
|
}])).kind;
|
|
250
253
|
};
|
|
@@ -309,6 +312,25 @@ const buildExistingFolderMetadata = async (root, name, kind, options, rootPackag
|
|
|
309
312
|
}
|
|
310
313
|
const defaultFrontendPath = (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'frontend')) ? 'frontend' : (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'client')) ? 'client' : 'frontend';
|
|
311
314
|
const defaultBackendPath = (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'backend')) ? 'backend' : (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'server')) ? 'server' : 'backend';
|
|
315
|
+
if (kind === 'backend-mobile') {
|
|
316
|
+
const defaultMobilePath = (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'mobile', 'package.json')) ? 'mobile' : (0, node_fs_1.existsSync)((0, node_path_1.join)(root, 'app', 'package.json')) ? 'app' : 'mobile';
|
|
317
|
+
const paths = await inquirer_1.default.prompt([
|
|
318
|
+
{ type: 'input', name: 'backendPath', message: 'Backend directory:', default: defaultBackendPath, validate: (v) => safeRelativePath(root, v) && (0, node_fs_1.existsSync)((0, node_path_1.join)(root, v, 'package.json')) || 'Select an existing backend folder containing package.json.' },
|
|
319
|
+
{ type: 'input', name: 'mobilePath', message: 'Mobile directory:', default: defaultMobilePath, validate: (v) => safeRelativePath(root, v) && (0, node_fs_1.existsSync)((0, node_path_1.join)(root, v, 'package.json')) || 'Select an existing mobile folder containing package.json.' }
|
|
320
|
+
]);
|
|
321
|
+
if ((0, node_path_1.resolve)(root, paths.backendPath) === (0, node_path_1.resolve)(root, paths.mobilePath))
|
|
322
|
+
throw new Error('Backend and mobile folders must be different.');
|
|
323
|
+
const mobileFramework = await chooseMobileFramework(options.framework, inferFramework(readPackageJson((0, node_path_1.join)(root, paths.mobilePath))));
|
|
324
|
+
const mobileDependencies = readPackageJson((0, node_path_1.join)(root, paths.mobilePath));
|
|
325
|
+
if (!mobileDependencies || !hasPackage(mobileDependencies, mobileFramework === 'expo' ? 'expo' : 'react-native'))
|
|
326
|
+
throw new Error(`The chosen mobile folder is not a ${mobileFramework} project.`);
|
|
327
|
+
let port = positivePort(options.port, 3000);
|
|
328
|
+
if (!options.port)
|
|
329
|
+
port = (await inquirer_1.default.prompt([{ type: 'number', name: 'port', message: 'Backend port:', default: port, validate: (v) => Number.isInteger(v) && v > 0 && v <= 65535 || 'Invalid port' }])).port;
|
|
330
|
+
const healthEndpoint = options.health?.trim() || '/health';
|
|
331
|
+
const backend = { name: `${name}-backend`, kind: 'backend', path: paths.backendPath, framework: 'express', appPort: port, containerPort: port, healthEndpoint, imageName: `${slug}-backend` };
|
|
332
|
+
return { schemaVersion: 2, name, kind, framework: 'express', nodeVersion, appPort: port, containerPort: port, healthEndpoint, imageName: slug, components: [backend], mobilePath: paths.mobilePath, mobileFramework, createdAt: new Date().toISOString() };
|
|
333
|
+
}
|
|
312
334
|
if (kind === 'fullstack') {
|
|
313
335
|
const paths = await inquirer_1.default.prompt([
|
|
314
336
|
{ type: 'input', name: 'frontendPath', message: 'Frontend path relative to this folder:', default: defaultFrontendPath, validate: (v) => safeRelativePath(root, v) || 'Enter an existing path inside the current project.' },
|
|
@@ -501,7 +523,7 @@ const createProject = async (requestedName, options) => {
|
|
|
501
523
|
const { prebuild } = await import('../../prebuild/commands/prebuild.command.js');
|
|
502
524
|
for (const target of metadata.deployment.targets) {
|
|
503
525
|
console.log(chalk_1.default.blue(`\nConfiguring selected services for ${target.environment}...`));
|
|
504
|
-
await prebuild({ env: target.environment, features: selectedInfrastructure, planned: true });
|
|
526
|
+
await prebuild({ env: target.environment, features: selectedInfrastructure, planned: true, skipMobile: true });
|
|
505
527
|
}
|
|
506
528
|
}
|
|
507
529
|
else if (!setupFeatures.length) {
|
|
@@ -511,8 +533,8 @@ const createProject = async (requestedName, options) => {
|
|
|
511
533
|
else if (kind !== 'mobile') {
|
|
512
534
|
console.log(chalk_1.default.gray(' Configure deployment environments later with `indraq project environments` or `indraq setup`.'));
|
|
513
535
|
}
|
|
514
|
-
if (kind === 'mobile')
|
|
515
|
-
console.log(chalk_1.default.gray(' Next: run `indraq
|
|
536
|
+
if (kind === 'mobile' || kind === 'backend-mobile')
|
|
537
|
+
console.log(chalk_1.default.gray(' Next: run `indraq setup` to configure the mobile Jenkins + OTA environment.'));
|
|
516
538
|
else
|
|
517
539
|
console.log(chalk_1.default.gray(' Next: run `indraq deploy` when the selected setup is ready.'));
|
|
518
540
|
};
|
|
@@ -701,22 +723,109 @@ const restoreProject = async () => {
|
|
|
701
723
|
console.log(chalk_1.default.green(`✓ ${project.name} restored.`));
|
|
702
724
|
};
|
|
703
725
|
exports.restoreProject = restoreProject;
|
|
726
|
+
/** Select the exact MANAGE-capable scope before any destructive request. */
|
|
727
|
+
const chooseCleanupScopeIds = async (api, projectId, candidates) => {
|
|
728
|
+
const scopes = await api.request('/scopes?all=true');
|
|
729
|
+
const links = await api.request(`/projects/${projectId}/environment-scopes`);
|
|
730
|
+
const selected = new Map();
|
|
731
|
+
for (const item of candidates) {
|
|
732
|
+
const provider = item.category === 'route53' ? 'aws' : item.category === 'jenkins' ? item.resources[0].provider : item.category;
|
|
733
|
+
const linked = links.find((link) => link.environment.toLowerCase() === item.environment.toLowerCase() && link.provider === provider);
|
|
734
|
+
let choices = scopes.filter((scope) => scope.provider === provider && scope.access === 'manage' && !!scope.id);
|
|
735
|
+
if (linked) {
|
|
736
|
+
choices = choices.filter((scope) => scope.id === linked.scope_id);
|
|
737
|
+
if (!choices.length)
|
|
738
|
+
throw new Error(`The ${item.name} resource has a linked ${provider} scope, but you do not have MANAGE permission on that scope.`);
|
|
739
|
+
}
|
|
740
|
+
else if (item.category === 'ghcr') {
|
|
741
|
+
const owner = /^ghcr\.io\/([^/]+)\//i.exec(String(item.resources[0]?.config.fullImage || ''))?.[1]?.toLowerCase();
|
|
742
|
+
choices = choices.filter((scope) => String(scope.config?.owner || '').toLowerCase() === owner);
|
|
743
|
+
}
|
|
744
|
+
else if (item.category === 'route53') {
|
|
745
|
+
const zone = String(item.resources[0]?.config.zoneId || '').replace(/^\/hostedzone\//, '');
|
|
746
|
+
choices = choices.filter((scope) => !scope.config?.hostedZoneId || String(scope.config.hostedZoneId).replace(/^\/hostedzone\//, '') === zone);
|
|
747
|
+
}
|
|
748
|
+
if (!choices.length)
|
|
749
|
+
throw new Error(`No MANAGE-capable ${provider} scope matches ${item.name}. Ask an admin to assign the correct scope.`);
|
|
750
|
+
const id = choices.length === 1 ? choices[0].id : (await inquirer_1.default.prompt([{
|
|
751
|
+
type: 'list', name: 'id', message: `Which ${provider.toUpperCase()} scope contains ${item.name}?`,
|
|
752
|
+
choices: choices.map((scope) => ({ name: `${scope.name}${scope.company ? ` — ${scope.company}` : ''}${scope.config?.url ? ` — ${scope.config.url}` : ''}`, value: scope.id }))
|
|
753
|
+
}])).id;
|
|
754
|
+
selected.set(item.key, id);
|
|
755
|
+
}
|
|
756
|
+
return selected;
|
|
757
|
+
};
|
|
704
758
|
const deleteProject = async (yes = false) => {
|
|
705
|
-
const
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
const
|
|
759
|
+
const api = new cloud_api_service_1.CloudApiService();
|
|
760
|
+
const identity = await api.request('/auth/me');
|
|
761
|
+
if (!['manager', 'admin'].includes(identity.role))
|
|
762
|
+
throw new Error('Permanent project deletion requires the manager or admin role, plus project WRITE and provider-scope MANAGE for selected resource cleanup.');
|
|
763
|
+
const projects = (await api.request('/projects?archived=all&all=true')).filter((p) => p.effective_access === 'write');
|
|
764
|
+
if (!projects.length)
|
|
765
|
+
throw new Error('No projects with WRITE access were found for deletion.');
|
|
766
|
+
const id = (await inquirer_1.default.prompt([{ type: 'list', name: 'id', message: 'Project to permanently delete:', choices: projects.map((p) => ({ name: `${p.name} — ${p.kind}`, value: p.id })) }])).id;
|
|
767
|
+
const project = projects.find((p) => p.id === id);
|
|
710
768
|
if (project.effective_access !== 'write')
|
|
711
769
|
throw new Error('WRITE access to the project is required.');
|
|
770
|
+
const { listCleanupCandidates, cleanupProviderResource } = await import('../services/project-cleanup.service.js');
|
|
771
|
+
const inventory = await api.request(`/projects/${id}/cleanup-inventory`);
|
|
772
|
+
const candidates = listCleanupCandidates(inventory);
|
|
773
|
+
console.log(chalk_1.default.blue.bold(`\nDelete project: ${project.name}`));
|
|
774
|
+
console.log(chalk_1.default.gray('Choose exactly which external resources to delete. Unchecked resources are kept.'));
|
|
775
|
+
const deletable = candidates.filter((c) => !c.shared);
|
|
776
|
+
const shared = candidates.filter((c) => c.shared);
|
|
777
|
+
for (const item of shared)
|
|
778
|
+
console.log(chalk_1.default.yellow(`⚠ Shared external resource protected: ${item.name}`));
|
|
779
|
+
if (inventory.length > candidates.reduce((count, c) => count + c.resources.length, 0))
|
|
780
|
+
console.log(chalk_1.default.yellow('⚠ Some Cloud associations are not supported by provider cleanup and will be left untouched.'));
|
|
781
|
+
const chosen = deletable.length ? (await inquirer_1.default.prompt([{
|
|
782
|
+
type: 'checkbox', name: 'selected', message: 'Delete external resources (leave unchecked to KEEP):', pageSize: 20,
|
|
783
|
+
choices: deletable.map((item) => ({ name: `${item.category.toUpperCase()} | ${item.name} | ${item.environment}${item.externallyLinked ? ' | externally linked' : ''}`, value: item.key, checked: false }))
|
|
784
|
+
}])).selected : [];
|
|
785
|
+
const toDelete = deletable.filter((item) => chosen.includes(item.key));
|
|
786
|
+
if (toDelete.some((item) => item.externallyLinked)) {
|
|
787
|
+
const allow = (await inquirer_1.default.prompt([{ type: 'confirm', name: 'allow', message: 'Some selected resources were originally linked as external (not created by IndraQ). Delete them anyway?', default: false }])).allow;
|
|
788
|
+
if (!allow) {
|
|
789
|
+
console.log(chalk_1.default.yellow('Deletion cancelled; no resources or project metadata were changed.'));
|
|
790
|
+
return;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
console.log(chalk_1.default.blue('\nDeletion plan'));
|
|
794
|
+
console.table(candidates.map((item) => ({ resource: item.name, category: item.category, action: item.shared ? 'PROTECTED' : chosen.includes(item.key) ? 'DELETE' : 'KEEP' })));
|
|
795
|
+
console.log(chalk_1.default.yellow('Deleting a GitHub Packages image deletes the entire container package, including every tag/version.'));
|
|
796
|
+
console.log(chalk_1.default.gray('Shared mobile Jenkins pipelines, AWS health checks, NPM certificates and deployed containers are not automatically deleted.'));
|
|
712
797
|
if (!yes) {
|
|
713
|
-
const
|
|
714
|
-
if (
|
|
798
|
+
const typed = (await inquirer_1.default.prompt([{ type: 'input', name: 'name', message: `Type the project name "${project.name}" to confirm permanently deleting this project and the selected resources:` }])).name;
|
|
799
|
+
if (typed !== project.name) {
|
|
800
|
+
console.log(chalk_1.default.yellow('Deletion cancelled (project name did not match).'));
|
|
715
801
|
return;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
const reason = (await inquirer_1.default.prompt([{ type: 'input', name: 'reason', message: 'Audit reason:', default: 'Permanently delete project and selected resources', validate: (v) => v.trim().length >= 3 || 'Reason is required.' }])).reason.trim();
|
|
805
|
+
// Resolve all authorization/scope selections before deleting even one resource.
|
|
806
|
+
const cleanupScopes = await chooseCleanupScopeIds(api, id, toDelete);
|
|
807
|
+
const failures = [];
|
|
808
|
+
// Delete proxies first, followed by DNS, deployment jobs, and container packages.
|
|
809
|
+
const sequence = { npm: 0, route53: 1, jenkins: 2, ghcr: 3 };
|
|
810
|
+
for (const item of [...toDelete].sort((a, b) => sequence[a.category] - sequence[b.category])) {
|
|
811
|
+
try {
|
|
812
|
+
const result = await cleanupProviderResource(id, item, reason, cleanupScopes.get(item.key));
|
|
813
|
+
console.log(chalk_1.default.green(`✓ ${item.name}: ${result}`));
|
|
814
|
+
}
|
|
815
|
+
catch (error) {
|
|
816
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
817
|
+
failures.push({ name: item.name, error: message });
|
|
818
|
+
console.log(chalk_1.default.red(`✗ ${item.name}: ${message}`));
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
if (failures.length) {
|
|
822
|
+
console.table(failures);
|
|
823
|
+
throw new Error(`${failures.length} selected external resource deletion(s) failed. Cloud project ${project.name} was NOT deleted. Fix access/errors and rerun project delete to retry.`);
|
|
716
824
|
}
|
|
717
|
-
|
|
718
|
-
await new cloud_api_service_1.CloudApiService().request(`/projects/${project.id}`, { method: 'DELETE', body: JSON.stringify({ reason }) });
|
|
825
|
+
await api.request(`/projects/${id}`, { method: 'DELETE', body: JSON.stringify({ reason }) });
|
|
719
826
|
console.log(chalk_1.default.green(`✓ ${project.name} permanently deleted from IndraQ Cloud.`));
|
|
827
|
+
if (candidates.length !== toDelete.length)
|
|
828
|
+
console.log(chalk_1.default.gray('All unselected/shared external resources were kept. Cloud resource associations are removed with the deleted project.'));
|
|
720
829
|
};
|
|
721
830
|
exports.deleteProject = deleteProject;
|
|
722
831
|
//# sourceMappingURL=cloud.command.js.map
|