pax8-cta 0.1.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/LICENSE +200 -0
- package/README.md +659 -0
- package/demo-data/solutions/ProductQADemo_1_0_0_2_managed.zip +0 -0
- package/dist/commands/analyze.d.ts +28 -0
- package/dist/commands/analyze.d.ts.map +1 -0
- package/dist/commands/analyze.js +571 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/auth.d.ts +18 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +171 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/config.d.ts +34 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +299 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/demo.d.ts +33 -0
- package/dist/commands/demo.d.ts.map +1 -0
- package/dist/commands/demo.js +362 -0
- package/dist/commands/demo.js.map +1 -0
- package/dist/commands/deploy.d.ts +18 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +1186 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/deployments/helpers.d.ts +68 -0
- package/dist/commands/deployments/helpers.d.ts.map +1 -0
- package/dist/commands/deployments/helpers.js +414 -0
- package/dist/commands/deployments/helpers.js.map +1 -0
- package/dist/commands/deployments/index.d.ts +24 -0
- package/dist/commands/deployments/index.d.ts.map +1 -0
- package/dist/commands/deployments/index.js +47 -0
- package/dist/commands/deployments/index.js.map +1 -0
- package/dist/commands/deployments/list.d.ts +18 -0
- package/dist/commands/deployments/list.d.ts.map +1 -0
- package/dist/commands/deployments/list.js +97 -0
- package/dist/commands/deployments/list.js.map +1 -0
- package/dist/commands/deployments/show.d.ts +18 -0
- package/dist/commands/deployments/show.d.ts.map +1 -0
- package/dist/commands/deployments/show.js +81 -0
- package/dist/commands/deployments/show.js.map +1 -0
- package/dist/commands/deployments/undo.d.ts +18 -0
- package/dist/commands/deployments/undo.d.ts.map +1 -0
- package/dist/commands/deployments/undo.js +295 -0
- package/dist/commands/deployments/undo.js.map +1 -0
- package/dist/commands/export.d.ts +18 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +133 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/import.d.ts +18 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +129 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/init-config.d.ts +26 -0
- package/dist/commands/init-config.d.ts.map +1 -0
- package/dist/commands/init-config.js +123 -0
- package/dist/commands/init-config.js.map +1 -0
- package/dist/commands/init-validation.d.ts +47 -0
- package/dist/commands/init-validation.d.ts.map +1 -0
- package/dist/commands/init-validation.js +339 -0
- package/dist/commands/init-validation.js.map +1 -0
- package/dist/commands/init-wizard.d.ts +25 -0
- package/dist/commands/init-wizard.d.ts.map +1 -0
- package/dist/commands/init-wizard.js +433 -0
- package/dist/commands/init-wizard.js.map +1 -0
- package/dist/commands/init.d.ts +18 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +46 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/resolve-url.d.ts +18 -0
- package/dist/commands/resolve-url.d.ts.map +1 -0
- package/dist/commands/resolve-url.js +126 -0
- package/dist/commands/resolve-url.js.map +1 -0
- package/dist/commands/setup.d.ts +18 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +239 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/solutions/drift-analysis.d.ts +73 -0
- package/dist/commands/solutions/drift-analysis.d.ts.map +1 -0
- package/dist/commands/solutions/drift-analysis.js +416 -0
- package/dist/commands/solutions/drift-analysis.js.map +1 -0
- package/dist/commands/solutions/drift.d.ts +32 -0
- package/dist/commands/solutions/drift.d.ts.map +1 -0
- package/dist/commands/solutions/drift.js +641 -0
- package/dist/commands/solutions/drift.js.map +1 -0
- package/dist/commands/solutions/fix-planner.d.ts +48 -0
- package/dist/commands/solutions/fix-planner.d.ts.map +1 -0
- package/dist/commands/solutions/fix-planner.js +43 -0
- package/dist/commands/solutions/fix-planner.js.map +1 -0
- package/dist/commands/solutions/helpers.d.ts +35 -0
- package/dist/commands/solutions/helpers.d.ts.map +1 -0
- package/dist/commands/solutions/helpers.js +54 -0
- package/dist/commands/solutions/helpers.js.map +1 -0
- package/dist/commands/solutions/index.d.ts +18 -0
- package/dist/commands/solutions/index.d.ts.map +1 -0
- package/dist/commands/solutions/index.js +30 -0
- package/dist/commands/solutions/index.js.map +1 -0
- package/dist/commands/solutions/list.d.ts +18 -0
- package/dist/commands/solutions/list.d.ts.map +1 -0
- package/dist/commands/solutions/list.js +174 -0
- package/dist/commands/solutions/list.js.map +1 -0
- package/dist/commands/solutions/remove.d.ts +18 -0
- package/dist/commands/solutions/remove.d.ts.map +1 -0
- package/dist/commands/solutions/remove.js +137 -0
- package/dist/commands/solutions/remove.js.map +1 -0
- package/dist/commands/solutions/risk-calculator.d.ts +33 -0
- package/dist/commands/solutions/risk-calculator.d.ts.map +1 -0
- package/dist/commands/solutions/risk-calculator.js +79 -0
- package/dist/commands/solutions/risk-calculator.js.map +1 -0
- package/dist/commands/solutions/show.d.ts +18 -0
- package/dist/commands/solutions/show.d.ts.map +1 -0
- package/dist/commands/solutions/show.js +165 -0
- package/dist/commands/solutions/show.js.map +1 -0
- package/dist/commands/status.d.ts +18 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +573 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/telemetry.d.ts +18 -0
- package/dist/commands/telemetry.d.ts.map +1 -0
- package/dist/commands/telemetry.js +85 -0
- package/dist/commands/telemetry.js.map +1 -0
- package/dist/commands/tenants/health.d.ts +18 -0
- package/dist/commands/tenants/health.d.ts.map +1 -0
- package/dist/commands/tenants/health.js +172 -0
- package/dist/commands/tenants/health.js.map +1 -0
- package/dist/commands/tenants/helpers.d.ts +44 -0
- package/dist/commands/tenants/helpers.d.ts.map +1 -0
- package/dist/commands/tenants/helpers.js +72 -0
- package/dist/commands/tenants/helpers.js.map +1 -0
- package/dist/commands/tenants/index.d.ts +19 -0
- package/dist/commands/tenants/index.d.ts.map +1 -0
- package/dist/commands/tenants/index.js +39 -0
- package/dist/commands/tenants/index.js.map +1 -0
- package/dist/commands/tenants/inspect.d.ts +18 -0
- package/dist/commands/tenants/inspect.d.ts.map +1 -0
- package/dist/commands/tenants/inspect.js +176 -0
- package/dist/commands/tenants/inspect.js.map +1 -0
- package/dist/commands/tenants/list.d.ts +18 -0
- package/dist/commands/tenants/list.d.ts.map +1 -0
- package/dist/commands/tenants/list.js +144 -0
- package/dist/commands/tenants/list.js.map +1 -0
- package/dist/commands/tenants/manage.d.ts +20 -0
- package/dist/commands/tenants/manage.d.ts.map +1 -0
- package/dist/commands/tenants/manage.js +206 -0
- package/dist/commands/tenants/manage.js.map +1 -0
- package/dist/commands/tenants/show.d.ts +18 -0
- package/dist/commands/tenants/show.d.ts.map +1 -0
- package/dist/commands/tenants/show.js +191 -0
- package/dist/commands/tenants/show.js.map +1 -0
- package/dist/commands/validate.d.ts +18 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +536 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +258 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/auth.d.ts +51 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +153 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/banner.d.ts +19 -0
- package/dist/lib/banner.d.ts.map +1 -0
- package/dist/lib/banner.js +78 -0
- package/dist/lib/banner.js.map +1 -0
- package/dist/lib/command-wrapper.d.ts +56 -0
- package/dist/lib/command-wrapper.d.ts.map +1 -0
- package/dist/lib/command-wrapper.js +71 -0
- package/dist/lib/command-wrapper.js.map +1 -0
- package/dist/lib/credentials.d.ts +56 -0
- package/dist/lib/credentials.d.ts.map +1 -0
- package/dist/lib/credentials.js +146 -0
- package/dist/lib/credentials.js.map +1 -0
- package/dist/lib/demo-banner.d.ts +15 -0
- package/dist/lib/demo-banner.d.ts.map +1 -0
- package/dist/lib/demo-banner.js +33 -0
- package/dist/lib/demo-banner.js.map +1 -0
- package/dist/lib/error-handler.d.ts +51 -0
- package/dist/lib/error-handler.d.ts.map +1 -0
- package/dist/lib/error-handler.js +458 -0
- package/dist/lib/error-handler.js.map +1 -0
- package/dist/lib/errors.d.ts +61 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +168 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/formatters.d.ts +55 -0
- package/dist/lib/formatters.d.ts.map +1 -0
- package/dist/lib/formatters.js +163 -0
- package/dist/lib/formatters.js.map +1 -0
- package/dist/lib/graph-client.d.ts +74 -0
- package/dist/lib/graph-client.d.ts.map +1 -0
- package/dist/lib/graph-client.js +231 -0
- package/dist/lib/graph-client.js.map +1 -0
- package/dist/lib/input.d.ts +22 -0
- package/dist/lib/input.d.ts.map +1 -0
- package/dist/lib/input.js +120 -0
- package/dist/lib/input.js.map +1 -0
- package/dist/lib/interactive-wizard.d.ts +26 -0
- package/dist/lib/interactive-wizard.d.ts.map +1 -0
- package/dist/lib/interactive-wizard.js +550 -0
- package/dist/lib/interactive-wizard.js.map +1 -0
- package/dist/lib/oss-surface.d.ts +21 -0
- package/dist/lib/oss-surface.d.ts.map +1 -0
- package/dist/lib/oss-surface.js +29 -0
- package/dist/lib/oss-surface.js.map +1 -0
- package/dist/lib/output.d.ts +74 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +156 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/picker.d.ts +75 -0
- package/dist/lib/picker.d.ts.map +1 -0
- package/dist/lib/picker.js +115 -0
- package/dist/lib/picker.js.map +1 -0
- package/dist/lib/repl.d.ts +19 -0
- package/dist/lib/repl.d.ts.map +1 -0
- package/dist/lib/repl.js +158 -0
- package/dist/lib/repl.js.map +1 -0
- package/dist/lib/spinner.d.ts +41 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/dist/lib/spinner.js +126 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/telemetry.d.ts +96 -0
- package/dist/lib/telemetry.d.ts.map +1 -0
- package/dist/lib/telemetry.js +367 -0
- package/dist/lib/telemetry.js.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024 Pax8, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Command } from "commander";
|
|
17
|
+
import { resolve } from "node:path";
|
|
18
|
+
import { existsSync } from "node:fs";
|
|
19
|
+
import chalk from "chalk";
|
|
20
|
+
import { createSpinner, isQuietMode } from "../lib/spinner.js";
|
|
21
|
+
import { DEMO_TENANTS, loadConfig, TokenManager, DataverseClient, ConfigError, GdapClient, parseAuthError, environmentSetupService, } from "@pax8-cta/core";
|
|
22
|
+
import { getClientSecretWithFallback } from "../lib/credentials.js";
|
|
23
|
+
import { CliError } from "../lib/errors.js";
|
|
24
|
+
import { isDemo } from "../lib/command-wrapper.js";
|
|
25
|
+
import { output, resolveFormat } from "../lib/output.js";
|
|
26
|
+
import { showDemoBanner } from "../lib/demo-banner.js";
|
|
27
|
+
// Issue #358: validate now flows its results through output() so --quiet,
|
|
28
|
+
// --json, and TTY-default behave consistently with `tenants list` /
|
|
29
|
+
// `deployments list`. The columns drive the human table; --json emits a
|
|
30
|
+
// structured envelope (results + summary) instead.
|
|
31
|
+
const VALIDATION_COLUMNS = [
|
|
32
|
+
{
|
|
33
|
+
key: "status",
|
|
34
|
+
header: "Status",
|
|
35
|
+
format: (v) => {
|
|
36
|
+
if (v === "pass")
|
|
37
|
+
return chalk.green("✓ pass");
|
|
38
|
+
if (v === "fail")
|
|
39
|
+
return chalk.red("✗ fail");
|
|
40
|
+
return chalk.yellow("⚠ warn");
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{ key: "name", header: "Check" },
|
|
44
|
+
{ key: "message", header: "Message" },
|
|
45
|
+
{
|
|
46
|
+
key: "fix",
|
|
47
|
+
header: "Fix",
|
|
48
|
+
format: (v) => (v ? chalk.gray(String(v)) : ""),
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
/**
|
|
52
|
+
* True when the resolved format is something other than table — that is, the
|
|
53
|
+
* caller is a script/agent (--json) or wants silence (--quiet). In those
|
|
54
|
+
* modes the per-section banner / spinner output is suppressed because it
|
|
55
|
+
* would interleave with structured output or violate quiet-mode guarantees.
|
|
56
|
+
*/
|
|
57
|
+
function isStructured(fmt) {
|
|
58
|
+
return fmt !== "table";
|
|
59
|
+
}
|
|
60
|
+
export const validateCommand = new Command("validate")
|
|
61
|
+
.description("Check that your config, credentials, and environments are working")
|
|
62
|
+
.option("-c, --config <path>", "Path to config file", "./config/tenants.yaml")
|
|
63
|
+
.option("-t, --tenant <name>", "Validate a specific tenant only")
|
|
64
|
+
.option("--skip-source", "Skip source environment check")
|
|
65
|
+
.option("--gdap", "Also check GDAP relationships and Power Platform Admin role")
|
|
66
|
+
.option("--json", "Output as JSON")
|
|
67
|
+
.option("--quiet", "Suppress all output (exit code only)")
|
|
68
|
+
.addHelpText("after", `
|
|
69
|
+
Examples:
|
|
70
|
+
validate Check everything
|
|
71
|
+
validate --gdap Also verify GDAP delegation
|
|
72
|
+
validate -t Pax8CTA-Test2 Check a specific tenant
|
|
73
|
+
validate --skip-source Check only tenants, not source
|
|
74
|
+
validate --json Emit structured results for scripts/agents
|
|
75
|
+
`)
|
|
76
|
+
.action(async (options, cmd) => {
|
|
77
|
+
// Merge global flags (--json, --quiet, etc. registered on root program)
|
|
78
|
+
// into local options. Without this, Commander consumes --json/--quiet at
|
|
79
|
+
// the root level and validate's options.json/quiet are undefined.
|
|
80
|
+
Object.assign(options, cmd.optsWithGlobals());
|
|
81
|
+
const fmt = resolveFormat({
|
|
82
|
+
json: options.json,
|
|
83
|
+
quiet: options.quiet,
|
|
84
|
+
});
|
|
85
|
+
const structured = isStructured(fmt);
|
|
86
|
+
// Demo mode short-circuits all real I/O — no config file, no Azure auth,
|
|
87
|
+
// no GDAP probe. Issue #385: validate previously called loadConfig() up
|
|
88
|
+
// front and failed with ERROR_CONFIG_NOT_FOUND when DEMO_MODE=true and
|
|
89
|
+
// ./config/tenants.yaml didn't exist.
|
|
90
|
+
if (isDemo()) {
|
|
91
|
+
runDemoValidation(options, fmt, structured);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const checks = [];
|
|
95
|
+
let hasErrors = false;
|
|
96
|
+
// Check 1: Config file exists and is valid YAML
|
|
97
|
+
const spinner = createSpinner("Validating configuration file...").start();
|
|
98
|
+
const configPath = resolve(process.cwd(), options.config);
|
|
99
|
+
if (!existsSync(configPath)) {
|
|
100
|
+
checks.push({
|
|
101
|
+
name: "Config file",
|
|
102
|
+
status: "fail",
|
|
103
|
+
message: `File not found: ${configPath}`,
|
|
104
|
+
fix: "Run 'init' to create a configuration file",
|
|
105
|
+
});
|
|
106
|
+
hasErrors = true;
|
|
107
|
+
spinner.fail("Configuration file not found");
|
|
108
|
+
displayResults(checks, fmt);
|
|
109
|
+
process.exit(1);
|
|
110
|
+
}
|
|
111
|
+
let config;
|
|
112
|
+
let enabledTenants = [];
|
|
113
|
+
try {
|
|
114
|
+
config = await loadConfig(configPath);
|
|
115
|
+
enabledTenants = config.tenants.filter((t) => t.enabled);
|
|
116
|
+
// Filter to specific tenant if requested
|
|
117
|
+
if (options.tenant) {
|
|
118
|
+
const tenant = enabledTenants.find((t) => t.name.toLowerCase() === options.tenant.toLowerCase());
|
|
119
|
+
if (!tenant) {
|
|
120
|
+
throw new CliError(`Tenant '${options.tenant}' not found in configuration or not enabled. Run 'tenants list' to see available tenants.`);
|
|
121
|
+
}
|
|
122
|
+
enabledTenants = [tenant];
|
|
123
|
+
}
|
|
124
|
+
checks.push({
|
|
125
|
+
name: "Config file",
|
|
126
|
+
status: "pass",
|
|
127
|
+
message: `Valid (${enabledTenants.length} tenant${enabledTenants.length === 1 ? "" : "s"} configured)`,
|
|
128
|
+
});
|
|
129
|
+
spinner.succeed("Configuration file valid");
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
if (error instanceof CliError) {
|
|
133
|
+
checks.push({
|
|
134
|
+
name: "Config file",
|
|
135
|
+
status: "fail",
|
|
136
|
+
message: error.message,
|
|
137
|
+
});
|
|
138
|
+
hasErrors = true;
|
|
139
|
+
spinner.fail(error.message);
|
|
140
|
+
displayResults(checks, fmt);
|
|
141
|
+
process.exit(error.exitCode);
|
|
142
|
+
}
|
|
143
|
+
const errorMsg = error instanceof ConfigError ? error.message : String(error);
|
|
144
|
+
checks.push({
|
|
145
|
+
name: "Config file",
|
|
146
|
+
status: "fail",
|
|
147
|
+
message: `Invalid: ${errorMsg}`,
|
|
148
|
+
fix: "Check the YAML syntax and configuration schema",
|
|
149
|
+
});
|
|
150
|
+
hasErrors = true;
|
|
151
|
+
spinner.fail("Configuration file invalid");
|
|
152
|
+
displayResults(checks, fmt);
|
|
153
|
+
process.exit(1);
|
|
154
|
+
}
|
|
155
|
+
// Check 2: Client secret is available
|
|
156
|
+
spinner.text = "Checking client secret...";
|
|
157
|
+
try {
|
|
158
|
+
await getClientSecretWithFallback();
|
|
159
|
+
checks.push({
|
|
160
|
+
name: "Client secret",
|
|
161
|
+
status: "pass",
|
|
162
|
+
message: "Found (environment or keychain)",
|
|
163
|
+
});
|
|
164
|
+
spinner.succeed("Client secret found");
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
checks.push({
|
|
168
|
+
name: "Client secret",
|
|
169
|
+
status: "fail",
|
|
170
|
+
message: "Missing PARTNER_CLIENT_SECRET environment variable",
|
|
171
|
+
fix: "Set PARTNER_CLIENT_SECRET environment variable with your app registration secret",
|
|
172
|
+
});
|
|
173
|
+
hasErrors = true;
|
|
174
|
+
spinner.fail("Client secret missing");
|
|
175
|
+
displayResults(checks, fmt);
|
|
176
|
+
process.exit(1);
|
|
177
|
+
}
|
|
178
|
+
// Check 3: Validate each enabled tenant
|
|
179
|
+
if (!structured) {
|
|
180
|
+
console.log();
|
|
181
|
+
console.log(chalk.bold(`Validating ${enabledTenants.length} tenant(s)...`));
|
|
182
|
+
console.log();
|
|
183
|
+
}
|
|
184
|
+
for (const tenant of enabledTenants) {
|
|
185
|
+
const tenantSpinner = createSpinner(`Checking ${tenant.name}...`).start();
|
|
186
|
+
try {
|
|
187
|
+
const clientSecret = await getClientSecretWithFallback();
|
|
188
|
+
const tokenManager = new TokenManager({
|
|
189
|
+
tenantId: tenant.tenantId,
|
|
190
|
+
clientId: config.partner.clientId,
|
|
191
|
+
clientSecret,
|
|
192
|
+
});
|
|
193
|
+
const client = new DataverseClient({
|
|
194
|
+
environmentUrl: tenant.environmentUrl,
|
|
195
|
+
tokenManager,
|
|
196
|
+
clientId: config.partner.clientId,
|
|
197
|
+
});
|
|
198
|
+
const result = await environmentSetupService.validateTenant(client, config.partner.clientId);
|
|
199
|
+
if (result.appUserExists && result.hasSystemAdminRole) {
|
|
200
|
+
checks.push({
|
|
201
|
+
name: `${tenant.name}`,
|
|
202
|
+
status: "pass",
|
|
203
|
+
message: "App user configured with System Administrator role",
|
|
204
|
+
});
|
|
205
|
+
tenantSpinner.succeed(chalk.green(`${tenant.name}: Ready`));
|
|
206
|
+
}
|
|
207
|
+
else if (!result.appUserExists) {
|
|
208
|
+
checks.push({
|
|
209
|
+
name: `${tenant.name}`,
|
|
210
|
+
status: "fail",
|
|
211
|
+
message: "App user not found in environment",
|
|
212
|
+
fix: `Run 'setup --tenant "${tenant.name}"'`,
|
|
213
|
+
});
|
|
214
|
+
hasErrors = true;
|
|
215
|
+
tenantSpinner.fail(chalk.red(`${tenant.name}: App user missing`));
|
|
216
|
+
}
|
|
217
|
+
else if (!result.hasSystemAdminRole) {
|
|
218
|
+
checks.push({
|
|
219
|
+
name: `${tenant.name}`,
|
|
220
|
+
status: "fail",
|
|
221
|
+
message: "App user exists but System Administrator role not assigned",
|
|
222
|
+
fix: `Run 'setup --tenant "${tenant.name}"'`,
|
|
223
|
+
});
|
|
224
|
+
hasErrors = true;
|
|
225
|
+
tenantSpinner.fail(chalk.red(`${tenant.name}: Missing System Administrator role`));
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
catch (error) {
|
|
229
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
230
|
+
const parsed = parseAuthError(errorMsg);
|
|
231
|
+
checks.push({
|
|
232
|
+
name: `${tenant.name}`,
|
|
233
|
+
status: "fail",
|
|
234
|
+
message: parsed.message,
|
|
235
|
+
fix: parsed.fix,
|
|
236
|
+
});
|
|
237
|
+
hasErrors = true;
|
|
238
|
+
tenantSpinner.fail(chalk.red(`${tenant.name}: ${parsed.message}`));
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
// Check 4: GDAP relationships (if --gdap flag is set)
|
|
242
|
+
if (options.gdap) {
|
|
243
|
+
if (!structured) {
|
|
244
|
+
console.log();
|
|
245
|
+
console.log(chalk.bold("Checking GDAP relationships..."));
|
|
246
|
+
console.log();
|
|
247
|
+
}
|
|
248
|
+
try {
|
|
249
|
+
const clientSecret = await getClientSecretWithFallback();
|
|
250
|
+
const gdapClient = new GdapClient({
|
|
251
|
+
tenantId: config.partner.tenantId,
|
|
252
|
+
clientId: config.partner.clientId,
|
|
253
|
+
clientSecret: clientSecret,
|
|
254
|
+
});
|
|
255
|
+
const gdapSpinner = createSpinner("Fetching GDAP relationships...").start();
|
|
256
|
+
let relationships;
|
|
257
|
+
try {
|
|
258
|
+
relationships = await gdapClient.listDelegatedAdminRelationships();
|
|
259
|
+
gdapSpinner.succeed(`Found ${relationships.length} active GDAP relationship${relationships.length === 1 ? "" : "s"}`);
|
|
260
|
+
}
|
|
261
|
+
catch (error) {
|
|
262
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
263
|
+
const parsed = parseAuthError(errorMsg);
|
|
264
|
+
checks.push({
|
|
265
|
+
name: "GDAP relationships",
|
|
266
|
+
status: "fail",
|
|
267
|
+
message: parsed.message,
|
|
268
|
+
fix: parsed.fix,
|
|
269
|
+
});
|
|
270
|
+
hasErrors = true;
|
|
271
|
+
gdapSpinner.fail(`GDAP check failed: ${parsed.message}`);
|
|
272
|
+
relationships = null;
|
|
273
|
+
}
|
|
274
|
+
if (relationships) {
|
|
275
|
+
for (const tenant of enabledTenants) {
|
|
276
|
+
const tenantSpinner = createSpinner(`Checking GDAP for ${tenant.name}...`).start();
|
|
277
|
+
const relationship = relationships.find((rel) => rel.customer.tenantId === tenant.tenantId);
|
|
278
|
+
if (!relationship) {
|
|
279
|
+
checks.push({
|
|
280
|
+
name: `GDAP: ${tenant.name}`,
|
|
281
|
+
status: "fail",
|
|
282
|
+
message: "No active GDAP relationship found",
|
|
283
|
+
fix: `Set up a GDAP relationship with tenant ${tenant.tenantId} in Partner Center`,
|
|
284
|
+
});
|
|
285
|
+
hasErrors = true;
|
|
286
|
+
tenantSpinner.fail(chalk.red(`${tenant.name}: No GDAP relationship`));
|
|
287
|
+
continue;
|
|
288
|
+
}
|
|
289
|
+
if (relationship.status !== "active") {
|
|
290
|
+
checks.push({
|
|
291
|
+
name: `GDAP: ${tenant.name}`,
|
|
292
|
+
status: "fail",
|
|
293
|
+
message: `GDAP relationship is ${relationship.status}`,
|
|
294
|
+
fix: `Renew the GDAP relationship in Partner Center (expires: ${relationship.endDateTime})`,
|
|
295
|
+
});
|
|
296
|
+
hasErrors = true;
|
|
297
|
+
tenantSpinner.fail(chalk.red(`${tenant.name}: GDAP ${relationship.status}`));
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
// Check for Power Platform Administrator role
|
|
301
|
+
const powerPlatformAdminRoleId = "11648597-926c-4cf3-9c36-bcebb0ba8dcc";
|
|
302
|
+
const hasPPAdmin = relationship.accessDetails.unifiedRoles.some((role) => role.roleDefinitionId === powerPlatformAdminRoleId);
|
|
303
|
+
if (!hasPPAdmin) {
|
|
304
|
+
checks.push({
|
|
305
|
+
name: `GDAP: ${tenant.name}`,
|
|
306
|
+
status: "fail",
|
|
307
|
+
message: "Missing Power Platform Administrator role",
|
|
308
|
+
fix: "Add Power Platform Administrator role to the GDAP relationship in Partner Center",
|
|
309
|
+
});
|
|
310
|
+
hasErrors = true;
|
|
311
|
+
tenantSpinner.fail(chalk.red(`${tenant.name}: Missing Power Platform Admin role`));
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
// Check expiration (warn if within 30 days)
|
|
315
|
+
const endDate = new Date(relationship.endDateTime);
|
|
316
|
+
const daysUntilExpiry = Math.floor((endDate.getTime() - Date.now()) / (1000 * 60 * 60 * 24));
|
|
317
|
+
if (daysUntilExpiry <= 30) {
|
|
318
|
+
checks.push({
|
|
319
|
+
name: `GDAP: ${tenant.name}`,
|
|
320
|
+
status: "warn",
|
|
321
|
+
message: `GDAP expires in ${daysUntilExpiry} day${daysUntilExpiry === 1 ? "" : "s"} (${relationship.endDateTime})`,
|
|
322
|
+
fix: "Renew the GDAP relationship in Partner Center before it expires",
|
|
323
|
+
});
|
|
324
|
+
tenantSpinner.warn(chalk.yellow(`${tenant.name}: GDAP expires in ${daysUntilExpiry} days`));
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
checks.push({
|
|
328
|
+
name: `GDAP: ${tenant.name}`,
|
|
329
|
+
status: "pass",
|
|
330
|
+
message: `Active with Power Platform Admin (expires in ${daysUntilExpiry} days)`,
|
|
331
|
+
});
|
|
332
|
+
tenantSpinner.succeed(chalk.green(`${tenant.name}: GDAP valid (${daysUntilExpiry}d remaining)`));
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
catch (error) {
|
|
338
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
339
|
+
checks.push({
|
|
340
|
+
name: "GDAP relationships",
|
|
341
|
+
status: "fail",
|
|
342
|
+
message: errorMsg,
|
|
343
|
+
fix: "Ensure partner credentials are correct and Graph API permissions are granted",
|
|
344
|
+
});
|
|
345
|
+
hasErrors = true;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
// Check 5: Source environment (if configured and not skipped)
|
|
349
|
+
if (!options.skipSource && config.source) {
|
|
350
|
+
if (!structured)
|
|
351
|
+
console.log();
|
|
352
|
+
const sourceSpinner = createSpinner("Checking source environment...").start();
|
|
353
|
+
try {
|
|
354
|
+
const clientSecret = await getClientSecretWithFallback();
|
|
355
|
+
const tokenManager = new TokenManager({
|
|
356
|
+
tenantId: config.source.tenantId,
|
|
357
|
+
clientId: config.partner.clientId,
|
|
358
|
+
clientSecret: clientSecret,
|
|
359
|
+
});
|
|
360
|
+
const client = new DataverseClient({
|
|
361
|
+
environmentUrl: config.source.environmentUrl,
|
|
362
|
+
tokenManager,
|
|
363
|
+
clientId: config.partner.clientId,
|
|
364
|
+
});
|
|
365
|
+
// Try to query solutions to verify connectivity
|
|
366
|
+
await client.querySolutions();
|
|
367
|
+
checks.push({
|
|
368
|
+
name: "Source environment",
|
|
369
|
+
status: "pass",
|
|
370
|
+
message: "Reachable and authenticated",
|
|
371
|
+
});
|
|
372
|
+
sourceSpinner.succeed("Source environment reachable");
|
|
373
|
+
}
|
|
374
|
+
catch (error) {
|
|
375
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
376
|
+
const parsed = parseAuthError(errorMsg);
|
|
377
|
+
checks.push({
|
|
378
|
+
name: "Source environment",
|
|
379
|
+
status: "fail",
|
|
380
|
+
message: parsed.message,
|
|
381
|
+
fix: parsed.fix,
|
|
382
|
+
});
|
|
383
|
+
hasErrors = true;
|
|
384
|
+
sourceSpinner.fail(`Source environment: ${parsed.message}`);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
else if (options.skipSource) {
|
|
388
|
+
checks.push({
|
|
389
|
+
name: "Source environment",
|
|
390
|
+
status: "warn",
|
|
391
|
+
message: "Skipped (--skip-source flag)",
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
// Display final results — displayResults is no-op in quiet mode and emits
|
|
395
|
+
// a JSON envelope when --json or pipe-default is active.
|
|
396
|
+
if (!structured) {
|
|
397
|
+
console.log();
|
|
398
|
+
}
|
|
399
|
+
displayResults(checks, fmt);
|
|
400
|
+
if (hasErrors) {
|
|
401
|
+
process.exit(1);
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
/**
|
|
405
|
+
* Demo-mode validation. Synthesizes a green report from DEMO_TENANTS without
|
|
406
|
+
* touching disk, partner credentials, or Microsoft Graph. Mirrors the real
|
|
407
|
+
* command's section ordering (config → secret → tenants → source) so the
|
|
408
|
+
* output shape stays familiar.
|
|
409
|
+
*
|
|
410
|
+
* Issue #385: previously this command always loaded ./config/tenants.yaml and
|
|
411
|
+
* threw ERROR_CONFIG_NOT_FOUND in demo mode.
|
|
412
|
+
*/
|
|
413
|
+
function runDemoValidation(options, fmt, structured) {
|
|
414
|
+
if (!structured && !isQuietMode()) {
|
|
415
|
+
showDemoBanner();
|
|
416
|
+
}
|
|
417
|
+
const checks = [];
|
|
418
|
+
let demoTenants = DEMO_TENANTS.filter((t) => t.enabled);
|
|
419
|
+
if (options.tenant) {
|
|
420
|
+
const match = demoTenants.find((t) => t.name.toLowerCase() === options.tenant.toLowerCase());
|
|
421
|
+
if (!match) {
|
|
422
|
+
checks.push({
|
|
423
|
+
name: "Tenant filter",
|
|
424
|
+
status: "fail",
|
|
425
|
+
message: `Tenant '${options.tenant}' not found in demo fleet.`,
|
|
426
|
+
fix: "Run 'tenants list' to see available demo tenants.",
|
|
427
|
+
});
|
|
428
|
+
displayResults(checks, fmt);
|
|
429
|
+
process.exit(1);
|
|
430
|
+
}
|
|
431
|
+
demoTenants = [match];
|
|
432
|
+
}
|
|
433
|
+
checks.push({
|
|
434
|
+
name: "Config file",
|
|
435
|
+
status: "pass",
|
|
436
|
+
message: `Demo fleet (${demoTenants.length} tenant${demoTenants.length === 1 ? "" : "s"})`,
|
|
437
|
+
});
|
|
438
|
+
checks.push({
|
|
439
|
+
name: "Client secret",
|
|
440
|
+
status: "pass",
|
|
441
|
+
message: "Skipped (demo mode)",
|
|
442
|
+
});
|
|
443
|
+
for (const tenant of demoTenants) {
|
|
444
|
+
// Use the riskProfile metadata to add a touch of realism — "problematic"
|
|
445
|
+
// tenants warn so the report demonstrates the warn path.
|
|
446
|
+
const meta = (tenant.metadata ?? {});
|
|
447
|
+
if (meta.riskProfile === "problematic") {
|
|
448
|
+
checks.push({
|
|
449
|
+
name: tenant.name,
|
|
450
|
+
status: "warn",
|
|
451
|
+
message: "Demo tenant flagged as problematic",
|
|
452
|
+
fix: "This is mock data — no action needed.",
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
checks.push({
|
|
457
|
+
name: tenant.name,
|
|
458
|
+
status: "pass",
|
|
459
|
+
message: "App user configured (demo)",
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
if (options.gdap) {
|
|
464
|
+
for (const tenant of demoTenants) {
|
|
465
|
+
checks.push({
|
|
466
|
+
name: `GDAP: ${tenant.name}`,
|
|
467
|
+
status: "pass",
|
|
468
|
+
message: "Active with Power Platform Admin (demo)",
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
if (!options.skipSource) {
|
|
473
|
+
checks.push({
|
|
474
|
+
name: "Source environment",
|
|
475
|
+
status: "pass",
|
|
476
|
+
message: "Reachable (demo)",
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
checks.push({
|
|
481
|
+
name: "Source environment",
|
|
482
|
+
status: "warn",
|
|
483
|
+
message: "Skipped (--skip-source flag)",
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
displayResults(checks, fmt);
|
|
487
|
+
// Demo validation is always "green enough" — warnings don't fail the run.
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Display validation results in the resolved output format.
|
|
491
|
+
*
|
|
492
|
+
* - "table" (TTY default): preserves the original human-readable rendering.
|
|
493
|
+
* - "json": emits a single envelope `{ checks, summary }` to stdout.
|
|
494
|
+
* - "quiet": no output (exit code carries the result).
|
|
495
|
+
* - "ids-only" / "csv": fall back to table rendering for now (no natural id).
|
|
496
|
+
*/
|
|
497
|
+
function displayResults(checks, fmt) {
|
|
498
|
+
const errorCount = checks.filter((c) => c.status === "fail").length;
|
|
499
|
+
const warnCount = checks.filter((c) => c.status === "warn").length;
|
|
500
|
+
const passCount = checks.filter((c) => c.status === "pass").length;
|
|
501
|
+
if (fmt === "quiet")
|
|
502
|
+
return;
|
|
503
|
+
if (fmt === "json") {
|
|
504
|
+
// Emit a structured envelope. We use a stable shape so scripts can rely
|
|
505
|
+
// on `checks[]` and the `summary` aggregate without parsing chrome.
|
|
506
|
+
const envelope = {
|
|
507
|
+
checks,
|
|
508
|
+
summary: {
|
|
509
|
+
total: checks.length,
|
|
510
|
+
passed: passCount,
|
|
511
|
+
failed: errorCount,
|
|
512
|
+
warnings: warnCount,
|
|
513
|
+
ok: errorCount === 0,
|
|
514
|
+
},
|
|
515
|
+
};
|
|
516
|
+
console.log(JSON.stringify(envelope, null, 2));
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
// Human (table) rendering — preserved from the previous bespoke layout but
|
|
520
|
+
// routed through output() so future formatters (e.g. CSV) plug in here.
|
|
521
|
+
console.log(chalk.bold("\nValidation Results:"));
|
|
522
|
+
console.log("─".repeat(80));
|
|
523
|
+
output(checks, { format: "table", columns: VALIDATION_COLUMNS });
|
|
524
|
+
console.log();
|
|
525
|
+
if (errorCount > 0 || warnCount > 0) {
|
|
526
|
+
console.log(chalk.bold("Summary: ") +
|
|
527
|
+
chalk.red(`${errorCount} error${errorCount === 1 ? "" : "s"}`) +
|
|
528
|
+
", " +
|
|
529
|
+
chalk.yellow(`${warnCount} warning${warnCount === 1 ? "" : "s"}`));
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
console.log(chalk.green.bold("✓ All validation checks passed!"));
|
|
533
|
+
console.log(chalk.gray(" Your configuration is ready for deployment."));
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,UAAU,EAEV,YAAY,EACZ,eAAe,EACf,WAAW,EACX,UAAU,EACV,cAAc,EACd,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,MAAM,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,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2024 Pax8, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { Command } from "commander";
|
|
18
|
+
export declare function createProgram(): Command;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;GAcG;AA6CH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiCpC,wBAAgB,aAAa,IAAI,OAAO,CAsDvC"}
|