@gluhar/cli 2.0.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +46 -0
- package/src/GlobalOptions.d.ts +8 -0
- package/src/GlobalOptions.d.ts.map +1 -0
- package/src/GlobalOptions.js +2 -0
- package/src/commands/blank/BlankOptions.d.ts +4 -0
- package/src/commands/blank/BlankOptions.d.ts.map +1 -0
- package/src/commands/blank/BlankOptions.js +2 -0
- package/src/commands/blank/blank.d.ts +3 -0
- package/src/commands/blank/blank.d.ts.map +1 -0
- package/src/commands/blank/blank.js +8 -0
- package/src/commands/blank/index.d.ts +4 -0
- package/src/commands/blank/index.d.ts.map +1 -0
- package/src/commands/blank/index.js +9 -0
- package/src/commands/blank/log.d.ts +2 -0
- package/src/commands/blank/log.d.ts.map +1 -0
- package/src/commands/blank/log.js +5 -0
- package/src/commands/build/BuildOptions.d.ts +4 -0
- package/src/commands/build/BuildOptions.d.ts.map +1 -0
- package/src/commands/build/BuildOptions.js +2 -0
- package/src/commands/build/build.d.ts +3 -0
- package/src/commands/build/build.d.ts.map +1 -0
- package/src/commands/build/build.js +22 -0
- package/src/commands/build/index.d.ts +4 -0
- package/src/commands/build/index.d.ts.map +1 -0
- package/src/commands/build/index.js +9 -0
- package/src/commands/build/log.d.ts +2 -0
- package/src/commands/build/log.d.ts.map +1 -0
- package/src/commands/build/log.js +5 -0
- package/src/commands/danka/DankaOptions.d.ts +4 -0
- package/src/commands/danka/DankaOptions.d.ts.map +1 -0
- package/src/commands/danka/DankaOptions.js +2 -0
- package/src/commands/danka/danka.d.ts +3 -0
- package/src/commands/danka/danka.d.ts.map +1 -0
- package/src/commands/danka/danka.js +8 -0
- package/src/commands/danka/index.d.ts +4 -0
- package/src/commands/danka/index.d.ts.map +1 -0
- package/src/commands/danka/index.js +9 -0
- package/src/commands/danka/log.d.ts +2 -0
- package/src/commands/danka/log.d.ts.map +1 -0
- package/src/commands/danka/log.js +5 -0
- package/src/commands/deinstall/DeinstallOptions.d.ts +4 -0
- package/src/commands/deinstall/DeinstallOptions.d.ts.map +1 -0
- package/src/commands/deinstall/DeinstallOptions.js +2 -0
- package/src/commands/deinstall/deinstall.d.ts +3 -0
- package/src/commands/deinstall/deinstall.d.ts.map +1 -0
- package/src/commands/deinstall/deinstall.js +21 -0
- package/src/commands/deinstall/index.d.ts +4 -0
- package/src/commands/deinstall/index.d.ts.map +1 -0
- package/src/commands/deinstall/index.js +9 -0
- package/src/commands/deinstall/log.d.ts +2 -0
- package/src/commands/deinstall/log.d.ts.map +1 -0
- package/src/commands/deinstall/log.js +5 -0
- package/src/commands/deploy/DeployOptions.d.ts +4 -0
- package/src/commands/deploy/DeployOptions.d.ts.map +1 -0
- package/src/commands/deploy/DeployOptions.js +2 -0
- package/src/commands/deploy/deploy.d.ts +3 -0
- package/src/commands/deploy/deploy.d.ts.map +1 -0
- package/src/commands/deploy/deploy.js +23 -0
- package/src/commands/deploy/index.d.ts +4 -0
- package/src/commands/deploy/index.d.ts.map +1 -0
- package/src/commands/deploy/index.js +9 -0
- package/src/commands/deploy/log.d.ts +2 -0
- package/src/commands/deploy/log.d.ts.map +1 -0
- package/src/commands/deploy/log.js +5 -0
- package/src/commands/generate/GenerateOptions.d.ts +8 -0
- package/src/commands/generate/GenerateOptions.d.ts.map +1 -0
- package/src/commands/generate/GenerateOptions.js +4 -0
- package/src/commands/generate/generate.d.ts +3 -0
- package/src/commands/generate/generate.d.ts.map +1 -0
- package/src/commands/generate/generate.js +22 -0
- package/src/commands/generate/generateCommand.d.ts +2 -0
- package/src/commands/generate/generateCommand.d.ts.map +1 -0
- package/src/commands/generate/generateCommand.js +36 -0
- package/src/commands/generate/generateProject.d.ts +3 -0
- package/src/commands/generate/generateProject.d.ts.map +1 -0
- package/src/commands/generate/generateProject.js +82 -0
- package/src/commands/generate/index.d.ts +4 -0
- package/src/commands/generate/index.d.ts.map +1 -0
- package/src/commands/generate/index.js +13 -0
- package/src/commands/generate/log.d.ts +2 -0
- package/src/commands/generate/log.d.ts.map +1 -0
- package/src/commands/generate/log.js +5 -0
- package/src/commands/index.d.ts +3 -0
- package/src/commands/index.d.ts.map +1 -0
- package/src/commands/index.js +21 -0
- package/src/commands/kiss/KissOptions.d.ts +4 -0
- package/src/commands/kiss/KissOptions.d.ts.map +1 -0
- package/src/commands/kiss/KissOptions.js +2 -0
- package/src/commands/kiss/index.d.ts +4 -0
- package/src/commands/kiss/index.d.ts.map +1 -0
- package/src/commands/kiss/index.js +9 -0
- package/src/commands/kiss/kiss.d.ts +3 -0
- package/src/commands/kiss/kiss.d.ts.map +1 -0
- package/src/commands/kiss/kiss.js +8 -0
- package/src/commands/kiss/log.d.ts +2 -0
- package/src/commands/kiss/log.d.ts.map +1 -0
- package/src/commands/kiss/log.js +5 -0
- package/src/commands/reinstall/ReinstallOptions.d.ts +4 -0
- package/src/commands/reinstall/ReinstallOptions.d.ts.map +1 -0
- package/src/commands/reinstall/ReinstallOptions.js +2 -0
- package/src/commands/reinstall/index.d.ts +4 -0
- package/src/commands/reinstall/index.d.ts.map +1 -0
- package/src/commands/reinstall/index.js +9 -0
- package/src/commands/reinstall/log.d.ts +2 -0
- package/src/commands/reinstall/log.d.ts.map +1 -0
- package/src/commands/reinstall/log.js +5 -0
- package/src/commands/reinstall/reinstall.d.ts +3 -0
- package/src/commands/reinstall/reinstall.d.ts.map +1 -0
- package/src/commands/reinstall/reinstall.js +14 -0
- package/src/commands/release/ReleaseOptions.d.ts +9 -0
- package/src/commands/release/ReleaseOptions.d.ts.map +1 -0
- package/src/commands/release/ReleaseOptions.js +2 -0
- package/src/commands/release/index.d.ts +4 -0
- package/src/commands/release/index.d.ts.map +1 -0
- package/src/commands/release/index.js +22 -0
- package/src/commands/release/log.d.ts +2 -0
- package/src/commands/release/log.d.ts.map +1 -0
- package/src/commands/release/log.js +5 -0
- package/src/commands/release/publish.d.ts +3 -0
- package/src/commands/release/publish.d.ts.map +1 -0
- package/src/commands/release/publish.js +18 -0
- package/src/commands/release/release.d.ts +3 -0
- package/src/commands/release/release.d.ts.map +1 -0
- package/src/commands/release/release.js +21 -0
- package/src/commands/release/tag.d.ts +23 -0
- package/src/commands/release/tag.d.ts.map +1 -0
- package/src/commands/release/tag.js +90 -0
- package/src/commands/version/VersionOptions.d.ts +7 -0
- package/src/commands/version/VersionOptions.d.ts.map +1 -0
- package/src/commands/version/VersionOptions.js +2 -0
- package/src/commands/version/getPreid.d.ts +2 -0
- package/src/commands/version/getPreid.d.ts.map +1 -0
- package/src/commands/version/getPreid.js +10 -0
- package/src/commands/version/index.d.ts +4 -0
- package/src/commands/version/index.d.ts.map +1 -0
- package/src/commands/version/index.js +12 -0
- package/src/commands/version/log.d.ts +2 -0
- package/src/commands/version/log.d.ts.map +1 -0
- package/src/commands/version/log.js +5 -0
- package/src/commands/version/pimpChangelogs.d.ts +2 -0
- package/src/commands/version/pimpChangelogs.d.ts.map +1 -0
- package/src/commands/version/pimpChangelogs.js +37 -0
- package/src/commands/version/version.d.ts +3 -0
- package/src/commands/version/version.d.ts.map +1 -0
- package/src/commands/version/version.js +32 -0
- package/src/constants.d.ts +4 -0
- package/src/constants.d.ts.map +1 -0
- package/src/constants.js +7 -0
- package/src/index.d.ts +3 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +24 -0
- package/src/preAction.d.ts +3 -0
- package/src/preAction.d.ts.map +1 -0
- package/src/preAction.js +55 -0
- package/src/scripts/cmd/cd.d.ts +2 -0
- package/src/scripts/cmd/cd.d.ts.map +1 -0
- package/src/scripts/cmd/cd.js +15 -0
- package/src/scripts/cmd/executeBash.d.ts +10 -0
- package/src/scripts/cmd/executeBash.d.ts.map +1 -0
- package/src/scripts/cmd/executeBash.js +21 -0
- package/src/scripts/cmd/executeCmd.d.ts +9 -0
- package/src/scripts/cmd/executeCmd.d.ts.map +1 -0
- package/src/scripts/cmd/executeCmd.js +23 -0
- package/src/scripts/cmd/getBashOutput.d.ts +10 -0
- package/src/scripts/cmd/getBashOutput.d.ts.map +1 -0
- package/src/scripts/cmd/getBashOutput.js +19 -0
- package/src/scripts/cmd/getCmdOutput.d.ts +10 -0
- package/src/scripts/cmd/getCmdOutput.d.ts.map +1 -0
- package/src/scripts/cmd/getCmdOutput.js +26 -0
- package/src/scripts/cmd/index.d.ts +8 -0
- package/src/scripts/cmd/index.d.ts.map +1 -0
- package/src/scripts/cmd/index.js +25 -0
- package/src/scripts/cmd/log.d.ts +2 -0
- package/src/scripts/cmd/log.d.ts.map +1 -0
- package/src/scripts/cmd/log.js +5 -0
- package/src/scripts/cmd/parseArgs.d.ts +3 -0
- package/src/scripts/cmd/parseArgs.d.ts.map +1 -0
- package/src/scripts/cmd/parseArgs.js +41 -0
- package/src/scripts/cmd/parseBashArgs.d.ts +3 -0
- package/src/scripts/cmd/parseBashArgs.d.ts.map +1 -0
- package/src/scripts/cmd/parseBashArgs.js +16 -0
- package/src/scripts/cmd/types.d.ts +12 -0
- package/src/scripts/cmd/types.d.ts.map +1 -0
- package/src/scripts/cmd/types.js +2 -0
- package/src/scripts/filesystem/copyDir.d.ts +9 -0
- package/src/scripts/filesystem/copyDir.d.ts.map +1 -0
- package/src/scripts/filesystem/copyDir.js +26 -0
- package/src/scripts/filesystem/copyFiles.d.ts +11 -0
- package/src/scripts/filesystem/copyFiles.d.ts.map +1 -0
- package/src/scripts/filesystem/copyFiles.js +59 -0
- package/src/scripts/filesystem/findFile.d.ts +2 -0
- package/src/scripts/filesystem/findFile.d.ts.map +1 -0
- package/src/scripts/filesystem/findFile.js +24 -0
- package/src/scripts/filesystem/index.d.ts +10 -0
- package/src/scripts/filesystem/index.d.ts.map +1 -0
- package/src/scripts/filesystem/index.js +17 -0
- package/src/scripts/filesystem/loadJsonFile.d.ts +2 -0
- package/src/scripts/filesystem/loadJsonFile.d.ts.map +1 -0
- package/src/scripts/filesystem/loadJsonFile.js +18 -0
- package/src/scripts/filesystem/log.d.ts +2 -0
- package/src/scripts/filesystem/log.d.ts.map +1 -0
- package/src/scripts/filesystem/log.js +5 -0
- package/src/scripts/filesystem/readDirRecursive.d.ts +2 -0
- package/src/scripts/filesystem/readDirRecursive.d.ts.map +1 -0
- package/src/scripts/filesystem/readDirRecursive.js +16 -0
- package/src/scripts/git/branch/branchDelete.d.ts +6 -0
- package/src/scripts/git/branch/branchDelete.d.ts.map +1 -0
- package/src/scripts/git/branch/branchDelete.js +24 -0
- package/src/scripts/git/branch/branchExists.d.ts +5 -0
- package/src/scripts/git/branch/branchExists.d.ts.map +1 -0
- package/src/scripts/git/branch/branchExists.js +15 -0
- package/src/scripts/git/branch/checkout.d.ts +5 -0
- package/src/scripts/git/branch/checkout.d.ts.map +1 -0
- package/src/scripts/git/branch/checkout.js +15 -0
- package/src/scripts/git/branch/getCurrentBranch.d.ts +11 -0
- package/src/scripts/git/branch/getCurrentBranch.d.ts.map +1 -0
- package/src/scripts/git/branch/getCurrentBranch.js +28 -0
- package/src/scripts/git/commit.sh +1 -0
- package/src/scripts/git/getRepo.d.ts +2 -0
- package/src/scripts/git/getRepo.d.ts.map +1 -0
- package/src/scripts/git/getRepo.js +13 -0
- package/src/scripts/git/index.d.ts +28 -0
- package/src/scripts/git/index.d.ts.map +1 -0
- package/src/scripts/git/index.js +38 -0
- package/src/scripts/git/log.d.ts +2 -0
- package/src/scripts/git/log.d.ts.map +1 -0
- package/src/scripts/git/log.js +5 -0
- package/src/scripts/git/openPr.d.ts +2 -0
- package/src/scripts/git/openPr.d.ts.map +1 -0
- package/src/scripts/git/openPr.js +20 -0
- package/src/scripts/git/remoteStatus.d.ts +3 -0
- package/src/scripts/git/remoteStatus.d.ts.map +1 -0
- package/src/scripts/git/remoteStatus.js +22 -0
- package/src/scripts/git/tag/createTag.d.ts +18 -0
- package/src/scripts/git/tag/createTag.d.ts.map +1 -0
- package/src/scripts/git/tag/createTag.js +18 -0
- package/src/scripts/git/tag/deleteTag.d.ts +2 -0
- package/src/scripts/git/tag/deleteTag.d.ts.map +1 -0
- package/src/scripts/git/tag/deleteTag.js +13 -0
- package/src/scripts/git/tag/getTags.d.ts +2 -0
- package/src/scripts/git/tag/getTags.d.ts.map +1 -0
- package/src/scripts/git/tag/getTags.js +8 -0
- package/src/scripts/git/tag/pushAllTags.d.ts +2 -0
- package/src/scripts/git/tag/pushAllTags.d.ts.map +1 -0
- package/src/scripts/git/tag/pushAllTags.js +8 -0
- package/src/scripts/git/tag/renameTag.d.ts +2 -0
- package/src/scripts/git/tag/renameTag.d.ts.map +1 -0
- package/src/scripts/git/tag/renameTag.js +14 -0
- package/src/scripts/lerna/changed.d.ts +3 -0
- package/src/scripts/lerna/changed.d.ts.map +1 -0
- package/src/scripts/lerna/changed.js +13 -0
- package/src/scripts/lerna/constants.d.ts +5 -0
- package/src/scripts/lerna/constants.d.ts.map +1 -0
- package/src/scripts/lerna/constants.js +7 -0
- package/src/scripts/lerna/filterByDependency.d.ts +7 -0
- package/src/scripts/lerna/filterByDependency.d.ts.map +1 -0
- package/src/scripts/lerna/filterByDependency.js +18 -0
- package/src/scripts/lerna/getConfig.d.ts +3 -0
- package/src/scripts/lerna/getConfig.d.ts.map +1 -0
- package/src/scripts/lerna/getConfig.js +13 -0
- package/src/scripts/lerna/getDependencies.d.ts +9 -0
- package/src/scripts/lerna/getDependencies.d.ts.map +1 -0
- package/src/scripts/lerna/getDependencies.js +23 -0
- package/src/scripts/lerna/getDetails.d.ts +3 -0
- package/src/scripts/lerna/getDetails.d.ts.map +1 -0
- package/src/scripts/lerna/getDetails.js +38 -0
- package/src/scripts/lerna/index.d.ts +14 -0
- package/src/scripts/lerna/index.d.ts.map +1 -0
- package/src/scripts/lerna/index.js +19 -0
- package/src/scripts/lerna/list.sh +1 -0
- package/src/scripts/lerna/log.d.ts +2 -0
- package/src/scripts/lerna/log.d.ts.map +1 -0
- package/src/scripts/lerna/log.js +5 -0
- package/src/scripts/lerna/publish.sh +1 -0
- package/src/scripts/lerna/types.d.ts +62 -0
- package/src/scripts/lerna/types.d.ts.map +1 -0
- package/src/scripts/lerna/types.js +2 -0
- package/src/scripts/lerna/version.sh +2 -0
- package/src/utils/chalk.d.ts +4 -0
- package/src/utils/chalk.d.ts.map +1 -0
- package/src/utils/chalk.js +9 -0
- package/src/utils/common.d.ts +2 -0
- package/src/utils/common.d.ts.map +1 -0
- package/src/utils/common.js +5 -0
- package/src/utils/index.d.ts +4 -0
- package/src/utils/index.d.ts.map +1 -0
- package/src/utils/index.js +19 -0
- package/src/utils/inquirer.d.ts +5 -0
- package/src/utils/inquirer.d.ts.map +1 -0
- package/src/utils/inquirer.js +21 -0
- package/src/utils/logger.d.ts +9 -0
- package/src/utils/logger.d.ts.map +1 -0
- package/src/utils/logger.js +36 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.copyFiles = exports.updateFiles = exports.loadFiles = void 0;
|
|
4
|
+
const promises_1 = require("fs/promises");
|
|
5
|
+
const glob_1 = require("glob");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const fs_extra_1 = require("fs-extra");
|
|
8
|
+
const log_1 = require("./log");
|
|
9
|
+
const loadFiles = async (globs) => {
|
|
10
|
+
const { isText } = await import("istextorbinary");
|
|
11
|
+
log_1.log.verbose("Globs:", globs);
|
|
12
|
+
const filePaths = await (0, glob_1.glob)(globs, {
|
|
13
|
+
nodir: true,
|
|
14
|
+
dot: true,
|
|
15
|
+
nocase: true,
|
|
16
|
+
});
|
|
17
|
+
log_1.log.verbose("Loaded files:", filePaths.length);
|
|
18
|
+
const files = filePaths.map(async (path) => {
|
|
19
|
+
const encoding = isText(path) ? "utf-8" : "binary";
|
|
20
|
+
return {
|
|
21
|
+
...(0, path_1.parse)(path),
|
|
22
|
+
content: await (0, promises_1.readFile)(path, encoding),
|
|
23
|
+
encoding,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
return Promise.all(files);
|
|
27
|
+
};
|
|
28
|
+
exports.loadFiles = loadFiles;
|
|
29
|
+
const updateFiles = (files, update) => {
|
|
30
|
+
return files.map((original) => {
|
|
31
|
+
log_1.log.verbose("Updating file", original.dir, original.base);
|
|
32
|
+
const updated = update(original);
|
|
33
|
+
return {
|
|
34
|
+
...original,
|
|
35
|
+
...updated,
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
exports.updateFiles = updateFiles;
|
|
40
|
+
const getPath = (relative) => (0, path_1.resolve)(process.cwd(), relative);
|
|
41
|
+
const write = async (files) => {
|
|
42
|
+
const writes = files.map(async (file) => {
|
|
43
|
+
const dirPath = getPath(file.dir);
|
|
44
|
+
const dirExists = await (0, fs_extra_1.exists)(dirPath);
|
|
45
|
+
if (!dirExists) {
|
|
46
|
+
await (0, promises_1.mkdir)(dirPath, { recursive: true });
|
|
47
|
+
}
|
|
48
|
+
const filePath = getPath((0, path_1.format)(file));
|
|
49
|
+
log_1.log.verbose("Writing file", filePath);
|
|
50
|
+
await (0, promises_1.writeFile)(filePath, file.content, file.encoding);
|
|
51
|
+
});
|
|
52
|
+
await Promise.all(writes);
|
|
53
|
+
};
|
|
54
|
+
const copyFiles = async (globs, update) => {
|
|
55
|
+
const files = await (0, exports.loadFiles)(globs);
|
|
56
|
+
const updatedFiles = (0, exports.updateFiles)(files, update);
|
|
57
|
+
await write(updatedFiles);
|
|
58
|
+
};
|
|
59
|
+
exports.copyFiles = copyFiles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findFile.d.ts","sourceRoot":"","sources":["../../../../src/scripts/filesystem/findFile.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,QAAQ,aACT,MAAM,QACX,MAAM,KACV,MAAM,GAAG,IAGX,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findFile = void 0;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const log_1 = require("./log");
|
|
7
|
+
const searchFile = (fileName, dir) => {
|
|
8
|
+
const filePath = (0, path_1.join)(dir, fileName);
|
|
9
|
+
if ((0, fs_1.existsSync)(filePath)) {
|
|
10
|
+
log_1.log.verbose('Found file:', filePath);
|
|
11
|
+
return filePath;
|
|
12
|
+
}
|
|
13
|
+
const parent = (0, path_1.join)(dir, '..');
|
|
14
|
+
if (parent === dir || !(0, fs_1.existsSync)(parent)) {
|
|
15
|
+
log_1.log.verbose('File not found:', fileName);
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
return searchFile(fileName, parent);
|
|
19
|
+
};
|
|
20
|
+
const findFile = (fileName, dir = process.cwd()) => {
|
|
21
|
+
log_1.log.verbose('Looking for file:', fileName);
|
|
22
|
+
return searchFile(fileName, dir);
|
|
23
|
+
};
|
|
24
|
+
exports.findFile = findFile;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const filesystem: {
|
|
2
|
+
copyDir: (sourcePath: string, destinationPath: string, updateFile?: import("./copyFiles").FileInfoUpdate) => Promise<void>;
|
|
3
|
+
copyFiles: (globs: string[], update: import("./copyFiles").FileInfoUpdate) => Promise<void>;
|
|
4
|
+
loadFiles: (globs: string[]) => Promise<import("./copyFiles").FileInfo[]>;
|
|
5
|
+
updateFiles: (files: import("./copyFiles").FileInfo[], update: import("./copyFiles").FileInfoUpdate) => import("./copyFiles").FileInfo[];
|
|
6
|
+
readDirRecursive: (dirPath: string) => string[];
|
|
7
|
+
loadJsonFile: <T>(filePath: string) => T | null;
|
|
8
|
+
findFile: (fileName: string, dir?: string) => string | null;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scripts/filesystem/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;;;;;;;CAQtB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.filesystem = void 0;
|
|
4
|
+
const copyDir_1 = require("./copyDir");
|
|
5
|
+
const readDirRecursive_1 = require("./readDirRecursive");
|
|
6
|
+
const loadJsonFile_1 = require("./loadJsonFile");
|
|
7
|
+
const findFile_1 = require("./findFile");
|
|
8
|
+
const copyFiles_1 = require("./copyFiles");
|
|
9
|
+
exports.filesystem = {
|
|
10
|
+
copyDir: copyDir_1.copyDir,
|
|
11
|
+
copyFiles: copyFiles_1.copyFiles,
|
|
12
|
+
loadFiles: copyFiles_1.loadFiles,
|
|
13
|
+
updateFiles: copyFiles_1.updateFiles,
|
|
14
|
+
readDirRecursive: readDirRecursive_1.readDirRecursive,
|
|
15
|
+
loadJsonFile: loadJsonFile_1.loadJsonFile,
|
|
16
|
+
findFile: findFile_1.findFile,
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadJsonFile.d.ts","sourceRoot":"","sources":["../../../../src/scripts/filesystem/loadJsonFile.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,GAAI,CAAC,YAAY,MAAM,KAAG,CAAC,GAAG,IAatD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadJsonFile = void 0;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const log_1 = require("./log");
|
|
6
|
+
const loadJsonFile = (filePath) => {
|
|
7
|
+
log_1.log.verbose('Try to load JSON file:', filePath);
|
|
8
|
+
const invalidPath = !filePath || !(0, fs_1.existsSync)(filePath);
|
|
9
|
+
if (invalidPath) {
|
|
10
|
+
log_1.log.verbose('Invalid file path:', filePath);
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
const json = (0, fs_1.readFileSync)(filePath).toString();
|
|
14
|
+
const result = JSON.parse(json);
|
|
15
|
+
log_1.log.verbose('Successfully loaded JSON file:', filePath);
|
|
16
|
+
return result;
|
|
17
|
+
};
|
|
18
|
+
exports.loadJsonFile = loadJsonFile;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/scripts/filesystem/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirRecursive.d.ts","sourceRoot":"","sources":["../../../../src/scripts/filesystem/readDirRecursive.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,gBAAgB,YAAa,MAAM,KAAG,MAAM,EAC/B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirRecursive = void 0;
|
|
4
|
+
const fs_extra_1 = require("fs-extra");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const readDirStep = (absoluteDirPath, relativeDirPath) => (0, fs_extra_1.readdirSync)(absoluteDirPath).reduce((result, current) => {
|
|
7
|
+
const absPath = (0, path_1.resolve)(absoluteDirPath, current);
|
|
8
|
+
const relPath = (0, path_1.join)(relativeDirPath, current);
|
|
9
|
+
const isDirectory = (0, fs_extra_1.statSync)(absPath).isDirectory();
|
|
10
|
+
if (isDirectory) {
|
|
11
|
+
return [...result, ...readDirStep(absPath, relPath)];
|
|
12
|
+
}
|
|
13
|
+
return [...result, relPath];
|
|
14
|
+
}, []);
|
|
15
|
+
const readDirRecursive = (dirPath) => readDirStep(dirPath, '');
|
|
16
|
+
exports.readDirRecursive = readDirRecursive;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branchDelete.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/branch/branchDelete.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,YAAY,WACf,MAAM,YACL,mBAAmB,SAa7B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// BRANCH=${npm_config_branch};
|
|
3
|
+
// LOCAL=$(git branch --list $BRANCH);
|
|
4
|
+
// if [ $LOCAL ];
|
|
5
|
+
// then git branch -D $BRANCH; fi;
|
|
6
|
+
// REMOTE=$(git ls-remote --heads origin $BRANCH);
|
|
7
|
+
// if [ $REMOTE ];
|
|
8
|
+
// then git push origin -d $BRANCH; fi
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.branchDelete = void 0;
|
|
11
|
+
const cmd_1 = require("../../../scripts/cmd");
|
|
12
|
+
const log_1 = require("../log");
|
|
13
|
+
const branchDelete = (branch, options = {}) => {
|
|
14
|
+
const { local, remote } = options;
|
|
15
|
+
if (local) {
|
|
16
|
+
log_1.log.verbose('Delete local branch:', branch);
|
|
17
|
+
(0, cmd_1.executeCmd)(`git branch -D ${branch}`);
|
|
18
|
+
}
|
|
19
|
+
if (remote) {
|
|
20
|
+
log_1.log.verbose('Delete remote branch:', branch);
|
|
21
|
+
(0, cmd_1.executeCmd)(`git push origin -d ${branch}`);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.branchDelete = branchDelete;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branchExists.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/branch/branchExists.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,eAAgB,MAAM;;;CAU9C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.branchExists = void 0;
|
|
4
|
+
const cmd_1 = require("../../../scripts/cmd");
|
|
5
|
+
const log_1 = require("../log");
|
|
6
|
+
const branchExists = (branchName) => {
|
|
7
|
+
const local = !!(0, cmd_1.getCmdOutput)(`git branch --list ${branchName}`);
|
|
8
|
+
const remote = !!(0, cmd_1.getCmdOutput)(`git ls-remote --heads origin ${branchName}`);
|
|
9
|
+
log_1.log.verbose('branchExists:', { local, remote });
|
|
10
|
+
return {
|
|
11
|
+
local,
|
|
12
|
+
remote,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.branchExists = branchExists;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/branch/checkout.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,QAAQ,eAAgB,MAAM,QAAO,eAAe,qDAYhE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkout = void 0;
|
|
4
|
+
const cmd_1 = require("../../../scripts/cmd");
|
|
5
|
+
const checkout = (branchName, opt = {}) => {
|
|
6
|
+
const { newBranch = false } = opt;
|
|
7
|
+
const cmd = ['git checkout'];
|
|
8
|
+
if (newBranch) {
|
|
9
|
+
cmd.push('-b');
|
|
10
|
+
}
|
|
11
|
+
cmd.push(branchName);
|
|
12
|
+
const fullCmd = cmd.join(' ');
|
|
13
|
+
return (0, cmd_1.executeCmd)(fullCmd);
|
|
14
|
+
};
|
|
15
|
+
exports.checkout = checkout;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface BranchInfo {
|
|
2
|
+
fullName: string;
|
|
3
|
+
type?: 'dev' | 'prep' | 'release' | string;
|
|
4
|
+
name: string;
|
|
5
|
+
isDev: boolean;
|
|
6
|
+
isPrep: boolean;
|
|
7
|
+
isRelease: boolean;
|
|
8
|
+
isOther: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const getCurrentBranch: () => BranchInfo;
|
|
11
|
+
//# sourceMappingURL=getCurrentBranch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCurrentBranch.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/branch/getCurrentBranch.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,gBAAgB,QAAO,UAuBnC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCurrentBranch = void 0;
|
|
4
|
+
const cmd_1 = require("../../../scripts/cmd");
|
|
5
|
+
const log_1 = require("../log");
|
|
6
|
+
const getCurrentBranch = () => {
|
|
7
|
+
const fullName = (0, cmd_1.getCmdOutput)('git rev-parse --abbrev-ref HEAD');
|
|
8
|
+
let [type, name] = fullName.split('/');
|
|
9
|
+
if (!name) {
|
|
10
|
+
name = type;
|
|
11
|
+
type = undefined;
|
|
12
|
+
}
|
|
13
|
+
const isDev = type === 'dev';
|
|
14
|
+
const isPrep = type === 'prep';
|
|
15
|
+
const isRelease = type === 'release';
|
|
16
|
+
const isOther = !isDev && !isPrep && !isRelease;
|
|
17
|
+
log_1.log.verbose('Current branch:', fullName);
|
|
18
|
+
return {
|
|
19
|
+
fullName,
|
|
20
|
+
type,
|
|
21
|
+
name,
|
|
22
|
+
isDev,
|
|
23
|
+
isPrep,
|
|
24
|
+
isRelease,
|
|
25
|
+
isOther,
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
exports.getCurrentBranch = getCurrentBranch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
git add -A && git commit "$@"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRepo.d.ts","sourceRoot":"","sources":["../../../../src/scripts/git/getRepo.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,QAAO,MAQ1B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRepo = void 0;
|
|
4
|
+
const cmd_1 = require("../cmd");
|
|
5
|
+
const getRepo = () => {
|
|
6
|
+
const url = (0, cmd_1.getCmdOutput)("git remote get-url origin");
|
|
7
|
+
const urlParts = url.split("/");
|
|
8
|
+
// "dev-tools.git"
|
|
9
|
+
const lastPart = urlParts[urlParts.length - 1];
|
|
10
|
+
// "dev-tools"
|
|
11
|
+
return lastPart.split(".")[0];
|
|
12
|
+
};
|
|
13
|
+
exports.getRepo = getRepo;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Args } from "../cmd/types";
|
|
2
|
+
export declare const git: {
|
|
3
|
+
openPr: (sourceBranch: string, destinationBranch: string) => void;
|
|
4
|
+
getRepo: () => string;
|
|
5
|
+
remoteStatus: (branch?: string, upstream?: string) => import("./remoteStatus").RemoteStatus;
|
|
6
|
+
commit: (args: Args) => import("child_process").SpawnSyncReturns<Buffer>;
|
|
7
|
+
push: (branchOrTag: string, remote?: string) => import("child_process").SpawnSyncReturns<Buffer>;
|
|
8
|
+
pull: (branchName: string, remote?: string) => import("child_process").SpawnSyncReturns<Buffer>;
|
|
9
|
+
merge: (branchName: string, y?: boolean) => import("child_process").SpawnSyncReturns<Buffer>;
|
|
10
|
+
branch: {
|
|
11
|
+
exists: (branchName: string) => {
|
|
12
|
+
local: boolean;
|
|
13
|
+
remote: boolean;
|
|
14
|
+
};
|
|
15
|
+
delete: (branch: string, options?: import("./branch/branchDelete").BranchDeleteOptions) => void;
|
|
16
|
+
getCurrent: () => import("./branch/getCurrentBranch").BranchInfo;
|
|
17
|
+
checkout: (branchName: string, opt?: import("./branch/checkout").CheckoutOptions) => import("child_process").SpawnSyncReturns<Buffer>;
|
|
18
|
+
};
|
|
19
|
+
tag: {
|
|
20
|
+
getAll: () => string[];
|
|
21
|
+
create: (name: string, options?: import("./tag/createTag").TagCreateOptions) => void;
|
|
22
|
+
delete: (name: string) => void;
|
|
23
|
+
rename: (oldTagName: string, newTagName: string) => void;
|
|
24
|
+
pushAll: (remote?: string) => import("child_process").SpawnSyncReturns<Buffer>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type { BranchInfo } from "./branch/getCurrentBranch";
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scripts/git/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAOzC,eAAO,MAAM,GAAG;;;;mBAIC,IAAI;wBACC,MAAM;uBAEP,MAAM;wBAEL,MAAM,MAAM,OAAO;;;;;;;;;;;;;;;;;CAexC,CAAC;AAEF,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.git = void 0;
|
|
4
|
+
const cmd_1 = require("../../scripts/cmd");
|
|
5
|
+
const branchDelete_1 = require("./branch/branchDelete");
|
|
6
|
+
const openPr_1 = require("./openPr");
|
|
7
|
+
const remoteStatus_1 = require("./remoteStatus");
|
|
8
|
+
const getCurrentBranch_1 = require("./branch/getCurrentBranch");
|
|
9
|
+
const checkout_1 = require("./branch/checkout");
|
|
10
|
+
const branchExists_1 = require("./branch/branchExists");
|
|
11
|
+
const createTag_1 = require("./tag/createTag");
|
|
12
|
+
const getRepo_1 = require("./getRepo");
|
|
13
|
+
const getTags_1 = require("./tag/getTags");
|
|
14
|
+
const pushAllTags_1 = require("./tag/pushAllTags");
|
|
15
|
+
const deleteTag_1 = require("./tag/deleteTag");
|
|
16
|
+
const renameTag_1 = require("./tag/renameTag");
|
|
17
|
+
exports.git = {
|
|
18
|
+
openPr: openPr_1.openPr,
|
|
19
|
+
getRepo: getRepo_1.getRepo,
|
|
20
|
+
remoteStatus: remoteStatus_1.remoteStatus,
|
|
21
|
+
commit: (args) => (0, cmd_1.executeBash)(`git/commit`, args),
|
|
22
|
+
push: (branchOrTag, remote = "origin") => (0, cmd_1.executeCmd)(`git push ${remote} ${branchOrTag}`),
|
|
23
|
+
pull: (branchName, remote = "origin") => (0, cmd_1.executeCmd)(`git pull ${remote} ${branchName}`),
|
|
24
|
+
merge: (branchName, y) => (0, cmd_1.executeCmd)(`git merge ${branchName}${y ? " --no-edit" : ""}`),
|
|
25
|
+
branch: {
|
|
26
|
+
exists: branchExists_1.branchExists,
|
|
27
|
+
delete: branchDelete_1.branchDelete,
|
|
28
|
+
getCurrent: getCurrentBranch_1.getCurrentBranch,
|
|
29
|
+
checkout: checkout_1.checkout,
|
|
30
|
+
},
|
|
31
|
+
tag: {
|
|
32
|
+
getAll: getTags_1.getTags,
|
|
33
|
+
create: createTag_1.createTag,
|
|
34
|
+
delete: deleteTag_1.deleteTag,
|
|
35
|
+
rename: renameTag_1.renameTag,
|
|
36
|
+
pushAll: pushAllTags_1.pushAllTags,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/scripts/git/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openPr.d.ts","sourceRoot":"","sources":["../../../../src/scripts/git/openPr.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,iBAAkB,MAAM,qBAAqB,MAAM,SAgBrE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.openPr = void 0;
|
|
4
|
+
const log_1 = require("./log");
|
|
5
|
+
const getRepo_1 = require("./getRepo");
|
|
6
|
+
const openPr = (sourceBranch, destinationBranch) => {
|
|
7
|
+
const repo = (0, getRepo_1.getRepo)();
|
|
8
|
+
const link = [
|
|
9
|
+
"https://bitbucket.org/pezak/",
|
|
10
|
+
repo,
|
|
11
|
+
"/pull-requests/new?",
|
|
12
|
+
`source=${sourceBranch}`,
|
|
13
|
+
"&",
|
|
14
|
+
`dest=${destinationBranch}`,
|
|
15
|
+
].join("");
|
|
16
|
+
log_1.log.verbose("Open PR Link:", link);
|
|
17
|
+
log_1.log.error("Har: This command does not work for the moment.");
|
|
18
|
+
// shell.open(link);
|
|
19
|
+
};
|
|
20
|
+
exports.openPr = openPr;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remoteStatus.d.ts","sourceRoot":"","sources":["../../../../src/scripts/git/remoteStatus.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GACpB,YAAY,GACZ,cAAc,GACd,cAAc,GACd,UAAU,CAAC;AAEf,eAAO,MAAM,YAAY,0CAAsC,YAkB9D,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.remoteStatus = void 0;
|
|
4
|
+
const cmd_1 = require("../../scripts/cmd");
|
|
5
|
+
const log_1 = require("./log");
|
|
6
|
+
const remoteStatus = (branch = '@', upstream = '@{u}') => {
|
|
7
|
+
const local = (0, cmd_1.getCmdOutput)(`git rev-parse ${branch}`);
|
|
8
|
+
const remote = (0, cmd_1.getCmdOutput)(`git rev-parse ${upstream}`);
|
|
9
|
+
const base = (0, cmd_1.getCmdOutput)(`git merge-base ${branch} ${upstream}`);
|
|
10
|
+
log_1.log.verbose('remoteStatus:', { local, remote, base });
|
|
11
|
+
if (local === remote) {
|
|
12
|
+
return 'up-to-date';
|
|
13
|
+
}
|
|
14
|
+
if (local === base) {
|
|
15
|
+
return 'need-to-pull';
|
|
16
|
+
}
|
|
17
|
+
if (remote === base) {
|
|
18
|
+
return 'need-to-push';
|
|
19
|
+
}
|
|
20
|
+
return 'diverged';
|
|
21
|
+
};
|
|
22
|
+
exports.remoteStatus = remoteStatus;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface TagCreateOptions {
|
|
2
|
+
/**
|
|
3
|
+
* The object that the new tag will refer to, usually a commit.
|
|
4
|
+
* Defaults to HEAD.
|
|
5
|
+
*/
|
|
6
|
+
object?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Replace an existing tag with the given name (instead of failing)
|
|
9
|
+
*/
|
|
10
|
+
force?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Create a new annotated tag. Doesn't push it to the remote.
|
|
14
|
+
* @param name The name of the tag to create.
|
|
15
|
+
* @param object The object that the new tag will refer to, usually a commit. Defaults to HEAD.
|
|
16
|
+
*/
|
|
17
|
+
export declare const createTag: (name: string, options?: TagCreateOptions) => void;
|
|
18
|
+
//# sourceMappingURL=createTag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTag.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/tag/createTag.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,SAAU,MAAM,YAAW,gBAAgB,SAOhE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTag = void 0;
|
|
4
|
+
const cmd_1 = require("../../cmd");
|
|
5
|
+
/**
|
|
6
|
+
* Create a new annotated tag. Doesn't push it to the remote.
|
|
7
|
+
* @param name The name of the tag to create.
|
|
8
|
+
* @param object The object that the new tag will refer to, usually a commit. Defaults to HEAD.
|
|
9
|
+
*/
|
|
10
|
+
const createTag = (name, options = {}) => {
|
|
11
|
+
const { object = '', force } = options;
|
|
12
|
+
(0, cmd_1.executeCmd)(`git tag ${name} ${object}`, {
|
|
13
|
+
force,
|
|
14
|
+
annotate: true,
|
|
15
|
+
message: '',
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
exports.createTag = createTag;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteTag.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/tag/deleteTag.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,SAAU,MAAM,SAOrC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteTag = void 0;
|
|
4
|
+
const cmd_1 = require("../../../scripts/cmd");
|
|
5
|
+
const log_1 = require("../log");
|
|
6
|
+
const deleteTag = (name) => {
|
|
7
|
+
log_1.log.verbose('Deleting tag locally and from remote:', name);
|
|
8
|
+
(0, cmd_1.executeCmd)('git tag', {
|
|
9
|
+
d: name,
|
|
10
|
+
});
|
|
11
|
+
(0, cmd_1.executeCmd)(`git push origin :${name}`);
|
|
12
|
+
};
|
|
13
|
+
exports.deleteTag = deleteTag;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTags.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/tag/getTags.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,QAAO,MAAM,EAGR,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTags = void 0;
|
|
4
|
+
const cmd_1 = require("../../cmd");
|
|
5
|
+
const getTags = () => (0, cmd_1.getCmdOutput)('git tag', { list: true })
|
|
6
|
+
.split('\n')
|
|
7
|
+
.map((t) => t.trim());
|
|
8
|
+
exports.getTags = getTags;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pushAllTags.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/tag/pushAllTags.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,uEAGpB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pushAllTags = void 0;
|
|
4
|
+
const cmd_1 = require("../../../scripts/cmd");
|
|
5
|
+
const pushAllTags = (remote = 'origin') => (0, cmd_1.executeCmd)(`git push ${remote}`, {
|
|
6
|
+
tags: true,
|
|
7
|
+
});
|
|
8
|
+
exports.pushAllTags = pushAllTags;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renameTag.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/tag/renameTag.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,eAAgB,MAAM,cAAc,MAAM,SAO/D,CAAC"}
|