@leo-h/create-nodejs-app 1.0.23 → 1.0.25
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.25",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.25",
|
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.",
|
@@ -50,7 +50,7 @@ importers:
|
|
50
50
|
version: 18.3.5(@types/react@18.3.18)
|
51
51
|
'@vitejs/plugin-react':
|
52
52
|
specifier: 4.3.4
|
53
|
-
version: 4.3.4(vite@6.0.
|
53
|
+
version: 4.3.4(vite@6.0.9(@types/node@22.10.5)(tsx@4.19.2)(yaml@2.6.1))
|
54
54
|
eslint:
|
55
55
|
specifier: 9.17.0
|
56
56
|
version: 9.17.0
|
@@ -91,11 +91,11 @@ importers:
|
|
91
91
|
specifier: 8.18.2
|
92
92
|
version: 8.18.2(eslint@9.17.0)(typescript@5.6.3)
|
93
93
|
vite:
|
94
|
-
specifier: 6.0.
|
95
|
-
version: 6.0.
|
94
|
+
specifier: 6.0.9
|
95
|
+
version: 6.0.9(@types/node@22.10.5)(tsx@4.19.2)(yaml@2.6.1)
|
96
96
|
vite-tsconfig-paths:
|
97
97
|
specifier: 5.1.3
|
98
|
-
version: 5.1.3(typescript@5.6.3)(vite@6.0.
|
98
|
+
version: 5.1.3(typescript@5.6.3)(vite@6.0.9(@types/node@22.10.5)(tsx@4.19.2)(yaml@2.6.1))
|
99
99
|
|
100
100
|
packages:
|
101
101
|
|
@@ -2503,8 +2503,8 @@ packages:
|
|
2503
2503
|
vite:
|
2504
2504
|
optional: true
|
2505
2505
|
|
2506
|
-
vite@6.0.
|
2507
|
-
resolution: {integrity: sha512-
|
2506
|
+
vite@6.0.9:
|
2507
|
+
resolution: {integrity: sha512-MSgUxHcaXLtnBPktkbUSoQUANApKYuxZ6DrbVENlIorbhL2dZydTLaZ01tjUoE3szeFzlFk9ANOKk0xurh4MKA==}
|
2508
2508
|
engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
|
2509
2509
|
hasBin: true
|
2510
2510
|
peerDependencies:
|
@@ -3527,14 +3527,14 @@ snapshots:
|
|
3527
3527
|
|
3528
3528
|
'@ungap/structured-clone@1.2.1': {}
|
3529
3529
|
|
3530
|
-
'@vitejs/plugin-react@4.3.4(vite@6.0.
|
3530
|
+
'@vitejs/plugin-react@4.3.4(vite@6.0.9(@types/node@22.10.5)(tsx@4.19.2)(yaml@2.6.1))':
|
3531
3531
|
dependencies:
|
3532
3532
|
'@babel/core': 7.26.0
|
3533
3533
|
'@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0)
|
3534
3534
|
'@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0)
|
3535
3535
|
'@types/babel__core': 7.20.5
|
3536
3536
|
react-refresh: 0.14.2
|
3537
|
-
vite: 6.0.
|
3537
|
+
vite: 6.0.9(@types/node@22.10.5)(tsx@4.19.2)(yaml@2.6.1)
|
3538
3538
|
transitivePeerDependencies:
|
3539
3539
|
- supports-color
|
3540
3540
|
|
@@ -5293,18 +5293,18 @@ snapshots:
|
|
5293
5293
|
'@types/unist': 3.0.3
|
5294
5294
|
vfile-message: 4.0.2
|
5295
5295
|
|
5296
|
-
vite-tsconfig-paths@5.1.3(typescript@5.6.3)(vite@6.0.
|
5296
|
+
vite-tsconfig-paths@5.1.3(typescript@5.6.3)(vite@6.0.9(@types/node@22.10.5)(tsx@4.19.2)(yaml@2.6.1)):
|
5297
5297
|
dependencies:
|
5298
5298
|
debug: 4.4.0
|
5299
5299
|
globrex: 0.1.2
|
5300
5300
|
tsconfck: 3.1.4(typescript@5.6.3)
|
5301
5301
|
optionalDependencies:
|
5302
|
-
vite: 6.0.
|
5302
|
+
vite: 6.0.9(@types/node@22.10.5)(tsx@4.19.2)(yaml@2.6.1)
|
5303
5303
|
transitivePeerDependencies:
|
5304
5304
|
- supports-color
|
5305
5305
|
- typescript
|
5306
5306
|
|
5307
|
-
vite@6.0.
|
5307
|
+
vite@6.0.9(@types/node@22.10.5)(tsx@4.19.2)(yaml@2.6.1):
|
5308
5308
|
dependencies:
|
5309
5309
|
esbuild: 0.24.2
|
5310
5310
|
postcss: 8.4.49
|
@@ -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 (
|