tnp-helpers 21.0.60 → 21.0.62
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/browser/fesm2022/tnp-helpers-browser.mjs +248 -120
- package/browser/fesm2022/tnp-helpers-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/tnp-helpers-browser.d.ts +22 -3
- package/browser-prod/fesm2022/tnp-helpers-browser-prod.mjs +248 -121
- package/browser-prod/fesm2022/tnp-helpers-browser-prod.mjs.map +1 -1
- package/browser-prod/package.json +1 -1
- package/browser-prod/types/tnp-helpers-browser-prod.d.ts +23 -4
- package/browser-prod.split-namespaces.json +14 -2
- package/lib/base/classes/base-global-command-line.d.ts +4 -0
- package/lib/base/classes/base-global-command-line.js +18 -6
- package/lib/base/classes/base-global-command-line.js.map +1 -1
- package/lib/base/classes/base-vscode.js +1 -1
- package/lib/base/classes/base-vscode.js.map +1 -1
- package/lib/base/core-project.d.ts +2 -2
- package/lib/base/tcp-udp-ports/not-assignable-port.entity.js +2 -2
- package/lib/base/tcp-udp-ports/ports.entity.d.ts +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/helpers/helpers.d.ts +1 -0
- package/lib/helpers/helpers.js +49 -0
- package/lib/helpers/helpers.js.map +1 -1
- package/lib/old/base-component.js +2 -2
- package/lib/old/base-formly-component.js +2 -2
- package/lib/old/dual-component-ctrl.js +2 -2
- package/lib/package.json +1 -1
- package/lib/utils.d.ts +17 -3
- package/lib/utils.js +148 -80
- package/lib/utils.js.map +1 -1
- package/lib-prod/base/classes/base-command-line-feature.js.map +1 -1
- package/lib-prod/base/classes/base-file-folders-operations.js.map +1 -1
- package/lib-prod/base/classes/base-git.js.map +1 -1
- package/lib-prod/base/classes/base-global-command-line.d.ts +4 -0
- package/lib-prod/base/classes/base-global-command-line.js +19 -7
- package/lib-prod/base/classes/base-global-command-line.js.map +1 -1
- package/lib-prod/base/classes/base-library-build.js.map +1 -1
- package/lib-prod/base/classes/base-linked-projects.js.map +1 -1
- package/lib-prod/base/classes/base-node-modules.js.map +1 -1
- package/lib-prod/base/classes/base-project.js.map +1 -1
- package/lib-prod/base/classes/base-quick-fixes.js.map +1 -1
- package/lib-prod/base/classes/base-release-process.js.map +1 -1
- package/lib-prod/base/classes/base-start-config.backend.js.map +1 -1
- package/lib-prod/base/classes/base-static-pages.js.map +1 -1
- package/lib-prod/base/classes/base-vscode.js +2 -2
- package/lib-prod/base/classes/base-vscode.js.map +1 -1
- package/lib-prod/base/commit-data.js.map +1 -1
- package/lib-prod/base/config-database.js.map +1 -1
- package/lib-prod/base/core-project.js.map +1 -1
- package/lib-prod/base/gh-temp-code.js.map +1 -1
- package/lib-prod/base/linked-project.js.map +1 -1
- package/lib-prod/base/tcp-udp-ports/not-assignable-port.entity.d.ts +1 -1
- package/lib-prod/base/tcp-udp-ports/not-assignable-port.entity.js +1 -1
- package/lib-prod/build-info._auto-generated_.d.ts +1 -1
- package/lib-prod/build-info._auto-generated_.js +1 -1
- package/lib-prod/helpers/helpers.d.ts +1 -0
- package/lib-prod/helpers/helpers.js +50 -2
- package/lib-prod/helpers/helpers.js.map +1 -1
- package/lib-prod/old/base-component.d.ts +1 -1
- package/lib-prod/old/base-component.js +1 -1
- package/lib-prod/old/base-formly-component.d.ts +1 -1
- package/lib-prod/old/base-formly-component.js +1 -1
- package/lib-prod/old/dual-component-ctrl.d.ts +1 -1
- package/lib-prod/old/dual-component-ctrl.js +1 -1
- package/lib-prod/old/helpers.js.map +1 -1
- package/lib-prod/package.json +1 -1
- package/lib-prod/utils.d.ts +17 -3
- package/lib-prod/utils.js +149 -81
- package/lib-prod/utils.js.map +1 -1
- package/lib-prod.split-namespaces.json +14 -2
- package/package.json +1 -1
- package/websql/fesm2022/tnp-helpers-websql.mjs +248 -120
- package/websql/fesm2022/tnp-helpers-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/tnp-helpers-websql.d.ts +22 -3
- package/websql-prod/fesm2022/tnp-helpers-websql-prod.mjs +248 -121
- package/websql-prod/fesm2022/tnp-helpers-websql-prod.mjs.map +1 -1
- package/websql-prod/package.json +1 -1
- package/websql-prod/types/tnp-helpers-websql-prod.d.ts +23 -4
- package/websql-prod.split-namespaces.json +14 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CoreModels, Utils, crossPlatformPath, UtilsFilesFoldersSync, _,
|
|
1
|
+
import { CoreModels, Utils, UtilsOs, Helpers, crossPlatformPath, UtilsFilesFoldersSync, _, UtilsTerminal, child_process, fse, path, config, dateformat, CLI, UtilsExecProc, BaselineSiteJoinprefix, chalk, folderName, fileName, GlobalTaskManager, UtilsNetwork, UtilsSudo, isElevated } from 'tnp-core/browser';
|
|
2
2
|
export { Helpers } from 'tnp-core/browser';
|
|
3
3
|
import { createSourceFile, ScriptTarget, isCallExpression, SyntaxKind, isImportDeclaration, isExportDeclaration, forEachChild, ScriptKind, getLeadingCommentRanges, getTrailingCommentRanges, isArrayLiteralExpression, isObjectLiteralExpression, DiagnosticCategory } from 'typescript';
|
|
4
4
|
import * as ini from 'ini';
|
|
@@ -590,6 +590,7 @@ var UtilsVSCode;
|
|
|
590
590
|
/* */
|
|
591
591
|
/* */
|
|
592
592
|
/* */
|
|
593
|
+
/* */
|
|
593
594
|
return (void 0);
|
|
594
595
|
};
|
|
595
596
|
//#endregion
|
|
@@ -666,130 +667,160 @@ var UtilsVSCode;
|
|
|
666
667
|
};
|
|
667
668
|
//#endregion
|
|
668
669
|
//#region get extensions
|
|
669
|
-
UtilsVSCode.
|
|
670
|
+
UtilsVSCode.commonRecommededExtensionsExtensions = () => {
|
|
671
|
+
return [
|
|
672
|
+
'taon-dev.taon',
|
|
673
|
+
'EditorConfig.EditorConfig',
|
|
674
|
+
'IBM.output-colorizer',
|
|
675
|
+
'Mikael.Angular-BeastCode',
|
|
676
|
+
// 'Angular.ng-template',
|
|
677
|
+
'sndst00m.vscode-native-svg-preview', // 'SimonSiefke.svg-preview',
|
|
678
|
+
'HansUXdev.bootstrap5-snippets', // 'Zaczero.bootstrap-v4-snippets', 'wcwhitehead.bootstrap-3-snippets', // very old
|
|
679
|
+
'alefragnani.Bookmarks',
|
|
680
|
+
'amodio.toggle-excluded-files',
|
|
681
|
+
'ctcuff.font-preview',
|
|
682
|
+
'dbaeumer.vscode-eslint',
|
|
683
|
+
'dnicolson.binary-plist',
|
|
684
|
+
'eamodio.gitlens', // very nice inline git blame
|
|
685
|
+
'esbenp.prettier-vscode',
|
|
686
|
+
'johnpapa.Angular2',
|
|
687
|
+
'marclipovsky.string-manipulation',
|
|
688
|
+
'ms-azuretools.vscode-docker',
|
|
689
|
+
'thebearingedge.vscode-sql-lit', // SQL templates extensions
|
|
690
|
+
'keyshout.sqlite-db-viewer', // free version of qwtel.sqlite-viewer - no writes
|
|
691
|
+
'christian-kohler.path-intellisense', // asset pathes autocomplete
|
|
692
|
+
'redhat.vscode-xml',
|
|
693
|
+
'rogalmic.bash-debug',
|
|
694
|
+
'Gruntfuggly.todo-tree',
|
|
695
|
+
'saber2pr.file-git-history',
|
|
696
|
+
'unifiedjs.vscode-mdx',
|
|
697
|
+
'Malo.copy-json-path',
|
|
698
|
+
'aaron-bond.better-comments',
|
|
699
|
+
'mikestead.dotenv',
|
|
700
|
+
'humao.rest-client',
|
|
701
|
+
'hediet.vscode-drawio',
|
|
702
|
+
'tomoki1207.pdf',
|
|
703
|
+
'streetsidesoftware.code-spell-checker',
|
|
704
|
+
'Tyriar.sort-lines',
|
|
705
|
+
'DavidAnson.vscode-markdownlint',
|
|
706
|
+
'wmaurer.change-case',
|
|
707
|
+
'earshinov.permute-lines',
|
|
708
|
+
// 'mechatroner.rainbow-csv',
|
|
709
|
+
// 'wenfangdu.snippet-generator', snippet generator
|
|
710
|
+
//#region to check
|
|
711
|
+
// 'abumalick.vscode-nvm', // test this before
|
|
712
|
+
// , // there is prettiers
|
|
713
|
+
// 'alexdima.copy-relative-path', // already in taon
|
|
714
|
+
// 'alexiv.vscode-angular2-files', // taon generator is better
|
|
715
|
+
// , // no needed anymore (embeded in taon)
|
|
716
|
+
// 'eg2.tslint',
|
|
717
|
+
// 'henry-li.vscode-import-formatter', not neede - eslint does it
|
|
718
|
+
// 'jack89ita.copy-filename', // in taon
|
|
719
|
+
// 'momoko8443.library-version',
|
|
720
|
+
// 'oven.bun-vscode', // errors in vscode cosole
|
|
721
|
+
// 'qwtel.sqlite-viewer', // 80$ not free
|
|
722
|
+
// , already in taon
|
|
723
|
+
// 'taddison.gitlazy',
|
|
724
|
+
// 'vespa-dev-works.jestrunit',
|
|
725
|
+
// 'wmaurer.vscode-jumpy', // nice but I am not using it
|
|
726
|
+
// 'usernamehw.errorlens', nice extension.. but to much input at once
|
|
727
|
+
// 'pranaygp.vscode-css-peek', // high cpu usage
|
|
728
|
+
// 'bengreenier.vscode-node-readme',
|
|
729
|
+
// 'kisstkondoros.vscode-codemetrics', // TOO MUCH CPU USAGE
|
|
730
|
+
// 'vscode-icons-team.vscode-icons',
|
|
731
|
+
// TODO nesting is so nice.. but I nee to modify it for taon
|
|
732
|
+
// 'antfu.file-nesting',
|
|
733
|
+
// 'frigus02.vscode-sql-tagged-template-literals', TODO CHECK
|
|
734
|
+
// 'frigus02.vscode-sql-tagged-template-literals-syntax-only', TODO CHECK
|
|
735
|
+
// -------
|
|
736
|
+
// 'mihelcic.colored-regions', TODO I need modified version for taon
|
|
737
|
+
// 'shardulm94.trailing-spaces',
|
|
738
|
+
// 'bierner.color-info', // nice to have color info in css/scss files
|
|
739
|
+
// ---
|
|
740
|
+
// 'skacekachna.win-opacity',
|
|
741
|
+
// 'electrotype.windows-explorer-context-menu',
|
|
742
|
+
// escape win path on paset TODO CHECK THIS
|
|
743
|
+
// 'coalaura.win-path',
|
|
744
|
+
// nice extension but not use for now in taon
|
|
745
|
+
// csv thing
|
|
746
|
+
//
|
|
747
|
+
//#endregion
|
|
748
|
+
];
|
|
749
|
+
};
|
|
750
|
+
UtilsVSCode.codiumExtensions = () => {
|
|
751
|
+
return [
|
|
752
|
+
'Alexanderius.language-hosts',
|
|
753
|
+
...UtilsVSCode.commonRecommededExtensionsExtensions(),
|
|
754
|
+
];
|
|
755
|
+
};
|
|
756
|
+
UtilsVSCode.codeExtensions = () => {
|
|
757
|
+
// wenfangdu.faster-new new file folder for codium
|
|
670
758
|
return Utils.uniqArray([
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
/* */
|
|
687
|
-
/* */
|
|
688
|
-
/* */
|
|
689
|
-
/* */
|
|
690
|
-
/* */
|
|
691
|
-
/* */
|
|
692
|
-
/* */
|
|
693
|
-
/* */
|
|
694
|
-
/* */
|
|
695
|
-
/* */
|
|
696
|
-
/* */
|
|
697
|
-
/* */
|
|
698
|
-
/* */
|
|
699
|
-
/* */
|
|
700
|
-
/* */
|
|
701
|
-
/* */
|
|
702
|
-
/* */
|
|
703
|
-
/* */
|
|
704
|
-
/* */
|
|
705
|
-
/* */
|
|
706
|
-
/* */
|
|
707
|
-
/* */
|
|
708
|
-
/* */
|
|
709
|
-
/* */
|
|
710
|
-
/* */
|
|
711
|
-
/* */
|
|
712
|
-
/* */
|
|
713
|
-
/* */
|
|
714
|
-
/* */
|
|
715
|
-
/* */
|
|
716
|
-
/* */
|
|
717
|
-
/* */
|
|
718
|
-
/* */
|
|
719
|
-
/* */
|
|
720
|
-
/* */
|
|
721
|
-
/* */
|
|
722
|
-
/* */
|
|
723
|
-
/* */
|
|
724
|
-
/* */
|
|
725
|
-
/* */
|
|
726
|
-
/* */
|
|
727
|
-
/* */
|
|
728
|
-
/* */
|
|
729
|
-
/* */
|
|
730
|
-
/* */
|
|
731
|
-
/* */
|
|
732
|
-
/* */
|
|
733
|
-
/* */
|
|
734
|
-
/* */
|
|
735
|
-
/* */
|
|
736
|
-
/* */
|
|
737
|
-
/* */
|
|
738
|
-
/* */
|
|
739
|
-
/* */
|
|
740
|
-
/* */
|
|
741
|
-
/* */
|
|
742
|
-
/* */
|
|
743
|
-
/* */
|
|
744
|
-
/* */
|
|
745
|
-
/* */
|
|
746
|
-
/* */
|
|
747
|
-
/* */
|
|
748
|
-
/* */
|
|
749
|
-
/* */
|
|
750
|
-
/* */
|
|
751
|
-
/* */
|
|
752
|
-
/* */
|
|
753
|
-
/* */
|
|
754
|
-
/* */
|
|
755
|
-
/* */
|
|
756
|
-
/* */
|
|
757
|
-
/* */
|
|
758
|
-
/* */
|
|
759
|
-
/* */
|
|
760
|
-
/* */
|
|
761
|
-
/* */
|
|
762
|
-
/* */
|
|
763
|
-
/* */
|
|
764
|
-
/* */
|
|
765
|
-
/* */
|
|
766
|
-
/* */
|
|
767
|
-
/* */
|
|
768
|
-
/* */
|
|
769
|
-
/* */
|
|
770
|
-
/* */
|
|
771
|
-
/* */
|
|
772
|
-
/* */
|
|
773
|
-
/* */
|
|
774
|
-
/* */
|
|
775
|
-
/* */
|
|
776
|
-
/* */
|
|
777
|
-
/* */
|
|
778
|
-
/* */
|
|
779
|
-
/* */
|
|
780
|
-
/* */
|
|
781
|
-
/* */
|
|
782
|
-
/* */
|
|
759
|
+
...UtilsVSCode.commonRecommededExtensionsExtensions(),
|
|
760
|
+
'tommasov.hosts',
|
|
761
|
+
/* */
|
|
762
|
+
/* */
|
|
763
|
+
/* */
|
|
764
|
+
/* */
|
|
765
|
+
/* */
|
|
766
|
+
/* */
|
|
767
|
+
/* */
|
|
768
|
+
/* */
|
|
769
|
+
/* */
|
|
770
|
+
/* */
|
|
771
|
+
/* */
|
|
772
|
+
/* */
|
|
773
|
+
/* */
|
|
783
774
|
]).map(c => c.toLowerCase());
|
|
784
775
|
};
|
|
785
776
|
//#endregion
|
|
777
|
+
UtilsVSCode.vscodeExtensions = (editor) => {
|
|
778
|
+
editor = editor ? editor : UtilsOs.detectEditor();
|
|
779
|
+
if (editor === 'code') {
|
|
780
|
+
return UtilsVSCode.codeExtensions();
|
|
781
|
+
}
|
|
782
|
+
return UtilsVSCode.codiumExtensions();
|
|
783
|
+
};
|
|
786
784
|
//#region get deprecated extensions
|
|
787
|
-
UtilsVSCode.getDeprecatedExtension = () => {
|
|
785
|
+
UtilsVSCode.getDeprecatedExtension = (editor) => {
|
|
788
786
|
return [
|
|
789
|
-
'
|
|
790
|
-
'
|
|
791
|
-
'
|
|
792
|
-
'
|
|
787
|
+
'bibhasdn.unique-lines',
|
|
788
|
+
'ms-vscode-remote.remote-ssh',
|
|
789
|
+
'scrapecrow.html-escape',
|
|
790
|
+
'marinhobrandao.angular2tests', // snipperts for test
|
|
791
|
+
'cg-cnu.vscode-path-tools',
|
|
792
|
+
'chrisdias.vscode-opennewinstance',
|
|
793
|
+
'aeschli.vscode-css-formatter',
|
|
794
|
+
'rssowl.copy-relative-path-posix',
|
|
795
|
+
'ms-vscode-remote.remote-containers',
|
|
796
|
+
'ms-azuretools.vscode-docker',
|
|
797
|
+
'waderyan.gitblame',
|
|
798
|
+
'ryu1kn.partial-diff',
|
|
799
|
+
'nidu.copy-json-path',
|
|
800
|
+
'xabikos.javascriptsnippets',
|
|
801
|
+
'firsttris.vscode-jest-runner', // better for jest TODO include this for TAON
|
|
802
|
+
'franklinteixeira205.primeflex',
|
|
803
|
+
'stepanog.angular1-inline',
|
|
804
|
+
'shakram02.bash-beautify',
|
|
805
|
+
'ryanlaws.toggle-case',
|
|
806
|
+
'ritwickdey.create-file-folder',
|
|
807
|
+
'ms-vscode-remote.remote-wsl',
|
|
808
|
+
'kgrzywocz.wsl-path',
|
|
809
|
+
'imgildev.vscode-angular-generator',
|
|
810
|
+
'nemesv.copy-file-name',
|
|
811
|
+
'natqe.reload', // in taon
|
|
812
|
+
'ms-vscode.live-server', // not needed
|
|
813
|
+
'msjsdiag.debugger-for-chrome', // old
|
|
814
|
+
'mikebovenlander.formate', // prettier
|
|
815
|
+
'mrmlnc.vscode-json5', // prettier
|
|
816
|
+
'jack89ita.copy-filename', // in taon
|
|
817
|
+
'eg2.tslint', // old
|
|
818
|
+
'rssowl.copy-relative-path-posix', // in taon
|
|
819
|
+
'alexdima.copy-relative-path', // in taon
|
|
820
|
+
'ivangabriele.vscode-git-add-and-commit', // in taon
|
|
821
|
+
'alexiv.vscode-angular2-files', // in taon
|
|
822
|
+
'taddison.gitlazy', // in taon
|
|
823
|
+
'xabikos.JavaScriptSnippets', // old
|
|
793
824
|
];
|
|
794
825
|
};
|
|
795
826
|
//#endregion
|
|
@@ -806,6 +837,33 @@ var UtilsVSCode;
|
|
|
806
837
|
};
|
|
807
838
|
//#endregion
|
|
808
839
|
//#region install extensions
|
|
840
|
+
UtilsVSCode.removeDeprecated = async (options) => {
|
|
841
|
+
options = options || {};
|
|
842
|
+
options.editor = UtilsOs.detectEditor();
|
|
843
|
+
const deprecated = UtilsVSCode.getDeprecatedExtension(options.editor);
|
|
844
|
+
// console.log({ deprecated });
|
|
845
|
+
// HelpersTaon.pressKeyOrWait('Press any key to continue...');
|
|
846
|
+
for (let index = 0; index < deprecated.length; index++) {
|
|
847
|
+
const extname = deprecated[index];
|
|
848
|
+
try {
|
|
849
|
+
Helpers.taskStarted(`Uninstalling: ${extname}`);
|
|
850
|
+
Helpers.run(`${options.editor} --uninstall-extension ${extname}`).sync();
|
|
851
|
+
Helpers.taskDone(`Removed ${extname} done.`);
|
|
852
|
+
await Utils.wait(1);
|
|
853
|
+
}
|
|
854
|
+
catch (error) {
|
|
855
|
+
// console.error(error);
|
|
856
|
+
Helpers.warn(`Not able to uninstall ${extname}`);
|
|
857
|
+
// await UtilsTerminal.pressAnyKeyToContinueAsync({
|
|
858
|
+
// message: 'Press any key to continue...',
|
|
859
|
+
// });
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
};
|
|
863
|
+
UtilsVSCode.installAndRemoveDeprecatedExtensions = async (options) => {
|
|
864
|
+
await UtilsVSCode.installExtensions(options);
|
|
865
|
+
await UtilsVSCode.removeDeprecated(options);
|
|
866
|
+
};
|
|
809
867
|
UtilsVSCode.installExtensions = async (options) => {
|
|
810
868
|
/* */
|
|
811
869
|
/* */
|
|
@@ -867,10 +925,14 @@ var UtilsVSCode;
|
|
|
867
925
|
/* */
|
|
868
926
|
/* */
|
|
869
927
|
/* */
|
|
928
|
+
/* */
|
|
870
929
|
return (void 0);
|
|
871
930
|
};
|
|
872
931
|
//#endregion
|
|
873
932
|
//#region installed extensions
|
|
933
|
+
/**
|
|
934
|
+
* @deprecated
|
|
935
|
+
*/
|
|
874
936
|
UtilsVSCode.installedExtensions = () => {
|
|
875
937
|
/* */
|
|
876
938
|
/* */
|
|
@@ -6976,6 +7038,23 @@ ${cwd}
|
|
|
6976
7038
|
}
|
|
6977
7039
|
catch (error) { }
|
|
6978
7040
|
};
|
|
7041
|
+
function extractGithubOwner(repoUrl) {
|
|
7042
|
+
if (!repoUrl)
|
|
7043
|
+
return null;
|
|
7044
|
+
repoUrl = repoUrl.trim();
|
|
7045
|
+
// SSH format: git@github.com:owner/repo.git
|
|
7046
|
+
const sshMatch = repoUrl.match(/^git@github\.com:(.+?)\/(.+?)(\.git)?$/);
|
|
7047
|
+
if (sshMatch) {
|
|
7048
|
+
return sshMatch[1];
|
|
7049
|
+
}
|
|
7050
|
+
// HTTPS format: https://github.com/owner/repo(.git)
|
|
7051
|
+
const httpsMatch = repoUrl.match(/^https?:\/\/github\.com\/(.+?)\/(.+?)(\.git)?$/);
|
|
7052
|
+
if (httpsMatch) {
|
|
7053
|
+
return httpsMatch[1];
|
|
7054
|
+
}
|
|
7055
|
+
return null;
|
|
7056
|
+
}
|
|
7057
|
+
git.extractGithubOwner = extractGithubOwner;
|
|
6979
7058
|
git.getRemoteProvider = (cwd) => {
|
|
6980
7059
|
/* */
|
|
6981
7060
|
/* */
|
|
@@ -7100,10 +7179,16 @@ ${cwd}
|
|
|
7100
7179
|
skip: {
|
|
7101
7180
|
name: 'Skip cloning this repository',
|
|
7102
7181
|
},
|
|
7182
|
+
create: {
|
|
7183
|
+
name: 'Create repository',
|
|
7184
|
+
},
|
|
7103
7185
|
exit: {
|
|
7104
7186
|
name: 'Exit process',
|
|
7105
7187
|
},
|
|
7106
7188
|
};
|
|
7189
|
+
if (!url.includes('github.com')) {
|
|
7190
|
+
delete cloneLinkOpt.create;
|
|
7191
|
+
}
|
|
7107
7192
|
const res = await HelpersTaon.consoleGui.select('What to do?', cloneLinkOpt);
|
|
7108
7193
|
if (res === 'again') {
|
|
7109
7194
|
continue;
|
|
@@ -7120,6 +7205,32 @@ ${cwd}
|
|
|
7120
7205
|
if (res === 'skip') {
|
|
7121
7206
|
break;
|
|
7122
7207
|
}
|
|
7208
|
+
if (res === 'create') {
|
|
7209
|
+
Helpers.info(`Checking if github cli installed`);
|
|
7210
|
+
const githubCliInstalled = await UtilsOs.commandExistsAsync('gh');
|
|
7211
|
+
if (!githubCliInstalled) {
|
|
7212
|
+
Helpers.info(`Github CLI not installed.. `);
|
|
7213
|
+
await UtilsTerminal.pressAnyKeyToContinueAsync({
|
|
7214
|
+
message: `Press any key to try clone again..`,
|
|
7215
|
+
});
|
|
7216
|
+
continue;
|
|
7217
|
+
}
|
|
7218
|
+
try {
|
|
7219
|
+
const orgOrAccount = HelpersTaon.git.extractGithubOwner(url);
|
|
7220
|
+
const reponame = path.basename(url.replace('.git', ''));
|
|
7221
|
+
await UtilsExecProc.spawnAsync(`gh repo create ${orgOrAccount}/${reponame} --private `).waitUntilDoneOrThrow();
|
|
7222
|
+
await UtilsTerminal.pressAnyKeyToContinueAsync({
|
|
7223
|
+
message: `REPO CREATED. Press any key to try clone again..`,
|
|
7224
|
+
});
|
|
7225
|
+
continue;
|
|
7226
|
+
}
|
|
7227
|
+
catch (error) {
|
|
7228
|
+
await UtilsTerminal.pressAnyKeyToContinueAsync({
|
|
7229
|
+
message: `REPO NOT CREATE. Press any key to try clone again..`,
|
|
7230
|
+
});
|
|
7231
|
+
continue;
|
|
7232
|
+
}
|
|
7233
|
+
}
|
|
7123
7234
|
}
|
|
7124
7235
|
}
|
|
7125
7236
|
}
|
|
@@ -9207,7 +9318,7 @@ const CURRENT_PACKAGE_TAON_VERSION = 'v21';
|
|
|
9207
9318
|
/**
|
|
9208
9319
|
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
9209
9320
|
*/
|
|
9210
|
-
const CURRENT_PACKAGE_VERSION = '21.0.
|
|
9321
|
+
const CURRENT_PACKAGE_VERSION = '21.0.62';
|
|
9211
9322
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
9212
9323
|
|
|
9213
9324
|
//#endregion
|
|
@@ -20357,6 +20468,8 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
20357
20468
|
/* */
|
|
20358
20469
|
/* */
|
|
20359
20470
|
/* */
|
|
20471
|
+
/* */
|
|
20472
|
+
/* */
|
|
20360
20473
|
return (void 0);
|
|
20361
20474
|
}
|
|
20362
20475
|
//#endregion
|
|
@@ -20773,6 +20886,21 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
20773
20886
|
return (void 0);
|
|
20774
20887
|
}
|
|
20775
20888
|
//#endregion
|
|
20889
|
+
//#region commands / lint
|
|
20890
|
+
/**
|
|
20891
|
+
* TODO move somewhere
|
|
20892
|
+
*/
|
|
20893
|
+
async lintStaged() {
|
|
20894
|
+
/* */
|
|
20895
|
+
/* */
|
|
20896
|
+
/* */
|
|
20897
|
+
/* */
|
|
20898
|
+
/* */
|
|
20899
|
+
/* */
|
|
20900
|
+
/* */
|
|
20901
|
+
return (void 0);
|
|
20902
|
+
}
|
|
20903
|
+
//#endregion
|
|
20776
20904
|
//#region commands / version
|
|
20777
20905
|
/**
|
|
20778
20906
|
* TODO move somewhere
|