@leo-h/create-nodejs-app 1.0.23 → 1.0.24
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/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.24",packageManager="pnpm@9.15.0",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 . --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.1.1",prompts:"2.4.2","validate-npm-package-name":"5.0.1",zod:"3.24.1"},devDependencies={"@eslint/js":"9.17.0","@faker-js/faker":"9.3.0","@types/node":"22.10.2","@types/prompts":"2.4.9","@types/validate-npm-package-name":"4.0.2","@vitest/eslint-plugin":"1.1.18","conventional-changelog-conventionalcommits":"8.0.0",eslint:"9.17.0","eslint-config-prettier":"9.1.0",globals:"15.14.0",husky:"9.1.7","lint-staged":"15.2.11",prettier:"3.4.2",rimraf:"6.0.1",tsx:"4.19.2",typescript:"5.7.2","typescript-eslint":"8.18.1",unbuild:"2.0.0","vite-tsconfig-paths":"4.3.2",vitest:"1.6.0"},w={name,version,packageManager,author,description,license,keywords,bin,files,repository,scripts,dependencies,devDependencies};exports.author=author;exports.bin=bin;exports.default=w;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/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.24",
|
4
4
|
"packageManager": "pnpm@9.15.0",
|
5
5
|
"author": "Leonardo Henrique <leonardo0507.business@gmail.com>",
|
6
6
|
"description": "Create a modern Node.js app with TypeScript using one command.",
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { env } from "@/env";
|
1
2
|
import { ApiError } from "./errors/api-error";
|
2
3
|
import { ApiUnexpectedResponseError } from "./errors/api-unexpected-response-error";
|
3
4
|
|
@@ -11,7 +12,13 @@ export async function swrFetcher<Output extends SwrFetcherOutput>(
|
|
11
12
|
url: RequestInfo | URL,
|
12
13
|
options?: RequestInit,
|
13
14
|
): Promise<Output> {
|
14
|
-
const
|
15
|
+
const apiBaseUrl = new URL(env.APP_API_BASE_URL);
|
16
|
+
const endpointUrl = new URL(url.toString());
|
17
|
+
|
18
|
+
endpointUrl.host = apiBaseUrl.host;
|
19
|
+
endpointUrl.protocol = apiBaseUrl.protocol;
|
20
|
+
|
21
|
+
const response = await fetch(endpointUrl, options);
|
15
22
|
let body: unknown;
|
16
23
|
|
17
24
|
if (
|