tnp-helpers 21.0.113 → 21.0.115
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/VERIFIED-BUILD-DATA.jsonc +3 -3
- package/bin/start.js +36 -36
- package/browser/README.md +24 -24
- package/browser/fesm2022/tnp-helpers-browser.mjs +1255 -858
- package/browser/fesm2022/tnp-helpers-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/tnp-helpers-browser.d.ts +918 -916
- package/browser-prod/README.md +24 -24
- package/browser-prod/fesm2022/tnp-helpers-browser-prod.mjs +1236 -839
- 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 +916 -914
- package/lib/base/classes/base-git.d.ts +2 -2
- package/lib/base/classes/base-git.js +6 -13
- package/lib/base/classes/base-git.js.map +1 -1
- package/lib/base/classes/base-global-command-line.d.ts +3 -3
- package/lib/base/classes/base-global-command-line.js +45 -30
- package/lib/base/classes/base-global-command-line.js.map +1 -1
- package/lib/base/classes/base-json-file-reader.js.map +1 -1
- package/lib/base/classes/base-linked-projects.d.ts +2 -1
- package/lib/base/classes/base-linked-projects.js +8 -6
- package/lib/base/classes/base-linked-projects.js.map +1 -1
- package/lib/base/classes/base-linter.js +1 -1
- package/lib/base/classes/base-linter.js.map +1 -1
- package/lib/base/classes/base-node-modules.d.ts +1 -1
- package/lib/base/classes/base-node-modules.js +56 -40
- package/lib/base/classes/base-node-modules.js.map +1 -1
- package/lib/base/classes/base-project.d.ts +3 -1
- package/lib/base/classes/base-project.js +12 -5
- package/lib/base/classes/base-project.js.map +1 -1
- package/lib/base/classes/base-start-config.backend.js.map +1 -1
- package/lib/base/tcp-udp-ports/not-assignable-port.entity.js +2 -2
- package/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +2 -6
- 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 +2 -1
- package/lib/helpers/helpers.js +9 -9
- 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/old/execute-command.d.ts +1 -1
- package/lib/old/helpers.d.ts +2 -2
- package/lib/package.json +1 -1
- package/lib/utils-typescript.d.ts +5 -3
- package/lib/utils-typescript.js +247 -18
- package/lib/utils-typescript.js.map +1 -1
- package/lib/utils-vscode.d.ts +1 -2
- package/lib/utils-vscode.js +3 -0
- package/lib/utils-vscode.js.map +1 -1
- package/lib/utils.js +9 -4
- package/lib/utils.js.map +1 -1
- package/lib-esm/app.electron.js +1 -0
- package/lib-esm/app.electron.js.map +1 -1
- package/lib-esm/app.hosts.js +1 -0
- package/lib-esm/app.hosts.js.map +1 -1
- package/lib-esm/app.js +1 -0
- package/lib-esm/app.js.map +1 -1
- package/lib-esm/app.vscode.js +1 -0
- package/lib-esm/app.vscode.js.map +1 -1
- package/lib-esm/lib/base/classes/base-git.d.ts +2 -2
- package/lib-esm/lib/base/classes/base-git.js +3 -10
- package/lib-esm/lib/base/classes/base-git.js.map +1 -1
- package/lib-esm/lib/base/classes/base-global-command-line.d.ts +3 -3
- package/lib-esm/lib/base/classes/base-global-command-line.js +43 -28
- package/lib-esm/lib/base/classes/base-global-command-line.js.map +1 -1
- package/lib-esm/lib/base/classes/base-json-file-reader.js.map +1 -1
- package/lib-esm/lib/base/classes/base-linked-projects.d.ts +2 -1
- package/lib-esm/lib/base/classes/base-linked-projects.js +3 -1
- package/lib-esm/lib/base/classes/base-linked-projects.js.map +1 -1
- package/lib-esm/lib/base/classes/base-linter.js +1 -1
- package/lib-esm/lib/base/classes/base-linter.js.map +1 -1
- package/lib-esm/lib/base/classes/base-node-modules.d.ts +1 -1
- package/lib-esm/lib/base/classes/base-node-modules.js +21 -5
- package/lib-esm/lib/base/classes/base-node-modules.js.map +1 -1
- package/lib-esm/lib/base/classes/base-project.d.ts +3 -1
- package/lib-esm/lib/base/classes/base-project.js +9 -5
- package/lib-esm/lib/base/classes/base-project.js.map +1 -1
- package/lib-esm/lib/base/classes/base-start-config.backend.js.map +1 -1
- package/lib-esm/lib/base/tcp-udp-ports/not-assignable-port.entity.d.ts +1 -1
- package/lib-esm/lib/base/tcp-udp-ports/not-assignable-port.entity.js +1 -1
- package/lib-esm/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +2 -6
- package/lib-esm/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib-esm/lib/build-info._auto-generated_.js +1 -1
- package/lib-esm/lib/helpers/helpers.d.ts +2 -1
- package/lib-esm/lib/helpers/helpers.js +11 -9
- package/lib-esm/lib/helpers/helpers.js.map +1 -1
- package/lib-esm/lib/old/base-component.d.ts +1 -1
- package/lib-esm/lib/old/base-component.js +1 -1
- package/lib-esm/lib/old/base-formly-component.d.ts +1 -1
- package/lib-esm/lib/old/base-formly-component.js +1 -1
- package/lib-esm/lib/old/dual-component-ctrl.d.ts +1 -1
- package/lib-esm/lib/old/dual-component-ctrl.js +1 -1
- package/lib-esm/lib/old/execute-command.d.ts +1 -1
- package/lib-esm/lib/old/helpers.d.ts +2 -2
- package/lib-esm/lib/utils-typescript.d.ts +5 -4
- package/lib-esm/lib/utils-typescript.js +3078 -2078
- package/lib-esm/lib/utils-typescript.js.map +1 -1
- package/lib-esm/lib/utils-vscode.d.ts +1 -2
- package/lib-esm/lib/utils-vscode.js +7 -5
- package/lib-esm/lib/utils-vscode.js.map +1 -1
- package/lib-esm/lib/utils.js +9 -4
- package/lib-esm/lib/utils.js.map +1 -1
- package/lib-prod/base/classes/base-cli-worker/base-cli-worker-database-config.js.map +1 -1
- package/lib-prod/base/classes/base-cli-worker/base-cli-worker-terminal-ui.js.map +1 -1
- package/lib-prod/base/classes/base-cli-worker/base-cli-worker.js.map +1 -1
- package/lib-prod/base/classes/base-cli-worker/base-cli-worker.utils.js.map +1 -1
- package/lib-prod/base/classes/base-db.js.map +1 -1
- package/lib-prod/base/classes/base-docker.js.map +1 -1
- package/lib-prod/base/classes/base-git.d.ts +2 -2
- package/lib-prod/base/classes/base-git.js +3 -10
- package/lib-prod/base/classes/base-git.js.map +1 -1
- package/lib-prod/base/classes/base-global-command-line.d.ts +3 -3
- package/lib-prod/base/classes/base-global-command-line.js +43 -28
- package/lib-prod/base/classes/base-global-command-line.js.map +1 -1
- package/lib-prod/base/classes/base-linked-projects.d.ts +2 -1
- package/lib-prod/base/classes/base-linked-projects.js +3 -1
- package/lib-prod/base/classes/base-linked-projects.js.map +1 -1
- package/lib-prod/base/classes/base-linter.js +1 -1
- package/lib-prod/base/classes/base-linter.js.map +1 -1
- package/lib-prod/base/classes/base-node-modules.d.ts +1 -1
- package/lib-prod/base/classes/base-node-modules.js +21 -5
- package/lib-prod/base/classes/base-node-modules.js.map +1 -1
- package/lib-prod/base/classes/base-npm-helpers.js.map +1 -1
- package/lib-prod/base/classes/base-package-json.js.map +1 -1
- package/lib-prod/base/classes/base-project-resolver.js.map +1 -1
- package/lib-prod/base/classes/base-project.d.ts +3 -1
- package/lib-prod/base/classes/base-project.js +9 -2
- package/lib-prod/base/classes/base-project.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/config-database.js.map +1 -1
- package/lib-prod/base/gh-temp-code.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/base/tcp-udp-ports/ports.controller.js.map +1 -1
- package/lib-prod/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +2 -6
- package/lib-prod/base/tcp-udp-ports/tcp-upd-ports-terminal-ui.js.map +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 +2 -1
- package/lib-prod/helpers/helpers.js +9 -9
- package/lib-prod/helpers/helpers.js.map +1 -1
- package/lib-prod/models.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/execute-command.d.ts +1 -1
- package/lib-prod/old/helpers.d.ts +2 -2
- package/lib-prod/package.json +1 -1
- package/lib-prod/utils-typescript.d.ts +4 -2
- package/lib-prod/utils-typescript.js +248 -19
- package/lib-prod/utils-typescript.js.map +1 -1
- package/lib-prod/utils-vscode.d.ts +1 -2
- package/lib-prod/utils-vscode.js +3 -0
- package/lib-prod/utils-vscode.js.map +1 -1
- package/lib-prod/utils.js +9 -4
- package/lib-prod/utils.js.map +1 -1
- package/package.json +1 -1
- package/websql/README.md +24 -24
- package/websql/fesm2022/tnp-helpers-websql.mjs +1259 -861
- package/websql/fesm2022/tnp-helpers-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/tnp-helpers-websql.d.ts +918 -916
- package/websql-prod/README.md +24 -24
- package/websql-prod/fesm2022/tnp-helpers-websql-prod.mjs +1228 -830
- 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 +916 -914
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CoreModels, Utils, crossPlatformPath, UtilsOs, Helpers,
|
|
1
|
+
import { CoreModels, Utils, crossPlatformPath, UtilsOs, Helpers, _, UtilsTerminal, child_process, fse, path, config, dateformat, CLI, UtilsExecProc, BaselineSiteJoinprefix, UtilsFilesFoldersSync, chalk, UtilsProjects, folderName, fileName, UtilsNetwork, UtilsSudo, isElevated } from 'tnp-core/browser';
|
|
2
2
|
export { Helpers } from 'tnp-core/browser';
|
|
3
|
-
import { createSourceFile, ScriptTarget, isCallExpression, SyntaxKind, isImportDeclaration, isExportDeclaration, forEachChild, ScriptKind, getLeadingCommentRanges, getTrailingCommentRanges, isArrayLiteralExpression, isObjectLiteralExpression, DiagnosticCategory } from 'typescript';
|
|
4
3
|
import { CLASS } from 'typescript-class-helpers/browser';
|
|
5
4
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
6
5
|
import { TaonBaseEntity, TaonEntity, TaonBaseClass, TaonBaseController, PUT, Body, GET, Query, HTML, POST, TaonController, DELETE, TaonBaseMigration, TaonMigration, Taon, TaonBaseContext } from 'taon/browser';
|
|
@@ -1528,6 +1527,10 @@ var UtilsFileSync;
|
|
|
1528
1527
|
/* */
|
|
1529
1528
|
/* */
|
|
1530
1529
|
/* */
|
|
1530
|
+
/* */
|
|
1531
|
+
/* */
|
|
1532
|
+
/* */
|
|
1533
|
+
/* */
|
|
1531
1534
|
return (void 0);
|
|
1532
1535
|
}
|
|
1533
1536
|
//#endregion
|
|
@@ -1611,6 +1614,10 @@ var UtilsFileSync;
|
|
|
1611
1614
|
/* */
|
|
1612
1615
|
/* */
|
|
1613
1616
|
/* */
|
|
1617
|
+
/* */
|
|
1618
|
+
/* */
|
|
1619
|
+
/* */
|
|
1620
|
+
/* */
|
|
1614
1621
|
return (void 0);
|
|
1615
1622
|
};
|
|
1616
1623
|
//#endregion
|
|
@@ -1885,6 +1892,9 @@ var UtilsVSCode;
|
|
|
1885
1892
|
/* */
|
|
1886
1893
|
/* */
|
|
1887
1894
|
/* */
|
|
1895
|
+
/* */
|
|
1896
|
+
/* */
|
|
1897
|
+
/* */
|
|
1888
1898
|
return (void 0);
|
|
1889
1899
|
};
|
|
1890
1900
|
//#region utils os / open folder in vscode
|
|
@@ -2723,7 +2733,6 @@ var UtilsVSCode;
|
|
|
2723
2733
|
})(UtilsVSCode || (UtilsVSCode = {}));
|
|
2724
2734
|
//#endregion
|
|
2725
2735
|
|
|
2726
|
-
//#region imports
|
|
2727
2736
|
//#endregion
|
|
2728
2737
|
var UtilsTypescript;
|
|
2729
2738
|
(function (UtilsTypescript) {
|
|
@@ -2747,6 +2756,9 @@ var UtilsTypescript;
|
|
|
2747
2756
|
/* */
|
|
2748
2757
|
/* */
|
|
2749
2758
|
/* */
|
|
2759
|
+
/* */
|
|
2760
|
+
/* */
|
|
2761
|
+
/* */
|
|
2750
2762
|
return (void 0);
|
|
2751
2763
|
};
|
|
2752
2764
|
//#endregion
|
|
@@ -2850,6 +2862,9 @@ var UtilsTypescript;
|
|
|
2850
2862
|
/* */
|
|
2851
2863
|
/* */
|
|
2852
2864
|
/* */
|
|
2865
|
+
/* */
|
|
2866
|
+
/* */
|
|
2867
|
+
/* */
|
|
2853
2868
|
return (void 0);
|
|
2854
2869
|
}
|
|
2855
2870
|
UtilsTypescript.extractGettextFromTs = extractGettextFromTs;
|
|
@@ -2908,14 +2923,16 @@ var UtilsTypescript;
|
|
|
2908
2923
|
/* */
|
|
2909
2924
|
/* */
|
|
2910
2925
|
/* */
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2926
|
+
return (void 0);
|
|
2927
|
+
};
|
|
2928
|
+
/**
|
|
2929
|
+
* Removes the specified region blocks and handles nested regions.
|
|
2930
|
+
*
|
|
2931
|
+
* @param statements - List of statements in the source file.
|
|
2932
|
+
* @param regionName - The name of the region to remove.
|
|
2933
|
+
* @returns Modified list of statements without the specified regions.
|
|
2934
|
+
*/
|
|
2935
|
+
const removeRegions = (statements, regionName) => {
|
|
2919
2936
|
/* */
|
|
2920
2937
|
/* */
|
|
2921
2938
|
/* */
|
|
@@ -2990,6 +3007,9 @@ var UtilsTypescript;
|
|
|
2990
3007
|
/* */
|
|
2991
3008
|
/* */
|
|
2992
3009
|
/* */
|
|
3010
|
+
/* */
|
|
3011
|
+
/* */
|
|
3012
|
+
/* */
|
|
2993
3013
|
return (void 0);
|
|
2994
3014
|
};
|
|
2995
3015
|
/**
|
|
@@ -3002,6 +3022,9 @@ var UtilsTypescript;
|
|
|
3002
3022
|
/* */
|
|
3003
3023
|
/* */
|
|
3004
3024
|
/* */
|
|
3025
|
+
/* */
|
|
3026
|
+
/* */
|
|
3027
|
+
/* */
|
|
3005
3028
|
return (void 0);
|
|
3006
3029
|
};
|
|
3007
3030
|
/**
|
|
@@ -3081,6 +3104,9 @@ var UtilsTypescript;
|
|
|
3081
3104
|
/* */
|
|
3082
3105
|
/* */
|
|
3083
3106
|
/* */
|
|
3107
|
+
/* */
|
|
3108
|
+
/* */
|
|
3109
|
+
/* */
|
|
3084
3110
|
return (void 0);
|
|
3085
3111
|
};
|
|
3086
3112
|
/**
|
|
@@ -3146,6 +3172,9 @@ var UtilsTypescript;
|
|
|
3146
3172
|
/* */
|
|
3147
3173
|
/* */
|
|
3148
3174
|
/* */
|
|
3175
|
+
/* */
|
|
3176
|
+
/* */
|
|
3177
|
+
/* */
|
|
3149
3178
|
return (void 0);
|
|
3150
3179
|
};
|
|
3151
3180
|
/**
|
|
@@ -3158,6 +3187,9 @@ var UtilsTypescript;
|
|
|
3158
3187
|
/* */
|
|
3159
3188
|
/* */
|
|
3160
3189
|
/* */
|
|
3190
|
+
/* */
|
|
3191
|
+
/* */
|
|
3192
|
+
/* */
|
|
3161
3193
|
return (void 0);
|
|
3162
3194
|
};
|
|
3163
3195
|
//#endregion
|
|
@@ -3184,6 +3216,9 @@ var UtilsTypescript;
|
|
|
3184
3216
|
/* */
|
|
3185
3217
|
/* */
|
|
3186
3218
|
/* */
|
|
3219
|
+
/* */
|
|
3220
|
+
/* */
|
|
3221
|
+
/* */
|
|
3187
3222
|
return (void 0);
|
|
3188
3223
|
};
|
|
3189
3224
|
UtilsTypescript.extractClassNameFromString = (sourceCode) => {
|
|
@@ -3205,6 +3240,9 @@ var UtilsTypescript;
|
|
|
3205
3240
|
/* */
|
|
3206
3241
|
/* */
|
|
3207
3242
|
/* */
|
|
3243
|
+
/* */
|
|
3244
|
+
/* */
|
|
3245
|
+
/* */
|
|
3208
3246
|
return (void 0);
|
|
3209
3247
|
};
|
|
3210
3248
|
UtilsTypescript.extractClassNamesFromFile = (absoluteFilePath) => {
|
|
@@ -3214,9 +3252,15 @@ var UtilsTypescript;
|
|
|
3214
3252
|
/* */
|
|
3215
3253
|
/* */
|
|
3216
3254
|
/* */
|
|
3255
|
+
/* */
|
|
3256
|
+
/* */
|
|
3257
|
+
/* */
|
|
3217
3258
|
return (void 0);
|
|
3218
3259
|
};
|
|
3219
3260
|
UtilsTypescript.extractDefaultClassNameFromFile = (absoluteFilePath) => {
|
|
3261
|
+
/* */
|
|
3262
|
+
/* */
|
|
3263
|
+
/* */
|
|
3220
3264
|
/* */
|
|
3221
3265
|
/* */
|
|
3222
3266
|
/* */
|
|
@@ -3239,6 +3283,11 @@ var UtilsTypescript;
|
|
|
3239
3283
|
/* */
|
|
3240
3284
|
/* */
|
|
3241
3285
|
/* */
|
|
3286
|
+
/* */
|
|
3287
|
+
/* */
|
|
3288
|
+
/* */
|
|
3289
|
+
/* */
|
|
3290
|
+
/* */
|
|
3242
3291
|
return (void 0);
|
|
3243
3292
|
};
|
|
3244
3293
|
UtilsTypescript.formatAllFilesInsideFolder = (absPathToFolder) => {
|
|
@@ -3254,6 +3303,9 @@ var UtilsTypescript;
|
|
|
3254
3303
|
/* */
|
|
3255
3304
|
/* */
|
|
3256
3305
|
/* */
|
|
3306
|
+
/* */
|
|
3307
|
+
/* */
|
|
3308
|
+
/* */
|
|
3257
3309
|
return (void 0);
|
|
3258
3310
|
};
|
|
3259
3311
|
//#endregion
|
|
@@ -3277,6 +3329,9 @@ var UtilsTypescript;
|
|
|
3277
3329
|
/* */
|
|
3278
3330
|
/* */
|
|
3279
3331
|
/* */
|
|
3332
|
+
/* */
|
|
3333
|
+
/* */
|
|
3334
|
+
/* */
|
|
3280
3335
|
return (void 0);
|
|
3281
3336
|
};
|
|
3282
3337
|
UtilsTypescript.eslintFixAllFilesInsideFolderAsync = async (absPathToFolder) => {
|
|
@@ -3316,6 +3371,9 @@ var UtilsTypescript;
|
|
|
3316
3371
|
/* */
|
|
3317
3372
|
/* */
|
|
3318
3373
|
/* */
|
|
3374
|
+
/* */
|
|
3375
|
+
/* */
|
|
3376
|
+
/* */
|
|
3319
3377
|
return (void 0);
|
|
3320
3378
|
};
|
|
3321
3379
|
/**
|
|
@@ -3338,6 +3396,9 @@ var UtilsTypescript;
|
|
|
3338
3396
|
/* */
|
|
3339
3397
|
/* */
|
|
3340
3398
|
/* */
|
|
3399
|
+
/* */
|
|
3400
|
+
/* */
|
|
3401
|
+
/* */
|
|
3341
3402
|
return (void 0);
|
|
3342
3403
|
};
|
|
3343
3404
|
//#endregion
|
|
@@ -3395,9 +3456,15 @@ var UtilsTypescript;
|
|
|
3395
3456
|
/* */
|
|
3396
3457
|
/* */
|
|
3397
3458
|
/* */
|
|
3459
|
+
/* */
|
|
3460
|
+
/* */
|
|
3461
|
+
/* */
|
|
3398
3462
|
return (void 0);
|
|
3399
3463
|
};
|
|
3400
3464
|
UtilsTypescript.getTaonContextsNamesFromFile = (tsAbsFilePath) => {
|
|
3465
|
+
/* */
|
|
3466
|
+
/* */
|
|
3467
|
+
/* */
|
|
3401
3468
|
/* */
|
|
3402
3469
|
/* */
|
|
3403
3470
|
return (void 0);
|
|
@@ -3452,6 +3519,9 @@ var UtilsTypescript;
|
|
|
3452
3519
|
/* */
|
|
3453
3520
|
/* */
|
|
3454
3521
|
/* */
|
|
3522
|
+
/* */
|
|
3523
|
+
/* */
|
|
3524
|
+
/* */
|
|
3455
3525
|
return (void 0);
|
|
3456
3526
|
};
|
|
3457
3527
|
//#endregion
|
|
@@ -3481,6 +3551,9 @@ var UtilsTypescript;
|
|
|
3481
3551
|
/* */
|
|
3482
3552
|
/* */
|
|
3483
3553
|
/* */
|
|
3554
|
+
/* */
|
|
3555
|
+
/* */
|
|
3556
|
+
/* */
|
|
3484
3557
|
return (void 0);
|
|
3485
3558
|
};
|
|
3486
3559
|
//#endregion
|
|
@@ -3628,6 +3701,9 @@ var UtilsTypescript;
|
|
|
3628
3701
|
/* */
|
|
3629
3702
|
/* */
|
|
3630
3703
|
/* */
|
|
3704
|
+
/* */
|
|
3705
|
+
/* */
|
|
3706
|
+
/* */
|
|
3631
3707
|
return (void 0);
|
|
3632
3708
|
};
|
|
3633
3709
|
//#endregion
|
|
@@ -3636,8 +3712,11 @@ var UtilsTypescript;
|
|
|
3636
3712
|
class TsImportExport {
|
|
3637
3713
|
//#endregion
|
|
3638
3714
|
//#region constructor
|
|
3715
|
+
//#region @esmRemove
|
|
3639
3716
|
constructor(type, embeddedPathToFile, start, end, parenthesisType, importElements = []) {
|
|
3640
3717
|
this.importElements = [];
|
|
3718
|
+
this.markForDeletion = false;
|
|
3719
|
+
this.markForDeletionImportElems = [];
|
|
3641
3720
|
this.type = type;
|
|
3642
3721
|
this.isIsomorphic = false;
|
|
3643
3722
|
this.embeddedPathToFile = embeddedPathToFile;
|
|
@@ -3652,6 +3731,7 @@ var UtilsTypescript;
|
|
|
3652
3731
|
this.importElements = importElements;
|
|
3653
3732
|
}
|
|
3654
3733
|
//#endregion
|
|
3734
|
+
//#endregion
|
|
3655
3735
|
//#region remove quotes
|
|
3656
3736
|
removeStartEndQuotes(str) {
|
|
3657
3737
|
return str.replace(/^['"`]/, '').replace(/['"`]$/, '');
|
|
@@ -3709,6 +3789,9 @@ var UtilsTypescript;
|
|
|
3709
3789
|
//#endregion
|
|
3710
3790
|
//#region recognize imports from file / get quote type
|
|
3711
3791
|
const getQuoteType = (text) => {
|
|
3792
|
+
/* */
|
|
3793
|
+
/* */
|
|
3794
|
+
/* */
|
|
3712
3795
|
/* */
|
|
3713
3796
|
/* */
|
|
3714
3797
|
/* */
|
|
@@ -3739,11 +3822,17 @@ var UtilsTypescript;
|
|
|
3739
3822
|
/* */
|
|
3740
3823
|
/* */
|
|
3741
3824
|
/* */
|
|
3825
|
+
/* */
|
|
3826
|
+
/* */
|
|
3827
|
+
/* */
|
|
3742
3828
|
return (void 0);
|
|
3743
3829
|
};
|
|
3744
3830
|
//#endregion
|
|
3745
3831
|
//#region recognize imports from file / recognize imports from file
|
|
3746
3832
|
UtilsTypescript.recognizeImportsFromFile = (fileAbsPAth) => {
|
|
3833
|
+
/* */
|
|
3834
|
+
/* */
|
|
3835
|
+
/* */
|
|
3747
3836
|
/* */
|
|
3748
3837
|
/* */
|
|
3749
3838
|
/* */
|
|
@@ -3752,49 +3841,6 @@ var UtilsTypescript;
|
|
|
3752
3841
|
//#endregion
|
|
3753
3842
|
//#region recognize imports from file / recognize imports from content
|
|
3754
3843
|
UtilsTypescript.recognizeImportsFromContent = (fileContent) => {
|
|
3755
|
-
if (!fileContent) {
|
|
3756
|
-
return [];
|
|
3757
|
-
}
|
|
3758
|
-
const sourceFile = createSourceFile('file.ts', // a name for the file
|
|
3759
|
-
fileContent, ScriptTarget.Latest, true);
|
|
3760
|
-
const results = [];
|
|
3761
|
-
const visit = (node) => {
|
|
3762
|
-
// Check for dynamic import expressions specifically
|
|
3763
|
-
if (isCallExpression(node) &&
|
|
3764
|
-
node.expression.kind === SyntaxKind.ImportKeyword) {
|
|
3765
|
-
const args = node.arguments;
|
|
3766
|
-
if (args.length) {
|
|
3767
|
-
const arg = args[0];
|
|
3768
|
-
const specifier = arg.getText(sourceFile);
|
|
3769
|
-
const parenthesisType = getQuoteType(specifier);
|
|
3770
|
-
results.push(new TsImportExport('async-import', specifier, sourceFile.getLineAndCharacterOfPosition(node.getStart()), sourceFile.getLineAndCharacterOfPosition(node.getEnd()), parenthesisType));
|
|
3771
|
-
}
|
|
3772
|
-
}
|
|
3773
|
-
if (isImportDeclaration(node) || isExportDeclaration(node)) {
|
|
3774
|
-
const specifier = node.moduleSpecifier
|
|
3775
|
-
? node.moduleSpecifier.getText(sourceFile)
|
|
3776
|
-
: '';
|
|
3777
|
-
const parenthesisType = getQuoteType(specifier);
|
|
3778
|
-
const type = node.kind === SyntaxKind.ImportDeclaration ? 'import' : 'export';
|
|
3779
|
-
const importExportElements = extractImportExportElements(node);
|
|
3780
|
-
results.push(new TsImportExport(type, specifier, sourceFile.getLineAndCharacterOfPosition(node.getStart()), sourceFile.getLineAndCharacterOfPosition(node.getEnd()), parenthesisType, importExportElements));
|
|
3781
|
-
}
|
|
3782
|
-
if (isCallExpression(node) &&
|
|
3783
|
-
node.expression.getText(sourceFile) === 'require') {
|
|
3784
|
-
const args = node.arguments;
|
|
3785
|
-
if (args.length > 0) {
|
|
3786
|
-
const arg = args[0];
|
|
3787
|
-
const specifier = arg.getText(sourceFile);
|
|
3788
|
-
const parenthesisType = getQuoteType(specifier);
|
|
3789
|
-
results.push(new TsImportExport('require', specifier, sourceFile.getLineAndCharacterOfPosition(arg.getStart()), sourceFile.getLineAndCharacterOfPosition(arg.getEnd()), parenthesisType));
|
|
3790
|
-
}
|
|
3791
|
-
}
|
|
3792
|
-
forEachChild(node, visit);
|
|
3793
|
-
};
|
|
3794
|
-
forEachChild(sourceFile, visit);
|
|
3795
|
-
return results;
|
|
3796
|
-
};
|
|
3797
|
-
UtilsTypescript.extractRenamedImportsOrExport = (content) => {
|
|
3798
3844
|
/* */
|
|
3799
3845
|
/* */
|
|
3800
3846
|
/* */
|
|
@@ -3857,15 +3903,6 @@ var UtilsTypescript;
|
|
|
3857
3903
|
/* */
|
|
3858
3904
|
/* */
|
|
3859
3905
|
/* */
|
|
3860
|
-
return (void 0);
|
|
3861
|
-
};
|
|
3862
|
-
//#endregion
|
|
3863
|
-
//#region transform Angular component standalone option
|
|
3864
|
-
/**
|
|
3865
|
-
* Transition methods ng18 => ng19
|
|
3866
|
-
* Adds standalone: false if not exists in component decorator
|
|
3867
|
-
*/
|
|
3868
|
-
function transformComponentStandaloneOption(sourceText) {
|
|
3869
3906
|
/* */
|
|
3870
3907
|
/* */
|
|
3871
3908
|
/* */
|
|
@@ -3891,22 +3928,14 @@ var UtilsTypescript;
|
|
|
3891
3928
|
/* */
|
|
3892
3929
|
/* */
|
|
3893
3930
|
/* */
|
|
3931
|
+
return (void 0);
|
|
3932
|
+
};
|
|
3933
|
+
UtilsTypescript.extractRenamedImportsOrExport = (content) => {
|
|
3894
3934
|
/* */
|
|
3895
3935
|
/* */
|
|
3896
3936
|
/* */
|
|
3897
3937
|
/* */
|
|
3898
3938
|
/* */
|
|
3899
|
-
return (void 0);
|
|
3900
|
-
}
|
|
3901
|
-
UtilsTypescript.transformComponentStandaloneOption = transformComponentStandaloneOption;
|
|
3902
|
-
//#endregion
|
|
3903
|
-
//#region escape @ in html text
|
|
3904
|
-
const escapeAtInHtmlText = (fileContent) => {
|
|
3905
|
-
return fileContent.replace(/>([^<@]*?)@([^<]*)</g, (_match, before, after) => {
|
|
3906
|
-
return `>${before}@${after}<`;
|
|
3907
|
-
});
|
|
3908
|
-
};
|
|
3909
|
-
UtilsTypescript.fixHtmlTemplatesInDir = (directoryPath) => {
|
|
3910
3939
|
/* */
|
|
3911
3940
|
/* */
|
|
3912
3941
|
/* */
|
|
@@ -3927,139 +3956,6 @@ var UtilsTypescript;
|
|
|
3927
3956
|
/* */
|
|
3928
3957
|
/* */
|
|
3929
3958
|
/* */
|
|
3930
|
-
return (void 0);
|
|
3931
|
-
};
|
|
3932
|
-
//#endregion
|
|
3933
|
-
//#region remove tagged imports/exports
|
|
3934
|
-
function removeTaggedImportExport(tsFileContent, tags, replaceWithEmptyLine = false) {
|
|
3935
|
-
const sourceFile = createSourceFile('temp.ts', tsFileContent, ScriptTarget.Latest, true, ScriptKind.TS);
|
|
3936
|
-
const lines = tsFileContent.split(/\r?\n/);
|
|
3937
|
-
const tagRegex = new RegExp(tags
|
|
3938
|
-
.map(t => (Array.isArray(t) ? t[0] : t))
|
|
3939
|
-
.filter(Boolean)
|
|
3940
|
-
.map(t => Utils.escapeStringForRegEx(t))
|
|
3941
|
-
.join('|'), 'i');
|
|
3942
|
-
let a = 0;
|
|
3943
|
-
for (const statement of sourceFile.statements) {
|
|
3944
|
-
// debug && console.log('processing line ' + a++);
|
|
3945
|
-
if (!isImportDeclaration(statement) && !isExportDeclaration(statement)) {
|
|
3946
|
-
continue;
|
|
3947
|
-
}
|
|
3948
|
-
const start = statement.getStart();
|
|
3949
|
-
const end = statement.getEnd();
|
|
3950
|
-
const startLine = sourceFile.getLineAndCharacterOfPosition(start).line;
|
|
3951
|
-
const endLine = sourceFile.getLineAndCharacterOfPosition(end).line;
|
|
3952
|
-
// get full text including trailing comments
|
|
3953
|
-
const endLineText = lines[endLine]; // ← get real line content from file
|
|
3954
|
-
if (!tagRegex.test(endLineText))
|
|
3955
|
-
continue;
|
|
3956
|
-
for (let i = startLine; i <= endLine; i++) {
|
|
3957
|
-
const original = lines[i];
|
|
3958
|
-
if (replaceWithEmptyLine) {
|
|
3959
|
-
lines[i] = '';
|
|
3960
|
-
}
|
|
3961
|
-
else {
|
|
3962
|
-
lines[i] = '/* */' + ' '.repeat(Math.max(0, original.length - 4));
|
|
3963
|
-
}
|
|
3964
|
-
}
|
|
3965
|
-
}
|
|
3966
|
-
const result = lines.join('\n');
|
|
3967
|
-
return result;
|
|
3968
|
-
}
|
|
3969
|
-
UtilsTypescript.removeTaggedImportExport = removeTaggedImportExport;
|
|
3970
|
-
//#endregion
|
|
3971
|
-
//#region remove tagged array objects
|
|
3972
|
-
function removeTaggedArrayObjects(tsFileContent, tags, replaceWithEmptyLine = false) {
|
|
3973
|
-
const sourceFile = createSourceFile('temp.ts', tsFileContent, ScriptTarget.Latest, true, ScriptKind.TS);
|
|
3974
|
-
const lines = tsFileContent.split(/\r?\n/);
|
|
3975
|
-
const tagRegex = new RegExp(tags.map(t => Utils.escapeStringForRegEx(t)).join('|'), 'i');
|
|
3976
|
-
function hasTag(node) {
|
|
3977
|
-
const fullText = sourceFile.getFullText();
|
|
3978
|
-
// comments BEFORE object
|
|
3979
|
-
const leading = getLeadingCommentRanges(fullText, node.getFullStart()) ?? [];
|
|
3980
|
-
for (const c of leading) {
|
|
3981
|
-
const text = fullText.slice(c.pos, c.end);
|
|
3982
|
-
if (tagRegex.test(text))
|
|
3983
|
-
return true;
|
|
3984
|
-
}
|
|
3985
|
-
// comments AFTER `{` (same-line)
|
|
3986
|
-
const trailing = getTrailingCommentRanges(fullText, node.getStart()) ?? [];
|
|
3987
|
-
for (const c of trailing) {
|
|
3988
|
-
const text = fullText.slice(c.pos, c.end);
|
|
3989
|
-
if (tagRegex.test(text))
|
|
3990
|
-
return true;
|
|
3991
|
-
}
|
|
3992
|
-
return false;
|
|
3993
|
-
}
|
|
3994
|
-
function commentOutNode(node) {
|
|
3995
|
-
const startLine = sourceFile.getLineAndCharacterOfPosition(node.getStart()).line;
|
|
3996
|
-
const endLine = sourceFile.getLineAndCharacterOfPosition(node.getEnd()).line;
|
|
3997
|
-
for (let i = startLine; i <= endLine; i++) {
|
|
3998
|
-
const original = lines[i];
|
|
3999
|
-
if (replaceWithEmptyLine) {
|
|
4000
|
-
lines[i] = '';
|
|
4001
|
-
}
|
|
4002
|
-
else {
|
|
4003
|
-
lines[i] = '/* */' + ' '.repeat(Math.max(0, original.length - 4));
|
|
4004
|
-
}
|
|
4005
|
-
}
|
|
4006
|
-
}
|
|
4007
|
-
function visit(node) {
|
|
4008
|
-
if (isArrayLiteralExpression(node)) {
|
|
4009
|
-
for (const element of node.elements) {
|
|
4010
|
-
if (isObjectLiteralExpression(element) && hasTag(element)) {
|
|
4011
|
-
commentOutNode(element);
|
|
4012
|
-
}
|
|
4013
|
-
}
|
|
4014
|
-
}
|
|
4015
|
-
forEachChild(node, visit);
|
|
4016
|
-
}
|
|
4017
|
-
visit(sourceFile);
|
|
4018
|
-
return lines.join('\n');
|
|
4019
|
-
}
|
|
4020
|
-
UtilsTypescript.removeTaggedArrayObjects = removeTaggedArrayObjects;
|
|
4021
|
-
//#endregion
|
|
4022
|
-
//#region remove tagged lines
|
|
4023
|
-
function removeTaggedLines(tsFileContent, tags, replaceWithEmptyLine = false) {
|
|
4024
|
-
const lines = tsFileContent.split(/\r?\n/);
|
|
4025
|
-
const tagRegex = new RegExp(tags
|
|
4026
|
-
.filter(Boolean)
|
|
4027
|
-
.map(t => Utils.escapeStringForRegEx(t))
|
|
4028
|
-
.join('|'), 'i');
|
|
4029
|
-
for (let i = 0; i < lines.length; i++) {
|
|
4030
|
-
const original = lines[i];
|
|
4031
|
-
if (!tagRegex.test(original))
|
|
4032
|
-
continue;
|
|
4033
|
-
// preserve line length
|
|
4034
|
-
if (replaceWithEmptyLine) {
|
|
4035
|
-
lines[i] = '';
|
|
4036
|
-
}
|
|
4037
|
-
else {
|
|
4038
|
-
lines[i] = '/* */' + ' '.repeat(Math.max(0, original.length - 4));
|
|
4039
|
-
}
|
|
4040
|
-
}
|
|
4041
|
-
return lines.join('\n');
|
|
4042
|
-
}
|
|
4043
|
-
UtilsTypescript.removeTaggedLines = removeTaggedLines;
|
|
4044
|
-
//#endregion
|
|
4045
|
-
//#region add content below placeholder
|
|
4046
|
-
function addBelowPlaceholder(tsFileContent, placeholderTag, contentToAdd) {
|
|
4047
|
-
const lines = tsFileContent.split(/\r?\n/);
|
|
4048
|
-
const insertLines = contentToAdd.split(/\r?\n/);
|
|
4049
|
-
const placeholderRegex = new RegExp(Utils.escapeStringForRegEx(placeholderTag), 'i');
|
|
4050
|
-
for (let i = 0; i < lines.length; i++) {
|
|
4051
|
-
if (!placeholderRegex.test(lines[i]))
|
|
4052
|
-
continue;
|
|
4053
|
-
// insert directly BELOW the placeholder line
|
|
4054
|
-
lines.splice(i + 1, 0, ...insertLines);
|
|
4055
|
-
break;
|
|
4056
|
-
}
|
|
4057
|
-
return lines.join('\n');
|
|
4058
|
-
}
|
|
4059
|
-
UtilsTypescript.addBelowPlaceholder = addBelowPlaceholder;
|
|
4060
|
-
//#endregion
|
|
4061
|
-
//#region wrap first imports in region
|
|
4062
|
-
UtilsTypescript.wrapFirstImportsInImportsRegion = (fileContent) => {
|
|
4063
3959
|
/* */
|
|
4064
3960
|
/* */
|
|
4065
3961
|
/* */
|
|
@@ -4099,6 +3995,16 @@ var UtilsTypescript;
|
|
|
4099
3995
|
/* */
|
|
4100
3996
|
/* */
|
|
4101
3997
|
/* */
|
|
3998
|
+
/* */
|
|
3999
|
+
return (void 0);
|
|
4000
|
+
};
|
|
4001
|
+
//#endregion
|
|
4002
|
+
//#region transform Angular component standalone option
|
|
4003
|
+
/**
|
|
4004
|
+
* Transition methods ng18 => ng19
|
|
4005
|
+
* Adds standalone: false if not exists in component decorator
|
|
4006
|
+
*/
|
|
4007
|
+
function transformComponentStandaloneOption(sourceText) {
|
|
4102
4008
|
/* */
|
|
4103
4009
|
/* */
|
|
4104
4010
|
/* */
|
|
@@ -4133,27 +4039,16 @@ var UtilsTypescript;
|
|
|
4133
4039
|
/* */
|
|
4134
4040
|
/* */
|
|
4135
4041
|
return (void 0);
|
|
4136
|
-
}
|
|
4042
|
+
}
|
|
4043
|
+
UtilsTypescript.transformComponentStandaloneOption = transformComponentStandaloneOption;
|
|
4137
4044
|
//#endregion
|
|
4138
|
-
//#region
|
|
4139
|
-
const
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
result = result.slice(0, edit.pos) + edit.text + result.slice(edit.pos);
|
|
4144
|
-
}
|
|
4145
|
-
return result;
|
|
4045
|
+
//#region escape @ in html text
|
|
4046
|
+
const escapeAtInHtmlText = (fileContent) => {
|
|
4047
|
+
return fileContent.replace(/>([^<@]*?)@([^<]*)</g, (_match, before, after) => {
|
|
4048
|
+
return `>${before}@${after}<`;
|
|
4049
|
+
});
|
|
4146
4050
|
};
|
|
4147
|
-
|
|
4148
|
-
* wrap class field with decorators
|
|
4149
|
-
* wrap class methods with decorators
|
|
4150
|
-
*/
|
|
4151
|
-
function wrapContentClassMembersDecoratorsWithRegion(classFileContent, wrapTag = '@websql') {
|
|
4152
|
-
/* */
|
|
4153
|
-
/* */
|
|
4154
|
-
/* */
|
|
4155
|
-
/* */
|
|
4156
|
-
/* */
|
|
4051
|
+
UtilsTypescript.fixHtmlTemplatesInDir = (directoryPath) => {
|
|
4157
4052
|
/* */
|
|
4158
4053
|
/* */
|
|
4159
4054
|
/* */
|
|
@@ -4177,6 +4072,11 @@ var UtilsTypescript;
|
|
|
4177
4072
|
/* */
|
|
4178
4073
|
/* */
|
|
4179
4074
|
/* */
|
|
4075
|
+
return (void 0);
|
|
4076
|
+
};
|
|
4077
|
+
//#endregion
|
|
4078
|
+
//#region remove tagged imports/exports
|
|
4079
|
+
function removeTaggedImportExport(tsFileContent, tags, replaceWithEmptyLine = false) {
|
|
4180
4080
|
/* */
|
|
4181
4081
|
/* */
|
|
4182
4082
|
/* */
|
|
@@ -4196,16 +4096,6 @@ var UtilsTypescript;
|
|
|
4196
4096
|
/* */
|
|
4197
4097
|
/* */
|
|
4198
4098
|
/* */
|
|
4199
|
-
return (void 0);
|
|
4200
|
-
}
|
|
4201
|
-
UtilsTypescript.wrapContentClassMembersDecoratorsWithRegion = wrapContentClassMembersDecoratorsWithRegion;
|
|
4202
|
-
const buildQualifiedRegex = (qualifiedName) => {
|
|
4203
|
-
const parts = qualifiedName.split('.');
|
|
4204
|
-
const escapedParts = parts.map(p => p.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
|
|
4205
|
-
const pattern = '\\b' + escapedParts.join('\\s*\\.\\s*') + '\\b';
|
|
4206
|
-
return new RegExp(pattern, 'g');
|
|
4207
|
-
};
|
|
4208
|
-
function transformFlatImports(sourceText, mapping) {
|
|
4209
4099
|
/* */
|
|
4210
4100
|
/* */
|
|
4211
4101
|
/* */
|
|
@@ -4239,6 +4129,12 @@ var UtilsTypescript;
|
|
|
4239
4129
|
/* */
|
|
4240
4130
|
/* */
|
|
4241
4131
|
/* */
|
|
4132
|
+
return (void 0);
|
|
4133
|
+
}
|
|
4134
|
+
UtilsTypescript.removeTaggedImportExport = removeTaggedImportExport;
|
|
4135
|
+
//#endregion
|
|
4136
|
+
//#region remove tagged array objects
|
|
4137
|
+
function removeTaggedArrayObjects(tsFileContent, tags, replaceWithEmptyLine = false) {
|
|
4242
4138
|
/* */
|
|
4243
4139
|
/* */
|
|
4244
4140
|
/* */
|
|
@@ -4273,12 +4169,6 @@ var UtilsTypescript;
|
|
|
4273
4169
|
/* */
|
|
4274
4170
|
/* */
|
|
4275
4171
|
/* */
|
|
4276
|
-
return (void 0);
|
|
4277
|
-
}
|
|
4278
|
-
UtilsTypescript.transformFlatImports = transformFlatImports;
|
|
4279
|
-
//#endregion
|
|
4280
|
-
//#region clear require cache recursive
|
|
4281
|
-
UtilsTypescript.clearRequireCacheRecursive = (modulePath, seen = new Set()) => {
|
|
4282
4172
|
/* */
|
|
4283
4173
|
/* */
|
|
4284
4174
|
/* */
|
|
@@ -4293,51 +4183,6 @@ var UtilsTypescript;
|
|
|
4293
4183
|
/* */
|
|
4294
4184
|
/* */
|
|
4295
4185
|
/* */
|
|
4296
|
-
return (void 0);
|
|
4297
|
-
};
|
|
4298
|
-
//#endregion
|
|
4299
|
-
//#region add or update import if not exists
|
|
4300
|
-
UtilsTypescript.addOrUpdateImportIfNotExists = (tsFileContent, identifiers, fromModule) => {
|
|
4301
|
-
const idents = Array.isArray(identifiers) ? identifiers : [identifiers];
|
|
4302
|
-
const impRegex = new RegExp(`${'imp' + 'ort'}\\s*\\{([^}]*)\\}\\s*from\\s*['"]${fromModule}['"];?`, 'm');
|
|
4303
|
-
const match = tsFileContent.match(impRegex);
|
|
4304
|
-
// ----------------------------------------------------
|
|
4305
|
-
// 1. Import exists → merge identifiers
|
|
4306
|
-
// ----------------------------------------------------
|
|
4307
|
-
if (match) {
|
|
4308
|
-
const existing = match[1]
|
|
4309
|
-
.split(',')
|
|
4310
|
-
.map(s => s.trim())
|
|
4311
|
-
.filter(Boolean);
|
|
4312
|
-
const merged = Array.from(new Set([...existing, ...idents])).sort();
|
|
4313
|
-
const updatedImport = `import { ${merged.join(', ')} } from '${fromModule}';`;
|
|
4314
|
-
return tsFileContent.replace(match[0], updatedImport);
|
|
4315
|
-
}
|
|
4316
|
-
// ----------------------------------------------------
|
|
4317
|
-
// 2. Import does NOT exist → insert into //#region imports
|
|
4318
|
-
// ----------------------------------------------------
|
|
4319
|
-
const newImport = `${'imp' + 'ort'} { ${idents.join(', ')} } from '${fromModule}';\n`;
|
|
4320
|
-
const regRegex = new RegExp(`\\/\\/\\#${'reg' + 'ion'} imports\\s*\\n([\\s\\S]*?)\\/\\/\\#${'endr' + 'egion'}`, 'm');
|
|
4321
|
-
const regionMatch = tsFileContent.match(regRegex);
|
|
4322
|
-
if (regionMatch) {
|
|
4323
|
-
const regStart = regionMatch.index + regionMatch[0].indexOf('\n') + 1;
|
|
4324
|
-
return (tsFileContent.slice(0, regStart) +
|
|
4325
|
-
newImport +
|
|
4326
|
-
tsFileContent.slice(regStart));
|
|
4327
|
-
}
|
|
4328
|
-
// ----------------------------------------------------
|
|
4329
|
-
// 3. Fallback → insert at very top (after 'use strict')
|
|
4330
|
-
// ----------------------------------------------------
|
|
4331
|
-
const useStrictMatch = tsFileContent.match(/^(['"])use strict\1;\s*/m);
|
|
4332
|
-
if (useStrictMatch) {
|
|
4333
|
-
const idx = useStrictMatch.index + useStrictMatch[0].length;
|
|
4334
|
-
return tsFileContent.slice(0, idx) + newImport + tsFileContent.slice(idx);
|
|
4335
|
-
}
|
|
4336
|
-
return newImport + tsFileContent;
|
|
4337
|
-
};
|
|
4338
|
-
//#endregion
|
|
4339
|
-
//#region migrate from ng modules to standalone v21
|
|
4340
|
-
UtilsTypescript.migrateFromNgModulesToStandaloneV21 = (tsFileContent, projectName) => {
|
|
4341
4186
|
/* */
|
|
4342
4187
|
/* */
|
|
4343
4188
|
/* */
|
|
@@ -4364,6 +4209,12 @@ var UtilsTypescript;
|
|
|
4364
4209
|
/* */
|
|
4365
4210
|
/* */
|
|
4366
4211
|
/* */
|
|
4212
|
+
return (void 0);
|
|
4213
|
+
}
|
|
4214
|
+
UtilsTypescript.removeTaggedArrayObjects = removeTaggedArrayObjects;
|
|
4215
|
+
//#endregion
|
|
4216
|
+
//#region remove tagged lines
|
|
4217
|
+
function removeTaggedLines(tsFileContent, tags, replaceWithEmptyLine = false) {
|
|
4367
4218
|
/* */
|
|
4368
4219
|
/* */
|
|
4369
4220
|
/* */
|
|
@@ -4392,6 +4243,12 @@ var UtilsTypescript;
|
|
|
4392
4243
|
/* */
|
|
4393
4244
|
/* */
|
|
4394
4245
|
/* */
|
|
4246
|
+
return (void 0);
|
|
4247
|
+
}
|
|
4248
|
+
UtilsTypescript.removeTaggedLines = removeTaggedLines;
|
|
4249
|
+
//#endregion
|
|
4250
|
+
//#region add content below placeholder
|
|
4251
|
+
function addBelowPlaceholder(tsFileContent, placeholderTag, contentToAdd) {
|
|
4395
4252
|
/* */
|
|
4396
4253
|
/* */
|
|
4397
4254
|
/* */
|
|
@@ -4412,6 +4269,13 @@ var UtilsTypescript;
|
|
|
4412
4269
|
/* */
|
|
4413
4270
|
/* */
|
|
4414
4271
|
/* */
|
|
4272
|
+
/* */
|
|
4273
|
+
return (void 0);
|
|
4274
|
+
}
|
|
4275
|
+
UtilsTypescript.addBelowPlaceholder = addBelowPlaceholder;
|
|
4276
|
+
//#endregion
|
|
4277
|
+
//#region wrap first imports in region
|
|
4278
|
+
UtilsTypescript.wrapFirstImportsInImportsRegion = (fileContent) => {
|
|
4415
4279
|
/* */
|
|
4416
4280
|
/* */
|
|
4417
4281
|
/* */
|
|
@@ -4490,18 +4354,9 @@ var UtilsTypescript;
|
|
|
4490
4354
|
return (void 0);
|
|
4491
4355
|
};
|
|
4492
4356
|
//#endregion
|
|
4493
|
-
//#region
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
*
|
|
4497
|
-
* @example
|
|
4498
|
-
* calculateRelativeImportPath(
|
|
4499
|
-
* 'mypath/to/file/here.ts',
|
|
4500
|
-
* 'mypath/to/other/file/there.ts'
|
|
4501
|
-
* )
|
|
4502
|
-
* => '../other/file/there'
|
|
4503
|
-
*/
|
|
4504
|
-
UtilsTypescript.calculateRelativeImportPath = (fileRelativePathFrom, fileRelativePathTo) => {
|
|
4357
|
+
//#region wrap entities class fields with region
|
|
4358
|
+
const applyEdits = (original, edits) => {
|
|
4359
|
+
/* */
|
|
4505
4360
|
/* */
|
|
4506
4361
|
/* */
|
|
4507
4362
|
/* */
|
|
@@ -4511,6 +4366,13 @@ var UtilsTypescript;
|
|
|
4511
4366
|
/* */
|
|
4512
4367
|
/* */
|
|
4513
4368
|
/* */
|
|
4369
|
+
return (void 0);
|
|
4370
|
+
};
|
|
4371
|
+
/**
|
|
4372
|
+
* wrap class field with decorators
|
|
4373
|
+
* wrap class methods with decorators
|
|
4374
|
+
*/
|
|
4375
|
+
function wrapContentClassMembersDecoratorsWithRegion(classFileContent, wrapTag = '@web' + 'sql') {
|
|
4514
4376
|
/* */
|
|
4515
4377
|
/* */
|
|
4516
4378
|
/* */
|
|
@@ -4522,11 +4384,6 @@ var UtilsTypescript;
|
|
|
4522
4384
|
/* */
|
|
4523
4385
|
/* */
|
|
4524
4386
|
/* */
|
|
4525
|
-
return (void 0);
|
|
4526
|
-
};
|
|
4527
|
-
//#endregion
|
|
4528
|
-
//#region inject imports into imports region function
|
|
4529
|
-
UtilsTypescript.injectImportsIntoImportsRegion = (content, importsToAdd) => {
|
|
4530
4387
|
/* */
|
|
4531
4388
|
/* */
|
|
4532
4389
|
/* */
|
|
@@ -4551,20 +4408,6 @@ var UtilsTypescript;
|
|
|
4551
4408
|
/* */
|
|
4552
4409
|
/* */
|
|
4553
4410
|
/* */
|
|
4554
|
-
return (void 0);
|
|
4555
|
-
};
|
|
4556
|
-
function categoryToString(cat) {
|
|
4557
|
-
return cat === DiagnosticCategory.Error
|
|
4558
|
-
? 'error'
|
|
4559
|
-
: cat === DiagnosticCategory.Warning
|
|
4560
|
-
? 'warning'
|
|
4561
|
-
: cat === DiagnosticCategory.Suggestion
|
|
4562
|
-
? 'suggestion'
|
|
4563
|
-
: cat === DiagnosticCategory.Message
|
|
4564
|
-
? 'message'
|
|
4565
|
-
: 'unknown';
|
|
4566
|
-
}
|
|
4567
|
-
function parseTsDiagnostic(diagnostic) {
|
|
4568
4411
|
/* */
|
|
4569
4412
|
/* */
|
|
4570
4413
|
/* */
|
|
@@ -4580,6 +4423,10 @@ var UtilsTypescript;
|
|
|
4580
4423
|
/* */
|
|
4581
4424
|
/* */
|
|
4582
4425
|
/* */
|
|
4426
|
+
return (void 0);
|
|
4427
|
+
}
|
|
4428
|
+
UtilsTypescript.wrapContentClassMembersDecoratorsWithRegion = wrapContentClassMembersDecoratorsWithRegion;
|
|
4429
|
+
const buildQualifiedRegex = (qualifiedName) => {
|
|
4583
4430
|
/* */
|
|
4584
4431
|
/* */
|
|
4585
4432
|
/* */
|
|
@@ -4593,6 +4440,9 @@ var UtilsTypescript;
|
|
|
4593
4440
|
/* */
|
|
4594
4441
|
/* */
|
|
4595
4442
|
/* */
|
|
4443
|
+
return (void 0);
|
|
4444
|
+
};
|
|
4445
|
+
function transformFlatImports(sourceText, mapping) {
|
|
4596
4446
|
/* */
|
|
4597
4447
|
/* */
|
|
4598
4448
|
/* */
|
|
@@ -4607,17 +4457,6 @@ var UtilsTypescript;
|
|
|
4607
4457
|
/* */
|
|
4608
4458
|
/* */
|
|
4609
4459
|
/* */
|
|
4610
|
-
return (void 0);
|
|
4611
|
-
}
|
|
4612
|
-
UtilsTypescript.parseTsDiagnostic = parseTsDiagnostic;
|
|
4613
|
-
//#endregion
|
|
4614
|
-
//#region spliting namespaces
|
|
4615
|
-
UtilsTypescript.NSSPLITNAMESAPCE = '__NS__';
|
|
4616
|
-
//#region spliting namespaces / normalize content
|
|
4617
|
-
UtilsTypescript.hoistTrailingChainComments = (code) => {
|
|
4618
|
-
return code.replace(/(.*?)(\/\/[^\n]*?)\n(\s*\.)/g, (_m, expr, comment, dot) => `${comment}\n${expr.trim()}\n${dot}`);
|
|
4619
|
-
};
|
|
4620
|
-
UtilsTypescript.normalizeBrokenLines = (code) => {
|
|
4621
4460
|
/* */
|
|
4622
4461
|
/* */
|
|
4623
4462
|
/* */
|
|
@@ -4674,6 +4513,12 @@ var UtilsTypescript;
|
|
|
4674
4513
|
/* */
|
|
4675
4514
|
/* */
|
|
4676
4515
|
/* */
|
|
4516
|
+
return (void 0);
|
|
4517
|
+
}
|
|
4518
|
+
UtilsTypescript.transformFlatImports = transformFlatImports;
|
|
4519
|
+
//#endregion
|
|
4520
|
+
//#region clear require cache recursive
|
|
4521
|
+
UtilsTypescript.clearRequireCacheRecursive = (modulePath, seen = new Set()) => {
|
|
4677
4522
|
/* */
|
|
4678
4523
|
/* */
|
|
4679
4524
|
/* */
|
|
@@ -4693,14 +4538,9 @@ var UtilsTypescript;
|
|
|
4693
4538
|
/* */
|
|
4694
4539
|
return (void 0);
|
|
4695
4540
|
};
|
|
4696
|
-
UtilsTypescript.collapseFluentChains = (code) => {
|
|
4697
|
-
return code.replace(/(\S)\n\s*\./g, '$1.');
|
|
4698
|
-
};
|
|
4699
4541
|
//#endregion
|
|
4700
|
-
//#region
|
|
4701
|
-
UtilsTypescript.
|
|
4702
|
-
/* */
|
|
4703
|
-
/* */
|
|
4542
|
+
//#region add or update import if not exists
|
|
4543
|
+
UtilsTypescript.addOrUpdateImportIfNotExists = (tsFileContent, identifiers, fromModule) => {
|
|
4704
4544
|
/* */
|
|
4705
4545
|
/* */
|
|
4706
4546
|
/* */
|
|
@@ -4767,6 +4607,11 @@ var UtilsTypescript;
|
|
|
4767
4607
|
/* */
|
|
4768
4608
|
/* */
|
|
4769
4609
|
/* */
|
|
4610
|
+
return (void 0);
|
|
4611
|
+
};
|
|
4612
|
+
//#endregion
|
|
4613
|
+
//#region migrate from ng modules to standalone v21
|
|
4614
|
+
UtilsTypescript.migrateFromNgModulesToStandaloneV21 = (tsFileContent, projectName) => {
|
|
4770
4615
|
/* */
|
|
4771
4616
|
/* */
|
|
4772
4617
|
/* */
|
|
@@ -4919,6 +4764,21 @@ var UtilsTypescript;
|
|
|
4919
4764
|
/* */
|
|
4920
4765
|
/* */
|
|
4921
4766
|
/* */
|
|
4767
|
+
return (void 0);
|
|
4768
|
+
};
|
|
4769
|
+
//#endregion
|
|
4770
|
+
//#region calculate relative import path function
|
|
4771
|
+
/**
|
|
4772
|
+
* Calculate relative import path between two project-relative files.
|
|
4773
|
+
*
|
|
4774
|
+
* @example
|
|
4775
|
+
* calculateRelativeImportPath(
|
|
4776
|
+
* 'mypath/to/file/here.ts',
|
|
4777
|
+
* 'mypath/to/other/file/there.ts'
|
|
4778
|
+
* )
|
|
4779
|
+
* => '../other/file/there'
|
|
4780
|
+
*/
|
|
4781
|
+
UtilsTypescript.calculateRelativeImportPath = (fileRelativePathFrom, fileRelativePathTo) => {
|
|
4922
4782
|
/* */
|
|
4923
4783
|
/* */
|
|
4924
4784
|
/* */
|
|
@@ -4942,6 +4802,11 @@ var UtilsTypescript;
|
|
|
4942
4802
|
/* */
|
|
4943
4803
|
/* */
|
|
4944
4804
|
/* */
|
|
4805
|
+
return (void 0);
|
|
4806
|
+
};
|
|
4807
|
+
//#endregion
|
|
4808
|
+
//#region inject imports into imports region function
|
|
4809
|
+
UtilsTypescript.injectImportsIntoImportsRegion = (content, importsToAdd) => {
|
|
4945
4810
|
/* */
|
|
4946
4811
|
/* */
|
|
4947
4812
|
/* */
|
|
@@ -4969,6 +4834,9 @@ var UtilsTypescript;
|
|
|
4969
4834
|
/* */
|
|
4970
4835
|
/* */
|
|
4971
4836
|
/* */
|
|
4837
|
+
return (void 0);
|
|
4838
|
+
};
|
|
4839
|
+
function categoryToString(cat) {
|
|
4972
4840
|
/* */
|
|
4973
4841
|
/* */
|
|
4974
4842
|
/* */
|
|
@@ -4982,6 +4850,9 @@ var UtilsTypescript;
|
|
|
4982
4850
|
/* */
|
|
4983
4851
|
/* */
|
|
4984
4852
|
/* */
|
|
4853
|
+
return (void 0);
|
|
4854
|
+
}
|
|
4855
|
+
function parseTsDiagnostic(diagnostic) {
|
|
4985
4856
|
/* */
|
|
4986
4857
|
/* */
|
|
4987
4858
|
/* */
|
|
@@ -5027,6 +4898,17 @@ var UtilsTypescript;
|
|
|
5027
4898
|
/* */
|
|
5028
4899
|
/* */
|
|
5029
4900
|
/* */
|
|
4901
|
+
return (void 0);
|
|
4902
|
+
}
|
|
4903
|
+
UtilsTypescript.parseTsDiagnostic = parseTsDiagnostic;
|
|
4904
|
+
//#endregion
|
|
4905
|
+
//#region spliting namespaces
|
|
4906
|
+
UtilsTypescript.NSSPLITNAMESAPCE = '__NS__';
|
|
4907
|
+
//#region spliting namespaces / normalize content
|
|
4908
|
+
UtilsTypescript.hoistTrailingChainComments = (code) => {
|
|
4909
|
+
return code.replace(/(.*?)(\/\/[^\n]*?)\n(\s*\.)/g, (_m, expr, comment, dot) => `${comment}\n${expr.trim()}\n${dot}`);
|
|
4910
|
+
};
|
|
4911
|
+
UtilsTypescript.normalizeBrokenLines = (code) => {
|
|
5030
4912
|
/* */
|
|
5031
4913
|
/* */
|
|
5032
4914
|
/* */
|
|
@@ -5088,19 +4970,9 @@ var UtilsTypescript;
|
|
|
5088
4970
|
/* */
|
|
5089
4971
|
/* */
|
|
5090
4972
|
/* */
|
|
5091
|
-
return (void 0);
|
|
5092
|
-
};
|
|
5093
|
-
//#endregion
|
|
5094
|
-
//#region spliting namespaces / split for file
|
|
5095
|
-
UtilsTypescript.splitNamespaceForFile = (fileAbsPath) => {
|
|
5096
4973
|
/* */
|
|
5097
4974
|
/* */
|
|
5098
4975
|
/* */
|
|
5099
|
-
return (void 0);
|
|
5100
|
-
};
|
|
5101
|
-
//#endregion
|
|
5102
|
-
//#region spliting namespaces / replace namespaces with long names
|
|
5103
|
-
UtilsTypescript.replaceNamespaceWithLongNames = (content, namespacesMapObj) => {
|
|
5104
4976
|
/* */
|
|
5105
4977
|
/* */
|
|
5106
4978
|
/* */
|
|
@@ -5113,6 +4985,14 @@ var UtilsTypescript;
|
|
|
5113
4985
|
/* */
|
|
5114
4986
|
/* */
|
|
5115
4987
|
/* */
|
|
4988
|
+
return (void 0);
|
|
4989
|
+
};
|
|
4990
|
+
UtilsTypescript.collapseFluentChains = (code) => {
|
|
4991
|
+
return code.replace(/(\S)\n\s*\./g, '$1.');
|
|
4992
|
+
};
|
|
4993
|
+
//#endregion
|
|
4994
|
+
//#region spliting namespaces / split for content
|
|
4995
|
+
UtilsTypescript.splitNamespaceForContent = (content) => {
|
|
5116
4996
|
/* */
|
|
5117
4997
|
/* */
|
|
5118
4998
|
/* */
|
|
@@ -5126,11 +5006,6 @@ var UtilsTypescript;
|
|
|
5126
5006
|
/* */
|
|
5127
5007
|
/* */
|
|
5128
5008
|
/* */
|
|
5129
|
-
return (void 0);
|
|
5130
|
-
};
|
|
5131
|
-
//#endregion
|
|
5132
|
-
//#region spliting namespaces / replace import namepspace with exploaded ns
|
|
5133
|
-
UtilsTypescript.replaceImportNamespaceWithWithExplodedNamespace = (content, namespacesReplace, renamedImportsOrExports, currentPackageName, replaceInAllImports = false) => {
|
|
5134
5009
|
/* */
|
|
5135
5010
|
/* */
|
|
5136
5011
|
/* */
|
|
@@ -5398,11 +5273,6 @@ var UtilsTypescript;
|
|
|
5398
5273
|
/* */
|
|
5399
5274
|
/* */
|
|
5400
5275
|
/* */
|
|
5401
|
-
return (void 0);
|
|
5402
|
-
};
|
|
5403
|
-
//#endregion
|
|
5404
|
-
//#region spliting namespaces / update result with renames
|
|
5405
|
-
UtilsTypescript.updateSplitNamespaceResultMapReplaceObj = (result, renamedList) => {
|
|
5406
5276
|
/* */
|
|
5407
5277
|
/* */
|
|
5408
5278
|
/* */
|
|
@@ -5480,10 +5350,6 @@ var UtilsTypescript;
|
|
|
5480
5350
|
/* */
|
|
5481
5351
|
/* */
|
|
5482
5352
|
/* */
|
|
5483
|
-
return (void 0);
|
|
5484
|
-
};
|
|
5485
|
-
//#endregion
|
|
5486
|
-
UtilsTypescript.updateSplitNamespaceReExports = (splitNamespacesForPackages, reExports) => {
|
|
5487
5353
|
/* */
|
|
5488
5354
|
/* */
|
|
5489
5355
|
/* */
|
|
@@ -5519,6 +5385,11 @@ var UtilsTypescript;
|
|
|
5519
5385
|
/* */
|
|
5520
5386
|
/* */
|
|
5521
5387
|
/* */
|
|
5388
|
+
return (void 0);
|
|
5389
|
+
};
|
|
5390
|
+
//#endregion
|
|
5391
|
+
//#region spliting namespaces / split for file
|
|
5392
|
+
UtilsTypescript.splitNamespaceForFile = (fileAbsPath) => {
|
|
5522
5393
|
/* */
|
|
5523
5394
|
/* */
|
|
5524
5395
|
/* */
|
|
@@ -5527,9 +5398,9 @@ var UtilsTypescript;
|
|
|
5527
5398
|
/* */
|
|
5528
5399
|
return (void 0);
|
|
5529
5400
|
};
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5401
|
+
//#endregion
|
|
5402
|
+
//#region spliting namespaces / replace namespaces with long names
|
|
5403
|
+
UtilsTypescript.replaceNamespaceWithLongNames = (content, namespacesMapObj) => {
|
|
5533
5404
|
/* */
|
|
5534
5405
|
/* */
|
|
5535
5406
|
/* */
|
|
@@ -5558,6 +5429,11 @@ var UtilsTypescript;
|
|
|
5558
5429
|
/* */
|
|
5559
5430
|
/* */
|
|
5560
5431
|
/* */
|
|
5432
|
+
return (void 0);
|
|
5433
|
+
};
|
|
5434
|
+
//#endregion
|
|
5435
|
+
//#region spliting namespaces / replace import namepspace with exploaded ns
|
|
5436
|
+
UtilsTypescript.replaceImportNamespaceWithWithExplodedNamespace = (content, namespacesReplace, renamedImportsOrExports, currentPackageName, replaceInAllImports = false) => {
|
|
5561
5437
|
/* */
|
|
5562
5438
|
/* */
|
|
5563
5439
|
/* */
|
|
@@ -5587,9 +5463,6 @@ var UtilsTypescript;
|
|
|
5587
5463
|
/* */
|
|
5588
5464
|
/* */
|
|
5589
5465
|
/* */
|
|
5590
|
-
return (void 0);
|
|
5591
|
-
};
|
|
5592
|
-
UtilsTypescript.gatherExportsMapFromIndex = (pathToIndexTs, isomorphicImportsMap) => {
|
|
5593
5466
|
/* */
|
|
5594
5467
|
/* */
|
|
5595
5468
|
/* */
|
|
@@ -5606,26 +5479,6 @@ var UtilsTypescript;
|
|
|
5606
5479
|
/* */
|
|
5607
5480
|
/* */
|
|
5608
5481
|
/* */
|
|
5609
|
-
return (void 0);
|
|
5610
|
-
};
|
|
5611
|
-
//#endregion
|
|
5612
|
-
//#endregion
|
|
5613
|
-
//#region get clean import
|
|
5614
|
-
UtilsTypescript.getCleanImport = (importName) => {
|
|
5615
|
-
if (!importName) {
|
|
5616
|
-
return importName;
|
|
5617
|
-
}
|
|
5618
|
-
return importName
|
|
5619
|
-
.replace(new RegExp(Utils.escapeStringForRegEx(`/browser-prod`) + '$'), '')
|
|
5620
|
-
.replace(new RegExp(Utils.escapeStringForRegEx(`/websql-prod`) + '$'), '')
|
|
5621
|
-
.replace(new RegExp(Utils.escapeStringForRegEx(`/lib-prod`) + '$'), '')
|
|
5622
|
-
.replace(new RegExp(Utils.escapeStringForRegEx(`/browser`) + '$'), '')
|
|
5623
|
-
.replace(new RegExp(Utils.escapeStringForRegEx(`/websql`) + '$'), '')
|
|
5624
|
-
.replace(new RegExp(Utils.escapeStringForRegEx(`/lib`) + '$'), '');
|
|
5625
|
-
};
|
|
5626
|
-
//#endregion
|
|
5627
|
-
//#region refactor classses into namespaces
|
|
5628
|
-
UtilsTypescript.refactorClassToNamespace = (sourceText) => {
|
|
5629
5482
|
/* */
|
|
5630
5483
|
/* */
|
|
5631
5484
|
/* */
|
|
@@ -5774,16 +5627,6 @@ var UtilsTypescript;
|
|
|
5774
5627
|
/* */
|
|
5775
5628
|
/* */
|
|
5776
5629
|
/* */
|
|
5777
|
-
return (void 0);
|
|
5778
|
-
};
|
|
5779
|
-
//#endregion
|
|
5780
|
-
//#region strip ts from js
|
|
5781
|
-
/**
|
|
5782
|
-
* @param tsContent TypeScript file content
|
|
5783
|
-
* @param absTsFile needed for debugging
|
|
5784
|
-
* @returns js content
|
|
5785
|
-
*/
|
|
5786
|
-
UtilsTypescript.stripTsTypesIntoJsFromContent = (tsContent, absTsFile) => {
|
|
5787
5630
|
/* */
|
|
5788
5631
|
/* */
|
|
5789
5632
|
/* */
|
|
@@ -5809,9 +5652,6 @@ var UtilsTypescript;
|
|
|
5809
5652
|
/* */
|
|
5810
5653
|
/* */
|
|
5811
5654
|
/* */
|
|
5812
|
-
return (void 0);
|
|
5813
|
-
};
|
|
5814
|
-
UtilsTypescript.stripTsTypesIntoJs = async (entrypointFolderAbsPathWithIndexTs, outFolderWithIndexJS) => {
|
|
5815
5655
|
/* */
|
|
5816
5656
|
/* */
|
|
5817
5657
|
/* */
|
|
@@ -5832,16 +5672,6 @@ var UtilsTypescript;
|
|
|
5832
5672
|
/* */
|
|
5833
5673
|
/* */
|
|
5834
5674
|
/* */
|
|
5835
|
-
return (void 0);
|
|
5836
|
-
};
|
|
5837
|
-
//#endregion
|
|
5838
|
-
//#region check if file has default export
|
|
5839
|
-
UtilsTypescript.fileHasDefaultExport = (absFilePath) => {
|
|
5840
|
-
return UtilsTypescript.hasDefaultExport(UtilsFilesFoldersSync.readFile(absFilePath));
|
|
5841
|
-
};
|
|
5842
|
-
//#endregion
|
|
5843
|
-
//#region check if content has default export
|
|
5844
|
-
UtilsTypescript.hasDefaultExport = (sourceText) => {
|
|
5845
5675
|
/* */
|
|
5846
5676
|
/* */
|
|
5847
5677
|
/* */
|
|
@@ -5874,6 +5704,11 @@ var UtilsTypescript;
|
|
|
5874
5704
|
/* */
|
|
5875
5705
|
/* */
|
|
5876
5706
|
/* */
|
|
5707
|
+
return (void 0);
|
|
5708
|
+
};
|
|
5709
|
+
//#endregion
|
|
5710
|
+
//#region spliting namespaces / update result with renames
|
|
5711
|
+
UtilsTypescript.updateSplitNamespaceResultMapReplaceObj = (result, renamedList) => {
|
|
5877
5712
|
/* */
|
|
5878
5713
|
/* */
|
|
5879
5714
|
/* */
|
|
@@ -5892,11 +5727,6 @@ var UtilsTypescript;
|
|
|
5892
5727
|
/* */
|
|
5893
5728
|
/* */
|
|
5894
5729
|
/* */
|
|
5895
|
-
return (void 0);
|
|
5896
|
-
};
|
|
5897
|
-
//#endregion
|
|
5898
|
-
//#region remove all first level regions in file
|
|
5899
|
-
UtilsTypescript.removeFirstLevelRegionsInFile = (filePath) => {
|
|
5900
5730
|
/* */
|
|
5901
5731
|
/* */
|
|
5902
5732
|
/* */
|
|
@@ -5906,11 +5736,6 @@ var UtilsTypescript;
|
|
|
5906
5736
|
/* */
|
|
5907
5737
|
/* */
|
|
5908
5738
|
/* */
|
|
5909
|
-
return (void 0);
|
|
5910
|
-
};
|
|
5911
|
-
//#endregion
|
|
5912
|
-
//#region remove all first level regions from content
|
|
5913
|
-
UtilsTypescript.removeFirstLevelRegions = (content) => {
|
|
5914
5739
|
/* */
|
|
5915
5740
|
/* */
|
|
5916
5741
|
/* */
|
|
@@ -5955,11 +5780,6 @@ var UtilsTypescript;
|
|
|
5955
5780
|
/* */
|
|
5956
5781
|
/* */
|
|
5957
5782
|
/* */
|
|
5958
|
-
return (void 0);
|
|
5959
|
-
};
|
|
5960
|
-
//#endregion
|
|
5961
|
-
//#region add export to not exported first level symbols in file
|
|
5962
|
-
UtilsTypescript.addExportToNotExportedFirstLevelSymbolsInFile = (filePath) => {
|
|
5963
5783
|
/* */
|
|
5964
5784
|
/* */
|
|
5965
5785
|
/* */
|
|
@@ -5972,8 +5792,8 @@ var UtilsTypescript;
|
|
|
5972
5792
|
return (void 0);
|
|
5973
5793
|
};
|
|
5974
5794
|
//#endregion
|
|
5975
|
-
//#region
|
|
5976
|
-
UtilsTypescript.
|
|
5795
|
+
//#region pliting namespaces / update split namespaces re exports
|
|
5796
|
+
UtilsTypescript.updateSplitNamespaceReExports = (splitNamespacesForPackages, reExports) => {
|
|
5977
5797
|
/* */
|
|
5978
5798
|
/* */
|
|
5979
5799
|
/* */
|
|
@@ -5983,16 +5803,6 @@ var UtilsTypescript;
|
|
|
5983
5803
|
/* */
|
|
5984
5804
|
/* */
|
|
5985
5805
|
/* */
|
|
5986
|
-
return (void 0);
|
|
5987
|
-
};
|
|
5988
|
-
//#endregion
|
|
5989
|
-
})(UtilsTypescript || (UtilsTypescript = {}));
|
|
5990
|
-
|
|
5991
|
-
var UtilsCjsPackage;
|
|
5992
|
-
(function (UtilsCjsPackage) {
|
|
5993
|
-
//#endregion
|
|
5994
|
-
//#region build cjs version for
|
|
5995
|
-
async function buildCjsVersionFor(packageName, pathToNodeModulesRoot, overrideOutputFolder = 'cjs', options = {}) {
|
|
5996
5806
|
/* */
|
|
5997
5807
|
/* */
|
|
5998
5808
|
/* */
|
|
@@ -6028,6 +5838,9 @@ var UtilsCjsPackage;
|
|
|
6028
5838
|
/* */
|
|
6029
5839
|
/* */
|
|
6030
5840
|
/* */
|
|
5841
|
+
return (void 0);
|
|
5842
|
+
};
|
|
5843
|
+
const gatherPackageExportedThirdPartyNamespaces = (program, entryFilePath, onlyConsideThisIsomorphicImport) => {
|
|
6031
5844
|
/* */
|
|
6032
5845
|
/* */
|
|
6033
5846
|
/* */
|
|
@@ -6090,6 +5903,9 @@ var UtilsCjsPackage;
|
|
|
6090
5903
|
/* */
|
|
6091
5904
|
/* */
|
|
6092
5905
|
/* */
|
|
5906
|
+
return (void 0);
|
|
5907
|
+
};
|
|
5908
|
+
UtilsTypescript.gatherExportsMapFromIndex = (pathToIndexTs, isomorphicImportsMap) => {
|
|
6093
5909
|
/* */
|
|
6094
5910
|
/* */
|
|
6095
5911
|
/* */
|
|
@@ -6109,6 +5925,12 @@ var UtilsCjsPackage;
|
|
|
6109
5925
|
/* */
|
|
6110
5926
|
/* */
|
|
6111
5927
|
/* */
|
|
5928
|
+
return (void 0);
|
|
5929
|
+
};
|
|
5930
|
+
//#endregion
|
|
5931
|
+
//#endregion
|
|
5932
|
+
//#region get clean import
|
|
5933
|
+
UtilsTypescript.getCleanImport = (importName) => {
|
|
6112
5934
|
/* */
|
|
6113
5935
|
/* */
|
|
6114
5936
|
/* */
|
|
@@ -6126,6 +5948,11 @@ var UtilsCjsPackage;
|
|
|
6126
5948
|
/* */
|
|
6127
5949
|
/* */
|
|
6128
5950
|
/* */
|
|
5951
|
+
return (void 0);
|
|
5952
|
+
};
|
|
5953
|
+
//#endregion
|
|
5954
|
+
//#region refactor classses into namespaces
|
|
5955
|
+
UtilsTypescript.refactorClassToNamespace = (sourceText) => {
|
|
6129
5956
|
/* */
|
|
6130
5957
|
/* */
|
|
6131
5958
|
/* */
|
|
@@ -6175,9 +6002,545 @@ var UtilsCjsPackage;
|
|
|
6175
6002
|
/* */
|
|
6176
6003
|
/* */
|
|
6177
6004
|
/* */
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6005
|
+
/* */
|
|
6006
|
+
/* */
|
|
6007
|
+
/* */
|
|
6008
|
+
/* */
|
|
6009
|
+
/* */
|
|
6010
|
+
/* */
|
|
6011
|
+
/* */
|
|
6012
|
+
/* */
|
|
6013
|
+
/* */
|
|
6014
|
+
/* */
|
|
6015
|
+
/* */
|
|
6016
|
+
/* */
|
|
6017
|
+
/* */
|
|
6018
|
+
/* */
|
|
6019
|
+
/* */
|
|
6020
|
+
/* */
|
|
6021
|
+
/* */
|
|
6022
|
+
/* */
|
|
6023
|
+
/* */
|
|
6024
|
+
/* */
|
|
6025
|
+
/* */
|
|
6026
|
+
/* */
|
|
6027
|
+
/* */
|
|
6028
|
+
/* */
|
|
6029
|
+
/* */
|
|
6030
|
+
/* */
|
|
6031
|
+
/* */
|
|
6032
|
+
/* */
|
|
6033
|
+
/* */
|
|
6034
|
+
/* */
|
|
6035
|
+
/* */
|
|
6036
|
+
/* */
|
|
6037
|
+
/* */
|
|
6038
|
+
/* */
|
|
6039
|
+
/* */
|
|
6040
|
+
/* */
|
|
6041
|
+
/* */
|
|
6042
|
+
/* */
|
|
6043
|
+
/* */
|
|
6044
|
+
/* */
|
|
6045
|
+
/* */
|
|
6046
|
+
/* */
|
|
6047
|
+
/* */
|
|
6048
|
+
/* */
|
|
6049
|
+
/* */
|
|
6050
|
+
/* */
|
|
6051
|
+
/* */
|
|
6052
|
+
/* */
|
|
6053
|
+
/* */
|
|
6054
|
+
/* */
|
|
6055
|
+
/* */
|
|
6056
|
+
/* */
|
|
6057
|
+
/* */
|
|
6058
|
+
/* */
|
|
6059
|
+
/* */
|
|
6060
|
+
/* */
|
|
6061
|
+
/* */
|
|
6062
|
+
/* */
|
|
6063
|
+
/* */
|
|
6064
|
+
/* */
|
|
6065
|
+
/* */
|
|
6066
|
+
/* */
|
|
6067
|
+
/* */
|
|
6068
|
+
/* */
|
|
6069
|
+
/* */
|
|
6070
|
+
/* */
|
|
6071
|
+
/* */
|
|
6072
|
+
/* */
|
|
6073
|
+
/* */
|
|
6074
|
+
/* */
|
|
6075
|
+
/* */
|
|
6076
|
+
/* */
|
|
6077
|
+
/* */
|
|
6078
|
+
/* */
|
|
6079
|
+
/* */
|
|
6080
|
+
/* */
|
|
6081
|
+
/* */
|
|
6082
|
+
/* */
|
|
6083
|
+
/* */
|
|
6084
|
+
/* */
|
|
6085
|
+
/* */
|
|
6086
|
+
/* */
|
|
6087
|
+
/* */
|
|
6088
|
+
/* */
|
|
6089
|
+
/* */
|
|
6090
|
+
/* */
|
|
6091
|
+
/* */
|
|
6092
|
+
/* */
|
|
6093
|
+
/* */
|
|
6094
|
+
/* */
|
|
6095
|
+
/* */
|
|
6096
|
+
/* */
|
|
6097
|
+
/* */
|
|
6098
|
+
/* */
|
|
6099
|
+
/* */
|
|
6100
|
+
/* */
|
|
6101
|
+
/* */
|
|
6102
|
+
/* */
|
|
6103
|
+
/* */
|
|
6104
|
+
/* */
|
|
6105
|
+
/* */
|
|
6106
|
+
/* */
|
|
6107
|
+
/* */
|
|
6108
|
+
/* */
|
|
6109
|
+
/* */
|
|
6110
|
+
/* */
|
|
6111
|
+
/* */
|
|
6112
|
+
/* */
|
|
6113
|
+
/* */
|
|
6114
|
+
/* */
|
|
6115
|
+
return (void 0);
|
|
6116
|
+
};
|
|
6117
|
+
//#endregion
|
|
6118
|
+
//#region strip ts from js
|
|
6119
|
+
/**
|
|
6120
|
+
* @param tsContent TypeScript file content
|
|
6121
|
+
* @param absTsFile needed for debugging
|
|
6122
|
+
* @returns js content
|
|
6123
|
+
*/
|
|
6124
|
+
UtilsTypescript.stripTsTypesIntoJsFromContent = (tsContent, absTsFile) => {
|
|
6125
|
+
/* */
|
|
6126
|
+
/* */
|
|
6127
|
+
/* */
|
|
6128
|
+
/* */
|
|
6129
|
+
/* */
|
|
6130
|
+
/* */
|
|
6131
|
+
/* */
|
|
6132
|
+
/* */
|
|
6133
|
+
/* */
|
|
6134
|
+
/* */
|
|
6135
|
+
/* */
|
|
6136
|
+
/* */
|
|
6137
|
+
/* */
|
|
6138
|
+
/* */
|
|
6139
|
+
/* */
|
|
6140
|
+
/* */
|
|
6141
|
+
/* */
|
|
6142
|
+
/* */
|
|
6143
|
+
/* */
|
|
6144
|
+
/* */
|
|
6145
|
+
/* */
|
|
6146
|
+
/* */
|
|
6147
|
+
/* */
|
|
6148
|
+
/* */
|
|
6149
|
+
/* */
|
|
6150
|
+
/* */
|
|
6151
|
+
/* */
|
|
6152
|
+
/* */
|
|
6153
|
+
return (void 0);
|
|
6154
|
+
};
|
|
6155
|
+
UtilsTypescript.stripTsTypesIntoJs = async (entrypointFolderAbsPathWithIndexTs, outFolderWithIndexJS) => {
|
|
6156
|
+
/* */
|
|
6157
|
+
/* */
|
|
6158
|
+
/* */
|
|
6159
|
+
/* */
|
|
6160
|
+
/* */
|
|
6161
|
+
/* */
|
|
6162
|
+
/* */
|
|
6163
|
+
/* */
|
|
6164
|
+
/* */
|
|
6165
|
+
/* */
|
|
6166
|
+
/* */
|
|
6167
|
+
/* */
|
|
6168
|
+
/* */
|
|
6169
|
+
/* */
|
|
6170
|
+
/* */
|
|
6171
|
+
/* */
|
|
6172
|
+
/* */
|
|
6173
|
+
/* */
|
|
6174
|
+
/* */
|
|
6175
|
+
/* */
|
|
6176
|
+
/* */
|
|
6177
|
+
/* */
|
|
6178
|
+
/* */
|
|
6179
|
+
return (void 0);
|
|
6180
|
+
};
|
|
6181
|
+
//#endregion
|
|
6182
|
+
//#region check if file has default export
|
|
6183
|
+
UtilsTypescript.fileHasDefaultExport = (absFilePath) => {
|
|
6184
|
+
/* */
|
|
6185
|
+
/* */
|
|
6186
|
+
/* */
|
|
6187
|
+
/* */
|
|
6188
|
+
/* */
|
|
6189
|
+
return (void 0);
|
|
6190
|
+
};
|
|
6191
|
+
//#endregion
|
|
6192
|
+
//#region check if content has default export
|
|
6193
|
+
UtilsTypescript.hasDefaultExport = (sourceText) => {
|
|
6194
|
+
/* */
|
|
6195
|
+
/* */
|
|
6196
|
+
/* */
|
|
6197
|
+
/* */
|
|
6198
|
+
/* */
|
|
6199
|
+
/* */
|
|
6200
|
+
/* */
|
|
6201
|
+
/* */
|
|
6202
|
+
/* */
|
|
6203
|
+
/* */
|
|
6204
|
+
/* */
|
|
6205
|
+
/* */
|
|
6206
|
+
/* */
|
|
6207
|
+
/* */
|
|
6208
|
+
/* */
|
|
6209
|
+
/* */
|
|
6210
|
+
/* */
|
|
6211
|
+
/* */
|
|
6212
|
+
/* */
|
|
6213
|
+
/* */
|
|
6214
|
+
/* */
|
|
6215
|
+
/* */
|
|
6216
|
+
/* */
|
|
6217
|
+
/* */
|
|
6218
|
+
/* */
|
|
6219
|
+
/* */
|
|
6220
|
+
/* */
|
|
6221
|
+
/* */
|
|
6222
|
+
/* */
|
|
6223
|
+
/* */
|
|
6224
|
+
/* */
|
|
6225
|
+
/* */
|
|
6226
|
+
/* */
|
|
6227
|
+
/* */
|
|
6228
|
+
/* */
|
|
6229
|
+
/* */
|
|
6230
|
+
/* */
|
|
6231
|
+
/* */
|
|
6232
|
+
/* */
|
|
6233
|
+
/* */
|
|
6234
|
+
/* */
|
|
6235
|
+
/* */
|
|
6236
|
+
/* */
|
|
6237
|
+
/* */
|
|
6238
|
+
/* */
|
|
6239
|
+
/* */
|
|
6240
|
+
/* */
|
|
6241
|
+
/* */
|
|
6242
|
+
/* */
|
|
6243
|
+
/* */
|
|
6244
|
+
/* */
|
|
6245
|
+
/* */
|
|
6246
|
+
/* */
|
|
6247
|
+
return (void 0);
|
|
6248
|
+
};
|
|
6249
|
+
//#endregion
|
|
6250
|
+
//#region remove all first level regions in file
|
|
6251
|
+
UtilsTypescript.removeFirstLevelRegionsInFile = (filePath) => {
|
|
6252
|
+
/* */
|
|
6253
|
+
/* */
|
|
6254
|
+
/* */
|
|
6255
|
+
/* */
|
|
6256
|
+
/* */
|
|
6257
|
+
/* */
|
|
6258
|
+
/* */
|
|
6259
|
+
/* */
|
|
6260
|
+
/* */
|
|
6261
|
+
/* */
|
|
6262
|
+
/* */
|
|
6263
|
+
/* */
|
|
6264
|
+
return (void 0);
|
|
6265
|
+
};
|
|
6266
|
+
//#endregion
|
|
6267
|
+
//#region remove all first level regions from content
|
|
6268
|
+
UtilsTypescript.removeFirstLevelRegions = (content) => {
|
|
6269
|
+
/* */
|
|
6270
|
+
/* */
|
|
6271
|
+
/* */
|
|
6272
|
+
/* */
|
|
6273
|
+
/* */
|
|
6274
|
+
/* */
|
|
6275
|
+
/* */
|
|
6276
|
+
/* */
|
|
6277
|
+
/* */
|
|
6278
|
+
/* */
|
|
6279
|
+
/* */
|
|
6280
|
+
/* */
|
|
6281
|
+
/* */
|
|
6282
|
+
/* */
|
|
6283
|
+
/* */
|
|
6284
|
+
/* */
|
|
6285
|
+
/* */
|
|
6286
|
+
/* */
|
|
6287
|
+
/* */
|
|
6288
|
+
/* */
|
|
6289
|
+
/* */
|
|
6290
|
+
/* */
|
|
6291
|
+
/* */
|
|
6292
|
+
/* */
|
|
6293
|
+
/* */
|
|
6294
|
+
/* */
|
|
6295
|
+
/* */
|
|
6296
|
+
/* */
|
|
6297
|
+
/* */
|
|
6298
|
+
/* */
|
|
6299
|
+
/* */
|
|
6300
|
+
/* */
|
|
6301
|
+
/* */
|
|
6302
|
+
/* */
|
|
6303
|
+
/* */
|
|
6304
|
+
/* */
|
|
6305
|
+
/* */
|
|
6306
|
+
/* */
|
|
6307
|
+
/* */
|
|
6308
|
+
/* */
|
|
6309
|
+
/* */
|
|
6310
|
+
/* */
|
|
6311
|
+
/* */
|
|
6312
|
+
/* */
|
|
6313
|
+
/* */
|
|
6314
|
+
/* */
|
|
6315
|
+
/* */
|
|
6316
|
+
return (void 0);
|
|
6317
|
+
};
|
|
6318
|
+
//#endregion
|
|
6319
|
+
//#region add export to not exported first level symbols in file
|
|
6320
|
+
UtilsTypescript.addExportToNotExportedFirstLevelSymbolsInFile = (filePath) => {
|
|
6321
|
+
/* */
|
|
6322
|
+
/* */
|
|
6323
|
+
/* */
|
|
6324
|
+
/* */
|
|
6325
|
+
/* */
|
|
6326
|
+
/* */
|
|
6327
|
+
/* */
|
|
6328
|
+
/* */
|
|
6329
|
+
/* */
|
|
6330
|
+
/* */
|
|
6331
|
+
/* */
|
|
6332
|
+
/* */
|
|
6333
|
+
return (void 0);
|
|
6334
|
+
};
|
|
6335
|
+
//#endregion
|
|
6336
|
+
//#region add export to not exported first level symbols in content
|
|
6337
|
+
UtilsTypescript.addExportToNotExportedFirstLevelSymbolsInContent = (content) => {
|
|
6338
|
+
/* */
|
|
6339
|
+
/* */
|
|
6340
|
+
/* */
|
|
6341
|
+
/* */
|
|
6342
|
+
/* */
|
|
6343
|
+
/* */
|
|
6344
|
+
/* */
|
|
6345
|
+
/* */
|
|
6346
|
+
/* */
|
|
6347
|
+
/* */
|
|
6348
|
+
/* */
|
|
6349
|
+
return (void 0);
|
|
6350
|
+
};
|
|
6351
|
+
//#endregion
|
|
6352
|
+
})(UtilsTypescript || (UtilsTypescript = {}));
|
|
6353
|
+
|
|
6354
|
+
var UtilsCjsPackage;
|
|
6355
|
+
(function (UtilsCjsPackage) {
|
|
6356
|
+
//#endregion
|
|
6357
|
+
//#region build cjs version for
|
|
6358
|
+
async function buildCjsVersionFor(packageName, pathToNodeModulesRoot, overrideOutputFolder = 'cjs', options = {}) {
|
|
6359
|
+
/* */
|
|
6360
|
+
/* */
|
|
6361
|
+
/* */
|
|
6362
|
+
/* */
|
|
6363
|
+
/* */
|
|
6364
|
+
/* */
|
|
6365
|
+
/* */
|
|
6366
|
+
/* */
|
|
6367
|
+
/* */
|
|
6368
|
+
/* */
|
|
6369
|
+
/* */
|
|
6370
|
+
/* */
|
|
6371
|
+
/* */
|
|
6372
|
+
/* */
|
|
6373
|
+
/* */
|
|
6374
|
+
/* */
|
|
6375
|
+
/* */
|
|
6376
|
+
/* */
|
|
6377
|
+
/* */
|
|
6378
|
+
/* */
|
|
6379
|
+
/* */
|
|
6380
|
+
/* */
|
|
6381
|
+
/* */
|
|
6382
|
+
/* */
|
|
6383
|
+
/* */
|
|
6384
|
+
/* */
|
|
6385
|
+
/* */
|
|
6386
|
+
/* */
|
|
6387
|
+
/* */
|
|
6388
|
+
/* */
|
|
6389
|
+
/* */
|
|
6390
|
+
/* */
|
|
6391
|
+
/* */
|
|
6392
|
+
/* */
|
|
6393
|
+
/* */
|
|
6394
|
+
/* */
|
|
6395
|
+
/* */
|
|
6396
|
+
/* */
|
|
6397
|
+
/* */
|
|
6398
|
+
/* */
|
|
6399
|
+
/* */
|
|
6400
|
+
/* */
|
|
6401
|
+
/* */
|
|
6402
|
+
/* */
|
|
6403
|
+
/* */
|
|
6404
|
+
/* */
|
|
6405
|
+
/* */
|
|
6406
|
+
/* */
|
|
6407
|
+
/* */
|
|
6408
|
+
/* */
|
|
6409
|
+
/* */
|
|
6410
|
+
/* */
|
|
6411
|
+
/* */
|
|
6412
|
+
/* */
|
|
6413
|
+
/* */
|
|
6414
|
+
/* */
|
|
6415
|
+
/* */
|
|
6416
|
+
/* */
|
|
6417
|
+
/* */
|
|
6418
|
+
/* */
|
|
6419
|
+
/* */
|
|
6420
|
+
/* */
|
|
6421
|
+
/* */
|
|
6422
|
+
/* */
|
|
6423
|
+
/* */
|
|
6424
|
+
/* */
|
|
6425
|
+
/* */
|
|
6426
|
+
/* */
|
|
6427
|
+
/* */
|
|
6428
|
+
/* */
|
|
6429
|
+
/* */
|
|
6430
|
+
/* */
|
|
6431
|
+
/* */
|
|
6432
|
+
/* */
|
|
6433
|
+
/* */
|
|
6434
|
+
/* */
|
|
6435
|
+
/* */
|
|
6436
|
+
/* */
|
|
6437
|
+
/* */
|
|
6438
|
+
/* */
|
|
6439
|
+
/* */
|
|
6440
|
+
/* */
|
|
6441
|
+
/* */
|
|
6442
|
+
/* */
|
|
6443
|
+
/* */
|
|
6444
|
+
/* */
|
|
6445
|
+
/* */
|
|
6446
|
+
/* */
|
|
6447
|
+
/* */
|
|
6448
|
+
/* */
|
|
6449
|
+
/* */
|
|
6450
|
+
/* */
|
|
6451
|
+
/* */
|
|
6452
|
+
/* */
|
|
6453
|
+
/* */
|
|
6454
|
+
/* */
|
|
6455
|
+
/* */
|
|
6456
|
+
/* */
|
|
6457
|
+
/* */
|
|
6458
|
+
/* */
|
|
6459
|
+
/* */
|
|
6460
|
+
/* */
|
|
6461
|
+
/* */
|
|
6462
|
+
/* */
|
|
6463
|
+
/* */
|
|
6464
|
+
/* */
|
|
6465
|
+
/* */
|
|
6466
|
+
/* */
|
|
6467
|
+
/* */
|
|
6468
|
+
/* */
|
|
6469
|
+
/* */
|
|
6470
|
+
/* */
|
|
6471
|
+
/* */
|
|
6472
|
+
/* */
|
|
6473
|
+
/* */
|
|
6474
|
+
/* */
|
|
6475
|
+
/* */
|
|
6476
|
+
/* */
|
|
6477
|
+
/* */
|
|
6478
|
+
/* */
|
|
6479
|
+
/* */
|
|
6480
|
+
/* */
|
|
6481
|
+
/* */
|
|
6482
|
+
/* */
|
|
6483
|
+
/* */
|
|
6484
|
+
/* */
|
|
6485
|
+
/* */
|
|
6486
|
+
/* */
|
|
6487
|
+
/* */
|
|
6488
|
+
/* */
|
|
6489
|
+
/* */
|
|
6490
|
+
/* */
|
|
6491
|
+
/* */
|
|
6492
|
+
/* */
|
|
6493
|
+
/* */
|
|
6494
|
+
/* */
|
|
6495
|
+
/* */
|
|
6496
|
+
/* */
|
|
6497
|
+
/* */
|
|
6498
|
+
/* */
|
|
6499
|
+
/* */
|
|
6500
|
+
/* */
|
|
6501
|
+
/* */
|
|
6502
|
+
/* */
|
|
6503
|
+
/* */
|
|
6504
|
+
/* */
|
|
6505
|
+
/* */
|
|
6506
|
+
/* */
|
|
6507
|
+
/* */
|
|
6508
|
+
/* */
|
|
6509
|
+
/* */
|
|
6510
|
+
/* */
|
|
6511
|
+
/* */
|
|
6512
|
+
/* */
|
|
6513
|
+
/* */
|
|
6514
|
+
/* */
|
|
6515
|
+
/* */
|
|
6516
|
+
/* */
|
|
6517
|
+
/* */
|
|
6518
|
+
/* */
|
|
6519
|
+
/* */
|
|
6520
|
+
/* */
|
|
6521
|
+
/* */
|
|
6522
|
+
/* */
|
|
6523
|
+
/* */
|
|
6524
|
+
/* */
|
|
6525
|
+
/* */
|
|
6526
|
+
/* */
|
|
6527
|
+
/* */
|
|
6528
|
+
/* */
|
|
6529
|
+
/* */
|
|
6530
|
+
/* */
|
|
6531
|
+
/* */
|
|
6532
|
+
/* */
|
|
6533
|
+
/* */
|
|
6534
|
+
/* */
|
|
6535
|
+
/* */
|
|
6536
|
+
/* */
|
|
6537
|
+
/* */
|
|
6538
|
+
/* */
|
|
6539
|
+
/* */
|
|
6540
|
+
/* */
|
|
6541
|
+
return (void 0);
|
|
6542
|
+
}
|
|
6543
|
+
UtilsCjsPackage.buildCjsVersionFor = buildCjsVersionFor;
|
|
6181
6544
|
//#endregion
|
|
6182
6545
|
//#region export resolution
|
|
6183
6546
|
function getRootExport(exportsField) {
|
|
@@ -8368,7 +8731,7 @@ ${cwd}
|
|
|
8368
8731
|
f = f?.trim();
|
|
8369
8732
|
return !!f;
|
|
8370
8733
|
});
|
|
8371
|
-
return list;
|
|
8734
|
+
return (list || []).map(c => crossPlatformPath(c));
|
|
8372
8735
|
}
|
|
8373
8736
|
catch (error) {
|
|
8374
8737
|
return [];
|
|
@@ -8398,15 +8761,12 @@ ${cwd}
|
|
|
8398
8761
|
}
|
|
8399
8762
|
});
|
|
8400
8763
|
};
|
|
8401
|
-
git.stagedFiles = (cwd
|
|
8764
|
+
git.stagedFiles = (cwd) => {
|
|
8402
8765
|
cwd = crossPlatformPath(cwd).replace(/\/$/, '');
|
|
8403
8766
|
const command = `git diff --name-only --cached`.trim();
|
|
8404
8767
|
const result = Helpers.commandOutputAsString(command, cwd, {}) || '';
|
|
8405
8768
|
return (result ? result.split('\n') : []).map(relative => {
|
|
8406
|
-
|
|
8407
|
-
return crossPlatformPath(relative);
|
|
8408
|
-
}
|
|
8409
|
-
return crossPlatformPath([cwd, relative]);
|
|
8769
|
+
return crossPlatformPath(relative);
|
|
8410
8770
|
});
|
|
8411
8771
|
};
|
|
8412
8772
|
git.getChangedFiles = async (cwd, commitHash) => {
|
|
@@ -9976,6 +10336,7 @@ ${cwd}
|
|
|
9976
10336
|
return f;
|
|
9977
10337
|
};
|
|
9978
10338
|
/**
|
|
10339
|
+
* @deprecated DONT USE THIS
|
|
9979
10340
|
* Strips TypeScript types and emits plain JS files.
|
|
9980
10341
|
* - No type-checking
|
|
9981
10342
|
* - No bundling
|
|
@@ -10023,6 +10384,8 @@ ${cwd}
|
|
|
10023
10384
|
/* */
|
|
10024
10385
|
/* */
|
|
10025
10386
|
/* */
|
|
10387
|
+
/* */
|
|
10388
|
+
/* */
|
|
10026
10389
|
return (void 0);
|
|
10027
10390
|
};
|
|
10028
10391
|
HelpersTaon.bundleCodeIntoSingleFile = async (pathToJsFile, outputFilePath, options) => {
|
|
@@ -10348,35 +10711,162 @@ ${cwd}
|
|
|
10348
10711
|
/* */
|
|
10349
10712
|
/* */
|
|
10350
10713
|
/* */
|
|
10351
|
-
};
|
|
10352
|
-
HelpersTaon.checkEnvironment = (deps) => {
|
|
10714
|
+
};
|
|
10715
|
+
HelpersTaon.checkEnvironment = (deps) => {
|
|
10716
|
+
/* */
|
|
10717
|
+
/* */
|
|
10718
|
+
return (void 0);
|
|
10719
|
+
};
|
|
10720
|
+
/**
|
|
10721
|
+
* Mixing for multiclass inheritance
|
|
10722
|
+
*
|
|
10723
|
+
* How to use It:
|
|
10724
|
+
*
|
|
10725
|
+
* class Wolverine {}
|
|
10726
|
+
* class Jean {}
|
|
10727
|
+
* export class Child {}
|
|
10728
|
+
* export interface MyChild implements Wolverine, Jean {}
|
|
10729
|
+
* applyMixing(Child,[Wolverine, Jean]);
|
|
10730
|
+
*
|
|
10731
|
+
* @param derivedCtor Target Class
|
|
10732
|
+
* @param baseCtors Base Classes
|
|
10733
|
+
*/
|
|
10734
|
+
function applyMixins(derivedCtor, baseCtors) {
|
|
10735
|
+
baseCtors.forEach(baseCtor => {
|
|
10736
|
+
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
|
|
10737
|
+
Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
|
|
10738
|
+
});
|
|
10739
|
+
});
|
|
10740
|
+
}
|
|
10741
|
+
HelpersTaon.applyMixins = applyMixins;
|
|
10742
|
+
})(HelpersTaon || (HelpersTaon = {}));
|
|
10743
|
+
|
|
10744
|
+
//#region imports
|
|
10745
|
+
//#endregion
|
|
10746
|
+
//#region constants
|
|
10747
|
+
//#region constants / defult db
|
|
10748
|
+
const defaultDb$2 = {
|
|
10749
|
+
projects: [],
|
|
10750
|
+
};
|
|
10751
|
+
;
|
|
10752
|
+
//#endregion
|
|
10753
|
+
class CoreProject {
|
|
10754
|
+
//#region static
|
|
10755
|
+
//#region static / core projects
|
|
10756
|
+
static { this.coreProjects = []; }
|
|
10757
|
+
//#endregion
|
|
10758
|
+
//#region static / from
|
|
10759
|
+
static from(options) {
|
|
10760
|
+
/* */
|
|
10761
|
+
/* */
|
|
10762
|
+
/* */
|
|
10763
|
+
/* */
|
|
10764
|
+
/* */
|
|
10765
|
+
/* */
|
|
10766
|
+
/* */
|
|
10767
|
+
/* */
|
|
10768
|
+
/* */
|
|
10769
|
+
/* */
|
|
10770
|
+
/* */
|
|
10771
|
+
/* */
|
|
10772
|
+
/* */
|
|
10773
|
+
/* */
|
|
10774
|
+
/* */
|
|
10775
|
+
/* */
|
|
10776
|
+
/* */
|
|
10777
|
+
/* */
|
|
10778
|
+
/* */
|
|
10779
|
+
/* */
|
|
10780
|
+
/* */
|
|
10781
|
+
/* */
|
|
10782
|
+
/* */
|
|
10783
|
+
/* */
|
|
10784
|
+
/* */
|
|
10785
|
+
return (void 0);
|
|
10786
|
+
}
|
|
10787
|
+
//#endregion
|
|
10788
|
+
//#endregion
|
|
10789
|
+
//#region constructor
|
|
10790
|
+
constructor() {
|
|
10791
|
+
/**
|
|
10792
|
+
* project environments
|
|
10793
|
+
*/
|
|
10794
|
+
this.environments = [];
|
|
10795
|
+
}
|
|
10796
|
+
/**
|
|
10797
|
+
* core porject name from repo basename
|
|
10798
|
+
*/
|
|
10799
|
+
get name() {
|
|
10800
|
+
return path.basename(this.url).replace(/\.git$/, '');
|
|
10801
|
+
}
|
|
10802
|
+
/**
|
|
10803
|
+
* main (default for reset) branch
|
|
10804
|
+
*/
|
|
10805
|
+
get branch() {
|
|
10806
|
+
return _.first(this.branches);
|
|
10807
|
+
}
|
|
10808
|
+
/**
|
|
10809
|
+
* url for git repo
|
|
10810
|
+
*/
|
|
10811
|
+
get url() {
|
|
10812
|
+
return (this.urlHttp ? this.urlHttp : this.urlSSH) || '';
|
|
10813
|
+
}
|
|
10814
|
+
}
|
|
10815
|
+
const CoreTypescriptProject = CoreProject.from({
|
|
10816
|
+
//#region configuration
|
|
10817
|
+
branches: ['master', 'develop'],
|
|
10818
|
+
environments: [],
|
|
10819
|
+
recognizedFn: project => {
|
|
10820
|
+
/* */
|
|
10821
|
+
/* */
|
|
10822
|
+
/* */
|
|
10823
|
+
/* */
|
|
10824
|
+
/* */
|
|
10825
|
+
/* */
|
|
10826
|
+
/* */
|
|
10827
|
+
/* */
|
|
10828
|
+
/* */
|
|
10829
|
+
return (void 0);
|
|
10830
|
+
},
|
|
10831
|
+
async startCommand({ project }) {
|
|
10832
|
+
/* */
|
|
10833
|
+
/* */
|
|
10834
|
+
/* */
|
|
10835
|
+
/* */
|
|
10836
|
+
/* */
|
|
10837
|
+
/* */
|
|
10838
|
+
/* */
|
|
10839
|
+
return (void 0);
|
|
10840
|
+
},
|
|
10841
|
+
async buildCommand({ project, watch }) {
|
|
10842
|
+
/* */
|
|
10843
|
+
/* */
|
|
10844
|
+
/* */
|
|
10353
10845
|
/* */
|
|
10354
10846
|
/* */
|
|
10355
10847
|
return (void 0);
|
|
10356
|
-
}
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
HelpersTaon.applyMixins = applyMixins;
|
|
10379
|
-
})(HelpersTaon || (HelpersTaon = {}));
|
|
10848
|
+
},
|
|
10849
|
+
//#endregion
|
|
10850
|
+
});
|
|
10851
|
+
const CoreAngularProject = CoreProject.from({
|
|
10852
|
+
//#region configuration
|
|
10853
|
+
extends: CoreTypescriptProject,
|
|
10854
|
+
branches: ['master', 'develop'],
|
|
10855
|
+
environments: [],
|
|
10856
|
+
recognizedFn: project => {
|
|
10857
|
+
return project.hasFile('angular.json');
|
|
10858
|
+
},
|
|
10859
|
+
async startCommand({ project }) {
|
|
10860
|
+
await project.npmHelpers.nodeModules.makeSureInstalled();
|
|
10861
|
+
const port = await project.assignFreePort(4200);
|
|
10862
|
+
project.run(`npm-run ng serve --port ${port}`).sync();
|
|
10863
|
+
},
|
|
10864
|
+
async buildCommand({ project }) {
|
|
10865
|
+
await project.npmHelpers.nodeModules.makeSureInstalled();
|
|
10866
|
+
project.run(`npm-run ng build`).sync();
|
|
10867
|
+
},
|
|
10868
|
+
//#endregion
|
|
10869
|
+
});
|
|
10380
10870
|
|
|
10381
10871
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
10382
10872
|
/**
|
|
@@ -10402,7 +10892,7 @@ const CURRENT_PACKAGE_TAON_VERSION = 'v21';
|
|
|
10402
10892
|
/**
|
|
10403
10893
|
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
10404
10894
|
*/
|
|
10405
|
-
const CURRENT_PACKAGE_VERSION = '21.0.
|
|
10895
|
+
const CURRENT_PACKAGE_VERSION = '21.0.115';
|
|
10406
10896
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
10407
10897
|
|
|
10408
10898
|
//#endregion
|
|
@@ -10434,7 +10924,7 @@ class BaseDb {
|
|
|
10434
10924
|
}
|
|
10435
10925
|
|
|
10436
10926
|
//#endregion
|
|
10437
|
-
const defaultDb$
|
|
10927
|
+
const defaultDb$1 = {
|
|
10438
10928
|
config: {},
|
|
10439
10929
|
};
|
|
10440
10930
|
//#region config database ext
|
|
@@ -10526,7 +11016,7 @@ class SshHttpsPreferenceConfig extends ConfigDatabaseEx {
|
|
|
10526
11016
|
//#endregion
|
|
10527
11017
|
class ConfigDatabase extends BaseDb {
|
|
10528
11018
|
constructor(ins) {
|
|
10529
|
-
super(ins, 'config', defaultDb$
|
|
11019
|
+
super(ins, 'config', defaultDb$1);
|
|
10530
11020
|
this.codeEditor = new CodeEditorConfig('selected-code-editor', this);
|
|
10531
11021
|
this.httpOrHttps = new CodeEditorConfig('selected-git-connection-type', this);
|
|
10532
11022
|
// const editor = await this.codeEditor.getValue
|
|
@@ -10534,12 +11024,12 @@ class ConfigDatabase extends BaseDb {
|
|
|
10534
11024
|
}
|
|
10535
11025
|
|
|
10536
11026
|
//#endregion
|
|
10537
|
-
const defaultDb
|
|
11027
|
+
const defaultDb = {
|
|
10538
11028
|
projects: [],
|
|
10539
11029
|
};
|
|
10540
11030
|
class ProjectDatabase extends BaseDb {
|
|
10541
11031
|
constructor(ins) {
|
|
10542
|
-
super(ins, 'projects', defaultDb
|
|
11032
|
+
super(ins, 'projects', defaultDb);
|
|
10543
11033
|
}
|
|
10544
11034
|
async getAllProjectsFromDB() {
|
|
10545
11035
|
/* */
|
|
@@ -13273,9 +13763,12 @@ class BaseProject {
|
|
|
13273
13763
|
/* */
|
|
13274
13764
|
/* */
|
|
13275
13765
|
/* */
|
|
13766
|
+
/* */
|
|
13276
13767
|
return (void 0);
|
|
13277
13768
|
}
|
|
13278
13769
|
formatAllFiles() {
|
|
13770
|
+
/* */
|
|
13771
|
+
/* */
|
|
13279
13772
|
/* */
|
|
13280
13773
|
/* */
|
|
13281
13774
|
/* */
|
|
@@ -15432,7 +15925,14 @@ class BaseNodeModules {
|
|
|
15432
15925
|
}
|
|
15433
15926
|
//#endregion
|
|
15434
15927
|
//#region reinstall node modules
|
|
15435
|
-
async reinstall(
|
|
15928
|
+
async reinstall(reinstallOptions) {
|
|
15929
|
+
/* */
|
|
15930
|
+
/* */
|
|
15931
|
+
/* */
|
|
15932
|
+
/* */
|
|
15933
|
+
/* */
|
|
15934
|
+
/* */
|
|
15935
|
+
/* */
|
|
15436
15936
|
/* */
|
|
15437
15937
|
/* */
|
|
15438
15938
|
/* */
|
|
@@ -15676,6 +16176,24 @@ class BaseNodeModules {
|
|
|
15676
16176
|
/* */
|
|
15677
16177
|
/* */
|
|
15678
16178
|
/* */
|
|
16179
|
+
/* */
|
|
16180
|
+
/* */
|
|
16181
|
+
/* */
|
|
16182
|
+
/* */
|
|
16183
|
+
/* */
|
|
16184
|
+
/* */
|
|
16185
|
+
/* */
|
|
16186
|
+
/* */
|
|
16187
|
+
/* */
|
|
16188
|
+
/* */
|
|
16189
|
+
/* */
|
|
16190
|
+
/* */
|
|
16191
|
+
/* */
|
|
16192
|
+
/* */
|
|
16193
|
+
/* */
|
|
16194
|
+
/* */
|
|
16195
|
+
/* */
|
|
16196
|
+
/* */
|
|
15679
16197
|
return (void 0);
|
|
15680
16198
|
}
|
|
15681
16199
|
//#endregion
|
|
@@ -16188,14 +16706,139 @@ class BaseNpmHelpers extends BaseFeatureForProject {
|
|
|
16188
16706
|
/* */
|
|
16189
16707
|
/* */
|
|
16190
16708
|
/* */
|
|
16191
|
-
return (void 0);
|
|
16192
|
-
}
|
|
16193
|
-
//#endregion
|
|
16194
|
-
//#region get package version from npm registry
|
|
16195
|
-
getPackageVersionFromNpmRegistry(packageName, options) {
|
|
16709
|
+
return (void 0);
|
|
16710
|
+
}
|
|
16711
|
+
//#endregion
|
|
16712
|
+
//#region get package version from npm registry
|
|
16713
|
+
getPackageVersionFromNpmRegistry(packageName, options) {
|
|
16714
|
+
/* */
|
|
16715
|
+
/* */
|
|
16716
|
+
/* */
|
|
16717
|
+
/* */
|
|
16718
|
+
/* */
|
|
16719
|
+
/* */
|
|
16720
|
+
/* */
|
|
16721
|
+
/* */
|
|
16722
|
+
/* */
|
|
16723
|
+
/* */
|
|
16724
|
+
/* */
|
|
16725
|
+
/* */
|
|
16726
|
+
/* */
|
|
16727
|
+
/* */
|
|
16728
|
+
/* */
|
|
16729
|
+
/* */
|
|
16730
|
+
/* */
|
|
16731
|
+
return (void 0);
|
|
16732
|
+
}
|
|
16733
|
+
}
|
|
16734
|
+
|
|
16735
|
+
class LinkedProject {
|
|
16736
|
+
//#region static
|
|
16737
|
+
//#region static / from
|
|
16738
|
+
static from(options) {
|
|
16739
|
+
const linkedProj = _.merge(new LinkedProject(), _.cloneDeep(options));
|
|
16740
|
+
if (!linkedProj.relativeClonePath) {
|
|
16741
|
+
linkedProj.relativeClonePath = path.basename(linkedProj.remoteUrl().replace('.git', ''));
|
|
16742
|
+
}
|
|
16743
|
+
if (!linkedProj.defaultBranch) {
|
|
16744
|
+
linkedProj.defaultBranch = 'master';
|
|
16745
|
+
}
|
|
16746
|
+
return linkedProj;
|
|
16747
|
+
}
|
|
16748
|
+
//#endregion
|
|
16749
|
+
//#region static / from name
|
|
16750
|
+
static fromName(projectName, currentRemoteUrl, currentBranch) {
|
|
16751
|
+
/* */
|
|
16752
|
+
/* */
|
|
16753
|
+
/* */
|
|
16754
|
+
/* */
|
|
16755
|
+
/* */
|
|
16756
|
+
/* */
|
|
16757
|
+
/* */
|
|
16758
|
+
/* */
|
|
16759
|
+
/* */
|
|
16760
|
+
/* */
|
|
16761
|
+
/* */
|
|
16762
|
+
/* */
|
|
16763
|
+
/* */
|
|
16764
|
+
/* */
|
|
16765
|
+
/* */
|
|
16766
|
+
/* */
|
|
16767
|
+
return (void 0);
|
|
16768
|
+
}
|
|
16769
|
+
//#endregion
|
|
16770
|
+
//#region static / detect
|
|
16771
|
+
static detect(insideLocation, options) {
|
|
16772
|
+
/* */
|
|
16773
|
+
/* */
|
|
16774
|
+
/* */
|
|
16775
|
+
/* */
|
|
16776
|
+
/* */
|
|
16777
|
+
/* */
|
|
16778
|
+
/* */
|
|
16779
|
+
/* */
|
|
16780
|
+
/* */
|
|
16781
|
+
/* */
|
|
16782
|
+
/* */
|
|
16783
|
+
/* */
|
|
16784
|
+
/* */
|
|
16785
|
+
/* */
|
|
16786
|
+
/* */
|
|
16787
|
+
/* */
|
|
16788
|
+
/* */
|
|
16789
|
+
/* */
|
|
16790
|
+
/* */
|
|
16791
|
+
/* */
|
|
16792
|
+
/* */
|
|
16793
|
+
/* */
|
|
16794
|
+
/* */
|
|
16795
|
+
/* */
|
|
16796
|
+
/* */
|
|
16797
|
+
/* */
|
|
16798
|
+
/* */
|
|
16799
|
+
/* */
|
|
16800
|
+
/* */
|
|
16801
|
+
/* */
|
|
16802
|
+
/* */
|
|
16803
|
+
/* */
|
|
16804
|
+
/* */
|
|
16805
|
+
/* */
|
|
16806
|
+
/* */
|
|
16807
|
+
/* */
|
|
16808
|
+
/* */
|
|
16809
|
+
/* */
|
|
16810
|
+
/* */
|
|
16811
|
+
/* */
|
|
16812
|
+
/* */
|
|
16813
|
+
/* */
|
|
16814
|
+
/* */
|
|
16815
|
+
/* */
|
|
16816
|
+
/* */
|
|
16817
|
+
/* */
|
|
16818
|
+
/* */
|
|
16819
|
+
/* */
|
|
16820
|
+
/* */
|
|
16821
|
+
/* */
|
|
16822
|
+
/* */
|
|
16823
|
+
/* */
|
|
16196
16824
|
/* */
|
|
16197
16825
|
/* */
|
|
16198
16826
|
/* */
|
|
16827
|
+
return (void 0);
|
|
16828
|
+
}
|
|
16829
|
+
/**
|
|
16830
|
+
* url for git repo
|
|
16831
|
+
*/
|
|
16832
|
+
remoteUrl() {
|
|
16833
|
+
if (this.repoUrl) {
|
|
16834
|
+
return this.repoUrl;
|
|
16835
|
+
}
|
|
16836
|
+
if (this.repoUrlHttp) {
|
|
16837
|
+
return this.repoUrlHttp;
|
|
16838
|
+
}
|
|
16839
|
+
return this.repoUrlSsh;
|
|
16840
|
+
}
|
|
16841
|
+
remoteUrlTransformed(setOrigin) {
|
|
16199
16842
|
/* */
|
|
16200
16843
|
/* */
|
|
16201
16844
|
/* */
|
|
@@ -16213,6 +16856,23 @@ class BaseNpmHelpers extends BaseFeatureForProject {
|
|
|
16213
16856
|
return (void 0);
|
|
16214
16857
|
}
|
|
16215
16858
|
}
|
|
16859
|
+
class LinkedPorjectsConfig {
|
|
16860
|
+
//#region static
|
|
16861
|
+
//#region static / from
|
|
16862
|
+
static from(options) {
|
|
16863
|
+
options = options || {};
|
|
16864
|
+
options.projects = (options.projects || []).map(linkedProjOrname => {
|
|
16865
|
+
if (_.isString(linkedProjOrname)) {
|
|
16866
|
+
return LinkedProject.fromName(linkedProjOrname);
|
|
16867
|
+
}
|
|
16868
|
+
return LinkedProject.from(linkedProjOrname);
|
|
16869
|
+
});
|
|
16870
|
+
// .sort((a, b) => {
|
|
16871
|
+
// return (a.relativeClonePath || '').localeCompare((b.relativeClonePath || ''));
|
|
16872
|
+
// });
|
|
16873
|
+
return _.merge(new LinkedPorjectsConfig(), _.cloneDeep(options));
|
|
16874
|
+
}
|
|
16875
|
+
}
|
|
16216
16876
|
|
|
16217
16877
|
// import { JsonValue, updateJsoncContent, loadJsonC } from 'tnp-core/src';
|
|
16218
16878
|
//#endregion
|
|
@@ -17057,9 +17717,6 @@ class BaseGit extends BaseFeatureForProject {
|
|
|
17057
17717
|
/* */
|
|
17058
17718
|
/* */
|
|
17059
17719
|
/* */
|
|
17060
|
-
/* */
|
|
17061
|
-
/* */
|
|
17062
|
-
/* */
|
|
17063
17720
|
return (void 0);
|
|
17064
17721
|
}
|
|
17065
17722
|
//#region methods & getters / has action commits to melt
|
|
@@ -17341,11 +17998,6 @@ class BaseGit extends BaseFeatureForProject {
|
|
|
17341
17998
|
/* */
|
|
17342
17999
|
return (void 0);
|
|
17343
18000
|
}
|
|
17344
|
-
get stagedFilesRelativePaths() {
|
|
17345
|
-
/* */
|
|
17346
|
-
/* */
|
|
17347
|
-
return (void 0);
|
|
17348
|
-
}
|
|
17349
18001
|
//#endregion
|
|
17350
18002
|
//#region methods & getters / rename origin
|
|
17351
18003
|
/**
|
|
@@ -20614,30 +21266,26 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
20614
21266
|
/* */
|
|
20615
21267
|
/* */
|
|
20616
21268
|
/* */
|
|
21269
|
+
/* */
|
|
21270
|
+
/* */
|
|
20617
21271
|
return (void 0);
|
|
20618
21272
|
}
|
|
20619
21273
|
//#endregion
|
|
20620
21274
|
//#region commands / pull
|
|
20621
21275
|
async pul() {
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
Please use pul:deep instead pull
|
|
20625
|
-
|
|
20626
|
-
`);
|
|
20627
|
-
await this.pullDeep();
|
|
21276
|
+
await this.pull();
|
|
20628
21277
|
}
|
|
20629
21278
|
async pull() {
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
`);
|
|
20635
|
-
await this.pullDeep();
|
|
21279
|
+
await this.pullDeep({
|
|
21280
|
+
updateType: 'only-this',
|
|
21281
|
+
});
|
|
20636
21282
|
}
|
|
20637
21283
|
async pulDeep() {
|
|
20638
21284
|
await this.pullDeep();
|
|
20639
21285
|
}
|
|
20640
|
-
async pullDeep() {
|
|
21286
|
+
async pullDeep(options) {
|
|
21287
|
+
/* */
|
|
21288
|
+
/* */
|
|
20641
21289
|
/* */
|
|
20642
21290
|
/* */
|
|
20643
21291
|
/* */
|
|
@@ -20662,6 +21310,7 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
20662
21310
|
/* */
|
|
20663
21311
|
/* */
|
|
20664
21312
|
/* */
|
|
21313
|
+
/* */
|
|
20665
21314
|
return (void 0);
|
|
20666
21315
|
}
|
|
20667
21316
|
//#endregion
|
|
@@ -20955,6 +21604,9 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
20955
21604
|
/* */
|
|
20956
21605
|
/* */
|
|
20957
21606
|
/* */
|
|
21607
|
+
/* */
|
|
21608
|
+
/* */
|
|
21609
|
+
/* */
|
|
20958
21610
|
return (void 0);
|
|
20959
21611
|
}
|
|
20960
21612
|
async pAllForce() {
|
|
@@ -20968,6 +21620,8 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
20968
21620
|
return (void 0);
|
|
20969
21621
|
}
|
|
20970
21622
|
async pAll() {
|
|
21623
|
+
/* */
|
|
21624
|
+
/* */
|
|
20971
21625
|
/* */
|
|
20972
21626
|
/* */
|
|
20973
21627
|
return (void 0);
|
|
@@ -20975,7 +21629,12 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
20975
21629
|
/**
|
|
20976
21630
|
* push to all origins
|
|
20977
21631
|
*/
|
|
20978
|
-
async
|
|
21632
|
+
async pushAllOrigins(force = false) {
|
|
21633
|
+
/* */
|
|
21634
|
+
/* */
|
|
21635
|
+
/* */
|
|
21636
|
+
/* */
|
|
21637
|
+
/* */
|
|
20979
21638
|
/* */
|
|
20980
21639
|
/* */
|
|
20981
21640
|
/* */
|
|
@@ -21001,11 +21660,19 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
21001
21660
|
//#endregion
|
|
21002
21661
|
//#region commands / push force
|
|
21003
21662
|
async forcePush() {
|
|
21663
|
+
/* */
|
|
21664
|
+
/* */
|
|
21665
|
+
/* */
|
|
21666
|
+
/* */
|
|
21004
21667
|
/* */
|
|
21005
21668
|
/* */
|
|
21006
21669
|
return (void 0);
|
|
21007
21670
|
}
|
|
21008
21671
|
async pushForce() {
|
|
21672
|
+
/* */
|
|
21673
|
+
/* */
|
|
21674
|
+
/* */
|
|
21675
|
+
/* */
|
|
21009
21676
|
/* */
|
|
21010
21677
|
/* */
|
|
21011
21678
|
return (void 0);
|
|
@@ -21183,12 +21850,9 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
21183
21850
|
return (void 0);
|
|
21184
21851
|
}
|
|
21185
21852
|
async push(options = {}) {
|
|
21186
|
-
|
|
21187
|
-
|
|
21188
|
-
|
|
21189
|
-
|
|
21190
|
-
`);
|
|
21191
|
-
await this.pushDeep(options);
|
|
21853
|
+
await this.pushDeep({
|
|
21854
|
+
updateType: 'only-this',
|
|
21855
|
+
});
|
|
21192
21856
|
}
|
|
21193
21857
|
//#endregion
|
|
21194
21858
|
//#region commands / melt
|
|
@@ -21294,6 +21958,7 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
21294
21958
|
/* */
|
|
21295
21959
|
/* */
|
|
21296
21960
|
/* */
|
|
21961
|
+
/* */
|
|
21297
21962
|
return (void 0);
|
|
21298
21963
|
}
|
|
21299
21964
|
async mPush() {
|
|
@@ -21333,6 +21998,7 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
21333
21998
|
/* */
|
|
21334
21999
|
/* */
|
|
21335
22000
|
/* */
|
|
22001
|
+
/* */
|
|
21336
22002
|
return (void 0);
|
|
21337
22003
|
}
|
|
21338
22004
|
async pushFeature() {
|
|
@@ -23705,209 +24371,12 @@ class CommitData {
|
|
|
23705
24371
|
/* */
|
|
23706
24372
|
/* */
|
|
23707
24373
|
/* */
|
|
23708
|
-
return (void 0);
|
|
23709
|
-
}
|
|
23710
|
-
//#endregion
|
|
23711
|
-
//#region static / methods & getters / get from bramch
|
|
23712
|
-
static async getFromBranch(currentBranchName, options) {
|
|
23713
|
-
/* */
|
|
23714
|
-
/* */
|
|
23715
|
-
/* */
|
|
23716
|
-
/* */
|
|
23717
|
-
/* */
|
|
23718
|
-
/* */
|
|
23719
|
-
/* */
|
|
23720
|
-
/* */
|
|
23721
|
-
/* */
|
|
23722
|
-
/* */
|
|
23723
|
-
/* */
|
|
23724
|
-
/* */
|
|
23725
|
-
/* */
|
|
23726
|
-
/* */
|
|
23727
|
-
/* */
|
|
23728
|
-
/* */
|
|
23729
|
-
/* */
|
|
23730
|
-
/* */
|
|
23731
|
-
/* */
|
|
23732
|
-
/* */
|
|
23733
|
-
/* */
|
|
23734
|
-
/* */
|
|
23735
|
-
/* */
|
|
23736
|
-
/* */
|
|
23737
|
-
/* */
|
|
23738
|
-
/* */
|
|
23739
|
-
/* */
|
|
23740
|
-
/* */
|
|
23741
|
-
/* */
|
|
23742
|
-
/* */
|
|
23743
|
-
/* */
|
|
23744
|
-
/* */
|
|
23745
|
-
/* */
|
|
23746
|
-
/* */
|
|
23747
|
-
/* */
|
|
23748
|
-
/* */
|
|
23749
|
-
/* */
|
|
23750
|
-
/* */
|
|
23751
|
-
/* */
|
|
23752
|
-
/* */
|
|
23753
|
-
/* */
|
|
23754
|
-
/* */
|
|
23755
|
-
/* */
|
|
23756
|
-
/* */
|
|
23757
|
-
/* */
|
|
23758
|
-
/* */
|
|
23759
|
-
/* */
|
|
23760
|
-
/* */
|
|
23761
|
-
/* */
|
|
23762
|
-
/* */
|
|
23763
|
-
/* */
|
|
23764
|
-
/* */
|
|
23765
|
-
/* */
|
|
23766
|
-
/* */
|
|
23767
|
-
/* */
|
|
23768
|
-
/* */
|
|
23769
|
-
/* */
|
|
23770
|
-
/* */
|
|
23771
|
-
/* */
|
|
23772
|
-
/* */
|
|
23773
|
-
/* */
|
|
23774
|
-
/* */
|
|
23775
|
-
/* */
|
|
23776
|
-
/* */
|
|
23777
|
-
/* */
|
|
23778
|
-
/* */
|
|
23779
|
-
/* */
|
|
23780
|
-
/* */
|
|
23781
|
-
/* */
|
|
23782
|
-
/* */
|
|
23783
|
-
/* */
|
|
23784
|
-
/* */
|
|
23785
|
-
/* */
|
|
23786
|
-
/* */
|
|
23787
|
-
/* */
|
|
23788
|
-
/* */
|
|
23789
|
-
/* */
|
|
23790
|
-
/* */
|
|
23791
|
-
/* */
|
|
23792
|
-
/* */
|
|
23793
|
-
/* */
|
|
23794
|
-
/* */
|
|
23795
|
-
/* */
|
|
23796
|
-
/* */
|
|
23797
|
-
/* */
|
|
23798
|
-
/* */
|
|
23799
|
-
/* */
|
|
23800
|
-
/* */
|
|
23801
|
-
/* */
|
|
23802
|
-
/* */
|
|
23803
|
-
/* */
|
|
23804
|
-
/* */
|
|
23805
|
-
/* */
|
|
23806
|
-
/* */
|
|
23807
|
-
/* */
|
|
23808
|
-
/* */
|
|
23809
|
-
/* */
|
|
23810
|
-
/* */
|
|
23811
|
-
/* */
|
|
23812
|
-
/* */
|
|
23813
|
-
/* */
|
|
23814
|
-
/* */
|
|
23815
|
-
/* */
|
|
23816
|
-
/* */
|
|
23817
|
-
/* */
|
|
23818
|
-
/* */
|
|
23819
|
-
/* */
|
|
23820
|
-
/* */
|
|
23821
|
-
/* */
|
|
23822
|
-
/* */
|
|
23823
|
-
/* */
|
|
23824
|
-
return (void 0);
|
|
23825
|
-
}
|
|
23826
|
-
//#endregion
|
|
23827
|
-
//#region static / methods & getters / from
|
|
23828
|
-
static from(options) {
|
|
23829
|
-
options = (options ? options : {});
|
|
23830
|
-
// console.log(options)
|
|
23831
|
-
const opt = _.merge(new CommitData(), _.cloneDeep(options));
|
|
23832
|
-
return opt;
|
|
23833
|
-
}
|
|
23834
|
-
//#endregion
|
|
23835
|
-
//#region methods & getters / clear message
|
|
23836
|
-
clearMessage(message) {
|
|
23837
|
-
return CommitData.cleanMessageFromJiraNumTeamIdEtc(message, {
|
|
23838
|
-
teamID: this.teamID,
|
|
23839
|
-
commitModuleName: this.commitModuleName,
|
|
23840
|
-
jiraNumbers: this.jiraNumbers,
|
|
23841
|
-
issuesFromOtherProjects: this.issuesFromOtherProjects,
|
|
23842
|
-
});
|
|
23843
|
-
}
|
|
23844
|
-
//#endregion
|
|
23845
|
-
//#region methods & getters / message
|
|
23846
|
-
/**
|
|
23847
|
-
* pure message what was done (without jira or prefixes)
|
|
23848
|
-
* => is included in this.commitMessage
|
|
23849
|
-
*/
|
|
23850
|
-
get message() {
|
|
23851
|
-
return this.clearMessage(this._message);
|
|
23852
|
-
}
|
|
23853
|
-
set message(message) {
|
|
23854
|
-
this._message = this.clearMessage(message);
|
|
23855
|
-
}
|
|
23856
|
-
//#region methods & getters / branch prefix
|
|
23857
|
-
get branchPrefix() {
|
|
23858
|
-
/* */
|
|
23859
|
-
/* */
|
|
23860
|
-
/* */
|
|
23861
|
-
/* */
|
|
23862
|
-
/* */
|
|
23863
|
-
/* */
|
|
23864
|
-
/* */
|
|
23865
|
-
/* */
|
|
23866
|
-
/* */
|
|
23867
|
-
/* */
|
|
23868
|
-
return (void 0);
|
|
23869
|
-
}
|
|
23870
|
-
//#endregion
|
|
23871
|
-
//#region methods & getters / issues from other projects
|
|
23872
|
-
/**
|
|
23873
|
-
* ex. taon/GH-12 darekf77/tnp-helpers/GH-4
|
|
23874
|
-
*/
|
|
23875
|
-
get issuesFromOtherProjects() {
|
|
23876
|
-
return this.__issuesFromOtherProjects;
|
|
23877
|
-
}
|
|
23878
|
-
set issuesFromOtherProjects(value) {
|
|
23879
|
-
this.__issuesFromOtherProjects = value;
|
|
23880
|
-
// this.__issuesFromOtherProjects = value.map(issue => {
|
|
23881
|
-
// console.log('MAPPING', issue);
|
|
23882
|
-
// console.log('project', this.project?.name);
|
|
23883
|
-
// if (issue.split('/').length === 1 && !!this.project) {
|
|
23884
|
-
// console.log('issue', issue);
|
|
23885
|
-
// const origin = HelpersTaon.git.originSshToHttp(this.project.git.originURL);
|
|
23886
|
-
// const provider = _.first(origin.replace('https://', '').split('/'));
|
|
23887
|
-
// const cleanUserWithPath = origin
|
|
23888
|
-
// .replace('https://', '')
|
|
23889
|
-
// .replace(provider + '/', '')
|
|
23890
|
-
// .replace(path.basename(origin).replace('.git', ''), '');
|
|
23891
|
-
// const issueLastPart = _.last(issue.split('/'));
|
|
23892
|
-
// return `tnp/${cleanUserWithPath}/${issueLastPart}`;
|
|
23893
|
-
// }
|
|
23894
|
-
// return issue;
|
|
23895
|
-
// });
|
|
23896
|
-
}
|
|
23897
|
-
//#endregion
|
|
23898
|
-
//#region methods & getters / commit message git commit -m
|
|
23899
|
-
get commitMessage() {
|
|
23900
|
-
/* */
|
|
23901
|
-
/* */
|
|
23902
|
-
/* */
|
|
23903
|
-
/* */
|
|
23904
|
-
/* */
|
|
23905
|
-
/* */
|
|
23906
|
-
/* */
|
|
23907
|
-
/* */
|
|
23908
|
-
/* */
|
|
23909
|
-
/* */
|
|
23910
|
-
/* */
|
|
24374
|
+
return (void 0);
|
|
24375
|
+
}
|
|
24376
|
+
//#endregion
|
|
24377
|
+
//#region static / methods & getters / get from bramch
|
|
24378
|
+
static async getFromBranch(currentBranchName, options) {
|
|
24379
|
+
/* */
|
|
23911
24380
|
/* */
|
|
23912
24381
|
/* */
|
|
23913
24382
|
/* */
|
|
@@ -24021,8 +24490,37 @@ class CommitData {
|
|
|
24021
24490
|
return (void 0);
|
|
24022
24491
|
}
|
|
24023
24492
|
//#endregion
|
|
24024
|
-
//#region methods & getters /
|
|
24025
|
-
|
|
24493
|
+
//#region static / methods & getters / from
|
|
24494
|
+
static from(options) {
|
|
24495
|
+
options = (options ? options : {});
|
|
24496
|
+
// console.log(options)
|
|
24497
|
+
const opt = _.merge(new CommitData(), _.cloneDeep(options));
|
|
24498
|
+
return opt;
|
|
24499
|
+
}
|
|
24500
|
+
//#endregion
|
|
24501
|
+
//#region methods & getters / clear message
|
|
24502
|
+
clearMessage(message) {
|
|
24503
|
+
return CommitData.cleanMessageFromJiraNumTeamIdEtc(message, {
|
|
24504
|
+
teamID: this.teamID,
|
|
24505
|
+
commitModuleName: this.commitModuleName,
|
|
24506
|
+
jiraNumbers: this.jiraNumbers,
|
|
24507
|
+
issuesFromOtherProjects: this.issuesFromOtherProjects,
|
|
24508
|
+
});
|
|
24509
|
+
}
|
|
24510
|
+
//#endregion
|
|
24511
|
+
//#region methods & getters / message
|
|
24512
|
+
/**
|
|
24513
|
+
* pure message what was done (without jira or prefixes)
|
|
24514
|
+
* => is included in this.commitMessage
|
|
24515
|
+
*/
|
|
24516
|
+
get message() {
|
|
24517
|
+
return this.clearMessage(this._message);
|
|
24518
|
+
}
|
|
24519
|
+
set message(message) {
|
|
24520
|
+
this._message = this.clearMessage(message);
|
|
24521
|
+
}
|
|
24522
|
+
//#region methods & getters / branch prefix
|
|
24523
|
+
get branchPrefix() {
|
|
24026
24524
|
/* */
|
|
24027
24525
|
/* */
|
|
24028
24526
|
/* */
|
|
@@ -24033,6 +24531,38 @@ class CommitData {
|
|
|
24033
24531
|
/* */
|
|
24034
24532
|
/* */
|
|
24035
24533
|
/* */
|
|
24534
|
+
return (void 0);
|
|
24535
|
+
}
|
|
24536
|
+
//#endregion
|
|
24537
|
+
//#region methods & getters / issues from other projects
|
|
24538
|
+
/**
|
|
24539
|
+
* ex. taon/GH-12 darekf77/tnp-helpers/GH-4
|
|
24540
|
+
*/
|
|
24541
|
+
get issuesFromOtherProjects() {
|
|
24542
|
+
return this.__issuesFromOtherProjects;
|
|
24543
|
+
}
|
|
24544
|
+
set issuesFromOtherProjects(value) {
|
|
24545
|
+
this.__issuesFromOtherProjects = value;
|
|
24546
|
+
// this.__issuesFromOtherProjects = value.map(issue => {
|
|
24547
|
+
// console.log('MAPPING', issue);
|
|
24548
|
+
// console.log('project', this.project?.name);
|
|
24549
|
+
// if (issue.split('/').length === 1 && !!this.project) {
|
|
24550
|
+
// console.log('issue', issue);
|
|
24551
|
+
// const origin = HelpersTaon.git.originSshToHttp(this.project.git.originURL);
|
|
24552
|
+
// const provider = _.first(origin.replace('https://', '').split('/'));
|
|
24553
|
+
// const cleanUserWithPath = origin
|
|
24554
|
+
// .replace('https://', '')
|
|
24555
|
+
// .replace(provider + '/', '')
|
|
24556
|
+
// .replace(path.basename(origin).replace('.git', ''), '');
|
|
24557
|
+
// const issueLastPart = _.last(issue.split('/'));
|
|
24558
|
+
// return `tnp/${cleanUserWithPath}/${issueLastPart}`;
|
|
24559
|
+
// }
|
|
24560
|
+
// return issue;
|
|
24561
|
+
// });
|
|
24562
|
+
}
|
|
24563
|
+
//#endregion
|
|
24564
|
+
//#region methods & getters / commit message git commit -m
|
|
24565
|
+
get commitMessage() {
|
|
24036
24566
|
/* */
|
|
24037
24567
|
/* */
|
|
24038
24568
|
/* */
|
|
@@ -24068,35 +24598,10 @@ class CommitData {
|
|
|
24068
24598
|
/* */
|
|
24069
24599
|
/* */
|
|
24070
24600
|
/* */
|
|
24071
|
-
return (void 0);
|
|
24072
|
-
}
|
|
24073
|
-
//#endregion
|
|
24074
|
-
//#region methods & getters / is action commit
|
|
24075
|
-
get isActionCommit() {
|
|
24076
24601
|
/* */
|
|
24077
24602
|
/* */
|
|
24078
24603
|
/* */
|
|
24079
24604
|
/* */
|
|
24080
|
-
return (void 0);
|
|
24081
|
-
}
|
|
24082
|
-
}
|
|
24083
|
-
|
|
24084
|
-
//#region imports
|
|
24085
|
-
//#endregion
|
|
24086
|
-
//#region constants
|
|
24087
|
-
//#region constants / defult db
|
|
24088
|
-
const defaultDb = {
|
|
24089
|
-
projects: [],
|
|
24090
|
-
};
|
|
24091
|
-
;
|
|
24092
|
-
//#endregion
|
|
24093
|
-
class CoreProject {
|
|
24094
|
-
//#region static
|
|
24095
|
-
//#region static / core projects
|
|
24096
|
-
static { this.coreProjects = []; }
|
|
24097
|
-
//#endregion
|
|
24098
|
-
//#region static / from
|
|
24099
|
-
static from(options) {
|
|
24100
24605
|
/* */
|
|
24101
24606
|
/* */
|
|
24102
24607
|
/* */
|
|
@@ -24122,41 +24627,6 @@ class CoreProject {
|
|
|
24122
24627
|
/* */
|
|
24123
24628
|
/* */
|
|
24124
24629
|
/* */
|
|
24125
|
-
return (void 0);
|
|
24126
|
-
}
|
|
24127
|
-
//#endregion
|
|
24128
|
-
//#endregion
|
|
24129
|
-
//#region constructor
|
|
24130
|
-
constructor() {
|
|
24131
|
-
/**
|
|
24132
|
-
* project environments
|
|
24133
|
-
*/
|
|
24134
|
-
this.environments = [];
|
|
24135
|
-
}
|
|
24136
|
-
/**
|
|
24137
|
-
* core porject name from repo basename
|
|
24138
|
-
*/
|
|
24139
|
-
get name() {
|
|
24140
|
-
return path.basename(this.url).replace(/\.git$/, '');
|
|
24141
|
-
}
|
|
24142
|
-
/**
|
|
24143
|
-
* main (default for reset) branch
|
|
24144
|
-
*/
|
|
24145
|
-
get branch() {
|
|
24146
|
-
return _.first(this.branches);
|
|
24147
|
-
}
|
|
24148
|
-
/**
|
|
24149
|
-
* url for git repo
|
|
24150
|
-
*/
|
|
24151
|
-
get url() {
|
|
24152
|
-
return (this.urlHttp ? this.urlHttp : this.urlSSH) || '';
|
|
24153
|
-
}
|
|
24154
|
-
}
|
|
24155
|
-
const CoreTypescriptProject = CoreProject.from({
|
|
24156
|
-
//#region configuration
|
|
24157
|
-
branches: ['master', 'develop'],
|
|
24158
|
-
environments: [],
|
|
24159
|
-
recognizedFn: project => {
|
|
24160
24630
|
/* */
|
|
24161
24631
|
/* */
|
|
24162
24632
|
/* */
|
|
@@ -24166,9 +24636,6 @@ const CoreTypescriptProject = CoreProject.from({
|
|
|
24166
24636
|
/* */
|
|
24167
24637
|
/* */
|
|
24168
24638
|
/* */
|
|
24169
|
-
return (void 0);
|
|
24170
|
-
},
|
|
24171
|
-
async startCommand({ project }) {
|
|
24172
24639
|
/* */
|
|
24173
24640
|
/* */
|
|
24174
24641
|
/* */
|
|
@@ -24176,54 +24643,11 @@ const CoreTypescriptProject = CoreProject.from({
|
|
|
24176
24643
|
/* */
|
|
24177
24644
|
/* */
|
|
24178
24645
|
/* */
|
|
24179
|
-
return (void 0);
|
|
24180
|
-
},
|
|
24181
|
-
async buildCommand({ project, watch }) {
|
|
24182
24646
|
/* */
|
|
24183
24647
|
/* */
|
|
24184
24648
|
/* */
|
|
24185
24649
|
/* */
|
|
24186
24650
|
/* */
|
|
24187
|
-
return (void 0);
|
|
24188
|
-
},
|
|
24189
|
-
//#endregion
|
|
24190
|
-
});
|
|
24191
|
-
const CoreAngularProject = CoreProject.from({
|
|
24192
|
-
//#region configuration
|
|
24193
|
-
extends: CoreTypescriptProject,
|
|
24194
|
-
branches: ['master', 'develop'],
|
|
24195
|
-
environments: [],
|
|
24196
|
-
recognizedFn: project => {
|
|
24197
|
-
return project.hasFile('angular.json');
|
|
24198
|
-
},
|
|
24199
|
-
async startCommand({ project }) {
|
|
24200
|
-
await project.npmHelpers.nodeModules.makeSureInstalled();
|
|
24201
|
-
const port = await project.assignFreePort(4200);
|
|
24202
|
-
project.run(`npm-run ng serve --port ${port}`).sync();
|
|
24203
|
-
},
|
|
24204
|
-
async buildCommand({ project }) {
|
|
24205
|
-
await project.npmHelpers.nodeModules.makeSureInstalled();
|
|
24206
|
-
project.run(`npm-run ng build`).sync();
|
|
24207
|
-
},
|
|
24208
|
-
//#endregion
|
|
24209
|
-
});
|
|
24210
|
-
|
|
24211
|
-
class LinkedProject {
|
|
24212
|
-
//#region static
|
|
24213
|
-
//#region static / from
|
|
24214
|
-
static from(options) {
|
|
24215
|
-
const linkedProj = _.merge(new LinkedProject(), _.cloneDeep(options));
|
|
24216
|
-
if (!linkedProj.relativeClonePath) {
|
|
24217
|
-
linkedProj.relativeClonePath = path.basename(linkedProj.remoteUrl().replace('.git', ''));
|
|
24218
|
-
}
|
|
24219
|
-
if (!linkedProj.defaultBranch) {
|
|
24220
|
-
linkedProj.defaultBranch = 'master';
|
|
24221
|
-
}
|
|
24222
|
-
return linkedProj;
|
|
24223
|
-
}
|
|
24224
|
-
//#endregion
|
|
24225
|
-
//#region static / from name
|
|
24226
|
-
static fromName(projectName, currentRemoteUrl, currentBranch) {
|
|
24227
24651
|
/* */
|
|
24228
24652
|
/* */
|
|
24229
24653
|
/* */
|
|
@@ -24240,11 +24664,6 @@ class LinkedProject {
|
|
|
24240
24664
|
/* */
|
|
24241
24665
|
/* */
|
|
24242
24666
|
/* */
|
|
24243
|
-
return (void 0);
|
|
24244
|
-
}
|
|
24245
|
-
//#endregion
|
|
24246
|
-
//#region static / detect
|
|
24247
|
-
static detect(insideLocation, options) {
|
|
24248
24667
|
/* */
|
|
24249
24668
|
/* */
|
|
24250
24669
|
/* */
|
|
@@ -24265,6 +24684,11 @@ class LinkedProject {
|
|
|
24265
24684
|
/* */
|
|
24266
24685
|
/* */
|
|
24267
24686
|
/* */
|
|
24687
|
+
return (void 0);
|
|
24688
|
+
}
|
|
24689
|
+
//#endregion
|
|
24690
|
+
//#region methods & getters / branch name
|
|
24691
|
+
get branchName() {
|
|
24268
24692
|
/* */
|
|
24269
24693
|
/* */
|
|
24270
24694
|
/* */
|
|
@@ -24300,21 +24724,6 @@ class LinkedProject {
|
|
|
24300
24724
|
/* */
|
|
24301
24725
|
/* */
|
|
24302
24726
|
/* */
|
|
24303
|
-
return (void 0);
|
|
24304
|
-
}
|
|
24305
|
-
/**
|
|
24306
|
-
* url for git repo
|
|
24307
|
-
*/
|
|
24308
|
-
remoteUrl() {
|
|
24309
|
-
if (this.repoUrl) {
|
|
24310
|
-
return this.repoUrl;
|
|
24311
|
-
}
|
|
24312
|
-
if (this.repoUrlHttp) {
|
|
24313
|
-
return this.repoUrlHttp;
|
|
24314
|
-
}
|
|
24315
|
-
return this.repoUrlSsh;
|
|
24316
|
-
}
|
|
24317
|
-
remoteUrlTransformed(setOrigin) {
|
|
24318
24727
|
/* */
|
|
24319
24728
|
/* */
|
|
24320
24729
|
/* */
|
|
@@ -24325,6 +24734,11 @@ class LinkedProject {
|
|
|
24325
24734
|
/* */
|
|
24326
24735
|
/* */
|
|
24327
24736
|
/* */
|
|
24737
|
+
return (void 0);
|
|
24738
|
+
}
|
|
24739
|
+
//#endregion
|
|
24740
|
+
//#region methods & getters / is action commit
|
|
24741
|
+
get isActionCommit() {
|
|
24328
24742
|
/* */
|
|
24329
24743
|
/* */
|
|
24330
24744
|
/* */
|
|
@@ -24332,23 +24746,6 @@ class LinkedProject {
|
|
|
24332
24746
|
return (void 0);
|
|
24333
24747
|
}
|
|
24334
24748
|
}
|
|
24335
|
-
class LinkedPorjectsConfig {
|
|
24336
|
-
//#region static
|
|
24337
|
-
//#region static / from
|
|
24338
|
-
static from(options) {
|
|
24339
|
-
options = options || {};
|
|
24340
|
-
options.projects = (options.projects || []).map(linkedProjOrname => {
|
|
24341
|
-
if (_.isString(linkedProjOrname)) {
|
|
24342
|
-
return LinkedProject.fromName(linkedProjOrname);
|
|
24343
|
-
}
|
|
24344
|
-
return LinkedProject.from(linkedProjOrname);
|
|
24345
|
-
});
|
|
24346
|
-
// .sort((a, b) => {
|
|
24347
|
-
// return (a.relativeClonePath || '').localeCompare((b.relativeClonePath || ''));
|
|
24348
|
-
// });
|
|
24349
|
-
return _.merge(new LinkedPorjectsConfig(), _.cloneDeep(options));
|
|
24350
|
-
}
|
|
24351
|
-
}
|
|
24352
24749
|
|
|
24353
24750
|
/* */
|
|
24354
24751
|
/* */
|