@uns-kit/core 0.0.16 → 0.0.17

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.
@@ -176,6 +176,7 @@ export type AppConfig = {
176
176
  };
177
177
  devops?: {
178
178
  organization: string;
179
+ project?: string | undefined;
179
180
  } | undefined;
180
181
  };
181
182
  //# sourceMappingURL=app-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-config.d.ts","sourceRoot":"","sources":["../src/app-config.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,SAAS,GAAG;IACpB,GAAG,EAAE;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;QAC7C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACtC,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACrC,GAAG,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;KAC7C,CAAC;IACF,KAAK,CAAC,EAAE;QACJ,IAAI,EAAE,MAAM,GAAG,CAAC;YACZ,2CAA2C;YAC3C,QAAQ,EAAE,QAAQ,CAAC;YACnB,uDAAuD;YACvD,KAAK,EAAE,MAAM,CAAC;SACjB,GAAG;YACA,iDAAiD;YACjD,QAAQ,EAAE,UAAU,CAAC;YACrB,wEAAwE;YACxE,GAAG,EAAE,MAAM,CAAC;YACZ,gFAAgF;YAChF,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;YAC/B,6EAA6E;YAC7E,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SAChC,GAAG;YACA,sDAAsD;YACtD,QAAQ,EAAE,QAAQ,CAAC;YACnB,yDAAyD;YACzD,MAAM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,oDAAoD;YACpD,QAAQ,EAAE,KAAK,CAAC;YAChB,gDAAgD;YAChD,GAAG,EAAE,MAAM,CAAC;YACZ,0EAA0E;YAC1E,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;YAC/B,wEAAwE;YACxE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SAChC,GAAG;YACA,sCAAsC;YACtC,QAAQ,EAAE,WAAW,CAAC;YACtB,6DAA6D;YAC7D,IAAI,EAAE,MAAM,CAAC;YACb,6CAA6C;YAC7C,GAAG,EAAE,MAAM,CAAC;YACZ,wEAAwE;YACxE,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;YAC/B,4EAA4E;YAC5E,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,wEAAwE;YACxE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC/B,oFAAoF;YACpF,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SAChC,CAAC,CAAC,GAAG,SAAS,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACjC,CAAC;IACF,MAAM,CAAC,EAAE;QACL,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAChC,GAAG,SAAS,CAAC;CACjB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"app-config.js","sourceRoot":"","sources":["../src/app-config.ts"],"names":[],"mappings":"","sourcesContent":["/* Auto-generated. Do not edit by hand. */\nexport type AppConfig = {\n uns: {\n graphql: string;\n rest: string;\n instanceMode?: \"wait\" | \"force\" | \"handover\";\n processName?: string | undefined;\n handover?: boolean;\n jwksWellKnownUrl?: string | undefined;\n kidWellKnownUrl?: string | undefined;\n env?: \"dev\" | \"staging\" | \"test\" | \"prod\";\n };\n input?: {\n host: string | ({\n /** Use the supplied host or IP address. */\n provider: \"inline\";\n /** Host or IP address that should be used directly. */\n value: string;\n } | {\n /** Resolve the host from an external mapping. */\n provider: \"external\";\n /** Identifier used when resolving the host from HostResolverOptions. */\n key: string;\n /** Allow the external host to be missing without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback host when optional is true and the external entry is missing. */\n default?: string | undefined;\n } | {\n /** Resolve the host from local network interfaces. */\n provider: \"system\";\n /** Address family to return when scanning interfaces. */\n family?: \"IPv4\" | \"IPv6\";\n /** Specific interface to read (falls back to the first match when omitted). */\n interfaceName?: string | undefined;\n /** Allow the interface lookup to fail without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback host/IP when optional is true and no interface matches. */\n default?: string | undefined;\n });\n username?: string | undefined;\n password?: (string | ({\n /** Load the secret from an environment variable. */\n provider: \"env\";\n /** Name of the environment variable to read. */\n key: string;\n /** Allow the variable to be absent without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback value when optional is true and the variable is missing. */\n default?: string | undefined;\n } | {\n /** Load the secret from Infisical. */\n provider: \"infisical\";\n /** Secret folder path in Infisical, e.g. '/app/database'. */\n path: string;\n /** Secret key/name inside the given path. */\n key: string;\n /** Allow the secret to be absent without throwing during resolution. */\n optional?: boolean | undefined;\n /** Infisical environment override (defaults to current mode if omitted). */\n environment?: string | undefined;\n /** Optional Infisical project identifier when not using the default. */\n projectId?: string | undefined;\n /** Fallback value when the secret is missing and optional resolution is allowed. */\n default?: string | undefined;\n })) | undefined;\n clientId?: string | undefined;\n } | undefined;\n output?: {\n host: string | ({\n /** Use the supplied host or IP address. */\n provider: \"inline\";\n /** Host or IP address that should be used directly. */\n value: string;\n } | {\n /** Resolve the host from an external mapping. */\n provider: \"external\";\n /** Identifier used when resolving the host from HostResolverOptions. */\n key: string;\n /** Allow the external host to be missing without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback host when optional is true and the external entry is missing. */\n default?: string | undefined;\n } | {\n /** Resolve the host from local network interfaces. */\n provider: \"system\";\n /** Address family to return when scanning interfaces. */\n family?: \"IPv4\" | \"IPv6\";\n /** Specific interface to read (falls back to the first match when omitted). */\n interfaceName?: string | undefined;\n /** Allow the interface lookup to fail without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback host/IP when optional is true and no interface matches. */\n default?: string | undefined;\n });\n username?: string | undefined;\n password?: (string | ({\n /** Load the secret from an environment variable. */\n provider: \"env\";\n /** Name of the environment variable to read. */\n key: string;\n /** Allow the variable to be absent without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback value when optional is true and the variable is missing. */\n default?: string | undefined;\n } | {\n /** Load the secret from Infisical. */\n provider: \"infisical\";\n /** Secret folder path in Infisical, e.g. '/app/database'. */\n path: string;\n /** Secret key/name inside the given path. */\n key: string;\n /** Allow the secret to be absent without throwing during resolution. */\n optional?: boolean | undefined;\n /** Infisical environment override (defaults to current mode if omitted). */\n environment?: string | undefined;\n /** Optional Infisical project identifier when not using the default. */\n projectId?: string | undefined;\n /** Fallback value when the secret is missing and optional resolution is allowed. */\n default?: string | undefined;\n })) | undefined;\n clientId?: string | undefined;\n } | undefined;\n infra: {\n host: string | ({\n /** Use the supplied host or IP address. */\n provider: \"inline\";\n /** Host or IP address that should be used directly. */\n value: string;\n } | {\n /** Resolve the host from an external mapping. */\n provider: \"external\";\n /** Identifier used when resolving the host from HostResolverOptions. */\n key: string;\n /** Allow the external host to be missing without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback host when optional is true and the external entry is missing. */\n default?: string | undefined;\n } | {\n /** Resolve the host from local network interfaces. */\n provider: \"system\";\n /** Address family to return when scanning interfaces. */\n family?: \"IPv4\" | \"IPv6\";\n /** Specific interface to read (falls back to the first match when omitted). */\n interfaceName?: string | undefined;\n /** Allow the interface lookup to fail without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback host/IP when optional is true and no interface matches. */\n default?: string | undefined;\n });\n username?: string | undefined;\n password?: (string | ({\n /** Load the secret from an environment variable. */\n provider: \"env\";\n /** Name of the environment variable to read. */\n key: string;\n /** Allow the variable to be absent without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback value when optional is true and the variable is missing. */\n default?: string | undefined;\n } | {\n /** Load the secret from Infisical. */\n provider: \"infisical\";\n /** Secret folder path in Infisical, e.g. '/app/database'. */\n path: string;\n /** Secret key/name inside the given path. */\n key: string;\n /** Allow the secret to be absent without throwing during resolution. */\n optional?: boolean | undefined;\n /** Infisical environment override (defaults to current mode if omitted). */\n environment?: string | undefined;\n /** Optional Infisical project identifier when not using the default. */\n projectId?: string | undefined;\n /** Fallback value when the secret is missing and optional resolution is allowed. */\n default?: string | undefined;\n })) | undefined;\n clientId?: string | undefined;\n };\n devops?: {\n organization: string;\n } | undefined;\n}\n"]}
1
+ {"version":3,"file":"app-config.js","sourceRoot":"","sources":["../src/app-config.ts"],"names":[],"mappings":"","sourcesContent":["/* Auto-generated. Do not edit by hand. */\nexport type AppConfig = {\n uns: {\n graphql: string;\n rest: string;\n instanceMode?: \"wait\" | \"force\" | \"handover\";\n processName?: string | undefined;\n handover?: boolean;\n jwksWellKnownUrl?: string | undefined;\n kidWellKnownUrl?: string | undefined;\n env?: \"dev\" | \"staging\" | \"test\" | \"prod\";\n };\n input?: {\n host: string | ({\n /** Use the supplied host or IP address. */\n provider: \"inline\";\n /** Host or IP address that should be used directly. */\n value: string;\n } | {\n /** Resolve the host from an external mapping. */\n provider: \"external\";\n /** Identifier used when resolving the host from HostResolverOptions. */\n key: string;\n /** Allow the external host to be missing without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback host when optional is true and the external entry is missing. */\n default?: string | undefined;\n } | {\n /** Resolve the host from local network interfaces. */\n provider: \"system\";\n /** Address family to return when scanning interfaces. */\n family?: \"IPv4\" | \"IPv6\";\n /** Specific interface to read (falls back to the first match when omitted). */\n interfaceName?: string | undefined;\n /** Allow the interface lookup to fail without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback host/IP when optional is true and no interface matches. */\n default?: string | undefined;\n });\n username?: string | undefined;\n password?: (string | ({\n /** Load the secret from an environment variable. */\n provider: \"env\";\n /** Name of the environment variable to read. */\n key: string;\n /** Allow the variable to be absent without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback value when optional is true and the variable is missing. */\n default?: string | undefined;\n } | {\n /** Load the secret from Infisical. */\n provider: \"infisical\";\n /** Secret folder path in Infisical, e.g. '/app/database'. */\n path: string;\n /** Secret key/name inside the given path. */\n key: string;\n /** Allow the secret to be absent without throwing during resolution. */\n optional?: boolean | undefined;\n /** Infisical environment override (defaults to current mode if omitted). */\n environment?: string | undefined;\n /** Optional Infisical project identifier when not using the default. */\n projectId?: string | undefined;\n /** Fallback value when the secret is missing and optional resolution is allowed. */\n default?: string | undefined;\n })) | undefined;\n clientId?: string | undefined;\n } | undefined;\n output?: {\n host: string | ({\n /** Use the supplied host or IP address. */\n provider: \"inline\";\n /** Host or IP address that should be used directly. */\n value: string;\n } | {\n /** Resolve the host from an external mapping. */\n provider: \"external\";\n /** Identifier used when resolving the host from HostResolverOptions. */\n key: string;\n /** Allow the external host to be missing without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback host when optional is true and the external entry is missing. */\n default?: string | undefined;\n } | {\n /** Resolve the host from local network interfaces. */\n provider: \"system\";\n /** Address family to return when scanning interfaces. */\n family?: \"IPv4\" | \"IPv6\";\n /** Specific interface to read (falls back to the first match when omitted). */\n interfaceName?: string | undefined;\n /** Allow the interface lookup to fail without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback host/IP when optional is true and no interface matches. */\n default?: string | undefined;\n });\n username?: string | undefined;\n password?: (string | ({\n /** Load the secret from an environment variable. */\n provider: \"env\";\n /** Name of the environment variable to read. */\n key: string;\n /** Allow the variable to be absent without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback value when optional is true and the variable is missing. */\n default?: string | undefined;\n } | {\n /** Load the secret from Infisical. */\n provider: \"infisical\";\n /** Secret folder path in Infisical, e.g. '/app/database'. */\n path: string;\n /** Secret key/name inside the given path. */\n key: string;\n /** Allow the secret to be absent without throwing during resolution. */\n optional?: boolean | undefined;\n /** Infisical environment override (defaults to current mode if omitted). */\n environment?: string | undefined;\n /** Optional Infisical project identifier when not using the default. */\n projectId?: string | undefined;\n /** Fallback value when the secret is missing and optional resolution is allowed. */\n default?: string | undefined;\n })) | undefined;\n clientId?: string | undefined;\n } | undefined;\n infra: {\n host: string | ({\n /** Use the supplied host or IP address. */\n provider: \"inline\";\n /** Host or IP address that should be used directly. */\n value: string;\n } | {\n /** Resolve the host from an external mapping. */\n provider: \"external\";\n /** Identifier used when resolving the host from HostResolverOptions. */\n key: string;\n /** Allow the external host to be missing without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback host when optional is true and the external entry is missing. */\n default?: string | undefined;\n } | {\n /** Resolve the host from local network interfaces. */\n provider: \"system\";\n /** Address family to return when scanning interfaces. */\n family?: \"IPv4\" | \"IPv6\";\n /** Specific interface to read (falls back to the first match when omitted). */\n interfaceName?: string | undefined;\n /** Allow the interface lookup to fail without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback host/IP when optional is true and no interface matches. */\n default?: string | undefined;\n });\n username?: string | undefined;\n password?: (string | ({\n /** Load the secret from an environment variable. */\n provider: \"env\";\n /** Name of the environment variable to read. */\n key: string;\n /** Allow the variable to be absent without throwing during resolution. */\n optional?: boolean | undefined;\n /** Fallback value when optional is true and the variable is missing. */\n default?: string | undefined;\n } | {\n /** Load the secret from Infisical. */\n provider: \"infisical\";\n /** Secret folder path in Infisical, e.g. '/app/database'. */\n path: string;\n /** Secret key/name inside the given path. */\n key: string;\n /** Allow the secret to be absent without throwing during resolution. */\n optional?: boolean | undefined;\n /** Infisical environment override (defaults to current mode if omitted). */\n environment?: string | undefined;\n /** Optional Infisical project identifier when not using the default. */\n projectId?: string | undefined;\n /** Fallback value when the secret is missing and optional resolution is allowed. */\n default?: string | undefined;\n })) | undefined;\n clientId?: string | undefined;\n };\n devops?: {\n organization: string;\n project?: string | undefined;\n } | undefined;\n}\n"]}
@@ -3,6 +3,7 @@ import chalk from "chalk";
3
3
  import { execSync } from "child_process";
4
4
  import fs from "fs";
5
5
  import { readFile } from "fs/promises";
6
+ import { Buffer } from "node:buffer";
6
7
  import readline from "node:readline";
7
8
  import * as path from "path";
8
9
  import * as prettier from "prettier";
@@ -16,26 +17,42 @@ const rl = readline.createInterface({
16
17
  });
17
18
  const question = util.promisify(rl.question).bind(rl);
18
19
  const git = simpleGit("./").clean(CleanOptions.FORCE);
20
+ git.env("GIT_TERMINAL_PROMPT", "0");
19
21
  const packageJsonPath = path.join(basePath, "package.json");
20
22
  const unsLibraryPath = path.join(basePath, "uns-library.json");
21
- let azureOrganization = "sijit";
23
+ let configOrganization;
24
+ let configProject;
22
25
  try {
23
26
  const appConfig = ConfigFile.loadRawConfig();
24
- azureOrganization = appConfig.devops?.organization?.trim() || azureOrganization;
27
+ configOrganization = appConfig.devops?.organization?.trim() || undefined;
28
+ configProject = appConfig.devops?.project?.trim() || undefined;
25
29
  }
26
30
  catch (error) {
27
- // Use default organization when config.json is missing
31
+ // Continue with defaults when config.json is missing or malformed
28
32
  }
29
- const orgUrl = `https://${azureOrganization}@dev.azure.com/${azureOrganization}`;
30
- const orgBaseUrl = `https://dev.azure.com/${azureOrganization}`;
31
- const tokensUrl = `${orgBaseUrl}/_usersSettings/tokens`;
32
33
  const packageJson = JSON.parse(await readFile(packageJsonPath, "utf8"));
33
34
  const repoName = packageJson.name;
34
35
  const version = packageJson.version;
36
+ let originRemoteUrl;
37
+ try {
38
+ originRemoteUrl = (await git.raw(["remote", "get-url", "origin"])).trim();
39
+ }
40
+ catch (error) {
41
+ // Ignore missing remote here, we surface a clearer error later when required
42
+ }
43
+ const remoteInfo = originRemoteUrl ? parseAzureRemote(originRemoteUrl) : undefined;
44
+ let azureOrganization = (configOrganization || remoteInfo?.organization || "sijit").trim();
45
+ let azureProjectName = (configProject || remoteInfo?.project || "").trim();
46
+ let azureRepositoryName = (remoteInfo?.repo || inferRepositoryName(repoName)).trim();
35
47
  const branches = await git.branchLocal();
36
48
  const currentBranch = branches.current;
37
49
  const gitStatus = await git.status();
50
+ const remoteName = "origin";
38
51
  let token = "";
52
+ let gitWithAuth;
53
+ let orgUrl = "";
54
+ let orgBaseUrl = "";
55
+ let pullRequestsUrl;
39
56
  try {
40
57
  await main();
41
58
  rl.close();
@@ -52,6 +69,14 @@ async function main() {
52
69
  throw new Error(`You can not create pull request from master to master.`);
53
70
  }
54
71
  else {
72
+ if (!originRemoteUrl) {
73
+ throw new Error(`Git remote "${remoteName}" is not configured. Please run uns-kit configure-devops or add the remote before creating a pull request.`);
74
+ }
75
+ azureProjectName = await resolveAzureProjectName();
76
+ orgBaseUrl = `https://dev.azure.com/${azureOrganization}`;
77
+ orgUrl = `https://${azureOrganization}@dev.azure.com/${azureOrganization}`;
78
+ pullRequestsUrl = buildAzurePullRequestsUrl(azureOrganization, azureProjectName, azureRepositoryName);
79
+ const tokensUrl = `${orgBaseUrl}/_usersSettings/tokens`;
55
80
  const envPat = process.env.AZURE_PAT;
56
81
  while (!token) {
57
82
  if (envPat && envPat.length > 10) {
@@ -80,6 +105,9 @@ async function main() {
80
105
  }
81
106
  }
82
107
  }
108
+ gitWithAuth = simpleGit("./");
109
+ gitWithAuth.env("GIT_TERMINAL_PROMPT", "0");
110
+ gitWithAuth.env("GIT_HTTP_EXTRAHEADER", buildGitAuthorizationHeader(token));
83
111
  const version = await getVersion();
84
112
  await setVersion(version);
85
113
  await runMake();
@@ -89,11 +117,14 @@ async function main() {
89
117
  }
90
118
  }
91
119
  async function getVersion() {
120
+ if (!gitWithAuth) {
121
+ throw new Error("Git authentication is not initialized.");
122
+ }
92
123
  let versionExists = true;
93
124
  let newVersion = version;
94
125
  while (versionExists) {
95
126
  newVersion = await question(`Every PR needs a unique version, please accept current version or enter a new one [${version}]: `) || version;
96
- const remoteTags = await git.listRemote(["--tags"]);
127
+ const remoteTags = await gitWithAuth.listRemote(["--tags", remoteName]);
97
128
  if (remoteTags.indexOf(`refs/tags/${newVersion}`) > 0) {
98
129
  console.log(chalk.bold.red(`Version ${newVersion} already exists on the server`));
99
130
  }
@@ -114,8 +145,11 @@ async function commitChanges(newVersion) {
114
145
  console.log(chalk.green.bold(` ... OK`));
115
146
  }
116
147
  async function pushChanges() {
148
+ if (!gitWithAuth) {
149
+ throw new Error("Git authentication is not initialized.");
150
+ }
117
151
  process.stdout.write(`Push changes to remote branch ${currentBranch} `);
118
- await git.push("origin", currentBranch);
152
+ await gitWithAuth.push(remoteName, currentBranch);
119
153
  console.log(chalk.green.bold(` ... OK`));
120
154
  }
121
155
  async function setVersion(newVersion) {
@@ -152,9 +186,22 @@ async function createPullRequest(tag) {
152
186
  const authHandler = azdev.getPersonalAccessTokenHandler(token);
153
187
  const connection = new azdev.WebApi(orgUrl, authHandler);
154
188
  const gitApi = await connection.getGitApi();
155
- const project = "industry40";
156
- const repos = await gitApi.getRepositories(project);
157
- const repoId = repos.filter((x) => x.name == repoName)[0].id;
189
+ const project = azureProjectName;
190
+ if (!project) {
191
+ throw new Error("Azure DevOps project is not defined.");
192
+ }
193
+ let repository;
194
+ try {
195
+ repository = await gitApi.getRepository(azureRepositoryName, project);
196
+ }
197
+ catch (error) {
198
+ // Fallback to searching by display name when direct lookup fails
199
+ const repositories = await gitApi.getRepositories(project);
200
+ repository = repositories.find((candidate) => candidate.name === azureRepositoryName || candidate.name === repoName);
201
+ }
202
+ if (!repository?.id) {
203
+ throw new Error(`Unable to find repository "${azureRepositoryName}" in project "${project}".`);
204
+ }
158
205
  const gitPullRequestToCreate = {
159
206
  sourceRefName: `refs/heads/${currentBranch}`,
160
207
  targetRefName: "refs/heads/master",
@@ -162,8 +209,109 @@ async function createPullRequest(tag) {
162
209
  description,
163
210
  labels: [{ active: true, name: tag }]
164
211
  };
165
- gitApi.createPullRequest(gitPullRequestToCreate, repoId, project);
212
+ await gitApi.createPullRequest(gitPullRequestToCreate, repository.id, project);
166
213
  console.log(chalk.green.bold(` ... OK`));
167
- console.log(`Pull request created at ` + chalk.green.bold(`[${orgBaseUrl}/${project}/_git/${repoName}/pullrequests]`));
214
+ const pullRequestUrl = pullRequestsUrl ?? `${orgBaseUrl}/${project}/_git/${azureRepositoryName}/pullrequests`;
215
+ console.log(`Pull request created at ` + chalk.green.bold(`[${pullRequestUrl}]`));
216
+ }
217
+ async function resolveAzureProjectName() {
218
+ const existing = azureProjectName.trim();
219
+ if (existing) {
220
+ return existing;
221
+ }
222
+ const remoteProject = remoteInfo?.project?.trim() ?? "";
223
+ const prompt = remoteProject
224
+ ? `Azure DevOps project [${remoteProject}]: `
225
+ : "Azure DevOps project: ";
226
+ const answer = (await question(prompt)).trim();
227
+ const resolved = (answer || remoteProject).trim();
228
+ if (!resolved) {
229
+ throw new Error("Azure DevOps project is required. Update config.json (devops.project) or run uns-kit configure-devops.");
230
+ }
231
+ azureProjectName = resolved;
232
+ return azureProjectName;
233
+ }
234
+ function buildGitAuthorizationHeader(personalAccessToken) {
235
+ const encoded = Buffer.from(`:${personalAccessToken}`).toString("base64");
236
+ return `Authorization: Basic ${encoded}`;
237
+ }
238
+ function buildAzureRepositoryUrl(organization, project, repository) {
239
+ if (!organization || !project || !repository) {
240
+ return undefined;
241
+ }
242
+ const segments = [organization, project, "_git", repository].map(encodeAzureSegment);
243
+ return `https://dev.azure.com/${segments.join("/")}`;
244
+ }
245
+ function buildAzurePullRequestsUrl(organization, project, repository) {
246
+ const repositoryUrl = buildAzureRepositoryUrl(organization, project, repository);
247
+ return repositoryUrl ? `${repositoryUrl}/pullrequests` : undefined;
248
+ }
249
+ function encodeAzureSegment(segment) {
250
+ return encodeURIComponent(segment.trim());
251
+ }
252
+ function parseAzureRemote(remoteUrl) {
253
+ try {
254
+ const url = new URL(remoteUrl);
255
+ const hostname = url.hostname.toLowerCase();
256
+ const segments = url.pathname.split("/").filter(Boolean).map(decodeURIComponent);
257
+ if (hostname === "dev.azure.com") {
258
+ const organization = (segments[0] || url.username) ? decodeAzureSegment(segments[0] || url.username) : undefined;
259
+ const project = decodeAzureSegment(segments[1]);
260
+ const repo = extractRepoFromSegments(segments.slice(2));
261
+ return { organization, project, repo };
262
+ }
263
+ if (hostname.endsWith(".visualstudio.com")) {
264
+ const organization = hostname.replace(/\.visualstudio\.com$/, "");
265
+ const project = decodeAzureSegment(segments[0]);
266
+ const repo = extractRepoFromSegments(segments.slice(1));
267
+ return { organization, project, repo };
268
+ }
269
+ }
270
+ catch (error) {
271
+ // Ignore parse errors for non-HTTP remotes
272
+ }
273
+ if (remoteUrl.startsWith("git@ssh.dev.azure.com:")) {
274
+ const [, pathPart] = remoteUrl.split(":", 2);
275
+ if (pathPart) {
276
+ const segments = pathPart.split("/").filter(Boolean).map(decodeURIComponent);
277
+ if (segments[0]?.toLowerCase() === "v3") {
278
+ return {
279
+ organization: decodeAzureSegment(segments[1]),
280
+ project: decodeAzureSegment(segments[2]),
281
+ repo: stripGitExtension(segments.slice(3).join("/")),
282
+ };
283
+ }
284
+ }
285
+ }
286
+ return undefined;
287
+ }
288
+ function decodeAzureSegment(segment) {
289
+ return segment ? decodeURIComponent(segment) : undefined;
290
+ }
291
+ function extractRepoFromSegments(segments) {
292
+ if (!segments.length) {
293
+ return undefined;
294
+ }
295
+ if (segments[0] === "_git") {
296
+ return stripGitExtension(segments.slice(1).join("/"));
297
+ }
298
+ if (segments.length >= 2 && segments[1] === "_git") {
299
+ return stripGitExtension(segments.slice(2).join("/"));
300
+ }
301
+ return stripGitExtension(segments.join("/"));
302
+ }
303
+ function stripGitExtension(value) {
304
+ if (!value) {
305
+ return undefined;
306
+ }
307
+ return value.endsWith(".git") ? value.slice(0, -4) : value;
308
+ }
309
+ function inferRepositoryName(pkgName) {
310
+ if (typeof pkgName !== "string" || !pkgName.trim()) {
311
+ return "uns-app";
312
+ }
313
+ const trimmed = pkgName.trim();
314
+ const baseName = trimmed.startsWith("@") ? trimmed.split("/").pop() ?? trimmed : trimmed;
315
+ return baseName.replace(/[^A-Za-z0-9._-]+/g, "-");
168
316
  }
169
317
  //# sourceMappingURL=pull-request.js.map
@@ -1 +1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C,CAAC;IAClE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACzC,OAAO,CAAC,GAAG,CAAC,0BAA0B,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,IAAI,OAAO,SAAS,QAAQ,gBAAgB,CAAC,CAAC,CAAC;AACzH,CAAC","sourcesContent":["import * as azdev from \"azure-devops-node-api\";\nimport * as ga from \"azure-devops-node-api/GitApi\";\nimport { GitPullRequest } from \"azure-devops-node-api/interfaces/GitInterfaces.js\";\nimport { GitRepository } from \"azure-devops-node-api/interfaces/TfvcInterfaces\";\nimport chalk from \"chalk\";\nimport { execSync } from \"child_process\";\nimport fs from \"fs\";\nimport { readFile } from \"fs/promises\";\nimport readline from \"node:readline\";\nimport * as path from \"path\";\nimport * as prettier from \"prettier\";\nimport { CleanOptions, SimpleGit, simpleGit } from \"simple-git\";\nimport util from \"util\";\n\nimport { ConfigFile } from \"../config-file.js\";\nimport { basePath } from \"../base-path.js\";\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n});\nconst question = util.promisify(rl.question).bind(rl);\n\nconst git: SimpleGit = simpleGit(\"./\").clean(CleanOptions.FORCE);\nconst packageJsonPath = path.join(basePath, \"package.json\");\nconst unsLibraryPath = path.join(basePath, \"uns-library.json\");\n\nlet azureOrganization = \"sijit\";\ntry {\n const appConfig = ConfigFile.loadRawConfig();\n azureOrganization = appConfig.devops?.organization?.trim() || azureOrganization;\n} catch (error) {\n // Use default organization when config.json is missing\n}\nconst orgUrl = `https://${azureOrganization}@dev.azure.com/${azureOrganization}`;\nconst orgBaseUrl = `https://dev.azure.com/${azureOrganization}`;\nconst tokensUrl = `${orgBaseUrl}/_usersSettings/tokens`;\n\nconst packageJson = JSON.parse(await readFile(packageJsonPath, \"utf8\"));\nconst repoName: string = packageJson.name;\nconst version: string = packageJson.version;\n\nconst branches = await git.branchLocal();\nconst currentBranch = branches.current;\n\nconst gitStatus = await git.status();\n\nlet token: string = \"\";\n\n\ntry {\n await main();\n rl.close();\n} catch (error) {\n console.log(chalk.red.bold(`\\n${error}`));\n rl.close();\n}\n\nasync function main() {\n if (!gitStatus.isClean()) {\n throw new Error(`Repository needs to be clean. Please commit or stash the changes.`);\n } else if (currentBranch == \"master\") {\n throw new Error(`You can not create pull request from master to master.`);\n } else { \n const envPat = process.env.AZURE_PAT;\n while (!token) {\n if (envPat && envPat.length > 10) {\n token = envPat;\n const authHandler = azdev.getPersonalAccessTokenHandler(token);\n const connection = new azdev.WebApi(orgUrl, authHandler);\n try {\n console.log(\"Using PAT from your AZURE_PAT environment\");\n await connection.connect();\n } catch (error) {\n console.log(\n \"The provided PAT is invalid or expired. Please provide a valid PAT.\",\n );\n token = \"\";\n }\n }\n if (!token) {\n token = await question(\n `Please enter your PAT, you can create one at [${tokensUrl}]: `,\n );\n const authHandler = azdev.getPersonalAccessTokenHandler(token);\n const connection = new azdev.WebApi(orgUrl, authHandler);\n try {\n await connection.connect();\n } catch (error) {\n console.log(\n \"The provided PAT is invalid or expired. Please provide a valid PAT.\",\n );\n token = \"\";\n }\n }\n }\n\n const version = await getVersion();\n await setVersion(version);\n await runMake();\n await commitChanges(version);\n await pushChanges();\n await createPullRequest(version);\n }\n}\n\nasync function getVersion(): Promise<string> {\n let versionExists = true;\n let newVersion = version;\n while (versionExists) {\n newVersion = await question(\n `Every PR needs a unique version, please accept current version or enter a new one [${version}]: `\n ) || version;\n\n const remoteTags = await git.listRemote([\"--tags\"]);\n if (remoteTags.indexOf(`refs/tags/${newVersion}`) > 0) {\n console.log(chalk.bold.red(`Version ${newVersion} already exists on the server`));\n } else {\n console.log(`Using version ${newVersion}`)\n versionExists = false;\n }\n }\n return newVersion;\n}\n\nasync function runMake() {\n execSync(\"npm run make\");\n}\n\nasync function commitChanges(newVersion: string) {\n process.stdout.write(`Commit changes to branch ${currentBranch} `);\n await git.add(\".\");\n await git.commit(`Set new production version: ${newVersion}`);\n console.log(chalk.green.bold(` ... OK`));\n}\n\nasync function pushChanges() {\n process.stdout.write(`Push changes to remote branch ${currentBranch} `);\n await git.push(\"origin\",currentBranch);\n console.log(chalk.green.bold(` ... OK`));\n}\n\nasync function setVersion(newVersion: string) {\n packageJson.version = newVersion;\n const docString = await prettier.format(JSON.stringify(packageJson), {\n parser: \"json\",\n });\n fs.writeFileSync(\"package.json\", docString, \"utf8\");\n\n if (repoName === \"template-uns-rtt\") {\n try {\n const unsLibraryFile = await readFile(unsLibraryPath, \"utf8\");\n const unsLibrary = JSON.parse(unsLibraryFile);\n unsLibrary.version = newVersion;\n const unsLibraryDoc = await prettier.format(JSON.stringify(unsLibrary), {\n parser: \"json\",\n });\n fs.writeFileSync(unsLibraryPath, unsLibraryDoc, \"utf8\");\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") {\n const unsLibraryDoc = await prettier.format(\n JSON.stringify({ name: repoName, version: newVersion }),\n { parser: \"json\" },\n );\n fs.writeFileSync(unsLibraryPath, unsLibraryDoc, \"utf8\");\n } else {\n throw error;\n }\n }\n }\n}\n\nasync function createPullRequest(tag: string) {\n const title = await question(\n `Title for the pull request: `,\n );\n const description = await question(\n `Description for the pull request: `,\n ); \n process.stdout.write(`Create new pull request from ${currentBranch} to master `);\n const authHandler = azdev.getPersonalAccessTokenHandler(token);\n const connection = new azdev.WebApi(orgUrl, authHandler);\n const gitApi: ga.IGitApi = await connection.getGitApi();\n const project: string = \"industry40\";\n const repos: GitRepository[] = await gitApi.getRepositories(project);\n const repoId = repos.filter((x) => x.name == repoName)[0].id;\n const gitPullRequestToCreate: GitPullRequest = {\n sourceRefName: `refs/heads/${currentBranch}`,\n targetRefName: \"refs/heads/master\",\n title,\n description,\n labels: [{active: true, name:tag}]\n };\n gitApi.createPullRequest(gitPullRequestToCreate, repoId, project);\n console.log(chalk.green.bold(` ... OK`));\n console.log(`Pull request created at ` + chalk.green.bold(`[${orgBaseUrl}/${project}/_git/${repo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E,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IACzF,OAAO,QAAQ,CAAC,OAAO,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import * as azdev from \"azure-devops-node-api\";\nimport * as ga from \"azure-devops-node-api/GitApi\";\nimport { GitPullRequest } from \"azure-devops-node-api/interfaces/GitInterfaces.js\";\nimport { GitRepository } from \"azure-devops-node-api/interfaces/TfvcInterfaces\";\nimport chalk from \"chalk\";\nimport { execSync } from \"child_process\";\nimport fs from \"fs\";\nimport { readFile } from \"fs/promises\";\nimport { Buffer } from \"node:buffer\";\nimport readline from \"node:readline\";\nimport * as path from \"path\";\nimport * as prettier from \"prettier\";\nimport { CleanOptions, SimpleGit, simpleGit } from \"simple-git\";\nimport util from \"util\";\n\ntype AzureRemoteInfo = {\n organization?: string;\n project?: string;\n repo?: string;\n};\n\nimport { ConfigFile } from \"../config-file.js\";\nimport { basePath } from \"../base-path.js\";\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n});\nconst question = util.promisify(rl.question).bind(rl);\n\nconst git: SimpleGit = simpleGit(\"./\").clean(CleanOptions.FORCE);\ngit.env(\"GIT_TERMINAL_PROMPT\", \"0\");\nconst packageJsonPath = path.join(basePath, \"package.json\");\nconst unsLibraryPath = path.join(basePath, \"uns-library.json\");\n\nlet configOrganization: string | undefined;\nlet configProject: string | undefined;\ntry {\n const appConfig = ConfigFile.loadRawConfig();\n configOrganization = appConfig.devops?.organization?.trim() || undefined;\n configProject = appConfig.devops?.project?.trim() || undefined;\n} catch (error) {\n // Continue with defaults when config.json is missing or malformed\n}\n\nconst packageJson = JSON.parse(await readFile(packageJsonPath, \"utf8\"));\nconst repoName: string = packageJson.name;\nconst version: string = packageJson.version;\n\nlet originRemoteUrl: string | undefined;\ntry {\n originRemoteUrl = (await git.raw([\"remote\", \"get-url\", \"origin\"])).trim();\n} catch (error) {\n // Ignore missing remote here, we surface a clearer error later when required\n}\n\nconst remoteInfo = originRemoteUrl ? parseAzureRemote(originRemoteUrl) : undefined;\n\nlet azureOrganization = (configOrganization || remoteInfo?.organization || \"sijit\").trim();\nlet azureProjectName = (configProject || remoteInfo?.project || \"\").trim();\nlet azureRepositoryName = (remoteInfo?.repo || inferRepositoryName(repoName)).trim();\n\nconst branches = await git.branchLocal();\nconst currentBranch = branches.current;\n\nconst gitStatus = await git.status();\n\nconst remoteName = \"origin\";\n\nlet token: string = \"\";\nlet gitWithAuth: SimpleGit | undefined;\nlet orgUrl = \"\";\nlet orgBaseUrl = \"\";\nlet pullRequestsUrl: string | undefined;\n\n\ntry {\n await main();\n rl.close();\n} catch (error) {\n console.log(chalk.red.bold(`\\n${error}`));\n rl.close();\n}\n\nasync function main() {\n if (!gitStatus.isClean()) {\n throw new Error(`Repository needs to be clean. Please commit or stash the changes.`);\n } else if (currentBranch == \"master\") {\n throw new Error(`You can not create pull request from master to master.`);\n } else { \n if (!originRemoteUrl) {\n throw new Error(\n `Git remote \"${remoteName}\" is not configured. Please run uns-kit configure-devops or add the remote before creating a pull request.`,\n );\n }\n\n azureProjectName = await resolveAzureProjectName();\n orgBaseUrl = `https://dev.azure.com/${azureOrganization}`;\n orgUrl = `https://${azureOrganization}@dev.azure.com/${azureOrganization}`;\n pullRequestsUrl = buildAzurePullRequestsUrl(azureOrganization, azureProjectName, azureRepositoryName);\n\n const tokensUrl = `${orgBaseUrl}/_usersSettings/tokens`;\n const envPat = process.env.AZURE_PAT;\n while (!token) {\n if (envPat && envPat.length > 10) {\n token = envPat;\n const authHandler = azdev.getPersonalAccessTokenHandler(token);\n const connection = new azdev.WebApi(orgUrl, authHandler);\n try {\n console.log(\"Using PAT from your AZURE_PAT environment\");\n await connection.connect();\n } catch (error) {\n console.log(\n \"The provided PAT is invalid or expired. Please provide a valid PAT.\",\n );\n token = \"\";\n }\n }\n if (!token) {\n token = await question(\n `Please enter your PAT, you can create one at [${tokensUrl}]: `,\n );\n const authHandler = azdev.getPersonalAccessTokenHandler(token);\n const connection = new azdev.WebApi(orgUrl, authHandler);\n try {\n await connection.connect();\n } catch (error) {\n console.log(\n \"The provided PAT is invalid or expired. Please provide a valid PAT.\",\n );\n token = \"\";\n }\n }\n }\n\n gitWithAuth = simpleGit(\"./\");\n gitWithAuth.env(\"GIT_TERMINAL_PROMPT\", \"0\");\n gitWithAuth.env(\"GIT_HTTP_EXTRAHEADER\", buildGitAuthorizationHeader(token));\n\n const version = await getVersion();\n await setVersion(version);\n await runMake();\n await commitChanges(version);\n await pushChanges();\n await createPullRequest(version);\n }\n}\n\nasync function getVersion(): Promise<string> {\n if (!gitWithAuth) {\n throw new Error(\"Git authentication is not initialized.\");\n }\n\n let versionExists = true;\n let newVersion = version;\n while (versionExists) {\n newVersion = await question(\n `Every PR needs a unique version, please accept current version or enter a new one [${version}]: `\n ) || version;\n\n const remoteTags = await gitWithAuth.listRemote([\"--tags\", remoteName]);\n if (remoteTags.indexOf(`refs/tags/${newVersion}`) > 0) {\n console.log(chalk.bold.red(`Version ${newVersion} already exists on the server`));\n } else {\n console.log(`Using version ${newVersion}`)\n versionExists = false;\n }\n }\n return newVersion;\n}\n\nasync function runMake() {\n execSync(\"npm run make\");\n}\n\nasync function commitChanges(newVersion: string) {\n process.stdout.write(`Commit changes to branch ${currentBranch} `);\n await git.add(\".\");\n await git.commit(`Set new production version: ${newVersion}`);\n console.log(chalk.green.bold(` ... OK`));\n}\n\nasync function pushChanges() {\n if (!gitWithAuth) {\n throw new Error(\"Git authentication is not initialized.\");\n }\n\n process.stdout.write(`Push changes to remote branch ${currentBranch} `);\n await gitWithAuth.push(remoteName, currentBranch);\n console.log(chalk.green.bold(` ... OK`));\n}\n\nasync function setVersion(newVersion: string) {\n packageJson.version = newVersion;\n const docString = await prettier.format(JSON.stringify(packageJson), {\n parser: \"json\",\n });\n fs.writeFileSync(\"package.json\", docString, \"utf8\");\n\n if (repoName === \"template-uns-rtt\") {\n try {\n const unsLibraryFile = await readFile(unsLibraryPath, \"utf8\");\n const unsLibrary = JSON.parse(unsLibraryFile);\n unsLibrary.version = newVersion;\n const unsLibraryDoc = await prettier.format(JSON.stringify(unsLibrary), {\n parser: \"json\",\n });\n fs.writeFileSync(unsLibraryPath, unsLibraryDoc, \"utf8\");\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") {\n const unsLibraryDoc = await prettier.format(\n JSON.stringify({ name: repoName, version: newVersion }),\n { parser: \"json\" },\n );\n fs.writeFileSync(unsLibraryPath, unsLibraryDoc, \"utf8\");\n } else {\n throw error;\n }\n }\n }\n}\n\nasync function createPullRequest(tag: string) {\n const title = await question(\n `Title for the pull request: `,\n );\n const description = await question(\n `Description for the pull request: `,\n ); \n process.stdout.write(`Create new pull request from ${currentBranch} to master `);\n const authHandler = azdev.getPersonalAccessTokenHandler(token);\n const connection = new azdev.WebApi(orgUrl, authHandler);\n const gitApi: ga.IGitApi = await connection.getGitApi();\n const project = azureProjectName;\n if (!project) {\n throw new Error(\"Azure DevOps project is not defined.\");\n }\n\n let repository: GitRepository | undefined;\n try {\n repository = await gitApi.getRepository(azureRepositoryName, project);\n } catch (error) {\n // Fallback to searching by display name when direct lookup fails\n const repositories = await gitApi.getRepositories(project);\n repository = repositories.find((candidate) => candidate.name === azureRepositoryName || candidate.name === repoName);\n }\n\n if (!repository?.id) {\n throw new Error(`Unable to find repository \"${azureRepositoryName}\" in project \"${project}\".`);\n }\n\n const gitPullRequestToCreate: GitPullRequest = {\n sourceRefName: `refs/heads/${currentBranch}`,\n targetRefName: \"refs/heads/master\",\n title,\n description,\n labels: [{active: true, name:tag}]\n };\n await gitApi.createPullRequest(gitPullRequestToCreate, repository.id, project);\n console.log(chalk.green.bold(` ... OK`));\n const pullRequestUrl = pullRequestsUrl ?? `${orgBaseUrl}/${project}/_git/${azureRepositoryName}/pullrequests`;\n console.log(`Pull request created at ` + chalk.green.bold(`[${pullRequestUrl}]`));\n}\n\nasync function resolveAzureProjectName(): Promise<string> {\n const existing = azureProjectName.trim();\n if (existing) {\n return existing;\n }\n\n const remoteProject = remoteInfo?.project?.trim() ?? \"\";\n const prompt = remoteProject\n ? `Azure DevOps project [${remoteProject}]: `\n : \"Azure DevOps project: \";\n const answer = (await question(prompt)).trim();\n const resolved = (answer || remoteProject).trim();\n\n if (!resolved) {\n throw new Error(\n \"Azure DevOps project is required. Update config.json (devops.project) or run uns-kit configure-devops.\",\n );\n }\n\n azureProjectName = resolved;\n return azureProjectName;\n}\n\nfunction buildGitAuthorizationHeader(personalAccessToken: string): string {\n const encoded = Buffer.from(`:${personalAccessToken}`).toString(\"base64\");\n return `Authorization: Basic ${encoded}`;\n}\n\nfunction buildAzureRepositoryUrl(organization: string, project: string, repository: string): string | undefined {\n if (!organization || !project || !repository) {\n return undefined;\n }\n\n const segments = [organization, project, \"_git\", repository].map(encodeAzureSegment);\n return `https://dev.azure.com/${segments.join(\"/\")}`;\n}\n\nfunction buildAzurePullRequestsUrl(organization: string, project: string, repository: string): string | undefined {\n const repositoryUrl = buildAzureRepositoryUrl(organization, project, repository);\n return repositoryUrl ? `${repositoryUrl}/pullrequests` : undefined;\n}\n\nfunction encodeAzureSegment(segment: string): string {\n return encodeURIComponent(segment.trim());\n}\n\nfunction parseAzureRemote(remoteUrl: string): AzureRemoteInfo | undefined {\n try {\n const url = new URL(remoteUrl);\n const hostname = url.hostname.toLowerCase();\n const segments = url.pathname.split(\"/\").filter(Boolean).map(decodeURIComponent);\n\n if (hostname === \"dev.azure.com\") {\n const organization = (segments[0] || url.username) ? decodeAzureSegment(segments[0] || url.username) : undefined;\n const project = decodeAzureSegment(segments[1]);\n const repo = extractRepoFromSegments(segments.slice(2));\n return { organization, project, repo };\n }\n\n if (hostname.endsWith(\".visualstudio.com\")) {\n const organization = hostname.replace(/\\.visualstudio\\.com$/, \"\");\n const project = decodeAzureSegment(segments[0]);\n const repo = extractRepoFromSegments(segments.slice(1));\n return { organization, project, repo };\n }\n } catch (error) {\n // Ignore parse errors for non-HTTP remotes\n }\n\n if (remoteUrl.startsWith(\"git@ssh.dev.azure.com:\")) {\n const [, pathPart] = remoteUrl.split(\":\", 2);\n if (pathPart) {\n const segments = pathPart.split(\"/\").filter(Boolean).map(decodeURIComponent);\n if (segments[0]?.toLowerCase() === \"v3\") {\n return {\n organization: decodeAzureSegment(segments[1]),\n project: decodeAzureSegment(segments[2]),\n repo: stripGitExtension(segments.slice(3).join(\"/\")),\n };\n }\n }\n }\n\n return undefined;\n}\n\nfunction decodeAzureSegment(segment: string | undefined): string | undefined {\n return segment ? decodeURIComponent(segment) : undefined;\n}\n\nfunction extractRepoFromSegments(segments: string[]): string | undefined {\n if (!segments.length) {\n return undefined;\n }\n\n if (segments[0] === \"_git\") {\n return stripGitExtension(segments.slice(1).join(\"/\"));\n }\n\n if (segments.length >= 2 && segments[1] === \"_git\") {\n return stripGitExtension(segments.slice(2).join(\"/\"));\n }\n\n return stripGitExtension(segments.join(\"/\"));\n}\n\nfunction stripGitExtension(value: string | undefined): string | undefined {\n if (!value) {\n return undefined;\n }\n return value.endsWith(\".git\") ? value.slice(0, -4) : value;\n}\n\nfunction inferRepositoryName(pkgName: unknown): string {\n if (typeof pkgName !== \"string\" || !pkgName.trim()) {\n return \"uns-app\";\n }\n\n const trimmed = pkgName.trim();\n const baseName = trimmed.startsWith(\"@\") ? trimmed.split(\"/\").pop() ?? trimmed : trimmed;\n return baseName.replace(/[^A-Za-z0-9._-]+/g, \"-\");\n}\n"]}
@@ -483,10 +483,13 @@ export declare const unsCoreSchema: z.ZodObject<{
483
483
  }>;
484
484
  devops: z.ZodOptional<z.ZodObject<{
485
485
  organization: z.ZodString;
486
+ project: z.ZodOptional<z.ZodString>;
486
487
  }, "strict", z.ZodTypeAny, {
487
488
  organization?: string;
489
+ project?: string;
488
490
  }, {
489
491
  organization?: string;
492
+ project?: string;
490
493
  }>>;
491
494
  }, "strict", z.ZodTypeAny, {
492
495
  uns?: {
@@ -600,6 +603,7 @@ export declare const unsCoreSchema: z.ZodObject<{
600
603
  };
601
604
  devops?: {
602
605
  organization?: string;
606
+ project?: string;
603
607
  };
604
608
  }, {
605
609
  uns?: {
@@ -713,6 +717,7 @@ export declare const unsCoreSchema: z.ZodObject<{
713
717
  };
714
718
  devops?: {
715
719
  organization?: string;
720
+ project?: string;
716
721
  };
717
722
  }>;
718
723
  export type UnsCore = z.infer<typeof unsCoreSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"uns-core-schema.d.ts","sourceRoot":"","sources":["../../src/uns-config/uns-core-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
@@ -24,6 +24,7 @@ export const unsCoreSchema = z.object({
24
24
  infra: mqttChannelSchema,
25
25
  devops: z.object({
26
26
  organization: z.string().min(1),
27
+ project: z.string().min(1).optional(),
27
28
  }).strict().optional(),
28
29
  }).strict();
29
30
  //# sourceMappingURL=uns-core-schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"uns-core-schema.js","sourceRoot":"","sources":["../../src/uns-config/uns-core-schema.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,QAAQ,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACtC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC;QACZ,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;QACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;QACtB,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACnE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACzC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;QACnC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAC7C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAC5C,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;KAC/D,CAAC,CAAC,MAAM,EAAE;IAEX,KAAK,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACpC,KAAK,EAAE,iBAAiB;IACxB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KAChC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvB,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["// src/uns-config/uns-core-schema.ts\nimport { z } from \"zod\";\nimport { secretValueSchema } from \"./secret-placeholders.js\";\nimport { hostValueSchema } from \"./host-placeholders.js\";\n\nconst mqttChannelSchema = z.object({\n host: hostValueSchema,\n username: z.string().optional(),\n password: secretValueSchema.optional(),\n clientId: z.string().optional(),\n}).strict();\n\nexport const unsCoreSchema = z.object({\n uns: z.object({\n graphql: z.string().url(),\n rest: z.string().url(),\n instanceMode: z.enum([\"wait\", \"force\", \"handover\"]).default(\"wait\"),\n processName: z.string().min(1).optional(),\n handover: z.boolean().default(true),\n jwksWellKnownUrl: z.string().url().optional(),\n kidWellKnownUrl: z.string().url().optional(),\n env: z.enum([\"dev\", \"staging\", \"test\", \"prod\"]).default(\"dev\"),\n }).strict(),\n\n input: mqttChannelSchema.optional(),\n output: mqttChannelSchema.optional(),\n infra: mqttChannelSchema,\n devops: z.object({\n organization: z.string().min(1),\n }).strict().optional(),\n}).strict();\n\nexport type UnsCore = z.infer<typeof unsCoreSchema>;\n"]}
1
+ {"version":3,"file":"uns-core-schema.js","sourceRoot":"","sources":["../../src/uns-config/uns-core-schema.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,QAAQ,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACtC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC;QACZ,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;QACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;QACtB,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACnE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACzC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;QACnC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAC7C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAC5C,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;KAC/D,CAAC,CAAC,MAAM,EAAE;IAEX,KAAK,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACpC,KAAK,EAAE,iBAAiB;IACxB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KACtC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvB,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["// src/uns-config/uns-core-schema.ts\nimport { z } from \"zod\";\nimport { secretValueSchema } from \"./secret-placeholders.js\";\nimport { hostValueSchema } from \"./host-placeholders.js\";\n\nconst mqttChannelSchema = z.object({\n host: hostValueSchema,\n username: z.string().optional(),\n password: secretValueSchema.optional(),\n clientId: z.string().optional(),\n}).strict();\n\nexport const unsCoreSchema = z.object({\n uns: z.object({\n graphql: z.string().url(),\n rest: z.string().url(),\n instanceMode: z.enum([\"wait\", \"force\", \"handover\"]).default(\"wait\"),\n processName: z.string().min(1).optional(),\n handover: z.boolean().default(true),\n jwksWellKnownUrl: z.string().url().optional(),\n kidWellKnownUrl: z.string().url().optional(),\n env: z.enum([\"dev\", \"staging\", \"test\", \"prod\"]).default(\"dev\"),\n }).strict(),\n\n input: mqttChannelSchema.optional(),\n output: mqttChannelSchema.optional(),\n infra: mqttChannelSchema,\n devops: z.object({\n organization: z.string().min(1),\n project: z.string().min(1).optional(),\n }).strict().optional(),\n}).strict();\n\nexport type UnsCore = z.infer<typeof unsCoreSchema>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uns-kit/core",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "Core utilities and runtime building blocks for UNS-based realtime transformers.",
5
5
  "type": "module",
6
6
  "license": "MIT",