@leo-h/create-nodejs-app 1.0.15 → 1.0.17
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
@@ -50,4 +50,4 @@ Options:
|
|
50
50
|
|
51
51
|
- **Lint and code format**: All templates use [eslint](https://eslint.org/) to identify problems in the code and [prettier](https://prettier.io/) to ensure consistent code formatting. Both are integrated with [husky](https://typicode.github.io/husky/) and [lint-staged](https://github.com/lint-staged/lint-staged) to automatically run them before every commit you make with git.
|
52
52
|
|
53
|
-
- **Tests**: To encourage the use of tests, all templates already have a pre-configured unit testing setup with [Vitest](https://vitest.dev/). The API templates also come with
|
53
|
+
- **Tests**: To encourage the use of tests, all templates already have a pre-configured unit testing setup with [Vitest](https://vitest.dev/). The API templates also come with integration testing examples, including all utility tools like [Supertest](https://github.com/ladjs/supertest#readme) and [Faker.js](https://fakerjs.dev/).
|
package/dist/package.json.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0});const name="@leo-h/create-nodejs-app",version="1.0.
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});const name="@leo-h/create-nodejs-app",version="1.0.17",packageManager="pnpm@9.1.1",author="Leonardo Henrique <leonardo0507.business@gmail.com>",description="Create a modern Node.js app with TypeScript using one command.",license="MIT",keywords=["node","node.js","typescript"],bin={"create-nodejs-app":"./dist/index.js"},files=["./dist","./templates"],repository={type:"git",url:"https://github.com/Leo-Henrique/create-nodejs-app"},scripts={start:"node ./dist/index.js","start:dev":"tsx --env-file=.env.development ./src/index.ts","start:dev:watch":"tsx --env-file=.env.development watch ./src/index.ts",typecheck:"tsc --noEmit",lint:"eslint . --ext .ts --max-warnings 0 --cache","lint:fix":"pnpm lint --fix",format:"prettier . --write --cache","test:unit":"vitest run","test:unit:watch":"vitest","test:e2e":"vitest run --config ./vitest.config.e2e.mts","test:e2e:watch":"vitest --config ./vitest.config.e2e.mts","test:coverage":"vitest run --coverage.enabled=true",template:"tsx --env-file=.env.development ./scripts/template-cli.ts",prebuild:"rimraf ./dist",build:"unbuild",prepublishOnly:"pnpm build"},dependencies={commander:"12.1.0",picocolors:"1.0.1",prompts:"2.4.2","validate-npm-package-name":"5.0.1",zod:"3.23.8"},devDependencies={"@faker-js/faker":"8.4.1","@types/node":"20.12.12","@types/prompts":"2.4.9","@types/validate-npm-package-name":"4.0.2","@typescript-eslint/eslint-plugin":"7.10.0","@typescript-eslint/parser":"7.10.0","conventional-changelog-conventionalcommits":"8.0.0",eslint:"8.57.0","eslint-config-prettier":"9.1.0","eslint-plugin-vitest":"0.4.0",husky:"9.0.11","lint-staged":"15.2.2","npm-run-all":"4.1.5",prettier:"3.2.5",rimraf:"5.0.7",tsx:"4.10.5",typescript:"5.4.5",unbuild:"2.0.0","vite-tsconfig-paths":"4.3.2",vitest:"1.6.0"},d={name,version,packageManager,author,description,license,keywords,bin,files,repository,scripts,dependencies,devDependencies};exports.author=author;exports.bin=bin;exports.default=d;exports.dependencies=dependencies;exports.description=description;exports.devDependencies=devDependencies;exports.files=files;exports.keywords=keywords;exports.license=license;exports.name=name;exports.packageManager=packageManager;exports.repository=repository;exports.scripts=scripts;exports.version=version;
|
package/dist/src/config/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const fs=require("fs"),path=require("path");process.env.NODE_ENV||(process.
|
1
|
+
const getPackageJsonUpDir=require("../utils/get-package-json-up-dir.js"),fs=require("fs"),path=require("path");process.env.NODE_ENV||(process.env.NODE_ENV="production");const e=getPackageJsonUpDir.getPackageJsonUpDir(),GENERATED_APP_TARGET_ROOT_PATH=process.env.NODE_ENV==="production"?process.cwd():path.resolve(e,"generated-apps"),TEMPLATES_PATH=path.resolve(e,"templates");path.resolve(TEMPLATES_PATH,"clean");process.env.NODE_ENV!=="production"&&!fs.existsSync(GENERATED_APP_TARGET_ROOT_PATH)&&fs.mkdirSync(GENERATED_APP_TARGET_ROOT_PATH);exports.GENERATED_APP_TARGET_ROOT_PATH=GENERATED_APP_TARGET_ROOT_PATH;exports.TEMPLATES_PATH=TEMPLATES_PATH;
|
@@ -0,0 +1 @@
|
|
1
|
+
const fs=require("fs"),path=require("path");function getPackageJsonUpDir(e=__dirname){return fs.readdirSync(e,{encoding:"utf-8"}).includes("package.json")?e:getPackageJsonUpDir(path.resolve(e,".."))}exports.getPackageJsonUpDir=getPackageJsonUpDir;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@leo-h/create-nodejs-app",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.17",
|
4
4
|
"packageManager": "pnpm@9.1.1",
|
5
5
|
"author": "Leonardo Henrique <leonardo0507.business@gmail.com>",
|
6
6
|
"description": "Create a modern Node.js app with TypeScript using one command.",
|
@@ -22,10 +22,9 @@
|
|
22
22
|
"url": "https://github.com/Leo-Henrique/create-nodejs-app"
|
23
23
|
},
|
24
24
|
"scripts": {
|
25
|
-
"prepare": "husky",
|
26
25
|
"start": "node ./dist/index.js",
|
27
|
-
"start:dev": "tsx ./src/index.ts",
|
28
|
-
"start:dev:watch": "tsx watch ./src/index.ts",
|
26
|
+
"start:dev": "tsx --env-file=.env.development ./src/index.ts",
|
27
|
+
"start:dev:watch": "tsx --env-file=.env.development watch ./src/index.ts",
|
29
28
|
"typecheck": "tsc --noEmit",
|
30
29
|
"lint": "eslint . --ext .ts --max-warnings 0 --cache",
|
31
30
|
"lint:fix": "pnpm lint --fix",
|
@@ -35,7 +34,7 @@
|
|
35
34
|
"test:e2e": "vitest run --config ./vitest.config.e2e.mts",
|
36
35
|
"test:e2e:watch": "vitest --config ./vitest.config.e2e.mts",
|
37
36
|
"test:coverage": "vitest run --coverage.enabled=true",
|
38
|
-
"template": "tsx ./scripts/template-cli.ts",
|
37
|
+
"template": "tsx --env-file=.env.development ./scripts/template-cli.ts",
|
39
38
|
"prebuild": "rimraf ./dist",
|
40
39
|
"build": "unbuild",
|
41
40
|
"prepublishOnly": "pnpm build"
|