tnp-core 19.0.73 → 19.0.77

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.
@@ -3135,7 +3135,10 @@ var UtilsOs;
3135
3135
  UtilsOs.isWebSQL = UtilsOs.isRunningInWebSQL();
3136
3136
  UtilsOs.isVscodeExtension = UtilsOs.isRunningInVscodeExtension();
3137
3137
  UtilsOs.isSSRMode = UtilsOs.isRunningInSSRMode();
3138
- UtilsOs.isRunningInWindows = process.platform == 'win32';
3138
+ let isRunningInWindowsTmp = false;
3139
+ /* */
3140
+ /* */
3141
+ UtilsOs.isRunningInWindows = isRunningInWindowsTmp;
3139
3142
  //#region utils os / command exists
3140
3143
  //#region helpers
3141
3144
  const fileNotExists = async (commandName) => {
@@ -9106,11 +9109,528 @@ class CLI {
9106
9109
  }
9107
9110
  }
9108
9111
 
9112
+ const urlRepoTaon = 'https://github.com/darekf77/taon.git';
9113
+ const urlRepoTaonContainers = 'https://github.com/darekf77/taon-containers.git';
9114
+ const GlobalLibTypeName = {
9115
+ /* */
9116
+ /* */
9117
+ /* */
9118
+ /* */
9119
+ /* */
9120
+ /* */
9121
+ /* */
9122
+ /* */
9123
+ /* */
9124
+ /* */
9125
+ };
9126
+ const LibTypeArr = [
9127
+ /* */
9128
+ /* */
9129
+ /* */
9130
+ /* */
9131
+ /* */
9132
+ /* */
9133
+ /* */
9134
+ /* */
9135
+ /* */
9136
+ ];
9137
+ const CoreLibCategoryArr = [
9138
+ // TODO this is for what ?
9139
+ /* */
9140
+ /* */
9141
+ /* */
9142
+ /* */
9143
+ ];
9144
+ //#region constants / files not allowed to clean
9145
+ const filesNotAllowedToClean = {
9146
+ /* */
9147
+ /* */
9148
+ /* */
9149
+ /* */
9150
+ /* */
9151
+ /* */
9152
+ /* */
9153
+ /* */
9154
+ };
9155
+ //#endregion
9156
+ //#region constants / file (files aliases)
9157
+ const fileName = {
9158
+ _bowerrc: '.bowerrc',
9159
+ bower_json: 'bower.json',
9160
+ controllers_ts: 'controllers.ts',
9161
+ entities_ts: 'entities.ts',
9162
+ angular_json: 'angular.json',
9163
+ autob_actions_js: 'auto-actions.js',
9164
+ local_config_js: 'local-config.js',
9165
+ build_config_js: 'build-config.js',
9166
+ local_config: 'local-config',
9167
+ start_backend_ts: 'start.backend.ts',
9168
+ result_packages_json: 'result-packages.json',
9169
+ build_info_generated_ts: 'build-info._auto-generated_.ts',
9170
+ index_generated_ts: 'index._auto-generated_.ts',
9171
+ docs_config_jsonc: 'docs-config.jsonc',
9172
+ package_json: 'package.json',
9173
+ taon_jsonc: 'taon.jsonc',
9174
+ /**
9175
+ * @deprecated
9176
+ */
9177
+ firedev_jsonc: 'firedev.jsonc',
9178
+ /**
9179
+ * @deprecated
9180
+ */
9181
+ firedev_json: 'firedev.json',
9182
+ /**
9183
+ * @deprecated
9184
+ */
9185
+ package_json__tnp_json: 'package.json_tnp.json',
9186
+ /**
9187
+ * @deprecated
9188
+ */
9189
+ package_json__tnp_json5: 'package.json_tnp.json5',
9190
+ /**
9191
+ * @deprecated
9192
+ */
9193
+ package_json__devDependencies_json: 'package.json_devDependencies.json',
9194
+ /**
9195
+ * @deprecated
9196
+ */
9197
+ devDependencies_json: 'devDependencies.json',
9198
+ yarn_lock: 'yarn.lock',
9199
+ package_lock_json: 'package-lock.json',
9200
+ tnpEnvironment_json: 'tmp-environment.json',
9201
+ environment: 'environment',
9202
+ environment_js: 'environment.js',
9203
+ /**
9204
+ * @deprecated
9205
+ */
9206
+ tmp_transaction_pid_txt: 'tmp-transaction-pid.txt',
9207
+ manifest_webmanifest: 'manifest.webmanifest',
9208
+ public_api_d_ts: 'public-api.d.ts',
9209
+ public_api_ts: 'public-api.ts',
9210
+ public_api: 'public-api',
9211
+ _babelrc: '.babelrc',
9212
+ index: 'index',
9213
+ index_d_ts: 'index.d.ts',
9214
+ index_ts: 'index.ts',
9215
+ index_js: 'index.js',
9216
+ cli_js: 'cli.js',
9217
+ cli_ts: 'cli.ts',
9218
+ index_js_map: 'index.js.map',
9219
+ db_json: 'db.json',
9220
+ db_for_tests_json: 'db-for-tests.json',
9221
+ /**
9222
+ * @deprecated
9223
+ */
9224
+ tmpDockerImageId: 'tmp-docker-image-id',
9225
+ tmp_recent_json: 'recent.json',
9226
+ tmpIsomorphicPackagesJson: 'tmp-isomorphic-packages.json',
9227
+ tsconfig_json: 'tsconfig.json',
9228
+ tsconfig_lib_json: 'tsconfig.lib.json',
9229
+ README_MD: 'README.md',
9230
+ server_key: 'server.key',
9231
+ server_cert: 'server.cert',
9232
+ server_chain_cert: 'server-chain.cert',
9233
+ meta_config_md: 'meta-content.md',
9234
+ logo_png: 'logo.png',
9235
+ logo_svg: 'logo.svg',
9236
+ ric_proj_json: 'ric-project.json',
9237
+ linked_projects_json: 'linked-projects.json',
9238
+ docker_compose_yml: 'docker-compose.yml',
9239
+ compose_yml: 'docker-compose.yml',
9240
+ ...filesNotAllowedToClean,
9241
+ };
9242
+ //#endregion
9243
+ //#region constants / temp folders
9244
+ const tempFoldersName = {
9245
+ // DO NOT PUT ANYTHING SUPID HERE!!!
9246
+ vendor: 'vendor',
9247
+ docs: 'docs',
9248
+ dist: 'dist',
9249
+ tmp: 'tmp',
9250
+ tmpDistRelease: 'tmp-dist-release',
9251
+ tempSrc: 'tmp-src',
9252
+ tempSrcDist: 'tmp-src-dist',
9253
+ previewDistApp: 'dist-app',
9254
+ preview: 'preview',
9255
+ browser: 'browser',
9256
+ websql: 'websql',
9257
+ _browser: '.browser',
9258
+ module: 'module',
9259
+ backup: 'backup',
9260
+ node_modules: 'node_modules',
9261
+ local_release: 'local_release',
9262
+ client: 'client',
9263
+ tnp_tests_context: 'tmp-tests-context',
9264
+ tmpPackage: 'tmp-package',
9265
+ tmpScenarios: 'tmp-scenarios',
9266
+ tmpTestsEnvironments: 'tmp-tests-environments',
9267
+ testsEnvironments: 'tests-environments',
9268
+ };
9269
+ //#endregion
9270
+ //#region constants / folder (folders aliases)
9271
+ const folderName = {
9272
+ scripts: 'scripts',
9273
+ scenarios: 'scenarios',
9274
+ bower: 'bower',
9275
+ src: 'src',
9276
+ out: 'out',
9277
+ app: 'app',
9278
+ lib: 'lib',
9279
+ libraries: 'libraries',
9280
+ libs: 'libs',
9281
+ source: 'source',
9282
+ custom: 'custom',
9283
+ migrations: 'migrations',
9284
+ components: 'components',
9285
+ assets: 'assets',
9286
+ generated: 'generated',
9287
+ apps: 'apps',
9288
+ shared: 'shared',
9289
+ container: 'container',
9290
+ bin: 'bin',
9291
+ _bin: '.bin',
9292
+ _vscode: '.vscode',
9293
+ project: 'project',
9294
+ projects: 'projects',
9295
+ external: 'external',
9296
+ tmpDist: 'tmp-dist',
9297
+ tmpFor(d) {
9298
+ return `tmp-src-${d}`;
9299
+ },
9300
+ targetProjects: {
9301
+ DEFAULT_PATH_GENERATED: 'tmp-target-projects/generated',
9302
+ DEFAULT_PATH_ORIGINS: 'tmp-target-projects/origins',
9303
+ },
9304
+ ...tempFoldersName,
9305
+ };
9306
+ //#endregion
9307
+ //#region constants / trusted packages for update
9308
+ const areTrustedForPatchUpdate = [
9309
+ /* */
9310
+ /* */
9311
+ /* */
9312
+ /* */
9313
+ /* */
9314
+ /* */
9315
+ /* */
9316
+ /* */
9317
+ ];
9318
+ //#endregion
9319
+ const extAllowedToExportAndReplaceTSJSCodeFiles = [
9320
+ 'js',
9321
+ 'ts',
9322
+ 'tsx',
9323
+ ].map(ext => `.${ext}`);
9324
+ const extTemplatesFiles = ['html'].map(ext => `.${ext}`);
9325
+ const extForSassLikeFiles = ['scss', 'sass'].map(ext => `.${ext}`);
9326
+ const extForStyles = [
9327
+ ...extForSassLikeFiles,
9328
+ ...['css', 'less'].map(ext => `.${ext}`),
9329
+ ];
9330
+ const extAllowedToReplace = [
9331
+ ...extForStyles,
9332
+ ...extTemplatesFiles,
9333
+ ...extAllowedToExportAndReplaceTSJSCodeFiles,
9334
+ ];
9335
+ const REGEX_REGION = {
9336
+ TS_JS_SCSS_SASS: {
9337
+ START: new RegExp('\\/\\/\\s*\\#region'),
9338
+ END: new RegExp('\\/\\/\\s*\\#endregion'),
9339
+ EXT: [...extAllowedToExportAndReplaceTSJSCodeFiles, ...extForSassLikeFiles],
9340
+ },
9341
+ HTML: {
9342
+ START: new RegExp('\\<\\!\\-\\-\\s*\\#region'),
9343
+ END: new RegExp('\\<\\!\\-\\-\\s*\\#endregion'),
9344
+ EXT: extTemplatesFiles,
9345
+ },
9346
+ CSS: {
9347
+ START: new RegExp('\\/\\*\\s*\\#region'),
9348
+ END: new RegExp('\\/\\*\\s*\\#endregion'),
9349
+ EXT: extForStyles,
9350
+ },
9351
+ };
9352
+ const backendNodejsOnlyFiles = [
9353
+ 'backend.ts',
9354
+ // '.repository.ts', // deprecated in typeorm
9355
+ ].map(ext => `.${ext}`);
9356
+ const backendWebsqlNodejsFiles = ['subscriber.ts', 'test.ts'].map(ext => `.${ext}`);
9357
+ const frontendFiles = [
9358
+ 'browser.ts',
9359
+ 'component.ts',
9360
+ 'container.ts',
9361
+ 'directive.ts',
9362
+ 'pipe.ts',
9363
+ 'module.ts',
9364
+ 'service.ts',
9365
+ 'store.ts',
9366
+ 'actions.ts',
9367
+ 'action.ts',
9368
+ 'effects.ts',
9369
+ 'effect.ts',
9370
+ 'reducers.ts',
9371
+ 'reducer.ts',
9372
+ 'selectors.ts',
9373
+ 'selector.ts',
9374
+ 'routes.ts',
9375
+ 'resolver.ts',
9376
+ 'resolvers.ts',
9377
+ 'guard.ts',
9378
+ 'guards.ts',
9379
+ 'store.ts',
9380
+ 'spec.ts',
9381
+ 'e2e.ts',
9382
+ 'cy.ts',
9383
+ 'e2e-spec.ts',
9384
+ ].map(ext => `.${ext}`);
9385
+ const notNeededForExportFiles = ['routes.ts'].map(ext => `.${ext}`);
9386
+ const frontEndOnly = [
9387
+ ...extTemplatesFiles,
9388
+ ...extForStyles,
9389
+ ...frontendFiles,
9390
+ ];
9391
+ const appRelatedFiles = [
9392
+ ...extAllowedToReplace.map(ext => `app${ext}`),
9393
+ ...frontendFiles.map(ext => `app${ext}`),
9394
+ 'app.models.ts',
9395
+ 'app.env.ts',
9396
+ 'app.constants.ts',
9397
+ 'app.hosts.ts',
9398
+ 'app.electron.ts',
9399
+ 'app.vscode.ts',
9400
+ 'app.mobile.ts',
9401
+ 'app.context.ts',
9402
+ 'app.worker.ts',
9403
+ ];
9404
+ const TAGS = {
9405
+ BACKEND: `@${'back' + 'end'}`,
9406
+ BACKEND_FUNC: `@${'back' + 'endFunc'}`,
9407
+ BROWSER: `@${'brow' + 'ser'}`,
9408
+ WEBSQL_ONLY: `@${'web' + 'sqlOnly'}`,
9409
+ WEBSQL: `@${'web' + 'sql'}`,
9410
+ WEBSQL_FUNC: `@${'web' + 'sqlFunc'}`,
9411
+ NOT_FOR_NPM: `@${'not' + 'ForNpm'}`,
9412
+ CUT_CODE_IF_TRUE: '@cutCode' + 'IfTrue',
9413
+ CUT_CODE_IF_FALSE: '@cutCode' + 'IfFalse',
9414
+ COMMENT_REGION: `//${'#reg' + 'ion'}`,
9415
+ COMMENT_END_REGION: `//${'#end' + 'region'}`,
9416
+ };
9417
+ const BaselineSiteJoinprefix = '__';
9418
+ const PREFIXES = {
9419
+ BASELINE: BaselineSiteJoinprefix,
9420
+ DELETED: '____DELETED____',
9421
+ ORIGINAL: '____ORIGINAL____',
9422
+ RESTORE_NPM: '____',
9423
+ };
9424
+ var FilesNames;
9425
+ (function (FilesNames) {
9426
+ FilesNames.tmpLastSelectedJsonFile = 'tmp-last-selected.json';
9427
+ })(FilesNames || (FilesNames = {}));
9428
+ const baseTaonDevProjectsNames = [
9429
+ 'taon',
9430
+ 'taon-simple-org',
9431
+ 'taon-storage',
9432
+ 'taon-type-sql',
9433
+ 'taon-typeorm',
9434
+ 'incremental-compiler',
9435
+ 'isomorphic-region-loader',
9436
+ 'json10',
9437
+ 'json10-writer',
9438
+ 'lodash-walk-object',
9439
+ 'magic-renamer',
9440
+ 'ng-talkback',
9441
+ 'ng2-logger',
9442
+ 'ng2-rest',
9443
+ 'ng2-rest-swagger-generator',
9444
+ 'node-cli-tester',
9445
+ 'record-replay-req-res-scenario',
9446
+ 'static-columns',
9447
+ 'tnp',
9448
+ 'tnp-config',
9449
+ 'tnp-core',
9450
+ 'tnp-helpers',
9451
+ 'tnp-models',
9452
+ 'typescript-class-helpers',
9453
+ 'vpn-split',
9454
+ ];
9455
+ const notAllowedNames = [
9456
+ 'copyto',
9457
+ 'copy',
9458
+ 'melt',
9459
+ 'push',
9460
+ 'pul',
9461
+ 'soft',
9462
+ 'pull',
9463
+ 'app',
9464
+ 'apps',
9465
+ 'dist',
9466
+ 'bundle',
9467
+ 'libs',
9468
+ 'lib',
9469
+ 'src',
9470
+ 'bin',
9471
+ 'source',
9472
+ 'migrations',
9473
+ 'assets',
9474
+ 'assets-for',
9475
+ 'browser',
9476
+ 'websql',
9477
+ 'compiled',
9478
+ 'docs',
9479
+ 'environments',
9480
+ 'env',
9481
+ 'projects',
9482
+ 'plugins',
9483
+ '_',
9484
+ ];
9485
+ const notAllowedProjectNames = [
9486
+ // TODO add all npm package names from core container
9487
+ ...notAllowedNames,
9488
+ ...backendNodejsOnlyFiles,
9489
+ ];
9490
+
9491
+ //#region imports & constants
9492
+ /* */
9493
+ /* */
9494
+ /* */
9495
+ /* */
9496
+ //#region resolve tnp location
9497
+ // @LAST RESOLVE TNP LOCATION !!! for each context and RELEASE TNP-CORE
9498
+ let dirnameForTnp;
9499
+ /* */
9500
+ /* */
9501
+ /* */
9502
+ /* */
9503
+ /* */
9504
+ /* */
9505
+ /* */
9506
+ /* */
9507
+ /* */
9508
+ /* */
9509
+ /* */
9510
+ /* */
9511
+ /* */
9512
+ /* */
9513
+ /* */
9514
+ /* */
9515
+ /* */
9516
+ /* */
9517
+ /* */
9518
+ /* */
9519
+ /* */
9520
+ /* */
9521
+ /* */
9522
+ /* */
9523
+ /* */
9524
+ /* */
9525
+ /* */
9526
+ /* */
9527
+ /* */
9528
+ /* */
9529
+ /* */
9530
+ /* */
9531
+ /* */
9532
+ /* */
9533
+ //#endregion
9534
+ //#region config
9535
+ // console.log({
9536
+ // dirnameForTnp
9537
+ // });
9538
+ // process.exit(0)
9539
+ const config = {
9540
+ dirnameForTnp,
9541
+ packagesThat: {
9542
+ areTrustedForPatchUpdate,
9543
+ },
9544
+ regexString: {
9545
+ pathPartStringRegex: `(\/([a-zA-Z0-9]|\\-|\\_|\\+|\\.)*)`,
9546
+ },
9547
+ placeholders: {
9548
+ forProjectsInEnvironmentFile: '//<PLACEHOLDER_FOR_PROJECTS>',
9549
+ },
9550
+ array: {
9551
+ isomorphicPackages: 'isomorphicPackages',
9552
+ },
9553
+ frameworkName,
9554
+ /**
9555
+ * @deprecated pacakge json will be generated
9556
+ */
9557
+ packageJsonFrameworkKey: 'tnp',
9558
+ frameworkNames: {
9559
+ productionFrameworkName: 'taon',
9560
+ developmentFrameworkName: 'tnp',
9561
+ },
9562
+ startPort: 6001,
9563
+ frameworks: ['bootstrap', 'ionic', 'material'],
9564
+ /* */
9565
+ /* */
9566
+ /* */
9567
+ /* */
9568
+ /* */
9569
+ /* */
9570
+ /* */
9571
+ /* */
9572
+ /**
9573
+ * @deprecated use folderName instead
9574
+ */
9575
+ folder: folderName,
9576
+ /**
9577
+ * @deprecated use tempFoldersName instead
9578
+ */
9579
+ tempFolders: tempFoldersName,
9580
+ // @ts-ignore
9581
+ filesNotAllowedToClean: Object.keys(filesNotAllowedToClean).map(key => filesNotAllowedToClean[key]),
9582
+ /**
9583
+ * @deprecated use fileName instead
9584
+ */
9585
+ file: fileName,
9586
+ reservedArgumentsNamesUglify: ['reservedExpOne', 'reservedExpSec'],
9587
+ filesExtensions: {
9588
+ filetemplate: 'filetemplate',
9589
+ },
9590
+ // environmentName,
9591
+ localLibs: [
9592
+ /* */
9593
+ /* */
9594
+ /* */
9595
+ /* */
9596
+ /* */
9597
+ /* */
9598
+ /* */
9599
+ /* */
9600
+ /* */
9601
+ /* */
9602
+ /* */
9603
+ /* */
9604
+ /* */
9605
+ /* */
9606
+ /* */
9607
+ ],
9608
+ helpAlias: ['-h', '--help', '-help', 'help'],
9609
+ };
9610
+ //#endregion
9611
+ //#region globa isomorphic deps
9612
+ // export const GlobalIsomorphicDependencies: ConfigModels.GlobalDependencies = {
9613
+ // npm: [
9614
+ // { name: 'rimraf' },
9615
+ // { name: 'npm-run', version: '4.1.2' },
9616
+ // { name: 'cpr' },
9617
+ // { name: 'check-node-version' },
9618
+ // { name: 'vsce' },
9619
+ // ],
9620
+ // programs: [
9621
+ // // {
9622
+ // // name: 'code',
9623
+ // // website: 'https://code.visualstudio.com/'
9624
+ // // }
9625
+ // ] as { name: string; website: string }[]
9626
+ // };
9627
+ //#endregion
9628
+
9109
9629
  let Helpers = HelpersCore.InstanceCore;
9110
9630
 
9111
9631
  /**
9112
9632
  * Generated bundle index. Do not edit.
9113
9633
  */
9114
9634
 
9115
- export { $, CLI, CoreConfig, HelpersCore as CoreHelpers, CoreModels, FilePathMetaData, Helpers, PROGRESS_DATA, Utils, UtilsCliClassMethod, UtilsDotFile, UtilsEtcHosts, UtilsJson, UtilsMigrations, UtilsNetwork, UtilsOs, UtilsProcess, UtilsProcessLogger, UtilsString, UtilsTerminal, UtilsYaml, chalk, child_process, chokidar, crossPlatformPath, fg, fkill, frameworkName, frameworkNameBe, fse, glob, http, https, isElevated, mkdirp, ncp, net, os, path, ps, psList, requiredForDev, rimraf, spawn, win32Path };
9635
+ export { $, BaselineSiteJoinprefix, CLI, CoreConfig, HelpersCore as CoreHelpers, CoreLibCategoryArr, CoreModels, FilePathMetaData, FilesNames, GlobalLibTypeName, Helpers, LibTypeArr, PREFIXES, PROGRESS_DATA, REGEX_REGION, TAGS, Utils, UtilsCliClassMethod, UtilsDotFile, UtilsEtcHosts, UtilsJson, UtilsMigrations, UtilsNetwork, UtilsOs, UtilsProcess, UtilsProcessLogger, UtilsString, UtilsTerminal, UtilsYaml, appRelatedFiles, areTrustedForPatchUpdate, backendNodejsOnlyFiles, backendWebsqlNodejsFiles, baseTaonDevProjectsNames, chalk, child_process, chokidar, config, crossPlatformPath, extAllowedToExportAndReplaceTSJSCodeFiles, extAllowedToReplace, extForSassLikeFiles, extForStyles, extTemplatesFiles, fg, fileName, filesNotAllowedToClean, fkill, folderName, frameworkName, frameworkNameBe, frontEndOnly, frontendFiles, fse, glob, http, https, isElevated, mkdirp, ncp, net, notAllowedNames, notAllowedProjectNames, notNeededForExportFiles, os, path, ps, psList, requiredForDev, rimraf, spawn, tempFoldersName, urlRepoTaon, urlRepoTaonContainers, win32Path };
9116
9636
  //# sourceMappingURL=tnp-core.mjs.map