diff --git a/index.d.ts b/index.d.ts index f20d73a..97f3c46 100644 --- a/index.d.ts +++ b/index.d.ts @@ -30,12 +30,42 @@ export interface ConventionalPackageOptions { title?: string } +export declare function executeFetchAll(cwd?: string | undefined | null): boolean + +export declare function executeFetchAllTags(cwd?: string | undefined | null): boolean + +export declare function getAllFilesChangedSinceBranch(packageInfo: Array, branch: string, cwd?: string | undefined | null): Array + +export declare function getAllFilesChangedSinceSha(sha: string, cwd?: string | undefined | null): Array + +export declare function getAllFilesChangedSinceTagInfos(packageInfo: Array, tagInfo: Array, cwd?: string | undefined | null): Array + +export declare function getCommitsSince(cwd?: string | undefined | null, since?: string | undefined | null, relative?: string | undefined | null): Array + +export declare function getConventionalForPackage(packageInfo: PackageInfo, noFetchAll?: boolean | undefined | null, cwd?: string | undefined | null, conventionalOptions?: ConventionalPackageOptions | undefined | null): ConventionalPackage + +export declare function getCurrentSha(cwd?: string | undefined | null): string + export declare function getDefinedAgent(): string | null +export declare function getDivergedCommit(refer: string, cwd?: string | undefined | null): string | null + +export declare function getLastKnownPublishTagInfoForAllPackages(packageInfo: Array, cwd?: string | undefined | null): Array + +export declare function getLastKnownPublishTagInfoForPackage(packageInfo: PackageInfo, cwd?: string | undefined | null): PublishTagInfo | null + +export declare function getMonorepoChangedPackages(sha?: string | undefined | null): Array + export declare function getMonorepoPackages(): Array export declare function getProjectRootPath(): string | null +export declare function getRemoteOrLocalTags(cwd?: string | undefined | null, local?: boolean | undefined | null): Array + +export declare function gitPush(cwd?: string | undefined | null): boolean + +export declare function isWorkdirUnclean(cwd?: string | undefined | null): boolean + export interface PackageInfo { name: string private: boolean @@ -58,3 +88,7 @@ export interface RemoteTags { tag: string } +export declare function setCommit(message: string, body?: string | undefined | null, footer?: string | undefined | null, cwd?: string | undefined | null): boolean + +export declare function setTag(tag: string, message?: string | undefined | null, cwd?: string | undefined | null): boolean + diff --git a/index.js b/index.js index 1638dec..b04850b 100644 --- a/index.js +++ b/index.js @@ -362,6 +362,23 @@ if (!nativeBinding) { } module.exports.Agent = nativeBinding.Agent +module.exports.executeFetchAll = nativeBinding.executeFetchAll +module.exports.executeFetchAllTags = nativeBinding.executeFetchAllTags +module.exports.getAllFilesChangedSinceBranch = nativeBinding.getAllFilesChangedSinceBranch +module.exports.getAllFilesChangedSinceSha = nativeBinding.getAllFilesChangedSinceSha +module.exports.getAllFilesChangedSinceTagInfos = nativeBinding.getAllFilesChangedSinceTagInfos +module.exports.getCommitsSince = nativeBinding.getCommitsSince +module.exports.getConventionalForPackage = nativeBinding.getConventionalForPackage +module.exports.getCurrentSha = nativeBinding.getCurrentSha module.exports.getDefinedAgent = nativeBinding.getDefinedAgent +module.exports.getDivergedCommit = nativeBinding.getDivergedCommit +module.exports.getLastKnownPublishTagInfoForAllPackages = nativeBinding.getLastKnownPublishTagInfoForAllPackages +module.exports.getLastKnownPublishTagInfoForPackage = nativeBinding.getLastKnownPublishTagInfoForPackage +module.exports.getMonorepoChangedPackages = nativeBinding.getMonorepoChangedPackages module.exports.getMonorepoPackages = nativeBinding.getMonorepoPackages module.exports.getProjectRootPath = nativeBinding.getProjectRootPath +module.exports.getRemoteOrLocalTags = nativeBinding.getRemoteOrLocalTags +module.exports.gitPush = nativeBinding.gitPush +module.exports.isWorkdirUnclean = nativeBinding.isWorkdirUnclean +module.exports.setCommit = nativeBinding.setCommit +module.exports.setTag = nativeBinding.setTag diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index f4c8d5b..a22c956 100644 --- a/npm/darwin-arm64/package.json +++ b/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@websublime/workspace-tools-darwin-arm64", - "version": "0.4.0", + "version": "0.4.1", "cpu": [ "arm64" ], diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index bee91b9..d74b600 100644 --- a/npm/darwin-x64/package.json +++ b/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@websublime/workspace-tools-darwin-x64", - "version": "0.4.0", + "version": "0.4.1", "cpu": [ "x64" ], diff --git a/npm/linux-arm-gnueabihf/package.json b/npm/linux-arm-gnueabihf/package.json index 8643c3d..ed09dc5 100644 --- a/npm/linux-arm-gnueabihf/package.json +++ b/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@websublime/workspace-tools-linux-arm-gnueabihf", - "version": "0.4.0", + "version": "0.4.1", "cpu": [ "arm" ], diff --git a/npm/linux-arm64-gnu/package.json b/npm/linux-arm64-gnu/package.json index 8e4c55d..c0781a7 100644 --- a/npm/linux-arm64-gnu/package.json +++ b/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@websublime/workspace-tools-linux-arm64-gnu", - "version": "0.4.0", + "version": "0.4.1", "cpu": [ "arm64" ], diff --git a/npm/linux-arm64-musl/package.json b/npm/linux-arm64-musl/package.json index d62b102..7eedc58 100644 --- a/npm/linux-arm64-musl/package.json +++ b/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@websublime/workspace-tools-linux-arm64-musl", - "version": "0.4.0", + "version": "0.4.1", "cpu": [ "arm64" ], diff --git a/npm/linux-x64-gnu/package.json b/npm/linux-x64-gnu/package.json index b8f32fa..97604ec 100644 --- a/npm/linux-x64-gnu/package.json +++ b/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@websublime/workspace-tools-linux-x64-gnu", - "version": "0.4.0", + "version": "0.4.1", "cpu": [ "x64" ], diff --git a/npm/linux-x64-musl/package.json b/npm/linux-x64-musl/package.json index 4bc6193..e1b720c 100644 --- a/npm/linux-x64-musl/package.json +++ b/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@websublime/workspace-tools-linux-x64-musl", - "version": "0.4.0", + "version": "0.4.1", "cpu": [ "x64" ], diff --git a/npm/win32-arm64-msvc/package.json b/npm/win32-arm64-msvc/package.json index d88184b..6b142f2 100644 --- a/npm/win32-arm64-msvc/package.json +++ b/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@websublime/workspace-tools-win32-arm64-msvc", - "version": "0.4.0", + "version": "0.4.1", "cpu": [ "arm64" ], diff --git a/npm/win32-ia32-msvc/package.json b/npm/win32-ia32-msvc/package.json index 54b7bd0..6ec58ff 100644 --- a/npm/win32-ia32-msvc/package.json +++ b/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@websublime/workspace-tools-win32-ia32-msvc", - "version": "0.4.0", + "version": "0.4.1", "cpu": [ "ia32" ], diff --git a/npm/win32-x64-msvc/package.json b/npm/win32-x64-msvc/package.json index 1903cd5..690094d 100644 --- a/npm/win32-x64-msvc/package.json +++ b/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@websublime/workspace-tools-win32-x64-msvc", - "version": "0.4.0", + "version": "0.4.1", "cpu": [ "x64" ],