tnp-helpers 21.0.60 → 21.0.64
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 +255 -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 +255 -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-npm-helpers.js +10 -2
- package/lib/base/classes/base-npm-helpers.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/tcp-udp-ports/not-assignable-port.entity.js +2 -2
- 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 +147 -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-npm-helpers.js +10 -2
- package/lib-prod/base/classes/base-npm-helpers.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 +148 -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 +255 -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 +255 -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,159 @@ 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
|
+
'xabikos.javascriptsnippets',
|
|
709
|
+
// 'mechatroner.rainbow-csv',
|
|
710
|
+
// 'wenfangdu.snippet-generator', snippet generator
|
|
711
|
+
//#region to check
|
|
712
|
+
// 'abumalick.vscode-nvm', // test this before
|
|
713
|
+
// , // there is prettiers
|
|
714
|
+
// 'alexdima.copy-relative-path', // already in taon
|
|
715
|
+
// 'alexiv.vscode-angular2-files', // taon generator is better
|
|
716
|
+
// , // no needed anymore (embeded in taon)
|
|
717
|
+
// 'eg2.tslint',
|
|
718
|
+
// 'henry-li.vscode-import-formatter', not neede - eslint does it
|
|
719
|
+
// 'jack89ita.copy-filename', // in taon
|
|
720
|
+
// 'momoko8443.library-version',
|
|
721
|
+
// 'oven.bun-vscode', // errors in vscode cosole
|
|
722
|
+
// 'qwtel.sqlite-viewer', // 80$ not free
|
|
723
|
+
// , already in taon
|
|
724
|
+
// 'taddison.gitlazy',
|
|
725
|
+
// 'vespa-dev-works.jestrunit',
|
|
726
|
+
// 'wmaurer.vscode-jumpy', // nice but I am not using it
|
|
727
|
+
// 'usernamehw.errorlens', nice extension.. but to much input at once
|
|
728
|
+
// 'pranaygp.vscode-css-peek', // high cpu usage
|
|
729
|
+
// 'bengreenier.vscode-node-readme',
|
|
730
|
+
// 'kisstkondoros.vscode-codemetrics', // TOO MUCH CPU USAGE
|
|
731
|
+
// 'vscode-icons-team.vscode-icons',
|
|
732
|
+
// TODO nesting is so nice.. but I nee to modify it for taon
|
|
733
|
+
// 'antfu.file-nesting',
|
|
734
|
+
// 'frigus02.vscode-sql-tagged-template-literals', TODO CHECK
|
|
735
|
+
// 'frigus02.vscode-sql-tagged-template-literals-syntax-only', TODO CHECK
|
|
736
|
+
// -------
|
|
737
|
+
// 'mihelcic.colored-regions', TODO I need modified version for taon
|
|
738
|
+
// 'shardulm94.trailing-spaces',
|
|
739
|
+
// 'bierner.color-info', // nice to have color info in css/scss files
|
|
740
|
+
// ---
|
|
741
|
+
// 'skacekachna.win-opacity',
|
|
742
|
+
// 'electrotype.windows-explorer-context-menu',
|
|
743
|
+
// escape win path on paset TODO CHECK THIS
|
|
744
|
+
// 'coalaura.win-path',
|
|
745
|
+
// nice extension but not use for now in taon
|
|
746
|
+
// csv thing
|
|
747
|
+
//
|
|
748
|
+
//#endregion
|
|
749
|
+
];
|
|
750
|
+
};
|
|
751
|
+
UtilsVSCode.codiumExtensions = () => {
|
|
752
|
+
return [
|
|
753
|
+
'Alexanderius.language-hosts',
|
|
754
|
+
...UtilsVSCode.commonRecommededExtensionsExtensions(),
|
|
755
|
+
];
|
|
756
|
+
};
|
|
757
|
+
UtilsVSCode.codeExtensions = () => {
|
|
758
|
+
// wenfangdu.faster-new new file folder for codium
|
|
670
759
|
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
|
-
/* */
|
|
760
|
+
...UtilsVSCode.commonRecommededExtensionsExtensions(),
|
|
761
|
+
'tommasov.hosts',
|
|
762
|
+
/* */
|
|
763
|
+
/* */
|
|
764
|
+
/* */
|
|
765
|
+
/* */
|
|
766
|
+
/* */
|
|
767
|
+
/* */
|
|
768
|
+
/* */
|
|
769
|
+
/* */
|
|
770
|
+
/* */
|
|
771
|
+
/* */
|
|
772
|
+
/* */
|
|
773
|
+
/* */
|
|
774
|
+
/* */
|
|
783
775
|
]).map(c => c.toLowerCase());
|
|
784
776
|
};
|
|
785
777
|
//#endregion
|
|
778
|
+
UtilsVSCode.vscodeExtensions = (editor) => {
|
|
779
|
+
editor = editor ? editor : UtilsOs.detectEditor();
|
|
780
|
+
if (editor === 'code') {
|
|
781
|
+
return UtilsVSCode.codeExtensions();
|
|
782
|
+
}
|
|
783
|
+
return UtilsVSCode.codiumExtensions();
|
|
784
|
+
};
|
|
786
785
|
//#region get deprecated extensions
|
|
787
|
-
UtilsVSCode.getDeprecatedExtension = () => {
|
|
786
|
+
UtilsVSCode.getDeprecatedExtension = (editor) => {
|
|
788
787
|
return [
|
|
789
|
-
'
|
|
790
|
-
'
|
|
791
|
-
'
|
|
792
|
-
'
|
|
788
|
+
'bibhasdn.unique-lines',
|
|
789
|
+
'ms-vscode-remote.remote-ssh',
|
|
790
|
+
'scrapecrow.html-escape',
|
|
791
|
+
'marinhobrandao.angular2tests', // snipperts for test
|
|
792
|
+
'cg-cnu.vscode-path-tools',
|
|
793
|
+
'chrisdias.vscode-opennewinstance',
|
|
794
|
+
'aeschli.vscode-css-formatter',
|
|
795
|
+
'rssowl.copy-relative-path-posix',
|
|
796
|
+
'ms-vscode-remote.remote-containers',
|
|
797
|
+
'ms-azuretools.vscode-docker',
|
|
798
|
+
'waderyan.gitblame',
|
|
799
|
+
'ryu1kn.partial-diff',
|
|
800
|
+
'nidu.copy-json-path',
|
|
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
|
|
793
823
|
];
|
|
794
824
|
};
|
|
795
825
|
//#endregion
|
|
@@ -806,6 +836,33 @@ var UtilsVSCode;
|
|
|
806
836
|
};
|
|
807
837
|
//#endregion
|
|
808
838
|
//#region install extensions
|
|
839
|
+
UtilsVSCode.removeDeprecated = async (options) => {
|
|
840
|
+
options = options || {};
|
|
841
|
+
options.editor = UtilsOs.detectEditor();
|
|
842
|
+
const deprecated = UtilsVSCode.getDeprecatedExtension(options.editor);
|
|
843
|
+
// console.log({ deprecated });
|
|
844
|
+
// HelpersTaon.pressKeyOrWait('Press any key to continue...');
|
|
845
|
+
for (let index = 0; index < deprecated.length; index++) {
|
|
846
|
+
const extname = deprecated[index];
|
|
847
|
+
try {
|
|
848
|
+
Helpers.taskStarted(`Uninstalling: ${extname}`);
|
|
849
|
+
Helpers.run(`${options.editor} --uninstall-extension ${extname}`).sync();
|
|
850
|
+
Helpers.taskDone(`Removed ${extname} done.`);
|
|
851
|
+
await Utils.wait(1);
|
|
852
|
+
}
|
|
853
|
+
catch (error) {
|
|
854
|
+
// console.error(error);
|
|
855
|
+
Helpers.warn(`Not able to uninstall ${extname}`);
|
|
856
|
+
// await UtilsTerminal.pressAnyKeyToContinueAsync({
|
|
857
|
+
// message: 'Press any key to continue...',
|
|
858
|
+
// });
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
UtilsVSCode.installAndRemoveDeprecatedExtensions = async (options) => {
|
|
863
|
+
await UtilsVSCode.installExtensions(options);
|
|
864
|
+
await UtilsVSCode.removeDeprecated(options);
|
|
865
|
+
};
|
|
809
866
|
UtilsVSCode.installExtensions = async (options) => {
|
|
810
867
|
/* */
|
|
811
868
|
/* */
|
|
@@ -867,10 +924,14 @@ var UtilsVSCode;
|
|
|
867
924
|
/* */
|
|
868
925
|
/* */
|
|
869
926
|
/* */
|
|
927
|
+
/* */
|
|
870
928
|
return (void 0);
|
|
871
929
|
};
|
|
872
930
|
//#endregion
|
|
873
931
|
//#region installed extensions
|
|
932
|
+
/**
|
|
933
|
+
* @deprecated
|
|
934
|
+
*/
|
|
874
935
|
UtilsVSCode.installedExtensions = () => {
|
|
875
936
|
/* */
|
|
876
937
|
/* */
|
|
@@ -6976,6 +7037,23 @@ ${cwd}
|
|
|
6976
7037
|
}
|
|
6977
7038
|
catch (error) { }
|
|
6978
7039
|
};
|
|
7040
|
+
function extractGithubOwner(repoUrl) {
|
|
7041
|
+
if (!repoUrl)
|
|
7042
|
+
return null;
|
|
7043
|
+
repoUrl = repoUrl.trim();
|
|
7044
|
+
// SSH format: git@github.com:owner/repo.git
|
|
7045
|
+
const sshMatch = repoUrl.match(/^git@github\.com:(.+?)\/(.+?)(\.git)?$/);
|
|
7046
|
+
if (sshMatch) {
|
|
7047
|
+
return sshMatch[1];
|
|
7048
|
+
}
|
|
7049
|
+
// HTTPS format: https://github.com/owner/repo(.git)
|
|
7050
|
+
const httpsMatch = repoUrl.match(/^https?:\/\/github\.com\/(.+?)\/(.+?)(\.git)?$/);
|
|
7051
|
+
if (httpsMatch) {
|
|
7052
|
+
return httpsMatch[1];
|
|
7053
|
+
}
|
|
7054
|
+
return null;
|
|
7055
|
+
}
|
|
7056
|
+
git.extractGithubOwner = extractGithubOwner;
|
|
6979
7057
|
git.getRemoteProvider = (cwd) => {
|
|
6980
7058
|
/* */
|
|
6981
7059
|
/* */
|
|
@@ -7100,10 +7178,16 @@ ${cwd}
|
|
|
7100
7178
|
skip: {
|
|
7101
7179
|
name: 'Skip cloning this repository',
|
|
7102
7180
|
},
|
|
7181
|
+
create: {
|
|
7182
|
+
name: 'Create repository',
|
|
7183
|
+
},
|
|
7103
7184
|
exit: {
|
|
7104
7185
|
name: 'Exit process',
|
|
7105
7186
|
},
|
|
7106
7187
|
};
|
|
7188
|
+
if (!url.includes('github.com')) {
|
|
7189
|
+
delete cloneLinkOpt.create;
|
|
7190
|
+
}
|
|
7107
7191
|
const res = await HelpersTaon.consoleGui.select('What to do?', cloneLinkOpt);
|
|
7108
7192
|
if (res === 'again') {
|
|
7109
7193
|
continue;
|
|
@@ -7120,6 +7204,32 @@ ${cwd}
|
|
|
7120
7204
|
if (res === 'skip') {
|
|
7121
7205
|
break;
|
|
7122
7206
|
}
|
|
7207
|
+
if (res === 'create') {
|
|
7208
|
+
Helpers.info(`Checking if github cli installed`);
|
|
7209
|
+
const githubCliInstalled = await UtilsOs.commandExistsAsync('gh');
|
|
7210
|
+
if (!githubCliInstalled) {
|
|
7211
|
+
Helpers.info(`Github CLI not installed.. `);
|
|
7212
|
+
await UtilsTerminal.pressAnyKeyToContinueAsync({
|
|
7213
|
+
message: `Press any key to try clone again..`,
|
|
7214
|
+
});
|
|
7215
|
+
continue;
|
|
7216
|
+
}
|
|
7217
|
+
try {
|
|
7218
|
+
const orgOrAccount = HelpersTaon.git.extractGithubOwner(url);
|
|
7219
|
+
const reponame = path.basename(url.replace('.git', ''));
|
|
7220
|
+
await UtilsExecProc.spawnAsync(`gh repo create ${orgOrAccount}/${reponame} --private `).waitUntilDoneOrThrow();
|
|
7221
|
+
await UtilsTerminal.pressAnyKeyToContinueAsync({
|
|
7222
|
+
message: `REPO CREATED. Press any key to try clone again..`,
|
|
7223
|
+
});
|
|
7224
|
+
continue;
|
|
7225
|
+
}
|
|
7226
|
+
catch (error) {
|
|
7227
|
+
await UtilsTerminal.pressAnyKeyToContinueAsync({
|
|
7228
|
+
message: `REPO NOT CREATE. Press any key to try clone again..`,
|
|
7229
|
+
});
|
|
7230
|
+
continue;
|
|
7231
|
+
}
|
|
7232
|
+
}
|
|
7123
7233
|
}
|
|
7124
7234
|
}
|
|
7125
7235
|
}
|
|
@@ -9207,7 +9317,7 @@ const CURRENT_PACKAGE_TAON_VERSION = 'v21';
|
|
|
9207
9317
|
/**
|
|
9208
9318
|
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
9209
9319
|
*/
|
|
9210
|
-
const CURRENT_PACKAGE_VERSION = '21.0.
|
|
9320
|
+
const CURRENT_PACKAGE_VERSION = '21.0.64';
|
|
9211
9321
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
9212
9322
|
|
|
9213
9323
|
//#endregion
|
|
@@ -14990,6 +15100,14 @@ class BaseNpmHelpers extends BaseFeatureForProject {
|
|
|
14990
15100
|
/* */
|
|
14991
15101
|
/* */
|
|
14992
15102
|
/* */
|
|
15103
|
+
/* */
|
|
15104
|
+
/* */
|
|
15105
|
+
/* */
|
|
15106
|
+
/* */
|
|
15107
|
+
/* */
|
|
15108
|
+
/* */
|
|
15109
|
+
/* */
|
|
15110
|
+
/* */
|
|
14993
15111
|
return (void 0);
|
|
14994
15112
|
}
|
|
14995
15113
|
//#endregion
|
|
@@ -20357,6 +20475,8 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
20357
20475
|
/* */
|
|
20358
20476
|
/* */
|
|
20359
20477
|
/* */
|
|
20478
|
+
/* */
|
|
20479
|
+
/* */
|
|
20360
20480
|
return (void 0);
|
|
20361
20481
|
}
|
|
20362
20482
|
//#endregion
|
|
@@ -20773,6 +20893,21 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
20773
20893
|
return (void 0);
|
|
20774
20894
|
}
|
|
20775
20895
|
//#endregion
|
|
20896
|
+
//#region commands / lint
|
|
20897
|
+
/**
|
|
20898
|
+
* TODO move somewhere
|
|
20899
|
+
*/
|
|
20900
|
+
async lintStaged() {
|
|
20901
|
+
/* */
|
|
20902
|
+
/* */
|
|
20903
|
+
/* */
|
|
20904
|
+
/* */
|
|
20905
|
+
/* */
|
|
20906
|
+
/* */
|
|
20907
|
+
/* */
|
|
20908
|
+
return (void 0);
|
|
20909
|
+
}
|
|
20910
|
+
//#endregion
|
|
20776
20911
|
//#region commands / version
|
|
20777
20912
|
/**
|
|
20778
20913
|
* TODO move somewhere
|