Compare commits
No commits in common. '436ba08b58b8d8c7633186d5a4a4e51837355e71' and 'a67af87fb734f0b5dedf36501210d00ee0f529fc' have entirely different histories.
436ba08b58
...
a67af87fb7
@ -1,15 +0,0 @@
|
|||||||
// .eslintrc.js
|
|
||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
plugins: ["@typescript-eslint", "import", "prettier"],
|
|
||||||
extends: [
|
|
||||||
"airbnb-typescript/base",
|
|
||||||
"prettier",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"plugin:import/typescript",
|
|
||||||
],
|
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
parserOptions: {
|
|
||||||
project: "./tsconfig.eslint.json",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
@ -1 +0,0 @@
|
|||||||
_
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
. "$(dirname "$0")/_/husky.sh"
|
|
||||||
|
|
||||||
npx lint-staged
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
/.vscode
|
|
||||||
node_modules/
|
|
||||||
/*test.js
|
|
||||||
/all.json
|
|
||||||
/format.json
|
|
||||||
/tag*.json
|
|
||||||
/*.xlsx
|
|
||||||
roadmap.txt
|
|
||||||
fw.bat
|
|
||||||
publish_*.ps1
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"useTabs": true
|
|
||||||
}
|
|
||||||
@ -1,171 +0,0 @@
|
|||||||
import * as semver from "semver";
|
|
||||||
import { svnGetLatestTag, svnPropGet } from "./promises";
|
|
||||||
export class SolutionImplementation {
|
|
||||||
constructor(url) {
|
|
||||||
this.url = "";
|
|
||||||
this.baseUrl = "";
|
|
||||||
this.repository = "";
|
|
||||||
this.repositoryUrl = "";
|
|
||||||
this.componentFolder = null;
|
|
||||||
this._isSolutionComponent = false;
|
|
||||||
this._isImplementation = false;
|
|
||||||
this.implementationUrl = "";
|
|
||||||
this.type = "";
|
|
||||||
this.version = null;
|
|
||||||
this.nextVersion = null;
|
|
||||||
this.component = "";
|
|
||||||
this.parseUrl(url);
|
|
||||||
}
|
|
||||||
getBaseUrl() {
|
|
||||||
return this.baseUrl;
|
|
||||||
}
|
|
||||||
getUrl() {
|
|
||||||
return this.url;
|
|
||||||
}
|
|
||||||
getImplementationUrl() {
|
|
||||||
return this.implementationUrl;
|
|
||||||
}
|
|
||||||
getRepository() {
|
|
||||||
return this.repository;
|
|
||||||
}
|
|
||||||
getRepositoryUrl() {
|
|
||||||
return this.repositoryUrl;
|
|
||||||
}
|
|
||||||
getComponentFolder() {
|
|
||||||
return this.componentFolder;
|
|
||||||
}
|
|
||||||
isSolutionComponent() {
|
|
||||||
return this._isSolutionComponent;
|
|
||||||
}
|
|
||||||
isImplementation() {
|
|
||||||
return this._isImplementation;
|
|
||||||
}
|
|
||||||
getType() {
|
|
||||||
return this.type;
|
|
||||||
}
|
|
||||||
getVersion() {
|
|
||||||
return this.version;
|
|
||||||
}
|
|
||||||
async getNextVersion(semVerIncrementType) {
|
|
||||||
await this.getLatestTag()
|
|
||||||
.then((result) => {
|
|
||||||
if (semver.valid(semver.coerce(result))) {
|
|
||||||
const sv = result;
|
|
||||||
this.nextVersion = semver.inc(sv, semVerIncrementType);
|
|
||||||
} else {
|
|
||||||
this.nextVersion = null;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
// Handle error
|
|
||||||
});
|
|
||||||
return this.nextVersion;
|
|
||||||
}
|
|
||||||
async getLatestTag() {
|
|
||||||
try {
|
|
||||||
const lastTagOrBranch = await svnGetLatestTag(this.implementationUrl);
|
|
||||||
return lastTagOrBranch.name;
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Error retrieving last tag or branch:", error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
getTypeAndVersion() {
|
|
||||||
if ((this.type === "tags" || this.type === "branches") && this.version) {
|
|
||||||
return `${this.type}/${this.version}`;
|
|
||||||
}
|
|
||||||
return `${this.type}`;
|
|
||||||
}
|
|
||||||
getComponent() {
|
|
||||||
return this.component;
|
|
||||||
}
|
|
||||||
getComponentDecoded() {
|
|
||||||
return decodeURIComponent(this.component);
|
|
||||||
}
|
|
||||||
getExternalsRaw() {
|
|
||||||
return decodeURIComponent(this.component);
|
|
||||||
}
|
|
||||||
// GetExternalsCollection(): externalsCollection {
|
|
||||||
// return decodeURIComponent(this.component);
|
|
||||||
// }
|
|
||||||
async getExternals() {
|
|
||||||
const svnOptions = { trustServerCert: true };
|
|
||||||
try {
|
|
||||||
const response = await svnPropGet("svn:externals", this.url, svnOptions);
|
|
||||||
const rawExternals = response.target.property._;
|
|
||||||
return rawExternals;
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Error retrieving last tag or branch:", error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
parseUrl(url) {
|
|
||||||
this.url = url;
|
|
||||||
const regex = /^(https?:\/\/[^\/]+\/svn\/)/;
|
|
||||||
const match = regex.exec(url);
|
|
||||||
if (match && match.length > 1) {
|
|
||||||
this.baseUrl = match[1];
|
|
||||||
} else {
|
|
||||||
throw new Error("Invalid URL");
|
|
||||||
}
|
|
||||||
const segments = url.split("/");
|
|
||||||
const svnIndex = segments.indexOf("svn");
|
|
||||||
const trunkTagBranchIndex = segments.findIndex(
|
|
||||||
(segment, index) =>
|
|
||||||
index > svnIndex &&
|
|
||||||
(segment === "trunk" || segment === "tags" || segment === "branches")
|
|
||||||
);
|
|
||||||
this._isSolutionComponent = trunkTagBranchIndex - svnIndex > 2;
|
|
||||||
if (svnIndex !== -1 && svnIndex + 1 < segments.length) {
|
|
||||||
this.repository = segments[svnIndex + 1];
|
|
||||||
this.repositoryUrl = `${this.baseUrl}${this.repository}`;
|
|
||||||
if (trunkTagBranchIndex !== -1 && trunkTagBranchIndex - 1 > svnIndex) {
|
|
||||||
const nextSegment = segments[trunkTagBranchIndex - 1];
|
|
||||||
if (
|
|
||||||
nextSegment !== "trunk" &&
|
|
||||||
nextSegment !== "tags" &&
|
|
||||||
nextSegment !== "branches"
|
|
||||||
) {
|
|
||||||
if (this._isSolutionComponent) {
|
|
||||||
this.componentFolder = nextSegment;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (trunkTagBranchIndex !== -1 && trunkTagBranchIndex < segments.length) {
|
|
||||||
this.type = segments[trunkTagBranchIndex];
|
|
||||||
if (this.type === "tags" || this.type === "branches") {
|
|
||||||
if (trunkTagBranchIndex + 1 < segments.length) {
|
|
||||||
this.version = segments[trunkTagBranchIndex + 1];
|
|
||||||
if (trunkTagBranchIndex + 2 < segments.length) {
|
|
||||||
this.component = segments[trunkTagBranchIndex + 2];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (trunkTagBranchIndex + 1 < segments.length) {
|
|
||||||
this.component = segments[trunkTagBranchIndex + 1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this._isImplementation =
|
|
||||||
this.componentFolder === null && this.component === "";
|
|
||||||
this.implementationUrl = segments
|
|
||||||
.slice(0, trunkTagBranchIndex + (this.version === null ? 1 : 2))
|
|
||||||
.join("/");
|
|
||||||
if (this._isImplementation) {
|
|
||||||
const rawExternals = this.getExternals();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
throw new Error("Invalid URL");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Helper function to retrieve the last tag or branch
|
|
||||||
// async function getLastTagOrBranch(url: string): Promise<string> {
|
|
||||||
// try {
|
|
||||||
// const list = await svnListPromise(url);
|
|
||||||
// const sortedList = list.sort((a, b) => b.date.getTime() - a.date.getTime());
|
|
||||||
// const lastTagOrBranch = sortedList[0].name;
|
|
||||||
// return lastTagOrBranch;
|
|
||||||
// } catch (error) {
|
|
||||||
// throw error;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//# sourceMappingURL=SolutionImplementation.js.map
|
|
||||||
@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"SolutionImplementation.js","sourceRoot":"","sources":["SolutionImplementation.ts"],"names":[],"mappings":"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"}
|
|
||||||
@ -1,210 +0,0 @@
|
|||||||
import * as semver from "semver";
|
|
||||||
import { type SemVerIncrementType, type ApiExternalsResponse } from "./types";
|
|
||||||
import { svnList, svnGetLatestTag, svnPropGet } from "./promises";
|
|
||||||
|
|
||||||
export class SolutionImplementation {
|
|
||||||
private url = "";
|
|
||||||
private baseUrl = "";
|
|
||||||
private repository = "";
|
|
||||||
private repositoryUrl = "";
|
|
||||||
private componentFolder: string | undefined = null;
|
|
||||||
private _isSolutionComponent = false;
|
|
||||||
private _isImplementation = false;
|
|
||||||
private implementationUrl = "";
|
|
||||||
private type = "";
|
|
||||||
private version: string | undefined = null;
|
|
||||||
private nextVersion: string | undefined = null;
|
|
||||||
|
|
||||||
private component = "";
|
|
||||||
|
|
||||||
constructor(url: string) {
|
|
||||||
this.parseUrl(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
getBaseUrl(): string {
|
|
||||||
return this.baseUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
getUrl(): string {
|
|
||||||
return this.url;
|
|
||||||
}
|
|
||||||
|
|
||||||
getImplementationUrl(): string {
|
|
||||||
return this.implementationUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
getRepository(): string {
|
|
||||||
return this.repository;
|
|
||||||
}
|
|
||||||
|
|
||||||
getRepositoryUrl(): string {
|
|
||||||
return this.repositoryUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
getComponentFolder(): string | undefined {
|
|
||||||
return this.componentFolder;
|
|
||||||
}
|
|
||||||
|
|
||||||
isSolutionComponent(): boolean {
|
|
||||||
return this._isSolutionComponent;
|
|
||||||
}
|
|
||||||
|
|
||||||
isImplementation(): boolean {
|
|
||||||
return this._isImplementation;
|
|
||||||
}
|
|
||||||
|
|
||||||
getType(): string {
|
|
||||||
return this.type;
|
|
||||||
}
|
|
||||||
|
|
||||||
getVersion(): string | undefined {
|
|
||||||
return this.version;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async getNextVersion(
|
|
||||||
semVerIncrementType: SemVerIncrementType
|
|
||||||
): Promise<string | undefined> {
|
|
||||||
await this.getLatestTag()
|
|
||||||
.then((result) => {
|
|
||||||
if (semver.valid(semver.coerce(result))) {
|
|
||||||
const sv: string = result;
|
|
||||||
this.nextVersion = semver.inc(sv, semVerIncrementType);
|
|
||||||
} else {
|
|
||||||
this.nextVersion = null;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
// Handle error
|
|
||||||
});
|
|
||||||
return this.nextVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async getLatestTag(): Promise<string> {
|
|
||||||
try {
|
|
||||||
const lastTagOrBranch = await svnGetLatestTag(this.implementationUrl);
|
|
||||||
return lastTagOrBranch.name;
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Error retrieving last tag or branch:", error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getTypeAndVersion(): string {
|
|
||||||
if ((this.type === "tags" || this.type === "branches") && this.version) {
|
|
||||||
return `${this.type}/${this.version}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return `${this.type}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
getComponent(): string {
|
|
||||||
return this.component;
|
|
||||||
}
|
|
||||||
|
|
||||||
getComponentDecoded(): string {
|
|
||||||
return decodeURIComponent(this.component);
|
|
||||||
}
|
|
||||||
|
|
||||||
getExternalsRaw(): string {
|
|
||||||
return decodeURIComponent(this.component);
|
|
||||||
}
|
|
||||||
// GetExternalsCollection(): externalsCollection {
|
|
||||||
// return decodeURIComponent(this.component);
|
|
||||||
// }
|
|
||||||
|
|
||||||
public async getExternals(): Promise<string> {
|
|
||||||
const svnOptions = { trustServerCert: true };
|
|
||||||
try {
|
|
||||||
const response: ApiExternalsResponse = await svnPropGet(
|
|
||||||
"svn:externals",
|
|
||||||
this.url,
|
|
||||||
svnOptions
|
|
||||||
);
|
|
||||||
const rawExternals: string = response.target.property._;
|
|
||||||
return rawExternals;
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Error retrieving last tag or branch:", error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private parseUrl(url: string): void {
|
|
||||||
this.url = url;
|
|
||||||
|
|
||||||
const regex = /^(https?:\/\/[^\/]+\/svn\/)/;
|
|
||||||
const match = regex.exec(url);
|
|
||||||
|
|
||||||
if (match && match.length > 1) {
|
|
||||||
this.baseUrl = match[1];
|
|
||||||
} else {
|
|
||||||
throw new Error("Invalid URL");
|
|
||||||
}
|
|
||||||
|
|
||||||
const segments = url.split("/");
|
|
||||||
const svnIndex = segments.indexOf("svn");
|
|
||||||
const trunkTagBranchIndex = segments.findIndex(
|
|
||||||
(segment, index) =>
|
|
||||||
index > svnIndex &&
|
|
||||||
(segment === "trunk" || segment === "tags" || segment === "branches")
|
|
||||||
);
|
|
||||||
this._isSolutionComponent = trunkTagBranchIndex - svnIndex > 2;
|
|
||||||
|
|
||||||
if (svnIndex !== -1 && svnIndex + 1 < segments.length) {
|
|
||||||
this.repository = segments[svnIndex + 1];
|
|
||||||
this.repositoryUrl = `${this.baseUrl}${this.repository}`;
|
|
||||||
|
|
||||||
if (trunkTagBranchIndex !== -1 && trunkTagBranchIndex - 1 > svnIndex) {
|
|
||||||
const nextSegment = segments[trunkTagBranchIndex - 1];
|
|
||||||
|
|
||||||
if (
|
|
||||||
nextSegment !== "trunk" &&
|
|
||||||
nextSegment !== "tags" &&
|
|
||||||
nextSegment !== "branches"
|
|
||||||
) {
|
|
||||||
if (this._isSolutionComponent) {
|
|
||||||
this.componentFolder = nextSegment;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (trunkTagBranchIndex !== -1 && trunkTagBranchIndex < segments.length) {
|
|
||||||
this.type = segments[trunkTagBranchIndex];
|
|
||||||
|
|
||||||
if (this.type === "tags" || this.type === "branches") {
|
|
||||||
if (trunkTagBranchIndex + 1 < segments.length) {
|
|
||||||
this.version = segments[trunkTagBranchIndex + 1];
|
|
||||||
if (trunkTagBranchIndex + 2 < segments.length) {
|
|
||||||
this.component = segments[trunkTagBranchIndex + 2];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (trunkTagBranchIndex + 1 < segments.length) {
|
|
||||||
this.component = segments[trunkTagBranchIndex + 1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this._isImplementation =
|
|
||||||
this.componentFolder === null && this.component === "";
|
|
||||||
this.implementationUrl = segments
|
|
||||||
.slice(0, trunkTagBranchIndex + (this.version === null ? 1 : 2))
|
|
||||||
.join("/");
|
|
||||||
|
|
||||||
if (this._isImplementation) {
|
|
||||||
const rawExternals = this.getExternals();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
throw new Error("Invalid URL");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Helper function to retrieve the last tag or branch
|
|
||||||
// async function getLastTagOrBranch(url: string): Promise<string> {
|
|
||||||
// try {
|
|
||||||
// const list = await svnListPromise(url);
|
|
||||||
// const sortedList = list.sort((a, b) => b.date.getTime() - a.date.getTime());
|
|
||||||
// const lastTagOrBranch = sortedList[0].name;
|
|
||||||
// return lastTagOrBranch;
|
|
||||||
// } catch (error) {
|
|
||||||
// throw error;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
import * as fs from "fs";
|
|
||||||
import { SolutionImplementation } from "./SolutionImplementation";
|
|
||||||
export class SolutionImplementationReader {
|
|
||||||
constructor() {
|
|
||||||
const json = fs.readFileSync("solutions.json", "utf-8");
|
|
||||||
this.solutionImplementations = JSON.parse(json);
|
|
||||||
}
|
|
||||||
readSolutionUrl() {
|
|
||||||
this.solutionImplementations.forEach((solutionImplementation) => {
|
|
||||||
const s = new SolutionImplementation(solutionImplementation.url);
|
|
||||||
console.log(JSON.stringify(s, null, 2));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=SolutionImplementationReader.js.map
|
|
||||||
@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"SolutionImplementationReader.js","sourceRoot":"","sources":["SolutionImplementationReader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AAEhE,MAAM,OAAO,4BAA4B;IAGxC;QACC,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QACxD,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IAEM,eAAe;QACrB,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,sBAAkD,EAAE,EAAE;YAC3F,MAAM,CAAC,GAAG,IAAI,sBAAsB,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC;YACjE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACJ,CAAC;CACD"}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
import * as fs from "fs";
|
|
||||||
import { type TypeSolutionImplementation } from "./types";
|
|
||||||
import { SolutionImplementation } from "./SolutionImplementation";
|
|
||||||
|
|
||||||
export class SolutionImplementationReader {
|
|
||||||
private readonly solutionImplementations: TypeSolutionImplementation[];
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
const json = fs.readFileSync("solutions.json", "utf-8");
|
|
||||||
this.solutionImplementations = JSON.parse(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
public readSolutionUrl(): void {
|
|
||||||
this.solutionImplementations.forEach(
|
|
||||||
(solutionImplementation: TypeSolutionImplementation) => {
|
|
||||||
const s = new SolutionImplementation(solutionImplementation.url);
|
|
||||||
console.log(JSON.stringify(s, null, 2));
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,85 +0,0 @@
|
|||||||
import { SolutionImplementationReader } from "./SolutionImplementationReader";
|
|
||||||
// Const trunkUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGLO/Business_Licence/trunk/DSC%20Business%20license';
|
|
||||||
// const tagUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGLO/Interim_Stabilization_Levy/tags/1.0.0/DSC%20Interim%20stabilization%20levy';
|
|
||||||
// const branchUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/branches/1.5.0/SC%20Address%20-%20Specific';
|
|
||||||
// const trunkSolutionUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/trunk';
|
|
||||||
// const tagSolutionUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/tags/2.1.1.1';
|
|
||||||
// const branchSolutionUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/branches/2.1.1';
|
|
||||||
async function showOutPut() {
|
|
||||||
console.log();
|
|
||||||
}
|
|
||||||
// ShowOutPut();
|
|
||||||
// Usage
|
|
||||||
const solutionImplementations = [];
|
|
||||||
const solutionImplementationReader = new SolutionImplementationReader();
|
|
||||||
// SolutionImplementations.push(solutionImplementationReader.readSolutionUrl());
|
|
||||||
// solution = new SolutionImplementation(tagUrl);
|
|
||||||
// console.log('solution.getURL():', solution.getURL());
|
|
||||||
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
|
||||||
// console.log('solution.getRepository():', solution.getRepository());
|
|
||||||
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
|
||||||
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
|
||||||
// console.log('solution.isImplementation():', solution.isImplementation());
|
|
||||||
// console.log('solution.getType():', solution.getType());
|
|
||||||
// console.log('solution.getVersion():', solution.getVersion());
|
|
||||||
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
|
||||||
// console.log('solution.getComponent():', solution.getComponent());
|
|
||||||
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
|
||||||
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
|
||||||
// console.log('--');
|
|
||||||
// solution = new SolutionImplementation(branchUrl);
|
|
||||||
// console.log('solution.getURL():', solution.getURL());
|
|
||||||
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
|
||||||
// console.log('solution.getRepository():', solution.getRepository());
|
|
||||||
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
|
||||||
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
|
||||||
// console.log('solution.isImplementation():', solution.isImplementation());
|
|
||||||
// console.log('solution.getType():', solution.getType());
|
|
||||||
// console.log('solution.getVersion():', solution.getVersion());
|
|
||||||
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
|
||||||
// console.log('solution.getComponent():', solution.getComponent());
|
|
||||||
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
|
||||||
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
|
||||||
// console.log('--');
|
|
||||||
// solution = new SolutionImplementation(trunkSolutionUrl);
|
|
||||||
// console.log('solution.getURL():', solution.getURL());
|
|
||||||
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
|
||||||
// console.log('solution.getRepository():', solution.getRepository());
|
|
||||||
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
|
||||||
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
|
||||||
// console.log('solution.isImplementation():', solution.isImplementation());
|
|
||||||
// console.log('solution.getType():', solution.getType());
|
|
||||||
// console.log('solution.getVersion():', solution.getVersion());
|
|
||||||
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
|
||||||
// console.log('solution.getComponent():', solution.getComponent());
|
|
||||||
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
|
||||||
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
|
||||||
// console.log('--');
|
|
||||||
// solution = new SolutionImplementation(tagSolutionUrl);
|
|
||||||
// console.log('solution.getURL():', solution.getURL());
|
|
||||||
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
|
||||||
// console.log('solution.getRepository():', solution.getRepository());
|
|
||||||
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
|
||||||
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
|
||||||
// console.log('solution.isImplementation():', solution.isImplementation());
|
|
||||||
// console.log('solution.getType():', solution.getType());
|
|
||||||
// console.log('solution.getVersion():', solution.getVersion());
|
|
||||||
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
|
||||||
// console.log('solution.getComponent():', solution.getComponent());
|
|
||||||
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
|
||||||
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
|
||||||
// console.log('--');
|
|
||||||
// solution = new SolutionImplementation(branchSolutionUrl);
|
|
||||||
// console.log('solution.getURL():', solution.getURL());
|
|
||||||
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
|
||||||
// console.log('solution.getRepository():', solution.getRepository());
|
|
||||||
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
|
||||||
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
|
||||||
// console.log('solution.isImplementation():', solution.isImplementation());
|
|
||||||
// console.log('solution.getType():', solution.getType());
|
|
||||||
// console.log('solution.getVersion():', solution.getVersion());
|
|
||||||
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
|
||||||
// console.log('solution.getComponent():', solution.getComponent());
|
|
||||||
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
|
||||||
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
|
||||||
//# sourceMappingURL=index_bak.js.map
|
|
||||||
@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"index_bak.js","sourceRoot":"","sources":["index_bak.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,0HAA0H;AAC1H,mJAAmJ;AACnJ,yHAAyH;AACzH,2FAA2F;AAC3F,gGAAgG;AAChG,qGAAqG;AAErG,KAAK,UAAU,UAAU;IACvB,OAAO,CAAC,GAAG,EAAE,CAAC;AAChB,CAAC;AAED,gBAAgB;AAEhB,QAAQ;AACR,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,4BAA4B,GAAG,IAAI,4BAA4B,EAAE,CAAC;AACxE,gFAAgF;AAEhF,iDAAiD;AACjD,wDAAwD;AACxD,gEAAgE;AAChE,sEAAsE;AACtE,gFAAgF;AAChF,kFAAkF;AAClF,4EAA4E;AAC5E,0DAA0D;AAC1D,gEAAgE;AAChE,8EAA8E;AAC9E,oEAAoE;AACpE,kFAAkF;AAClF,oFAAoF;AACpF,qBAAqB;AAErB,oDAAoD;AACpD,wDAAwD;AACxD,gEAAgE;AAChE,sEAAsE;AACtE,gFAAgF;AAChF,kFAAkF;AAClF,4EAA4E;AAC5E,0DAA0D;AAC1D,gEAAgE;AAChE,8EAA8E;AAC9E,oEAAoE;AACpE,kFAAkF;AAClF,oFAAoF;AACpF,qBAAqB;AAErB,2DAA2D;AAC3D,wDAAwD;AACxD,gEAAgE;AAChE,sEAAsE;AACtE,gFAAgF;AAChF,kFAAkF;AAClF,4EAA4E;AAC5E,0DAA0D;AAC1D,gEAAgE;AAChE,8EAA8E;AAC9E,oEAAoE;AACpE,kFAAkF;AAClF,oFAAoF;AACpF,qBAAqB;AAErB,yDAAyD;AACzD,wDAAwD;AACxD,gEAAgE;AAChE,sEAAsE;AACtE,gFAAgF;AAChF,kFAAkF;AAClF,4EAA4E;AAC5E,0DAA0D;AAC1D,gEAAgE;AAChE,8EAA8E;AAC9E,oEAAoE;AACpE,kFAAkF;AAClF,oFAAoF;AACpF,qBAAqB;AAErB,4DAA4D;AAC5D,wDAAwD;AACxD,gEAAgE;AAChE,sEAAsE;AACtE,gFAAgF;AAChF,kFAAkF;AAClF,4EAA4E;AAC5E,0DAA0D;AAC1D,gEAAgE;AAChE,8EAA8E;AAC9E,oEAAoE;AACpE,kFAAkF;AAClF,oFAAoF"}
|
|
||||||
@ -1,94 +0,0 @@
|
|||||||
import { SolutionImplementation } from "./SolutionImplementation";
|
|
||||||
import { SolutionImplementationReader } from "./SolutionImplementationReader";
|
|
||||||
|
|
||||||
// Const trunkUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGLO/Business_Licence/trunk/DSC%20Business%20license';
|
|
||||||
// const tagUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGLO/Interim_Stabilization_Levy/tags/1.0.0/DSC%20Interim%20stabilization%20levy';
|
|
||||||
// const branchUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/branches/1.5.0/SC%20Address%20-%20Specific';
|
|
||||||
// const trunkSolutionUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/trunk';
|
|
||||||
// const tagSolutionUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/tags/2.1.1.1';
|
|
||||||
// const branchSolutionUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/branches/2.1.1';
|
|
||||||
|
|
||||||
async function showOutPut() {
|
|
||||||
console.log();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShowOutPut();
|
|
||||||
|
|
||||||
// Usage
|
|
||||||
const solutionImplementations = [];
|
|
||||||
const solutionImplementationReader = new SolutionImplementationReader();
|
|
||||||
// SolutionImplementations.push(solutionImplementationReader.readSolutionUrl());
|
|
||||||
|
|
||||||
// solution = new SolutionImplementation(tagUrl);
|
|
||||||
// console.log('solution.getURL():', solution.getURL());
|
|
||||||
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
|
||||||
// console.log('solution.getRepository():', solution.getRepository());
|
|
||||||
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
|
||||||
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
|
||||||
// console.log('solution.isImplementation():', solution.isImplementation());
|
|
||||||
// console.log('solution.getType():', solution.getType());
|
|
||||||
// console.log('solution.getVersion():', solution.getVersion());
|
|
||||||
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
|
||||||
// console.log('solution.getComponent():', solution.getComponent());
|
|
||||||
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
|
||||||
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
|
||||||
// console.log('--');
|
|
||||||
|
|
||||||
// solution = new SolutionImplementation(branchUrl);
|
|
||||||
// console.log('solution.getURL():', solution.getURL());
|
|
||||||
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
|
||||||
// console.log('solution.getRepository():', solution.getRepository());
|
|
||||||
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
|
||||||
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
|
||||||
// console.log('solution.isImplementation():', solution.isImplementation());
|
|
||||||
// console.log('solution.getType():', solution.getType());
|
|
||||||
// console.log('solution.getVersion():', solution.getVersion());
|
|
||||||
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
|
||||||
// console.log('solution.getComponent():', solution.getComponent());
|
|
||||||
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
|
||||||
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
|
||||||
// console.log('--');
|
|
||||||
|
|
||||||
// solution = new SolutionImplementation(trunkSolutionUrl);
|
|
||||||
// console.log('solution.getURL():', solution.getURL());
|
|
||||||
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
|
||||||
// console.log('solution.getRepository():', solution.getRepository());
|
|
||||||
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
|
||||||
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
|
||||||
// console.log('solution.isImplementation():', solution.isImplementation());
|
|
||||||
// console.log('solution.getType():', solution.getType());
|
|
||||||
// console.log('solution.getVersion():', solution.getVersion());
|
|
||||||
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
|
||||||
// console.log('solution.getComponent():', solution.getComponent());
|
|
||||||
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
|
||||||
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
|
||||||
// console.log('--');
|
|
||||||
|
|
||||||
// solution = new SolutionImplementation(tagSolutionUrl);
|
|
||||||
// console.log('solution.getURL():', solution.getURL());
|
|
||||||
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
|
||||||
// console.log('solution.getRepository():', solution.getRepository());
|
|
||||||
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
|
||||||
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
|
||||||
// console.log('solution.isImplementation():', solution.isImplementation());
|
|
||||||
// console.log('solution.getType():', solution.getType());
|
|
||||||
// console.log('solution.getVersion():', solution.getVersion());
|
|
||||||
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
|
||||||
// console.log('solution.getComponent():', solution.getComponent());
|
|
||||||
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
|
||||||
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
|
||||||
// console.log('--');
|
|
||||||
|
|
||||||
// solution = new SolutionImplementation(branchSolutionUrl);
|
|
||||||
// console.log('solution.getURL():', solution.getURL());
|
|
||||||
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
|
||||||
// console.log('solution.getRepository():', solution.getRepository());
|
|
||||||
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
|
||||||
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
|
||||||
// console.log('solution.isImplementation():', solution.isImplementation());
|
|
||||||
// console.log('solution.getType():', solution.getType());
|
|
||||||
// console.log('solution.getVersion():', solution.getVersion());
|
|
||||||
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
|
||||||
// console.log('solution.getComponent():', solution.getComponent());
|
|
||||||
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
|
||||||
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
import { promisify } from "util";
|
|
||||||
import * as nodeSVNUltimate from "node-svn-ultimate";
|
|
||||||
// Promisify individual functions
|
|
||||||
const svnList = promisify(nodeSVNUltimate.commands.list);
|
|
||||||
const svnGetLatestTag = promisify(nodeSVNUltimate.util.getLatestTag);
|
|
||||||
const svnPropGet = promisify(nodeSVNUltimate.commands.propget);
|
|
||||||
export { svnList, svnGetLatestTag, svnPropGet };
|
|
||||||
//# sourceMappingURL=promises.js.map
|
|
||||||
@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"promises.js","sourceRoot":"","sources":["promises.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,MAAM,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAErD,iCAAiC;AACjC,MAAM,OAAO,GAAG,SAAS,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACzD,MAAM,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AACrE,MAAM,UAAU,GAAG,SAAS,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAE/D,OAAO,EACN,OAAO,EACP,eAAe,EACf,UAAU,GACV,CAAC"}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
export var Role;
|
|
||||||
(function (Role) {
|
|
||||||
Role["ADMIN"] = "admin";
|
|
||||||
Role["USER"] = "user";
|
|
||||||
})(Role || (Role = {}));
|
|
||||||
//# sourceMappingURL=types.js.map
|
|
||||||
@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAQA,MAAM,CAAN,IAAY,IAGX;AAHD,WAAY,IAAI;IACf,uBAAe,CAAA;IACf,qBAAa,CAAA;AACd,CAAC,EAHW,IAAI,KAAJ,IAAI,QAGf"}
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
export type SemVerIncrementType = "minor" | "major" | "patch";
|
|
||||||
|
|
||||||
export type User = {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
email: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export enum Role {
|
|
||||||
ADMIN = "admin",
|
|
||||||
USER = "user",
|
|
||||||
}
|
|
||||||
|
|
||||||
export type TypeSolutionImplementation = {
|
|
||||||
name: string;
|
|
||||||
functionalName: string;
|
|
||||||
customer: string;
|
|
||||||
customerCode: string;
|
|
||||||
path: string;
|
|
||||||
class: string;
|
|
||||||
url: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type ApiExternalsResponse = {
|
|
||||||
target: {
|
|
||||||
$: {
|
|
||||||
path: string;
|
|
||||||
};
|
|
||||||
property: {
|
|
||||||
_: string;
|
|
||||||
$: {
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@ -1,16 +1,20 @@
|
|||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
// Use IntelliSense to learn about possible attributes.
|
||||||
// Hover to view descriptions of existing attributes.
|
// Hover to view descriptions of existing attributes.
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"type": "node",
|
"type": "node",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "Launch Program",
|
"name": "Launch Program",
|
||||||
"skipFiles": ["<node_internals>/**"],
|
"skipFiles": [
|
||||||
"program": "${workspaceFolder}/dist/index.js",
|
"<node_internals>/**"
|
||||||
"outFiles": ["${workspaceFolder}/**/*.js"]
|
],
|
||||||
}
|
"program": "${workspaceFolder}/dist/index.js",
|
||||||
]
|
"outFiles": [
|
||||||
|
"${workspaceFolder}/**/*.js"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
||||||
"editor.formatOnSave": true
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
added 61 packages, removed 6 packages, and audited 284 packages in 9s
|
|
||||||
|
|
||||||
105 packages are looking for funding
|
|
||||||
run `npm fund` for details
|
|
||||||
|
|
||||||
2 moderate severity vulnerabilities
|
|
||||||
|
|
||||||
Some issues need review, and may require choosing
|
|
||||||
a different dependency.
|
|
||||||
|
|
||||||
Run `npm audit` for details.
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,37 +1,20 @@
|
|||||||
{
|
{
|
||||||
"name": "ts-anglo-helper",
|
"name": "chap1",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "",
|
"scripts": {
|
||||||
"license": "ISC",
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
"type": "module",
|
},
|
||||||
"scripts": {
|
"author": "",
|
||||||
"build": "tsc",
|
"license": "ISC",
|
||||||
"format": "prettier --write .",
|
"devDependencies": {
|
||||||
"prepare": "husky install"
|
"@types/node": "^20.2.3",
|
||||||
},
|
"@types/semver": "^7.5.0",
|
||||||
"devDependencies": {
|
"typescript": "^5.0.4"
|
||||||
"@types/node": "^20.2.3",
|
},
|
||||||
"@types/semver": "^7.5.0",
|
"dependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
"node-svn-ultimate": "^1.2.1",
|
||||||
"@typescript-eslint/parser": "^5.59.8",
|
"semver": "^7.5.1"
|
||||||
"eslint": "^8.2.0",
|
}
|
||||||
"eslint-config-airbnb-base": "^15.0.0",
|
|
||||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
||||||
"eslint-config-prettier": "^8.8.0",
|
|
||||||
"eslint-plugin-import": "^2.25.2",
|
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
|
||||||
"husky": "^8.0.3",
|
|
||||||
"lint-staged": "^13.2.2",
|
|
||||||
"prettier": "^2.8.8",
|
|
||||||
"typescript": "^5.1.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"node-svn-ultimate": "^1.2.1",
|
|
||||||
"semver": "^7.5.1"
|
|
||||||
},
|
|
||||||
"lint-staged": {
|
|
||||||
"*": "prettier --ignore-unknown --write"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,68 +1 @@
|
|||||||
# Anglo helper (CLI)
|
test
|
||||||
|
|
||||||
Anglo helper is a command line interface (CLI) that will assist with SVN switches and SVN updates of Anglo projects, detect missing projects, execute any general or component-level flyway scripts and validate the structure of Anglo specific projects.
|
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
- [Node.js](https://nodejs.org/dist/v16.17.0/node-v16.17.0-x64.msi) LTS 16.17.0 (including NPM 8.15.0).
|
|
||||||
- [Tortoise SVN](https://tortoisesvn.net/downloads.html) An SVN client for Windows.
|
|
||||||
|
|
||||||
## Installation steps
|
|
||||||
|
|
||||||
1. Start an elevated command prompt or any other terminal as administrator (i.e. git bash, windows terminal, powershell console).
|
|
||||||
2. Issue the following command `npm install anglo-helper@latest -g`. This will install Anglo helper as global module, which enables you to run it from any (workspace) folder.
|
|
||||||
3. Close the elevated command prompt and start a regular, non-elevated command prompt and navigate (change directory) to one of your **workspace** folders
|
|
||||||
4. Run `anglo-helper`. Since it is the first run, a number of questions will be asked in order to create a profile in <workspace>/profile_1.json. If applicable, use the same structure as suggested, for example when specifying the flyway folder: use forward slashes, including a trailing slash. You can always edit your profile (<workspace>/profile_1.json) in case something went wrong or something is missing.
|
|
||||||
|
|
||||||
## Command line options (anglo-helper --version)
|
|
||||||
|
|
||||||
<img src="https://raw.githubusercontent.com/guidohollander/anglo-helper/master/doc/help.png" alt="help" width="500"/>
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
- Run Anglo Helper with the default profile (profile_1.json). At first run, the default profile is created based on a questionaire.
|
|
||||||
|
|
||||||
$ `anglo-helper`
|
|
||||||
|
|
||||||
- Show all Anglo-helper command line options.
|
|
||||||
|
|
||||||
$ `anglo-helper --help`
|
|
||||||
|
|
||||||
- Change or copy your profile
|
|
||||||
|
|
||||||
$ `nano profile_1.json` or `notepad profile_1.json`
|
|
||||||
|
|
||||||
- Run Anglo Helper with an alternative profile (i.e., anglo-helper_profile_update.json)
|
|
||||||
|
|
||||||
$ `anglo-helper --profile profile_update.json`
|
|
||||||
|
|
||||||
- Select an svn version to upgrade or downgrade your current workspace to. Anglo-helper will automatically switch
|
|
||||||
|
|
||||||
$ `anglo-helper --select`
|
|
||||||
|
|
||||||
- Perform a deployment check, meaning that all externals should have been tagged
|
|
||||||
|
|
||||||
$ `anglo-helper --deploymentCheck`
|
|
||||||
|
|
||||||
- Override profile settings for to enable switch, update, flyway, verbose. Can be combined
|
|
||||||
|
|
||||||
$ `anglo-helper --update`
|
|
||||||
|
|
||||||
$ `anglo-helper --flyway --verbose`
|
|
||||||
etc.
|
|
||||||
|
|
||||||
- Force anglo-helper to perform actions on a subset of projects. Can be combined with other arguments
|
|
||||||
|
|
||||||
$ `anglo-helper --component 'Payout'
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2020 Hollander Consulting
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
@ -1,75 +1,75 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "MBS_ANGUILLA",
|
"name": "MBS_ANGUILLA",
|
||||||
"functionalName": "MBS Anguilla",
|
"functionalName": "MBS Anguilla",
|
||||||
"customer": "ANGUILLA",
|
"customer": "ANGUILLA",
|
||||||
"customerCode": "aia_mbs",
|
"customerCode": "aia_mbs",
|
||||||
"path": "D:\\repo\\mbs_anguilla_21\\",
|
"path": "D:\\repo\\mbs_anguilla_21\\",
|
||||||
"class": "MxS",
|
"class": "MxS",
|
||||||
"url": "https://svn.bearingpointcaribbean.com/svn/MBS_ANGUILLA/trunk"
|
"url": "https://svn.bearingpointcaribbean.com/svn/MBS_ANGUILLA/trunk"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "MTS_ANGUILLA",
|
"name": "MTS_ANGUILLA",
|
||||||
"functionalName": "MTS Anguilla",
|
"functionalName": "MTS Anguilla",
|
||||||
"customer": "ANGUILLA ",
|
"customer": "ANGUILLA",
|
||||||
"customerCode": "aia_mts",
|
"customerCode": "aia_mts",
|
||||||
"path": "D:\\repo\\mts_anguilla_21\\",
|
"path": "D:\\repo\\mts_anguilla_21\\",
|
||||||
"class": "MxS",
|
"class": "MxS",
|
||||||
"url": "https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/trunk"
|
"url": "https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/trunk"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ONLINE_ANGUILLA",
|
"name": "ONLINE_ANGUILLA",
|
||||||
"functionalName": "Online Anguilla",
|
"functionalName": "Online Anguilla",
|
||||||
"customer": "ANGUILLA",
|
"customer": "ANGUILLA",
|
||||||
"customerCode": "aia_online",
|
"customerCode": "aia_online",
|
||||||
"path": "D:\\repo\\online_anguilla\\",
|
"path": "D:\\repo\\online_anguilla\\",
|
||||||
"class": "ONLINE",
|
"class": "ONLINE",
|
||||||
"url": "https://svn.bearingpointcaribbean.com/svn/ONLINE_ANGUILLA/trunk"
|
"url": "https://svn.bearingpointcaribbean.com/svn/ONLINE_ANGUILLA/trunk"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "MTS_SKN",
|
"name": "MTS_SKN",
|
||||||
"functionalName": "MTS Saint Kitts and Nevis",
|
"functionalName": "MTS Saint Kitts and Nevis",
|
||||||
"customer": "SKN",
|
"customer": "SKN",
|
||||||
"customerCode": "skn_mts",
|
"customerCode": "skn_mts",
|
||||||
"path": "D:\\repo\\mts_skn\\",
|
"path": "D:\\repo\\mts_skn\\",
|
||||||
"class": "MxS",
|
"class": "MxS",
|
||||||
"url": "https://svn.bearingpointcaribbean.com/svn/MTS_SKN/trunk"
|
"url": "https://svn.bearingpointcaribbean.com/svn/MTS_SKN/trunk"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ONLINE_SKN",
|
"name": "ONLINE_SKN",
|
||||||
"functionalName": "Online Saint Kitts and Nevis",
|
"functionalName": "Online Saint Kitts and Nevis",
|
||||||
"customer": "SKN",
|
"customer": "SKN",
|
||||||
"customerCode": "skn_online",
|
"customerCode": "skn_online",
|
||||||
"path": "D:\\repo\\online_skn\\",
|
"path": "D:\\repo\\online_skn\\",
|
||||||
"class": "ONLINE",
|
"class": "ONLINE",
|
||||||
"url": "https://svn.bearingpointcaribbean.com/svn/ONLINE_SKN/trunk"
|
"url": "https://svn.bearingpointcaribbean.com/svn/ONLINE_SKN/trunk"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "BDSU_MTS",
|
"name": "BDSU_MTS",
|
||||||
"functionalName": "MTS Belastingdienst Suriname",
|
"functionalName": "MTS Belastingdienst Suriname",
|
||||||
"customer": "Belastingdienst Suriname",
|
"customer": "Belastingdienst Suriname",
|
||||||
"customerCode": "bdsu_mts",
|
"customerCode": "bdsu_mts",
|
||||||
"path": "D:\\repo\\mts_bdsu\\",
|
"path": "D:\\repo\\mts_bdsu\\",
|
||||||
"class": "MxS",
|
"class": "MxS",
|
||||||
"url": "https://svn.bearingpointcaribbean.com/svn/BDSU_MTS/trunk",
|
"url": "https://svn.bearingpointcaribbean.com/svn/BDSU_MTS/trunk",
|
||||||
"test": true
|
"test": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "MTS_GRENADA",
|
"name": "MTS_GRENADA",
|
||||||
"functionalName": "MTS Grenada",
|
"functionalName": "MTS Grenada",
|
||||||
"customer": "GRENADA",
|
"customer": "GRENADA",
|
||||||
"customerCode": "gd_mts",
|
"customerCode": "gd_mts",
|
||||||
"path": "D:\\repo\\mts_grenada\\",
|
"path": "D:\\repo\\mts_grenada\\",
|
||||||
"class": "MxS",
|
"class": "MxS",
|
||||||
"url": "https://svn.bearingpointcaribbean.com/svn/MTS_GRENADA/trunk"
|
"url": "https://svn.bearingpointcaribbean.com/svn/MTS_GRENADA/trunk"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ONLINE_GD",
|
"name": "ONLINE_GD",
|
||||||
"functionalName": "Online Grenada",
|
"functionalName": "Online Grenada",
|
||||||
"customer": "GRENADA",
|
"customer": "GRENADA",
|
||||||
"customerCode": "gd_online",
|
"customerCode": "gd_online",
|
||||||
"path": "D:\\repo\\online_gd\\",
|
"path": "D:\\repo\\online_gd\\",
|
||||||
"class": "ONLINE",
|
"class": "ONLINE",
|
||||||
"url": "https://svn.bearingpointcaribbean.com/svn/ONLINE_GD/trunk"
|
"url": "https://svn.bearingpointcaribbean.com/svn/ONLINE_GD/trunk"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -0,0 +1,209 @@
|
|||||||
|
import semver from 'semver';
|
||||||
|
import { SemVerIncrementType, ApiExternalsResponse } from './types';
|
||||||
|
import { svnList, svnGetLatestTag, svnPropGet } from './promises';
|
||||||
|
|
||||||
|
export class SolutionImplementation {
|
||||||
|
private url: string = '';
|
||||||
|
private baseURL: string = '';
|
||||||
|
private repository: string = '';
|
||||||
|
private repositoryURL: string = '';
|
||||||
|
private componentFolder: string | null = null;
|
||||||
|
private _isSolutionComponent: boolean = false;
|
||||||
|
private _isImplementation: boolean = false;
|
||||||
|
private implementationURL: string = ''
|
||||||
|
private type: string = '';
|
||||||
|
private version: string | null = null;
|
||||||
|
private nextVersion: string | null = null;
|
||||||
|
private previousVersion: string | null = null;
|
||||||
|
private component: string = '';
|
||||||
|
private externals: [];
|
||||||
|
|
||||||
|
constructor(url: string) {
|
||||||
|
this.parseUrl(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
private parseUrl(url: string): void {
|
||||||
|
|
||||||
|
this.url = url;
|
||||||
|
|
||||||
|
const regex = /^(https?:\/\/[^\/]+\/svn\/)/;
|
||||||
|
const match = url.match(regex);
|
||||||
|
|
||||||
|
if (match && match.length > 1) {
|
||||||
|
this.baseURL = match[1];
|
||||||
|
} else {
|
||||||
|
throw new Error('Invalid URL');
|
||||||
|
}
|
||||||
|
|
||||||
|
const segments = url.split('/');
|
||||||
|
const svnIndex = segments.indexOf('svn');
|
||||||
|
const trunkTagBranchIndex = segments.findIndex(
|
||||||
|
(segment, index) => index > svnIndex && (segment === 'trunk' || segment === 'tags' || segment === 'branches')
|
||||||
|
);
|
||||||
|
this._isSolutionComponent = (trunkTagBranchIndex - svnIndex > 2);
|
||||||
|
|
||||||
|
if (svnIndex !== -1 && svnIndex + 1 < segments.length) {
|
||||||
|
this.repository = segments[svnIndex + 1];
|
||||||
|
this.repositoryURL = `${this.baseURL}${this.repository}`;
|
||||||
|
|
||||||
|
if (trunkTagBranchIndex !== -1 && trunkTagBranchIndex - 1 > svnIndex) {
|
||||||
|
const nextSegment = segments[trunkTagBranchIndex - 1];
|
||||||
|
|
||||||
|
if (nextSegment !== 'trunk' && nextSegment !== 'tags' && nextSegment !== 'branches') {
|
||||||
|
if (this._isSolutionComponent) {
|
||||||
|
this.componentFolder = nextSegment;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (trunkTagBranchIndex !== -1 && trunkTagBranchIndex < segments.length) {
|
||||||
|
this.type = segments[trunkTagBranchIndex];
|
||||||
|
|
||||||
|
if (this.type === 'tags' || this.type === 'branches') {
|
||||||
|
if (trunkTagBranchIndex + 1 < segments.length) {
|
||||||
|
this.version = segments[trunkTagBranchIndex + 1];
|
||||||
|
if (trunkTagBranchIndex + 2 < segments.length) {
|
||||||
|
this.component = segments[trunkTagBranchIndex + 2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (trunkTagBranchIndex + 1 < segments.length) {
|
||||||
|
this.component = segments[trunkTagBranchIndex + 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this._isImplementation = (this.componentFolder === null && this.component === '');
|
||||||
|
this.implementationURL = segments.slice(0, trunkTagBranchIndex + ((this.version !== null) ? 2 : 1)).join('/');
|
||||||
|
|
||||||
|
if (this._isImplementation) {
|
||||||
|
const rawExternals = this.getExternals(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._isImplementation) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
throw new Error('Invalid URL');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getBaseURL(): string {
|
||||||
|
return this.baseURL;
|
||||||
|
}
|
||||||
|
|
||||||
|
getURL(): string {
|
||||||
|
return this.url;
|
||||||
|
}
|
||||||
|
|
||||||
|
getImplementationURL(): string {
|
||||||
|
return this.implementationURL
|
||||||
|
}
|
||||||
|
|
||||||
|
getRepository(): string {
|
||||||
|
return this.repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
getRepositoryURL(): string {
|
||||||
|
return this.repositoryURL;
|
||||||
|
}
|
||||||
|
|
||||||
|
getComponentFolder(): string | null {
|
||||||
|
return this.componentFolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
isSolutionComponent(): boolean {
|
||||||
|
return this._isSolutionComponent;
|
||||||
|
}
|
||||||
|
|
||||||
|
isImplementation(): boolean {
|
||||||
|
return this._isImplementation;
|
||||||
|
}
|
||||||
|
|
||||||
|
getType(): string {
|
||||||
|
return this.type;
|
||||||
|
}
|
||||||
|
|
||||||
|
getVersion(): string | null {
|
||||||
|
return this.version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async getNextVersion(semVerIncrementType: SemVerIncrementType): Promise<string | null> {
|
||||||
|
await this.getLatestTag()
|
||||||
|
.then((result) => {
|
||||||
|
if (semver.valid(semver.coerce(result))) {
|
||||||
|
const sv: string = <string>result;
|
||||||
|
this.nextVersion = semver.inc(sv, semVerIncrementType);
|
||||||
|
} else {
|
||||||
|
this.nextVersion = null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
// Handle error
|
||||||
|
});
|
||||||
|
return this.nextVersion;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public async getLatestTag(): Promise<string> {
|
||||||
|
try {
|
||||||
|
const lastTagOrBranch = await svnGetLatestTag(this.implementationURL);
|
||||||
|
return lastTagOrBranch.name;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error retrieving last tag or branch:', error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getTypeAndVersion(): string {
|
||||||
|
if (this.type === 'tags' || this.type === 'branches') {
|
||||||
|
return `${this.type}/${this.version}`;
|
||||||
|
} else {
|
||||||
|
return `${this.type}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getComponent(): string {
|
||||||
|
return this.component;
|
||||||
|
}
|
||||||
|
|
||||||
|
getComponentDecoded(): string {
|
||||||
|
return decodeURIComponent(this.component);
|
||||||
|
}
|
||||||
|
|
||||||
|
getExternalsRaw(): string {
|
||||||
|
return decodeURIComponent(this.component);
|
||||||
|
}
|
||||||
|
|
||||||
|
// getExternalsCollection(): externalsCollection {
|
||||||
|
// return decodeURIComponent(this.component);
|
||||||
|
// }
|
||||||
|
|
||||||
|
public async getExternals(): Promise<string> {
|
||||||
|
const svnOptions = { trustServerCert: true };
|
||||||
|
try {
|
||||||
|
const response: ApiExternalsResponse = await svnPropGet('svn:externals', this.url, svnOptions);
|
||||||
|
const rawExternals: string = response.target.property._
|
||||||
|
return rawExternals;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error retrieving last tag or branch:', error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Helper function to retrieve the last tag or branch
|
||||||
|
// async function getLastTagOrBranch(url: string): Promise<string> {
|
||||||
|
// try {
|
||||||
|
// const list = await svnListPromise(url);
|
||||||
|
// const sortedList = list.sort((a, b) => b.date.getTime() - a.date.getTime());
|
||||||
|
// const lastTagOrBranch = sortedList[0].name;
|
||||||
|
// return lastTagOrBranch;
|
||||||
|
// } catch (error) {
|
||||||
|
// throw error;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
import * as fs from 'fs';
|
||||||
|
import { ISolutionImplementation } from './types';
|
||||||
|
import { SolutionImplementation } from "./SolutionImplementation";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export class SolutionImplementationReader {
|
||||||
|
private solutionImplementations: ISolutionImplementation[];
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
const json = fs.readFileSync('solutions.json', 'utf-8');
|
||||||
|
this.solutionImplementations = JSON.parse(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
public readSolutionUrl(): void {
|
||||||
|
this.solutionImplementations.forEach((solutionImplementation: ISolutionImplementation) => {
|
||||||
|
let s = new SolutionImplementation(solutionImplementation.url);
|
||||||
|
console.log(JSON.stringify(s, null, 2));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1,33 +1,110 @@
|
|||||||
// import { spawn } from "child_process ";
|
import { SolutionImplementation } from "./SolutionImplementation";
|
||||||
|
import { SolutionImplementationReader } from "./SolutionImplementationReader";
|
||||||
// function spawnSample(command: string, args: string[]) {
|
|
||||||
// const execProcess = spawn(command, args);
|
// const trunkUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGLO/Business_Licence/trunk/DSC%20Business%20license';
|
||||||
// console.log('spawn');
|
// const tagUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGLO/Interim_Stabilization_Levy/tags/1.0.0/DSC%20Interim%20stabilization%20levy';
|
||||||
// console.log(execProcess.spawnfile);
|
// const branchUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/branches/1.5.0/SC%20Address%20-%20Specific';
|
||||||
// execProcess.on('spawn', () => {
|
// const trunkSolutionUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/trunk';
|
||||||
// console.log('spawn on spawn');
|
// const tagSolutionUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/tags/2.1.1.1';
|
||||||
// });
|
// const branchSolutionUrl = 'https://svn.bearingpointcaribbean.com/svn/MTS_ANGUILLA/branches/2.1.1';
|
||||||
// execProcess.stdout.on('data', (data) => {
|
|
||||||
// console.log(`spawn stdout: ${data}`);
|
async function showOutPut() {
|
||||||
// });
|
let solution = new SolutionImplementation(branchSolutionUrl);
|
||||||
// execProcess.stderr.on('data', (data) => {
|
console.log('solution.getURL():', solution.getURL());
|
||||||
// console.log(`spawn on error ${data}`);
|
console.log('solution.getBaseURL():', solution.getBaseURL());
|
||||||
// });
|
console.log('solution.getRepository():', solution.getRepository());
|
||||||
// execProcess.on('exit', (code, signal) => {
|
console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
||||||
// console.log(`spawn on exit code: ${code} signal: ${signal}`);
|
console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
||||||
// });
|
console.log('solution.isImplementation():', solution.isImplementation());
|
||||||
// execProcess.on('close', (code: number, args: any[])=> {
|
console.log('solution.getType():', solution.getType());
|
||||||
// console.log(`spawn on close code: ${code} args: ${args}`);
|
console.log('solution.getVersion():', solution.getVersion());
|
||||||
// });
|
console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
||||||
// }
|
console.log('solution.getComponent():', solution.getComponent());
|
||||||
// function start() {
|
console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
||||||
// spawnSample('powershell',['node', '-v']);
|
console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
||||||
// }
|
console.log('solution.getLatestTag:', await solution.getLatestTag());
|
||||||
// start();
|
console.log('solution.getNextVersion("minor"):', await solution.getNextVersion('minor'));
|
||||||
type Haha = true;
|
console.log('--');
|
||||||
console.log("Hello world!");
|
|
||||||
export const hello = "hi world";
|
|
||||||
|
|
||||||
async function test() {
|
|
||||||
await Promise.resolve("hi");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// showOutPut();
|
||||||
|
|
||||||
|
// Usage
|
||||||
|
const solutionImplementations = [];
|
||||||
|
const solutionImplementationReader = new SolutionImplementationReader();
|
||||||
|
solutionImplementations.push(solutionImplementationReader.readSolutionUrl();
|
||||||
|
|
||||||
|
// solution = new SolutionImplementation(tagUrl);
|
||||||
|
// console.log('solution.getURL():', solution.getURL());
|
||||||
|
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
||||||
|
// console.log('solution.getRepository():', solution.getRepository());
|
||||||
|
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
||||||
|
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
||||||
|
// console.log('solution.isImplementation():', solution.isImplementation());
|
||||||
|
// console.log('solution.getType():', solution.getType());
|
||||||
|
// console.log('solution.getVersion():', solution.getVersion());
|
||||||
|
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
||||||
|
// console.log('solution.getComponent():', solution.getComponent());
|
||||||
|
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
||||||
|
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
||||||
|
// console.log('--');
|
||||||
|
|
||||||
|
// solution = new SolutionImplementation(branchUrl);
|
||||||
|
// console.log('solution.getURL():', solution.getURL());
|
||||||
|
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
||||||
|
// console.log('solution.getRepository():', solution.getRepository());
|
||||||
|
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
||||||
|
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
||||||
|
// console.log('solution.isImplementation():', solution.isImplementation());
|
||||||
|
// console.log('solution.getType():', solution.getType());
|
||||||
|
// console.log('solution.getVersion():', solution.getVersion());
|
||||||
|
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
||||||
|
// console.log('solution.getComponent():', solution.getComponent());
|
||||||
|
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
||||||
|
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
||||||
|
// console.log('--');
|
||||||
|
|
||||||
|
// solution = new SolutionImplementation(trunkSolutionUrl);
|
||||||
|
// console.log('solution.getURL():', solution.getURL());
|
||||||
|
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
||||||
|
// console.log('solution.getRepository():', solution.getRepository());
|
||||||
|
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
||||||
|
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
||||||
|
// console.log('solution.isImplementation():', solution.isImplementation());
|
||||||
|
// console.log('solution.getType():', solution.getType());
|
||||||
|
// console.log('solution.getVersion():', solution.getVersion());
|
||||||
|
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
||||||
|
// console.log('solution.getComponent():', solution.getComponent());
|
||||||
|
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
||||||
|
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
||||||
|
// console.log('--');
|
||||||
|
|
||||||
|
// solution = new SolutionImplementation(tagSolutionUrl);
|
||||||
|
// console.log('solution.getURL():', solution.getURL());
|
||||||
|
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
||||||
|
// console.log('solution.getRepository():', solution.getRepository());
|
||||||
|
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
||||||
|
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
||||||
|
// console.log('solution.isImplementation():', solution.isImplementation());
|
||||||
|
// console.log('solution.getType():', solution.getType());
|
||||||
|
// console.log('solution.getVersion():', solution.getVersion());
|
||||||
|
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
||||||
|
// console.log('solution.getComponent():', solution.getComponent());
|
||||||
|
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
||||||
|
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
||||||
|
// console.log('--');
|
||||||
|
|
||||||
|
// solution = new SolutionImplementation(branchSolutionUrl);
|
||||||
|
// console.log('solution.getURL():', solution.getURL());
|
||||||
|
// console.log('solution.getBaseURL():', solution.getBaseURL());
|
||||||
|
// console.log('solution.getRepository():', solution.getRepository());
|
||||||
|
// console.log('solution.getComponentFolder():', solution.getComponentFolder());
|
||||||
|
// console.log('solution.isSolutionComponent():', solution.isSolutionComponent());
|
||||||
|
// console.log('solution.isImplementation():', solution.isImplementation());
|
||||||
|
// console.log('solution.getType():', solution.getType());
|
||||||
|
// console.log('solution.getVersion():', solution.getVersion());
|
||||||
|
// console.log('solution.getTypeAndVersion():', solution.getTypeAndVersion());
|
||||||
|
// console.log('solution.getComponent():', solution.getComponent());
|
||||||
|
// console.log('solution.getComponentDecoded():', solution.getComponentDecoded());
|
||||||
|
// console.log('solution.getImplementationURL():', solution.getImplementationURL());
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,13 @@
|
|||||||
import { promisify } from "util";
|
import { promisify } from 'util';
|
||||||
import * as nodeSVNUltimate from "node-svn-ultimate";
|
import * as nodeSVNUltimate from 'node-svn-ultimate';
|
||||||
|
|
||||||
// Promisify individual functions
|
// Promisify individual functions
|
||||||
const svnList = promisify(nodeSVNUltimate.commands.list);
|
const svnList = promisify(nodeSVNUltimate.commands.list);
|
||||||
const svnGetLatestTag = promisify(nodeSVNUltimate.util.getLatestTag);
|
const svnGetLatestTag = promisify(nodeSVNUltimate.util.getLatestTag);
|
||||||
const svnPropGet = promisify(nodeSVNUltimate.commands.propget);
|
const svnPropGet = promisify(nodeSVNUltimate.commands.propget);
|
||||||
|
|
||||||
export { svnList, svnGetLatestTag, svnPropGet };
|
export {
|
||||||
|
svnList,
|
||||||
|
svnGetLatestTag,
|
||||||
|
svnPropGet
|
||||||
|
};
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
export type SemVerIncrementType = 'minor' | 'major' | 'patch';
|
||||||
|
|
||||||
|
export interface User {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
email: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum Role {
|
||||||
|
ADMIN = 'admin',
|
||||||
|
USER = 'user',
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISolutionImplementation {
|
||||||
|
name: string;
|
||||||
|
functionalName: string;
|
||||||
|
customer: string;
|
||||||
|
customerCode: string;
|
||||||
|
path: string;
|
||||||
|
class: string;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ApiExternalsResponse {
|
||||||
|
target: {
|
||||||
|
$: {
|
||||||
|
path: string;
|
||||||
|
};
|
||||||
|
property: {
|
||||||
|
_: string;
|
||||||
|
$: {
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -1,5 +0,0 @@
|
|||||||
// tsconfig.eslint.json
|
|
||||||
{
|
|
||||||
"extends": "./tsconfig.json",
|
|
||||||
"include": ["./**/*.ts", "./**/*.js", "./.*.js"]
|
|
||||||
}
|
|
||||||
@ -1,109 +1,109 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
/* Visit https://aka.ms/tsconfig to read more about this file */
|
/* Visit https://aka.ms/tsconfig to read more about this file */
|
||||||
|
|
||||||
/* Projects */
|
/* Projects */
|
||||||
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
||||||
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
||||||
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
||||||
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
||||||
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
||||||
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
||||||
|
|
||||||
/* Language and Environment */
|
/* Language and Environment */
|
||||||
"target": "ES2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
||||||
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
||||||
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
||||||
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
||||||
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
||||||
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
||||||
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
||||||
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
||||||
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
||||||
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
||||||
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||||
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
||||||
|
|
||||||
/* Modules */
|
/* Modules */
|
||||||
"module": "ESNext" /* Specify what module code is generated. */,
|
"module": "commonjs", /* Specify what module code is generated. */
|
||||||
"rootDir": "src" /* Specify the root folder within your source files. */,
|
"rootDir": "src", /* Specify the root folder within your source files. */
|
||||||
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
|
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||||
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
||||||
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
||||||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
||||||
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
||||||
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
|
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
|
||||||
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
|
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
|
||||||
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
|
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
|
||||||
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
|
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
|
||||||
// "resolveJsonModule": true, /* Enable importing .json files. */
|
// "resolveJsonModule": true, /* Enable importing .json files. */
|
||||||
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
||||||
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
||||||
|
|
||||||
/* JavaScript Support */
|
/* JavaScript Support */
|
||||||
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
||||||
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
||||||
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
||||||
|
|
||||||
/* Emit */
|
/* Emit */
|
||||||
"declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
|
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
||||||
"declarationMap": true /* Create sourcemaps for d.ts files. */,
|
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
||||||
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
||||||
"sourceMap": true /* Create source map files for emitted JavaScript files. */,
|
"sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
||||||
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
||||||
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
||||||
"outDir": "dist" /* Specify an output folder for all emitted files. */,
|
"outDir": "dist", /* Specify an output folder for all emitted files. */
|
||||||
// "removeComments": true, /* Disable emitting comments. */
|
// "removeComments": true, /* Disable emitting comments. */
|
||||||
// "noEmit": true, /* Disable emitting files from a compilation. */
|
// "noEmit": true, /* Disable emitting files from a compilation. */
|
||||||
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
||||||
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
|
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
|
||||||
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
||||||
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
||||||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
||||||
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
||||||
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
||||||
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
||||||
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
||||||
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
||||||
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
||||||
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
||||||
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
||||||
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
||||||
|
|
||||||
/* Interop Constraints */
|
/* Interop Constraints */
|
||||||
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
||||||
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
|
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
|
||||||
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
||||||
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
|
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
||||||
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
||||||
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
||||||
|
|
||||||
/* Type Checking */
|
/* Type Checking */
|
||||||
"strict": true /* Enable all strict type-checking options. */,
|
"strict": true, /* Enable all strict type-checking options. */
|
||||||
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
||||||
"strictNullChecks": false /* When type checking, take into account 'null' and 'undefined'. */,
|
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
||||||
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
||||||
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
||||||
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
||||||
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
||||||
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
||||||
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
||||||
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
||||||
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
||||||
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
||||||
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
||||||
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
||||||
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
||||||
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||||
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
||||||
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
||||||
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
||||||
|
|
||||||
/* Completeness */
|
/* Completeness */
|
||||||
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
||||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
declare module "node-svn-ultimate";
|
|
||||||
Loading…
Reference in new issue