tnp 13.1.148 → 13.1.149

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/app.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dummy1673242324704 = void 0;
4
- function dummy1673242324704() { }
5
- exports.dummy1673242324704 = dummy1673242324704;
3
+ exports.dummy1673248234358 = void 0;
4
+ function dummy1673248234358() { }
5
+ exports.dummy1673248234358 = dummy1673248234358;
6
6
  //# sourceMappingURL=app.js.map
package/bin/start.js CHANGED
@@ -92,7 +92,7 @@ if (procType === 'child-of-root' || debugMode) {
92
92
  // startSpinner = !isNodeDebuggerEnabled;
93
93
  // }
94
94
 
95
- if (frameworkName === 'tnp') {
95
+ if (frameworkName === 'tnp' || global.skipCoreCheck) {
96
96
  startSpinner = false;
97
97
  }
98
98
 
@@ -146,7 +146,7 @@ if (startSpinner) {
146
146
  };
147
147
 
148
148
  const cwd = process.cwd();
149
- const argsToCHildProc = (`${orgArgvForChild.slice(2).join(' ')} `
149
+ const argsToCHildProc = (`${orgArgvForChild.slice(2).join(' ')} ${global.skipCoreCheck ? '--skipCoreCheck':''} `
150
150
  + `${spinnerOnInArgs ? '-spinner' : (spinnerOffInArgs ? '-spinner=off' : '')} ${childprocsecretarg}`).split(' ');
151
151
 
152
152
  const proc = child_process.fork(crossPlatofrmPath(__filename), argsToCHildProc, {
package/index.js CHANGED
@@ -362422,15 +362422,13 @@ function pathResolved() {
362422
362422
  catch (error) {
362423
362423
  tnp_core_3.Helpers.error("[".concat(frameworkName, "][config] Not able to clone repository: ").concat(urlMorphi, " in:\n ").concat(morphiPathUserInUserDir), false, true);
362424
362424
  }
362425
- }
362426
- if (!global.skipCoreCheck) {
362427
362425
  try {
362428
362426
  tnp_core_1.child_process.execSync("".concat(frameworkName, " init:core --skipCoreCheck"), {
362429
362427
  stdio: [0, 1, 2]
362430
362428
  });
362431
362429
  }
362432
362430
  catch (error) {
362433
- tnp_core_3.Helpers.error("[".concat(frameworkName, "][config] Not able to install local global environment"), false, true);
362431
+ tnp_core_3.Helpers.error("[".concat(frameworkName, "][config] Not able init core project"), false, true);
362434
362432
  }
362435
362433
  }
362436
362434
  pathResolved.prototype.resolved = true;
@@ -364090,8 +364088,15 @@ var HelpersCore = /** @class */ (function (_super) {
364090
364088
  return core_imports_1.fse.existsSync(folderOrFilePath);
364091
364089
  //#endregion
364092
364090
  };
364091
+ HelpersCore.prototype._fixCommand = function (command) {
364092
+ if (global.skipCoreCheck && (command.startsWith('tnp ') || command.startsWith('firedev'))) {
364093
+ command = "".concat(command, " --skipCoreCheck");
364094
+ }
364095
+ return command;
364096
+ };
364093
364097
  HelpersCore.prototype.command = function (command) {
364094
364098
  // console.log({ command })
364099
+ command = index_1.Helpers._fixCommand(command);
364095
364100
  return {
364096
364101
  //#region @backend
364097
364102
  getherOutput: function (options) {
@@ -364142,6 +364147,7 @@ var HelpersCore = /** @class */ (function (_super) {
364142
364147
  return tslib_1.__generator(this, function (_a) {
364143
364148
  switch (_a.label) {
364144
364149
  case 0:
364150
+ command = index_1.Helpers._fixCommand(command);
364145
364151
  opt = (options || {});
364146
364152
  output = '';
364147
364153
  _a.label = 1;
@@ -364183,6 +364189,7 @@ var HelpersCore = /** @class */ (function (_super) {
364183
364189
  HelpersCore.prototype.commnadOutputAsString = function (command, cwd, options) {
364184
364190
  var _a;
364185
364191
  if (cwd === void 0) { cwd = (0, core_imports_1.crossPlatformPath)(process.cwd()); }
364192
+ command = index_1.Helpers._fixCommand(command);
364186
364193
  var opt = (options || {});
364187
364194
  var output = '';
364188
364195
  try {
@@ -364213,6 +364220,7 @@ var HelpersCore = /** @class */ (function (_super) {
364213
364220
  //#endregion
364214
364221
  //#endregion
364215
364222
  HelpersCore.prototype.run = function (command, options) {
364223
+ command = index_1.Helpers._fixCommand(command);
364216
364224
  // console.log({ command })
364217
364225
  //#region @backend
364218
364226
  if (!options)
@@ -364412,11 +364420,11 @@ var HelpersCore = /** @class */ (function (_super) {
364412
364420
  });
364413
364421
  }
364414
364422
  }
364415
- return index_1.Helpers.logProc(proc, detach ? true : output, detach ? void 0 : stdio, outputLineReplace, options.prefix, extractFromLine, command);
364423
+ return index_1.Helpers.logProc(proc, detach ? true : output, detach ? void 0 : stdio, outputLineReplace, options.prefix, extractFromLine);
364416
364424
  };
364417
364425
  //#endregion
364418
364426
  //#region @backend
364419
- HelpersCore.prototype.logProc = function (proc, output, stdio, outputLineReplace, prefix, extractFromLine, command) {
364427
+ HelpersCore.prototype.logProc = function (proc, output, stdio, outputLineReplace, prefix, extractFromLine) {
364420
364428
  if (output === void 0) { output = true; }
364421
364429
  index_1.Helpers.processes.push(proc);
364422
364430
  if (stdio) {
@@ -364454,9 +364462,11 @@ var HelpersCore = /** @class */ (function (_super) {
364454
364462
  }
364455
364463
  return proc;
364456
364464
  };
364457
- HelpersCore.prototype.execute = function (childProcess, options) {
364465
+ HelpersCore.prototype.execute = function (command, cwd, options) {
364458
364466
  var _this = this;
364459
364467
  var _a = options || {}, hideOutput = _a.hideOutput, resolvePromiseMsg = _a.resolvePromiseMsg, outputLineReplace = _a.outputLineReplace, prefix = _a.prefix, extractFromLine = _a.extractFromLine, exitOnError = _a.exitOnError, exitOnErrorCallback = _a.exitOnErrorCallback;
364468
+ command = index_1.Helpers._fixCommand(command);
364469
+ var childProcess = core_imports_1.child_process.exec(command, { cwd: cwd });
364460
364470
  // let {
364461
364471
  // stderMsgForPromiseResolve,
364462
364472
  // stdoutMsgForPromiseResolve
@@ -368145,7 +368155,7 @@ var ProjectGit = /** @class */ (function () {
368145
368155
  else {
368146
368156
  Helpers.log("[".concat(tnp_cli_1.CLI.chalk.underline('Executing shell command'), "] \"").concat(command, "\" in [").concat(cwd, "]"));
368147
368157
  }
368148
- return [4 /*yield*/, Helpers.execute(tnp_core_1.child_process.exec(command, { cwd: cwd }), options)];
368158
+ return [4 /*yield*/, Helpers.execute(command, cwd, options)];
368149
368159
  case 1: return [2 /*return*/, _a.sent()];
368150
368160
  }
368151
368161
  });
@@ -371043,36 +371053,6 @@ var HelpersProcess = /** @class */ (function () {
371043
371053
  + '\n/' + tnp_cli_1.CLI.chalk.bold(tnp_core_1.path.basename(pathToFileOrFolder))), "\n").concat(index_1.Helpers.terminalLine(), "\n");
371044
371054
  };
371045
371055
  ;
371046
- HelpersProcess.prototype.waitForMessegeInStdout = function (proc, message) {
371047
- return tslib_1.__awaiter(this, void 0, void 0, function () {
371048
- return tslib_1.__generator(this, function (_a) {
371049
- return [2 /*return*/, new Promise(function (resolve, reject) {
371050
- var resolved = false;
371051
- proc.stdout.on('data', function (data) {
371052
- // console.log(`
371053
- // [waitForMessegeInStdout] data: ${data}
371054
- // [waitForMessegeInStdout] data typeof: ${typeof data}
371055
- // `);
371056
- if (tnp_core_1._.isObject(data) && tnp_core_1._.isFunction(data.toString)) {
371057
- data = data.toString();
371058
- }
371059
- if (tnp_core_1._.isString(data) && data.search(message) !== -1) {
371060
- resolved = true;
371061
- resolve(void 0);
371062
- }
371063
- });
371064
- proc.once('exit', function () {
371065
- // console.log(`
371066
- // [waitForMessegeInStdout] exit: ${code}
371067
- // `);
371068
- if (!resolved) {
371069
- reject();
371070
- }
371071
- });
371072
- })];
371073
- });
371074
- });
371075
- };
371076
371056
  HelpersProcess.prototype.prepareWatchCommand = function (cmd) {
371077
371057
  return tnp_core_1.os.platform() === 'win32' ? "\"".concat(cmd, "\"") : "'".concat(cmd, "'");
371078
371058
  };
@@ -372436,6 +372416,7 @@ var Project = /** @class */ (function (_super) {
372436
372416
  //#region @backendFunc
372437
372417
  var that = this;
372438
372418
  var className = typescript_class_helpers_1.CLASS.getName(classFn);
372419
+ // @ts-ignore
372439
372420
  var prefixedName = "__".concat(variableName);
372440
372421
  Object.defineProperty(this, variableName, {
372441
372422
  get: function () {
@@ -372475,10 +372456,12 @@ var Project = /** @class */ (function (_super) {
372475
372456
  return !this.typeIs.apply(this, tslib_1.__spreadArray([], tslib_1.__read(types), false));
372476
372457
  };
372477
372458
  Project.prototype.forEmptyStructure = function () {
372459
+ //#region @backendFunc
372478
372460
  return [
372479
372461
  { relativePath: tnp_config_1.config.file.package_json, includeContent: true },
372480
372462
  { relativePath: tnp_config_1.config.folder.src },
372481
372463
  ];
372464
+ //#endregion
372482
372465
  };
372483
372466
  Project.projects = [];
372484
372467
  /**
@@ -560188,7 +560171,7 @@ var BackendCompilation = /** @class */ (function (_super) {
560188
560171
  // console.log({ isStandalone, buildOutDir })
560189
560172
  //#region normal js build
560190
560173
  // if (watch) {
560191
- return [4 /*yield*/, tnp_helpers_1.Helpers.execute(tnp_core_1.child_process.exec(commandJs, { cwd: cwd }), {
560174
+ return [4 /*yield*/, tnp_helpers_1.Helpers.execute(commandJs, cwd, {
560192
560175
  exitOnError: true,
560193
560176
  exitOnErrorCallback: function (code) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
560194
560177
  return tslib_1.__generator(this, function (_a) {
@@ -560229,7 +560212,7 @@ var BackendCompilation = /** @class */ (function (_super) {
560229
560212
  // if (watch) {
560230
560213
  _a.sent();
560231
560214
  tnp_helpers_1.Helpers.info("* Typescirpt compilation first part done (".concat(buildOutDir, " build). ").concat(websql ? '[WEBSQL]' : '', " "));
560232
- return [4 /*yield*/, tnp_helpers_1.Helpers.execute(tnp_core_1.child_process.exec(commandMaps, { cwd: cwd }), {
560215
+ return [4 /*yield*/, tnp_helpers_1.Helpers.execute(commandMaps, cwd, {
560233
560216
  hideOutput: {
560234
560217
  stderr: true,
560235
560218
  stdout: true,
@@ -574359,6 +574342,10 @@ var TestRunner = /** @class */ (function (_super) {
574359
574342
  if (watchMode) {
574360
574343
  tnp_helpers_1.Helpers.clearConsole();
574361
574344
  tnp_helpers_1.Helpers.info("Start of testing... for watch mode");
574345
+ // Helpers.info(`
574346
+ // Running command: ${command}
574347
+ // `)
574348
+ command = tnp_helpers_1.Helpers._fixCommand(command);
574362
574349
  result = tnp_core_4.child_process.execSync(command, {
574363
574350
  stdio: ['pipe', 'pipe', 'pipe'],
574364
574351
  env: tslib_1.__assign(tslib_1.__assign({}, process.env), { FORCE_COLOR: '1' }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tnp",
3
- "version": "13.1.148",
3
+ "version": "13.1.149",
4
4
  "bin": {
5
5
  "tnp": "bin/tnp",
6
6
  "tnp-debug": "bin/tnp-debug",
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "ora": "3.4.0"
11
11
  },
12
- "lastBuildTagHash": "8c505d824449c649c300475773858600f6c3bddc",
12
+ "lastBuildTagHash": "1e6edc9105efcbf23dfc00628fa38ea165573ad4",
13
13
  "scripts": {
14
14
  "activate": "npm i --force && firedev dedupe && npx tsc && firedev link && tnp bd"
15
15
  },
@@ -559,7 +559,7 @@
559
559
  "private": false
560
560
  },
561
561
  "name": "tnp",
562
- "version": "13.1.148",
562
+ "version": "13.1.149",
563
563
  "bin": {
564
564
  "tnp": "bin/tnp",
565
565
  "tnp-debug": "bin/tnp-debug",
@@ -572,7 +572,7 @@
572
572
  "progress": "2.0.3",
573
573
  "tnp-db": "~13.1.7"
574
574
  },
575
- "lastBuildTagHash": "8c505d824449c649c300475773858600f6c3bddc",
575
+ "lastBuildTagHash": "1e6edc9105efcbf23dfc00628fa38ea165573ad4",
576
576
  "scripts": {
577
577
  "activate": "npm i --force && firedev dedupe && npx tsc && firedev link && tnp bd"
578
578
  },
@@ -804,9 +804,9 @@
804
804
  }
805
805
  },
806
806
  "build": {
807
- "number": 2671,
808
- "date": "2023-01-09T05:05:16.000Z",
809
- "hash": "bd8e5fa227aff4ddff58d169d6cebe216f2d50ab",
807
+ "number": 2674,
808
+ "date": "2023-01-09T05:34:11.000Z",
809
+ "hash": "87404e7819473e93781bdeb23116f1cf203f2889",
810
810
  "options": {}
811
811
  },
812
812
  "currentProjectName": "tnp",
@@ -814,7 +814,7 @@
814
814
  "currentProjectLaunchConfiguration": "{\"version\":\"0.2.0\",\"configurations\":[{\"type\":\"node\",\"request\":\"launch\",\"name\":\"Launch Server standalone\",\"program\":\"${workspaceFolder}/run.js\",\"args\":[\"--ENVoverride=%7B%0A%20%20%20%20%22clientProjectName%22%3A%20%22tnp%22%0A%7D\"],\"runtimeArgs\":[\"--nolazy\",\"-r\",\"ts-node/register\",\"--experimental-worker\"]},{\"name\":\"Debugger with ng serve\",\"type\":\"chrome\",\"request\":\"launch\",\"preLaunchTask\":\"Ng Serve\",\"postDebugTask\":\"terminateall\",\"sourceMaps\":true,\"webRoot\":\"${workspaceFolder}\",\"sourceMapPathOverrides\":{\"webpack:/*\":\"${webRoot}/*\",\"/./*\":\"${webRoot}/*\",\"/tmp-src/*\":\"${webRoot}/*\",\"/*\":\"*\",\"/./~/*\":\"${webRoot}/node_modules/*\"}},{\"type\":\"node\",\"request\":\"attach\",\"name\":\"Attach to global cli tool\",\"port\":9229,\"skipFiles\":[\"<node_internals>/**\"]}],\"compounds\":[{\"name\":\"Debug backend/frontend\",\"configurations\":[\"Launch Server standalone\",\"Debugger with ng serve\"]}]}",
815
815
  "currentProjectTasksConfiguration": "{\"version\":\"2.0.0\",\"tasks\":[{\"label\":\"terminateall\",\"command\":\"echo ${input:terminate}\",\"type\":\"shell\",\"problemMatcher\":[]},{\"label\":\"Ng Serve\",\"type\":\"shell\",\"command\":\"tnp build\",\"isBackground\":true,\"presentation\":{\"reveal\":\"always\"},\"group\":{\"kind\":\"build\",\"isDefault\":true},\"problemMatcher\":{\"owner\":\"typescript\",\"source\":\"ts\",\"applyTo\":\"closedDocuments\",\"fileLocation\":[\"relative\",\"${cwd}\"],\"pattern\":\"$tsc\",\"background\":{\"activeOnStart\":true,\"beginsPattern\":{\"regexp\":\"(.*?)\"},\"endsPattern\":{\"regexp\":\"Compiled |Failed to compile.\"}}}}],\"inputs\":[{\"id\":\"terminate\",\"type\":\"command\",\"command\":\"workbench.action.tasks.terminate\",\"args\":\"terminateAll\"}]}",
816
816
  "currentProjectType": "isomorphic-lib",
817
- "currentFrameworkVersion": "13.1.148",
817
+ "currentFrameworkVersion": "13.1.149",
818
818
  "currentProjectIsStrictSite": false,
819
819
  "currentProjectIsDependencySite": false,
820
820
  "currentProjectIsStatic": false,