create-windowless-app 7.10.0 → 7.12.0

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/README.md CHANGED
@@ -22,7 +22,8 @@ Create Windowless App works on Windows 64-bit only<br>
22
22
  If something doesn't work, please [file an issue](https://github.com/yoavain/create-windowless-app/issues/new).
23
23
 
24
24
 
25
- Pre-Requisites:
25
+ Pre-Requisites for template to work:
26
+ * `NodeJS` version `12.20.0` or higher
26
27
  * `MSBuild.exe` must be in the PATH environment variable
27
28
 
28
29
  ## Quick Overview
@@ -42,7 +43,7 @@ npm install -g create-windowsless-app
42
43
  ```
43
44
 
44
45
  And then you can run:
45
- ```
46
+ ```sh
46
47
  create-windowless-app my-app
47
48
  ```
48
49
  </p>
@@ -53,7 +54,7 @@ create-windowless-app my-app
53
54
  </p>
54
55
 
55
56
  Or in interactive mode:
56
- ```
57
+ ```sh
57
58
  npx create-windowless-app --interactive
58
59
  ```
59
60
 
@@ -87,7 +88,7 @@ my-app
87
88
  No configuration or complicated folder structures, just the files you need to build your app.<br>
88
89
 
89
90
  Once the installation is done, you can build the project
90
- ```
91
+ ```sh
91
92
  cd my-app
92
93
  npm run build
93
94
  ```
@@ -138,5 +139,5 @@ The "Hello World" template is a POC containing 2 features you might want when ru
138
139
  The template project build script does the following things
139
140
  1) Compiles TypeScript to JavaScript (if in a TypeScript template)
140
141
  2) Runs WebPack to bundle all JavaScript into a single file, and copy binary files into the "dist" folder
141
- 3) Runs nexe to compile the single WebPack JavaScript output file to an exe file bundled with NodeJS (currently, latest NodeJS version is bundled)
142
+ 3) Runs nexe to compile the single WebPack JavaScript output file to an exe file bundled with NodeJS (currently, NodeJS version 14.15.3 is the latest version supplied by nexe)
142
143
 
package/dist/cliParser.js CHANGED
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.parseCommand = void 0;
15
+ exports.parseCommand = exports.validateNodeVersion = exports.validateProjectNameInput = void 0;
16
16
  const chalk_1 = __importDefault(require("chalk"));
17
17
  const createWindowlessAppUtils_1 = require("./createWindowlessAppUtils");
18
18
  const fs_extra_1 = require("fs-extra");
@@ -22,17 +22,23 @@ const semver_1 = __importDefault(require("semver"));
22
22
  const yargs_1 = __importDefault(require("yargs"));
23
23
  const helpers_1 = require("yargs/helpers");
24
24
  const packageJson = require(`../${createWindowlessAppUtils_1.PACKAGE_JSON_FILENAME}`);
25
- function interactiveMode() {
25
+ const validateProjectNameInput = (value) => {
26
+ var _a, _b;
27
+ const result = (0, validate_npm_package_name_1.default)(value);
28
+ return result.validForNewPackages || ((_a = result === null || result === void 0 ? void 0 : result.errors) === null || _a === void 0 ? void 0 : _a[0]) || ((_b = result === null || result === void 0 ? void 0 : result.warnings) === null || _b === void 0 ? void 0 : _b[0]) || "Invalid project name";
29
+ };
30
+ exports.validateProjectNameInput = validateProjectNameInput;
31
+ const validateNodeVersion = (value) => {
32
+ return !value || !!semver_1.default.valid(value) || "Invalid node version";
33
+ };
34
+ exports.validateNodeVersion = validateNodeVersion;
35
+ const interactiveMode = () => {
26
36
  return inquirer_1.default.prompt([
27
37
  {
28
38
  type: "input",
29
39
  message: "Project Name:",
30
40
  name: "projectName",
31
- validate: (value) => {
32
- var _a, _b, _c, _d;
33
- const result = (0, validate_npm_package_name_1.default)(value);
34
- return result.validForNewPackages || ((_b = (_a = result) === null || _a === void 0 ? void 0 : _a.errors) === null || _b === void 0 ? void 0 : _b[0]) || ((_d = (_c = result) === null || _c === void 0 ? void 0 : _c.warnings) === null || _d === void 0 ? void 0 : _d[0]) || "Invalid project name";
35
- }
41
+ validate: exports.validateProjectNameInput
36
42
  },
37
43
  {
38
44
  type: "input",
@@ -61,7 +67,7 @@ function interactiveMode() {
61
67
  type: "input",
62
68
  message: "Node Version:",
63
69
  name: "nodeVersion",
64
- validate: (value) => !value || !!semver_1.default.valid(value) || "Invalid node version"
70
+ validate: exports.validateNodeVersion
65
71
  },
66
72
  {
67
73
  type: "confirm",
@@ -70,7 +76,7 @@ function interactiveMode() {
70
76
  default: false
71
77
  }
72
78
  ]);
73
- }
79
+ };
74
80
  const validateInput = (argv) => {
75
81
  if (argv.icon && !(0, fs_extra_1.pathExistsSync)(argv.icon)) {
76
82
  console.log(`Cannot find icon in ${chalk_1.default.red(argv.icon)}. Switching to ${chalk_1.default.green("default")} icon.`);
package/dist/consts.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.consts = void 0;
4
4
  exports.consts = {
5
5
  dependencies: [
6
- "node-notifier@9",
6
+ "node-notifier",
7
7
  "winston"
8
8
  ],
9
9
  devDependencies: [
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/dist/index.js CHANGED
@@ -1,17 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const createWindowlessApp_1 = require("./createWindowlessApp");
5
- const launcherCompiler_1 = require("./launcherCompiler");
6
- const currentNodeVersion = process.versions.node;
7
- const semver = currentNodeVersion.split(".");
8
- const major = Number(semver[0]);
9
- if (Number.isNaN(major) || major < 10) {
10
- console.error(`You are running Node ${currentNodeVersion}.\nCreate Windowless App requires Node 10 or higher.\nPlease update your version of Node.`);
11
- process.exit(1);
12
- }
13
- // Check for msbuild.exe in %PATH%
14
- (0, launcherCompiler_1.checkMsbuildInPath)(true).then(() => {
15
- // noinspection JSIgnoredPromiseFromCall
16
- (0, createWindowlessApp_1.createWindowlessApp)(process.argv);
17
- });
4
+ const main_1 = require("./main");
5
+ // Run main
6
+ (0, main_1.main)().catch(console.error);
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/dist/main.js ADDED
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.main = void 0;
13
+ const launcherCompiler_1 = require("./launcherCompiler");
14
+ const createWindowlessApp_1 = require("./createWindowlessApp");
15
+ const main = () => __awaiter(void 0, void 0, void 0, function* () {
16
+ const currentNodeVersion = process.versions.node;
17
+ const semver = currentNodeVersion.split(".");
18
+ const major = Number(semver[0]);
19
+ const minor = Number(semver[1]);
20
+ if (isNaN(major) || isNaN(minor) || major < 12 || (major === 12 && minor < 20)) {
21
+ console.error(`You are running NodeJS ${currentNodeVersion}.\nCreate Windowless App requires NodeJS 12.20 or higher.\nPlease update your version of Node.`);
22
+ process.exit(1);
23
+ }
24
+ // Check for msbuild.exe in %PATH%
25
+ yield (0, launcherCompiler_1.checkMsbuildInPath)(true);
26
+ yield (0, createWindowlessApp_1.createWindowlessApp)(process.argv);
27
+ });
28
+ exports.main = main;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-windowless-app",
3
- "version": "7.10.0",
3
+ "version": "7.12.0",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
@@ -42,9 +42,9 @@
42
42
  }
43
43
  },
44
44
  "@types/node": {
45
- "version": "14.18.5",
46
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.5.tgz",
47
- "integrity": "sha512-LMy+vDDcQR48EZdEx5wRX1q/sEl6NdGuHXPnfeL8ixkwCOSZ2qnIyIZmcCbdX0MeRqHhAcHmX+haCbrS8Run+A=="
45
+ "version": "14.18.12",
46
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.12.tgz",
47
+ "integrity": "sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A=="
48
48
  },
49
49
  "@types/responselike": {
50
50
  "version": "1.0.0",
@@ -281,9 +281,9 @@
281
281
  }
282
282
  },
283
283
  "fs-extra": {
284
- "version": "10.0.0",
285
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
286
- "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
284
+ "version": "10.0.1",
285
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
286
+ "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
287
287
  "requires": {
288
288
  "graceful-fs": "^4.2.0",
289
289
  "jsonfile": "^6.0.1",
@@ -360,9 +360,9 @@
360
360
  "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
361
361
  },
362
362
  "inquirer": {
363
- "version": "8.2.0",
364
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.0.tgz",
365
- "integrity": "sha512-0crLweprevJ02tTuA6ThpoAERAGyVILC4sS74uib58Xf/zSr1/ZWtmm7D5CI+bSQEaA04f0K7idaHpQbSWgiVQ==",
363
+ "version": "8.2.1",
364
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.1.tgz",
365
+ "integrity": "sha512-pxhBaw9cyTFMjwKtkjePWDhvwzvrNGAw7En4hottzlPvz80GZaMZthdDU35aA6/f5FRZf3uhE057q8w1DE3V2g==",
366
366
  "requires": {
367
367
  "ansi-escapes": "^4.2.1",
368
368
  "chalk": "^4.1.1",
@@ -374,24 +374,24 @@
374
374
  "mute-stream": "0.0.8",
375
375
  "ora": "^5.4.1",
376
376
  "run-async": "^2.4.0",
377
- "rxjs": "^7.2.0",
377
+ "rxjs": "^7.5.5",
378
378
  "string-width": "^4.1.0",
379
379
  "strip-ansi": "^6.0.0",
380
380
  "through": "^2.3.6"
381
381
  },
382
382
  "dependencies": {
383
383
  "rxjs": {
384
- "version": "7.3.1",
385
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.3.1.tgz",
386
- "integrity": "sha512-vNenx7gqjPyeKpRnM6S5Ksm/oFTRijWWzYlRON04KaehZ3YjDwEmVjGUGo0TKWVjeNXOujVRlh0K1drUbcdPkw==",
384
+ "version": "7.5.5",
385
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz",
386
+ "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==",
387
387
  "requires": {
388
- "tslib": "~2.1.0"
388
+ "tslib": "^2.1.0"
389
389
  }
390
390
  },
391
391
  "tslib": {
392
- "version": "2.1.0",
393
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
394
- "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
392
+ "version": "2.3.1",
393
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
394
+ "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
395
395
  }
396
396
  }
397
397
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-windowless-app",
3
- "version": "7.10.0",
3
+ "version": "7.12.0",
4
4
  "description": "Create a windowless NodeJS app",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,6 +18,8 @@
18
18
  "eslint:fix": "npm run eslint -- --fix",
19
19
  "type-check": "tsc --build tsconfig.json",
20
20
  "jest": "cross-env FORCE_COLOR=0 jest",
21
+ "jest:unit": "cross-env FORCE_COLOR=0 jest ./test/",
22
+ "jest:integration": "cross-env FORCE_COLOR=0 jest ./integration_test/",
21
23
  "prettier": "prettier --write *.json templates/**/*.json",
22
24
  "pretsc": "rimraf dist",
23
25
  "tsc": "tsc --build tsconfig.build.json",
@@ -57,10 +59,10 @@
57
59
  "@tsconfig/node12": "1.0.9",
58
60
  "@types/cross-spawn": "6.0.2",
59
61
  "@types/fs-extra": "9.0.13",
60
- "@types/inquirer": "8.1.3",
62
+ "@types/inquirer": "8.2.0",
61
63
  "@types/jest": "27.4.0",
62
64
  "@types/mock-fs": "4.13.1",
63
- "@types/node": "14.18.5",
65
+ "@types/node": "14.18.12",
64
66
  "@types/node-notifier": "8.0.2",
65
67
  "@types/request": "2.48.8",
66
68
  "@types/semver": "7.3.9",
@@ -68,39 +70,40 @@
68
70
  "@types/uuid": "8.3.4",
69
71
  "@types/validate-npm-package-name": "3.0.3",
70
72
  "@types/winston": "2.4.4",
71
- "@typescript-eslint/eslint-plugin": "5.9.1",
72
- "@typescript-eslint/parser": "5.9.1",
73
+ "@typescript-eslint/eslint-plugin": "5.14.0",
74
+ "@typescript-eslint/parser": "5.14.0",
73
75
  "add-shebang": "0.1.0",
74
- "copy-webpack-plugin": "10.2.0",
76
+ "copy-webpack-plugin": "10.2.4",
75
77
  "cross-env": "7.0.3",
76
78
  "del": "6.0.0",
77
- "eslint": "8.6.0",
78
- "eslint-plugin-import": "2.25.3",
79
- "eslint-plugin-jest": "25.3.4",
79
+ "eslint": "8.10.0",
80
+ "eslint-plugin-import": "2.25.4",
81
+ "eslint-plugin-jest": "26.1.1",
80
82
  "eslint-plugin-node": "11.1.0",
81
83
  "eslint-plugin-security": "1.4.0",
82
84
  "global-npm": "0.5.0",
83
85
  "husky": "7.0.4",
84
- "jest": "27.4.7",
85
- "lint-staged": "12.1.7",
86
+ "jest": "27.5.1",
87
+ "lint-staged": "12.3.5",
86
88
  "mock-fs": "5.1.2",
87
89
  "mocked-env": "1.3.5",
88
- "node-notifier": "10.0.0",
90
+ "node-notifier": "10.0.1",
89
91
  "prettier": "2.5.1",
90
92
  "rimraf": "3.0.2",
91
- "ts-jest": "27.1.2",
92
- "ts-node": "10.4.0",
93
- "typescript": "4.5.4",
93
+ "tmp-promise": "3.0.3",
94
+ "ts-jest": "27.1.3",
95
+ "ts-node": "10.7.0",
96
+ "typescript": "4.6.2",
94
97
  "uuid": "8.3.2",
95
- "webpack": "5.65.0",
96
- "winston": "3.4.0"
98
+ "webpack": "5.70.0",
99
+ "winston": "3.6.0"
97
100
  },
98
101
  "dependencies": {
99
102
  "chalk": "4.1.2",
100
103
  "cross-spawn": "7.0.3",
101
- "fs-extra": "10.0.0",
104
+ "fs-extra": "10.0.1",
102
105
  "got": "11.8.3",
103
- "inquirer": "8.2.0",
106
+ "inquirer": "8.2.1",
104
107
  "semver": "7.3.5",
105
108
  "semver-compare": "1.0.0",
106
109
  "validate-npm-package-name": "3.0.0",