@nibgat/ncli 0.0.0-stage → 2.0.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 +21 -0
- package/README.md +156 -2
- package/dist/bin/ncli.d.ts +2 -0
- package/dist/bin/ncli.js +9 -0
- package/dist/bin/ncli.js.map +1 -0
- package/dist/commands/auth.d.ts +2 -0
- package/dist/commands/auth.js +723 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/buyment.d.ts +2 -0
- package/dist/commands/buyment.js +174 -0
- package/dist/commands/buyment.js.map +1 -0
- package/dist/commands/cloud.d.ts +2 -0
- package/dist/commands/cloud.js +281 -0
- package/dist/commands/cloud.js.map +1 -0
- package/dist/commands/context.d.ts +25 -0
- package/dist/commands/context.js +92 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/front.d.ts +2 -0
- package/dist/commands/front.js +135 -0
- package/dist/commands/front.js.map +1 -0
- package/dist/commands/git.d.ts +2 -0
- package/dist/commands/git.js +726 -0
- package/dist/commands/git.js.map +1 -0
- package/dist/commands/health.d.ts +2 -0
- package/dist/commands/health.js +99 -0
- package/dist/commands/health.js.map +1 -0
- package/dist/commands/mail.d.ts +2 -0
- package/dist/commands/mail.js +265 -0
- package/dist/commands/mail.js.map +1 -0
- package/dist/commands/pipeline.d.ts +2 -0
- package/dist/commands/pipeline.js +333 -0
- package/dist/commands/pipeline.js.map +1 -0
- package/dist/commands/profile.d.ts +2 -0
- package/dist/commands/profile.js +229 -0
- package/dist/commands/profile.js.map +1 -0
- package/dist/commands/runner.d.ts +2 -0
- package/dist/commands/runner.js +266 -0
- package/dist/commands/runner.js.map +1 -0
- package/dist/commands/support.d.ts +2 -0
- package/dist/commands/support.js +133 -0
- package/dist/commands/support.js.map +1 -0
- package/dist/constants/index.d.ts +26 -0
- package/dist/constants/index.js +40 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/http/client.d.ts +46 -0
- package/dist/http/client.js +262 -0
- package/dist/http/client.js.map +1 -0
- package/dist/http/coreApi.d.ts +136 -0
- package/dist/http/coreApi.js +485 -0
- package/dist/http/coreApi.js.map +1 -0
- package/dist/http/gitApi.d.ts +128 -0
- package/dist/http/gitApi.js +255 -0
- package/dist/http/gitApi.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -0
- package/dist/pipeline/detect.d.ts +13 -0
- package/dist/pipeline/detect.js +90 -0
- package/dist/pipeline/detect.js.map +1 -0
- package/dist/pipeline/release.d.ts +36 -0
- package/dist/pipeline/release.js +250 -0
- package/dist/pipeline/release.js.map +1 -0
- package/dist/pipeline/schema.d.ts +10 -0
- package/dist/pipeline/schema.js +155 -0
- package/dist/pipeline/schema.js.map +1 -0
- package/dist/runner/config.d.ts +21 -0
- package/dist/runner/config.js +235 -0
- package/dist/runner/config.js.map +1 -0
- package/dist/runner/server.d.ts +25 -0
- package/dist/runner/server.js +803 -0
- package/dist/runner/server.js.map +1 -0
- package/dist/runner/systemd.d.ts +14 -0
- package/dist/runner/systemd.js +82 -0
- package/dist/runner/systemd.js.map +1 -0
- package/dist/runner/tarExtract.d.ts +4 -0
- package/dist/runner/tarExtract.js +215 -0
- package/dist/runner/tarExtract.js.map +1 -0
- package/dist/security/execSafe.d.ts +20 -0
- package/dist/security/execSafe.js +216 -0
- package/dist/security/execSafe.js.map +1 -0
- package/dist/security/pkce.d.ts +9 -0
- package/dist/security/pkce.js +35 -0
- package/dist/security/pkce.js.map +1 -0
- package/dist/security/redact.d.ts +3 -0
- package/dist/security/redact.js +76 -0
- package/dist/security/redact.js.map +1 -0
- package/dist/security/sanitize.d.ts +18 -0
- package/dist/security/sanitize.js +216 -0
- package/dist/security/sanitize.js.map +1 -0
- package/dist/security/vault.d.ts +34 -0
- package/dist/security/vault.js +291 -0
- package/dist/security/vault.js.map +1 -0
- package/dist/types/index.d.ts +116 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/ui/output.d.ts +25 -0
- package/dist/ui/output.js +100 -0
- package/dist/ui/output.js.map +1 -0
- package/dist/ui/prompt.d.ts +4 -0
- package/dist/ui/prompt.js +100 -0
- package/dist/ui/prompt.js.map +1 -0
- package/package.json +54 -5
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import { PIPELINE_CONFIG_FILENAME } from "../constants/index.js";
|
|
4
|
+
import { validateGitRef, parseRepoSpec } from "../security/sanitize.js";
|
|
5
|
+
import { execSafe } from "../security/execSafe.js";
|
|
6
|
+
import { validatePipelineConfig } from "../pipeline/schema.js";
|
|
7
|
+
import { detectProjectInDir } from "../pipeline/detect.js";
|
|
8
|
+
import { runReleaseWorkflow } from "../pipeline/release.js";
|
|
9
|
+
import { promptLine } from "../ui/prompt.js";
|
|
10
|
+
import { runCommandAction } from "./context.js";
|
|
11
|
+
export const registerPipelineCommands = (program) => {
|
|
12
|
+
const pipeline = program
|
|
13
|
+
.command("pipeline")
|
|
14
|
+
.description("Initialize, validate, release and monitor Release-to-Deploy CI/CD pipelines");
|
|
15
|
+
pipeline
|
|
16
|
+
.command("init")
|
|
17
|
+
.description("Auto-detect project and generate a strictly validated .ngit-deploy.json")
|
|
18
|
+
.option("--type <type>", "Pipeline type: docker | static")
|
|
19
|
+
.option("--repo <owner/repo>", "Target N - Git repository")
|
|
20
|
+
.option("--image <owner/image>", "OCI image name (for docker pipelines)")
|
|
21
|
+
.option("--dockerfile <path>", "Relative Dockerfile path", "Dockerfile")
|
|
22
|
+
.option("--context <path>", "Relative Docker build context", ".")
|
|
23
|
+
.option("--target <stage>", "Docker multi-stage target")
|
|
24
|
+
.option("--compose-service <svc>", "Docker Compose service to recreate")
|
|
25
|
+
.option("--compose-dir <dir>", "Docker Compose directory")
|
|
26
|
+
.option("--build-script <script>", "Package.json build script (for static pipelines)")
|
|
27
|
+
.option("--dist-dir <dir>", "Static output directory")
|
|
28
|
+
.option("--target-dir <dir>", "Deployment target directory (for static pipelines)")
|
|
29
|
+
.option("--sub-dir <dir>", "Monorepo subdirectory")
|
|
30
|
+
.option("--on-push", "Also trigger deployments on branch push")
|
|
31
|
+
.option("--managed", "Register NİBGAT® managed auto-deploy webhook on the repository")
|
|
32
|
+
.option("--webhook-url <url>", "Register a custom/self-hosted runner webhook URL")
|
|
33
|
+
.option("--webhook-secret <secret>", "Webhook secret when using --webhook-url")
|
|
34
|
+
.option("--configure-remote", "Configure git 'origin' remote to git.nibgat.space/<repo>.git")
|
|
35
|
+
.option("--output <path>", "Output file path", PIPELINE_CONFIG_FILENAME)
|
|
36
|
+
.option("--non-interactive", "Fail instead of prompting for missing values")
|
|
37
|
+
.action(async (opts, cmd) => {
|
|
38
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
39
|
+
const cwd = process.cwd();
|
|
40
|
+
const detected = await detectProjectInDir(cwd);
|
|
41
|
+
const interactive = !opts.nonInteractive && Boolean(process.stdin.isTTY);
|
|
42
|
+
let pType = (opts.type || detected.detectedType);
|
|
43
|
+
if (pType !== "docker" && pType !== "static") {
|
|
44
|
+
throw new Error(`Unsupported pipeline type "${opts.type}". Use "docker" or "static".`);
|
|
45
|
+
}
|
|
46
|
+
let repoStr = opts.repo || detected.detectedRepo || "";
|
|
47
|
+
if (!repoStr && interactive) {
|
|
48
|
+
repoStr = await promptLine("N - Git repository (<owner>/<repo>)", `nibgat/${detected.projectName}`);
|
|
49
|
+
}
|
|
50
|
+
const ownerPrefix = repoStr && repoStr.includes("/")
|
|
51
|
+
? repoStr.split("/")[0].toLowerCase()
|
|
52
|
+
: (ctx.credentials?.ngitUsername || "nibgat");
|
|
53
|
+
let config;
|
|
54
|
+
if (pType === "docker") {
|
|
55
|
+
let image = opts.image || `${ownerPrefix}/${detected.projectName}`;
|
|
56
|
+
if (!opts.image && interactive) {
|
|
57
|
+
image = await promptLine("OCI image name (<owner>/<image>)", image);
|
|
58
|
+
}
|
|
59
|
+
config = {
|
|
60
|
+
type: "docker",
|
|
61
|
+
image,
|
|
62
|
+
dockerfile: opts.dockerfile || "Dockerfile",
|
|
63
|
+
context: opts.context || ".",
|
|
64
|
+
...(opts.target ? {
|
|
65
|
+
target: opts.target
|
|
66
|
+
} : {}),
|
|
67
|
+
...(opts.composeService ? {
|
|
68
|
+
composeService: opts.composeService
|
|
69
|
+
} : {}),
|
|
70
|
+
...(opts.composeDir ? {
|
|
71
|
+
composeDir: opts.composeDir
|
|
72
|
+
} : {}),
|
|
73
|
+
...(opts.subDir ? {
|
|
74
|
+
subDir: opts.subDir
|
|
75
|
+
} : {}),
|
|
76
|
+
onPush: Boolean(opts.onPush)
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
const buildScript = opts.buildScript || detected.buildScript || "web:build";
|
|
81
|
+
const distDir = opts.distDir || detected.distDir || "dist";
|
|
82
|
+
let targetDir = opts.targetDir || `/var/www/${detected.projectName}`;
|
|
83
|
+
if (!opts.targetDir && interactive) {
|
|
84
|
+
targetDir = await promptLine("Static target directory", targetDir);
|
|
85
|
+
}
|
|
86
|
+
config = {
|
|
87
|
+
type: "static",
|
|
88
|
+
buildScript,
|
|
89
|
+
distDir,
|
|
90
|
+
targetDir,
|
|
91
|
+
...(opts.subDir ? {
|
|
92
|
+
subDir: opts.subDir
|
|
93
|
+
} : {}),
|
|
94
|
+
onPush: Boolean(opts.onPush)
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
const validation = validatePipelineConfig(config);
|
|
98
|
+
if (!validation.valid || !validation.config) {
|
|
99
|
+
throw new Error(`Generated pipeline config failed validation:\n - ${validation.errors.join("\n - ")}`);
|
|
100
|
+
}
|
|
101
|
+
const outPath = path.resolve(cwd, opts.output || PIPELINE_CONFIG_FILENAME);
|
|
102
|
+
fs.writeFileSync(outPath, `${JSON.stringify(validation.config, null, 4)}\n`, "utf8");
|
|
103
|
+
ctx.output.success(`Wrote validated pipeline config to ${outPath}`);
|
|
104
|
+
let webhookResult = null;
|
|
105
|
+
if (repoStr) {
|
|
106
|
+
const { owner, repo } = parseRepoSpec(repoStr);
|
|
107
|
+
if (opts.configureRemote) {
|
|
108
|
+
const remoteUrl = `${ctx.gitUrl}/${owner}/${repo}.git`;
|
|
109
|
+
try {
|
|
110
|
+
await execSafe("git", [
|
|
111
|
+
"remote",
|
|
112
|
+
"set-url",
|
|
113
|
+
"origin",
|
|
114
|
+
remoteUrl
|
|
115
|
+
], {
|
|
116
|
+
cwd
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
await execSafe("git", [
|
|
121
|
+
"remote",
|
|
122
|
+
"add",
|
|
123
|
+
"origin",
|
|
124
|
+
remoteUrl
|
|
125
|
+
], {
|
|
126
|
+
cwd
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
ctx.output.success(`Configured git origin -> ${remoteUrl}`);
|
|
130
|
+
}
|
|
131
|
+
if (opts.managed) {
|
|
132
|
+
const hookRes = await ctx.gitClient.setupAutoDeployWebhook(owner, repo, Boolean(opts.onPush));
|
|
133
|
+
webhookResult = hookRes.data;
|
|
134
|
+
ctx.output.success(`Registered managed auto-deploy webhook on ${owner}/${repo}.`);
|
|
135
|
+
}
|
|
136
|
+
else if (opts.webhookUrl) {
|
|
137
|
+
const events = opts.onPush ? [
|
|
138
|
+
"release",
|
|
139
|
+
"deploy",
|
|
140
|
+
"push"
|
|
141
|
+
] : [
|
|
142
|
+
"release",
|
|
143
|
+
"deploy"
|
|
144
|
+
];
|
|
145
|
+
const hookRes = await ctx.gitClient.createWebhook(owner, repo, {
|
|
146
|
+
secret: opts.webhookSecret,
|
|
147
|
+
url: opts.webhookUrl,
|
|
148
|
+
events
|
|
149
|
+
});
|
|
150
|
+
webhookResult = hookRes.data;
|
|
151
|
+
ctx.output.success(`Registered webhook -> ${opts.webhookUrl} on ${owner}/${repo}.`);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
ctx.output.data({
|
|
155
|
+
ok: true,
|
|
156
|
+
path: outPath,
|
|
157
|
+
config: validation.config,
|
|
158
|
+
webhook: webhookResult
|
|
159
|
+
}, () => {
|
|
160
|
+
ctx.output.kv([
|
|
161
|
+
[
|
|
162
|
+
"File",
|
|
163
|
+
outPath
|
|
164
|
+
],
|
|
165
|
+
[
|
|
166
|
+
"Type",
|
|
167
|
+
validation.config.type
|
|
168
|
+
],
|
|
169
|
+
[
|
|
170
|
+
"On Push",
|
|
171
|
+
String(Boolean(validation.config.onPush))
|
|
172
|
+
]
|
|
173
|
+
]);
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
pipeline
|
|
178
|
+
.command("validate [filePath]")
|
|
179
|
+
.description("Strictly validate a .ngit-deploy.json pipeline manifest")
|
|
180
|
+
.option("--allowed-root <dir>", "Optional allowed static root directory override")
|
|
181
|
+
.action(async (filePath, opts, cmd) => {
|
|
182
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
183
|
+
const target = path.resolve(process.cwd(), filePath || PIPELINE_CONFIG_FILENAME);
|
|
184
|
+
if (!fs.existsSync(target)) {
|
|
185
|
+
throw new Error(`Pipeline file not found: ${target}`);
|
|
186
|
+
}
|
|
187
|
+
const parsed = JSON.parse(fs.readFileSync(target, "utf8"));
|
|
188
|
+
const result = validatePipelineConfig(parsed, {
|
|
189
|
+
allowedStaticRoot: opts.allowedRoot
|
|
190
|
+
});
|
|
191
|
+
if (!result.valid) {
|
|
192
|
+
if (ctx.output.json) {
|
|
193
|
+
ctx.output.printJson({
|
|
194
|
+
valid: false,
|
|
195
|
+
path: target,
|
|
196
|
+
errors: result.errors
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
ctx.output.error(`Validation failed for ${target}:`);
|
|
201
|
+
for (const err of result.errors) {
|
|
202
|
+
process.stderr.write(` - ${err}\n`);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
process.exitCode = 1;
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
ctx.output.data({
|
|
209
|
+
valid: true,
|
|
210
|
+
path: target,
|
|
211
|
+
config: result.config
|
|
212
|
+
}, () => {
|
|
213
|
+
ctx.output.success(`Pipeline manifest is valid (${target}, type=${result.config?.type}).`);
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
pipeline
|
|
218
|
+
.command("release <tag>")
|
|
219
|
+
.description("Execute full release-to-deploy workflow (checks -> tag -> N - Git release -> watch)")
|
|
220
|
+
.option("--repo <owner/repo>", "Target repository (defaults to git origin)")
|
|
221
|
+
.option("--title <title>", "Release title")
|
|
222
|
+
.option("--body <notes>", "Release notes")
|
|
223
|
+
.option("--target <ref>", "Target branch/commitish", "main")
|
|
224
|
+
.option("--draft", "Publish as draft release")
|
|
225
|
+
.option("--prerelease", "Publish as prerelease")
|
|
226
|
+
.option("--skip-checks", "Skip local preflight lint/type-check/build scripts")
|
|
227
|
+
.option("--push-image", "Build and push local Docker image to OCI registry before releasing")
|
|
228
|
+
.option("--no-git-tag", "Skip creating and pushing local annotated git tag")
|
|
229
|
+
.option("--no-watch", "Do not poll deployment status after publishing release")
|
|
230
|
+
.option("--poll-interval <ms>", "Deployment poll interval in ms", (v) => parseInt(v, 10), 3000)
|
|
231
|
+
.option("--timeout <sec>", "Deployment watch timeout in seconds", (v) => parseInt(v, 10), 600)
|
|
232
|
+
.action(async (tag, opts, cmd) => {
|
|
233
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
234
|
+
const token = (process.env.NCLI_TOKEN || process.env.NGIT_TOKEN || ctx.credentials?.ngitToken || "").trim();
|
|
235
|
+
const result = await runReleaseWorkflow(ctx.gitClient, ctx.output, {
|
|
236
|
+
registryUser: ctx.credentials?.ngitUsername || ctx.credentials?.userName || "token",
|
|
237
|
+
registryPass: token || undefined,
|
|
238
|
+
pollIntervalMs: opts.pollInterval,
|
|
239
|
+
isPrerelease: Boolean(opts.prerelease),
|
|
240
|
+
skipChecks: Boolean(opts.skipChecks),
|
|
241
|
+
pushImage: Boolean(opts.pushImage),
|
|
242
|
+
noGitTag: opts.gitTag === false,
|
|
243
|
+
isDraft: Boolean(opts.draft),
|
|
244
|
+
watch: opts.watch !== false,
|
|
245
|
+
timeoutSec: opts.timeout,
|
|
246
|
+
target: opts.target,
|
|
247
|
+
title: opts.title,
|
|
248
|
+
body: opts.body,
|
|
249
|
+
repo: opts.repo,
|
|
250
|
+
tag
|
|
251
|
+
});
|
|
252
|
+
ctx.output.data({
|
|
253
|
+
ok: true,
|
|
254
|
+
...result
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
pipeline
|
|
259
|
+
.command("status <repo>")
|
|
260
|
+
.description("Show latest deployment pipeline status for <owner>/<repo>")
|
|
261
|
+
.action(async (repoSpec, _opts, cmd) => {
|
|
262
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
263
|
+
const { owner, repo } = parseRepoSpec(repoSpec);
|
|
264
|
+
const res = await ctx.gitClient.listDeployments(owner, repo);
|
|
265
|
+
const list = res.data?.deployments || [];
|
|
266
|
+
ctx.output.data(res.data, () => {
|
|
267
|
+
ctx.output.table([
|
|
268
|
+
"ID",
|
|
269
|
+
"REF",
|
|
270
|
+
"STATUS",
|
|
271
|
+
"STAGE",
|
|
272
|
+
"DURATION",
|
|
273
|
+
"CREATED"
|
|
274
|
+
], list.slice(0, 10).map((d) => [
|
|
275
|
+
d.id,
|
|
276
|
+
d.releaseTag || d.ref || "-",
|
|
277
|
+
d.status || "-",
|
|
278
|
+
d.stage || "-",
|
|
279
|
+
d.durationMs ? `${(d.durationMs / 1000).toFixed(1)}s` : "-",
|
|
280
|
+
d.createdAt || "-"
|
|
281
|
+
]));
|
|
282
|
+
});
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
pipeline
|
|
286
|
+
.command("trigger <repo>")
|
|
287
|
+
.description("Manually trigger a deployment pipeline on <owner>/<repo>")
|
|
288
|
+
.requiredOption("--ref <ref>", "Git tag or branch to deploy")
|
|
289
|
+
.action(async (repoSpec, opts, cmd) => {
|
|
290
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
291
|
+
const { owner, repo } = parseRepoSpec(repoSpec);
|
|
292
|
+
const safeRef = validateGitRef(opts.ref);
|
|
293
|
+
const res = await ctx.gitClient.triggerDeployment(owner, repo, safeRef);
|
|
294
|
+
ctx.output.data(res.data, () => {
|
|
295
|
+
ctx.output.success(`Triggered deployment for ${owner}/${repo}@${safeRef}.`);
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
pipeline
|
|
300
|
+
.command("logs <repo> [deploymentId]")
|
|
301
|
+
.description("Display logs for a pipeline deployment (defaults to latest)")
|
|
302
|
+
.action(async (repoSpec, deploymentId, _opts, cmd) => {
|
|
303
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
304
|
+
const { owner, repo } = parseRepoSpec(repoSpec);
|
|
305
|
+
const res = await ctx.gitClient.listDeployments(owner, repo);
|
|
306
|
+
const list = res.data?.deployments || [];
|
|
307
|
+
const target = deploymentId
|
|
308
|
+
? list.find((d) => d.id === deploymentId)
|
|
309
|
+
: list[0];
|
|
310
|
+
if (!target) {
|
|
311
|
+
throw new Error(`No matching deployment found for ${owner}/${repo}.`);
|
|
312
|
+
}
|
|
313
|
+
ctx.output.data(target, () => {
|
|
314
|
+
ctx.output.kv([
|
|
315
|
+
[
|
|
316
|
+
"Deployment",
|
|
317
|
+
target.id
|
|
318
|
+
],
|
|
319
|
+
[
|
|
320
|
+
"Status",
|
|
321
|
+
target.status || "-"
|
|
322
|
+
],
|
|
323
|
+
[
|
|
324
|
+
"Stage",
|
|
325
|
+
target.stage || "-"
|
|
326
|
+
]
|
|
327
|
+
]);
|
|
328
|
+
process.stdout.write(`\n${target.logs || "(no logs)"}\n`);
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
//# sourceMappingURL=pipeline.js.map
|
|
@@ -0,0 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,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,YAAY,CAAC;gBACzC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAEd,IAAG,CAAC,MAAM,EAAE,CAAC;gBACT,MAAM,IAAI,KAAK,CAAC,oCAAoC,KAAK,IAAI,IAAI,GAAG,CAAC,CAAC;YAC1E,CAAC;YAED,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;gBACzB,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;oBACV;wBACI,YAAY;wBACZ,MAAM,CAAC,EAAE;qBACZ;oBACD;wBACI,QAAQ;wBACR,MAAM,CAAC,MAAM,IAAI,GAAG;qBACvB;oBACD;wBACI,OAAO;wBACP,MAAM,CAAC,KAAK,IAAI,GAAG;qBACtB;iBACJ,CAAC,CAAC;gBACH,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,IAAI,IAAI,WAAW,IAAI,CAAC,CAAC;YAC9D,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACX,CAAC,CAAC"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { runCommandAction } from "./context.js";
|
|
2
|
+
export const registerProfileCommands = (program) => {
|
|
3
|
+
const profile = program
|
|
4
|
+
.command("profile")
|
|
5
|
+
.description("Manage your N - Char identity profile, emails and phones");
|
|
6
|
+
profile
|
|
7
|
+
.command("show")
|
|
8
|
+
.description("Display authenticated N - Char profile")
|
|
9
|
+
.action(async (_opts, cmd) => {
|
|
10
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
11
|
+
const res = await ctx.coreClient.profileShow();
|
|
12
|
+
ctx.output.data(res.data, () => {
|
|
13
|
+
const p = res.data;
|
|
14
|
+
ctx.output.kv([
|
|
15
|
+
[
|
|
16
|
+
"User ID",
|
|
17
|
+
String(p.userID || p.id || "-")
|
|
18
|
+
],
|
|
19
|
+
[
|
|
20
|
+
"Username",
|
|
21
|
+
String(p.userName || "-")
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"Full Name",
|
|
25
|
+
String(p.fullName || `${p.firstName || ""} ${p.lastName || ""}`.trim() || "-")
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
"Primary Email",
|
|
29
|
+
String(p.mail || "-")
|
|
30
|
+
],
|
|
31
|
+
[
|
|
32
|
+
"Language",
|
|
33
|
+
String(p.language || "-")
|
|
34
|
+
]
|
|
35
|
+
]);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
profile
|
|
40
|
+
.command("update")
|
|
41
|
+
.description("Update N - Char profile attributes")
|
|
42
|
+
.option("--first-name <name>", "First name")
|
|
43
|
+
.option("--last-name <name>", "Last name")
|
|
44
|
+
.option("--language <lang>", "Preferred language (e.g. tr, en)")
|
|
45
|
+
.option("--bio <text>", "Profile biography")
|
|
46
|
+
.option("--website <url>", "Website URL")
|
|
47
|
+
.option("--location <place>", "Location")
|
|
48
|
+
.option("--company <name>", "Company or organization")
|
|
49
|
+
.action(async (opts, cmd) => {
|
|
50
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
51
|
+
const body = {};
|
|
52
|
+
const ncharProfile = {};
|
|
53
|
+
if (opts.firstName !== undefined) {
|
|
54
|
+
body.firstName = opts.firstName;
|
|
55
|
+
}
|
|
56
|
+
if (opts.lastName !== undefined) {
|
|
57
|
+
body.lastName = opts.lastName;
|
|
58
|
+
}
|
|
59
|
+
if (opts.language !== undefined) {
|
|
60
|
+
body.language = opts.language;
|
|
61
|
+
}
|
|
62
|
+
if (opts.bio !== undefined) {
|
|
63
|
+
ncharProfile.bio = opts.bio;
|
|
64
|
+
}
|
|
65
|
+
if (opts.website !== undefined) {
|
|
66
|
+
ncharProfile.website = opts.website;
|
|
67
|
+
}
|
|
68
|
+
if (opts.location !== undefined) {
|
|
69
|
+
ncharProfile.location = opts.location;
|
|
70
|
+
}
|
|
71
|
+
if (opts.company !== undefined) {
|
|
72
|
+
ncharProfile.company = opts.company;
|
|
73
|
+
}
|
|
74
|
+
if (Object.keys(ncharProfile).length > 0) {
|
|
75
|
+
body.ncharProfile = ncharProfile;
|
|
76
|
+
}
|
|
77
|
+
if (Object.keys(body).length === 0) {
|
|
78
|
+
throw new Error("Provide at least one profile field to update (e.g. --first-name, --language).");
|
|
79
|
+
}
|
|
80
|
+
const res = await ctx.coreClient.profileUpdate(body);
|
|
81
|
+
ctx.output.data(res.data, () => {
|
|
82
|
+
ctx.output.success("Profile updated.");
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
profile
|
|
87
|
+
.command("history")
|
|
88
|
+
.description("Show username change history")
|
|
89
|
+
.action(async (_opts, cmd) => {
|
|
90
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
91
|
+
const res = await ctx.coreClient.profileUsernameHistory();
|
|
92
|
+
ctx.output.data(res.data, () => {
|
|
93
|
+
const data = res.data;
|
|
94
|
+
const items = data.changes || data.history || (Array.isArray(res.data) ? res.data : []);
|
|
95
|
+
ctx.output.table([
|
|
96
|
+
"OLD USERNAME",
|
|
97
|
+
"NEW USERNAME",
|
|
98
|
+
"CHANGED AT"
|
|
99
|
+
], items.map((item) => [
|
|
100
|
+
String(item.oldUserName || item.previousUserName || "-"),
|
|
101
|
+
String(item.newUserName || item.userName || "-"),
|
|
102
|
+
String(item.changedAt || item.createdAt || "-")
|
|
103
|
+
]));
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
const mails = profile
|
|
108
|
+
.command("mails")
|
|
109
|
+
.description("List or manage linked email addresses")
|
|
110
|
+
.action(async (_opts, cmd) => {
|
|
111
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
112
|
+
const res = await ctx.coreClient.profileMails();
|
|
113
|
+
ctx.output.data(res.data, () => {
|
|
114
|
+
const data = res.data;
|
|
115
|
+
const list = Array.isArray(data?.mails)
|
|
116
|
+
? data.mails
|
|
117
|
+
: (Array.isArray(res.data) ? res.data : []);
|
|
118
|
+
ctx.output.table([
|
|
119
|
+
"EMAIL",
|
|
120
|
+
"PRIMARY",
|
|
121
|
+
"VERIFIED"
|
|
122
|
+
], list.map((m) => (typeof m === "string"
|
|
123
|
+
? [
|
|
124
|
+
m,
|
|
125
|
+
"-",
|
|
126
|
+
"-"
|
|
127
|
+
]
|
|
128
|
+
: [
|
|
129
|
+
String(m.mail || "-"),
|
|
130
|
+
String(Boolean(m.isPrimary)),
|
|
131
|
+
String(Boolean(m.isVerified))
|
|
132
|
+
])));
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
mails
|
|
137
|
+
.command("add <mail>")
|
|
138
|
+
.description("Add an email address to your account")
|
|
139
|
+
.action(async (mail, _opts, cmd) => {
|
|
140
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
141
|
+
const res = await ctx.coreClient.profileAddMail(mail);
|
|
142
|
+
ctx.output.data(res.data, () => {
|
|
143
|
+
ctx.output.success(`Added email ${mail}.`);
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
mails
|
|
148
|
+
.command("delete <mail>")
|
|
149
|
+
.description("Remove an email address from your account")
|
|
150
|
+
.action(async (mail, _opts, cmd) => {
|
|
151
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
152
|
+
const res = await ctx.coreClient.profileDeleteMail(mail);
|
|
153
|
+
ctx.output.data(res.data, () => {
|
|
154
|
+
ctx.output.success(`Deleted email ${mail}.`);
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
const phones = profile
|
|
159
|
+
.command("phones")
|
|
160
|
+
.description("List or manage linked phone numbers")
|
|
161
|
+
.action(async (_opts, cmd) => {
|
|
162
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
163
|
+
const res = await ctx.coreClient.profilePhones();
|
|
164
|
+
ctx.output.data(res.data, () => {
|
|
165
|
+
const data = res.data;
|
|
166
|
+
const list = data?.phoneNumbers || data?.phones || (Array.isArray(res.data) ? res.data : []);
|
|
167
|
+
ctx.output.table([
|
|
168
|
+
"AREA CODE",
|
|
169
|
+
"PHONE",
|
|
170
|
+
"PRIMARY",
|
|
171
|
+
"VERIFIED"
|
|
172
|
+
], list.map((p) => [
|
|
173
|
+
String(p.phoneAreaCode || "-"),
|
|
174
|
+
String(p.phone || "-"),
|
|
175
|
+
String(Boolean(p.isPrimary)),
|
|
176
|
+
String(Boolean(p.isVerified))
|
|
177
|
+
]));
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
phones
|
|
182
|
+
.command("add <areaCode> <phone>")
|
|
183
|
+
.description("Add a phone number to your account")
|
|
184
|
+
.action(async (areaCode, phone, _opts, cmd) => {
|
|
185
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
186
|
+
const res = await ctx.coreClient.profileAddPhone(areaCode, phone);
|
|
187
|
+
ctx.output.data(res.data, () => {
|
|
188
|
+
ctx.output.success(`Added phone ${areaCode} ${phone}.`);
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
phones
|
|
193
|
+
.command("delete <areaCode> <phone>")
|
|
194
|
+
.description("Delete a phone number from your account")
|
|
195
|
+
.action(async (areaCode, phone, _opts, cmd) => {
|
|
196
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
197
|
+
const res = await ctx.coreClient.profileDeletePhone(areaCode, phone);
|
|
198
|
+
ctx.output.data(res.data, () => {
|
|
199
|
+
ctx.output.success(`Deleted phone ${areaCode} ${phone}.`);
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
profile
|
|
204
|
+
.command("public <username>")
|
|
205
|
+
.description("Fetch a public N - Char profile by username")
|
|
206
|
+
.action(async (username, _opts, cmd) => {
|
|
207
|
+
await runCommandAction(cmd, async (ctx) => {
|
|
208
|
+
const res = await ctx.coreClient.profilePublic(username);
|
|
209
|
+
ctx.output.data(res.data, () => {
|
|
210
|
+
const p = res.data;
|
|
211
|
+
ctx.output.kv([
|
|
212
|
+
[
|
|
213
|
+
"Username",
|
|
214
|
+
String(p.userName || username)
|
|
215
|
+
],
|
|
216
|
+
[
|
|
217
|
+
"Full Name",
|
|
218
|
+
String(p.fullName || "-")
|
|
219
|
+
],
|
|
220
|
+
[
|
|
221
|
+
"Bio",
|
|
222
|
+
String(p.ncharProfile?.bio || p.bio || "-")
|
|
223
|
+
]
|
|
224
|
+
]);
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
};
|
|
229
|
+
//# sourceMappingURL=profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/commands/profile.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,gBAAgB,EACnB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,OAAgB,EAAQ,EAAE;IAC9D,MAAM,OAAO,GAAG,OAAO;SAClB,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,0DAA0D,CAAC,CAAC;IAE7E,OAAO;SACF,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,wCAAwC,CAAC;SACrD,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACzB,MAAM,gBAAgB,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YACtC,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;YAE/C,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE;gBAC3B,MAAM,CAAC,GAAG,GAAG,CAAC,IAA+B,CAAC;gBAE9C,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;oBACV;wBACI,SAAS;wBAC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