db-json-cli 2.1.1 → 2.1.3
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/.next/server/app/api/[resource]/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/[resource]/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/[resource]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/[resource]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/info/route.js +1 -1
- package/.next/standalone/.next/server/app/api/info/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/info.body +1 -1
- package/.next/standalone/.next/server/app/api/login/route.js +1 -1
- package/.next/standalone/.next/server/app/api/login/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/register/route.js +1 -1
- package/.next/standalone/.next/server/app/api/register/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +3 -3
- package/.next/standalone/.next/server/chunks/{656.js → 759.js} +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/db.json +20 -105
- package/.next/standalone/package.json +1 -1
- package/bin/cli.js +8 -1
- package/package.json +1 -1
- /package/.next/standalone/.next/static/{VRnkOhUo8cbYlQGI7OxpI → ANGyQ0qQihM3hnAa-ot73}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{VRnkOhUo8cbYlQGI7OxpI → ANGyQ0qQihM3hnAa-ot73}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ANGyQ0qQihM3hnAa-ot73
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"/_not-found/page":"/_not-found","/page":"/","/api/
|
|
1
|
+
{"/_not-found/page":"/_not-found","/page":"/","/api/info/route":"/api/info","/api/login/route":"/api/login","/api/[resource]/route":"/api/[resource]","/api/register/route":"/api/register","/api/[resource]/[id]/route":"/api/[resource]/[id]"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"devFiles": [],
|
|
6
6
|
"ampDevFiles": [],
|
|
7
7
|
"lowPriorityFiles": [
|
|
8
|
-
"static/
|
|
9
|
-
"static/
|
|
8
|
+
"static/ANGyQ0qQihM3hnAa-ot73/_buildManifest.js",
|
|
9
|
+
"static/ANGyQ0qQihM3hnAa-ot73/_ssgManifest.js"
|
|
10
10
|
],
|
|
11
11
|
"rootMainFiles": [
|
|
12
12
|
"static/chunks/webpack-020ce2426d70958e.js",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":4,"routes":{"/":{"experimentalBypassFor":[{"type":"header","key":"Next-Action"},{"type":"header","key":"content-type","value":"multipart/form-data;.*"}],"initialRevalidateSeconds":false,"srcRoute":"/","dataRoute":
|
|
1
|
+
{"version":4,"routes":{"/api/info":{"initialHeaders":{"content-type":"application/json","x-next-cache-tags":"_N_T_/layout,_N_T_/api/layout,_N_T_/api/info/layout,_N_T_/api/info/route,_N_T_/api/info"},"experimentalBypassFor":[{"type":"header","key":"Next-Action"},{"type":"header","key":"content-type","value":"multipart/form-data;.*"}],"initialRevalidateSeconds":false,"srcRoute":"/api/info","dataRoute":null},"/":{"experimentalBypassFor":[{"type":"header","key":"Next-Action"},{"type":"header","key":"content-type","value":"multipart/form-data;.*"}],"initialRevalidateSeconds":false,"srcRoute":"/","dataRoute":"/index.rsc"}},"dynamicRoutes":{},"notFoundRoutes":[],"preview":{"previewModeId":"88b7deb392c7f68e19556feeb230f01b","previewModeSigningKey":"923352fd8e683098cd66a08a7a08274455e8db9c0944a261d1f1c06396a4a5df","previewModeEncryptionKey":"e82c0844d8d840101138048e37eabd0daf6331a2c45042316466bc45390902b4"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="ko"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/9e7c0563f88bbaa4.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-020ce2426d70958e.js"/><script src="/_next/static/chunks/fd9d1056-13294f02aa6fd7af.js" async=""></script><script src="/_next/static/chunks/117-69b8841dc3821afe.js" async=""></script><script src="/_next/static/chunks/main-app-9982ced3bf7037dc.js" async=""></script><script src="/_next/static/chunks/954-b2c56f3f904cc664.js" async=""></script><script src="/_next/static/chunks/app/layout-fa3af872c59446d2.js" async=""></script><meta name="robots" content="noindex"/><title>db-json-cli</title><title>404: This page could not be found.</title><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_746a73"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-020ce2426d70958e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/9e7c0563f88bbaa4.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[2846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[6423,[],\"\"]\n6:I[6984,[\"954\",\"static/chunks/954-b2c56f3f904cc664.js\",\"185\",\"static/chunks/app/layout-fa3af872c59446d2.js\"],\"default\",1]\nc:I[1060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"
|
|
1
|
+
<!DOCTYPE html><html lang="ko"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/9e7c0563f88bbaa4.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-020ce2426d70958e.js"/><script src="/_next/static/chunks/fd9d1056-13294f02aa6fd7af.js" async=""></script><script src="/_next/static/chunks/117-69b8841dc3821afe.js" async=""></script><script src="/_next/static/chunks/main-app-9982ced3bf7037dc.js" async=""></script><script src="/_next/static/chunks/954-b2c56f3f904cc664.js" async=""></script><script src="/_next/static/chunks/app/layout-fa3af872c59446d2.js" async=""></script><meta name="robots" content="noindex"/><title>db-json-cli</title><title>404: This page could not be found.</title><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_746a73"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-020ce2426d70958e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/9e7c0563f88bbaa4.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[2846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[6423,[],\"\"]\n6:I[6984,[\"954\",\"static/chunks/954-b2c56f3f904cc664.js\",\"185\",\"static/chunks/app/layout-fa3af872c59446d2.js\"],\"default\",1]\nc:I[1060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"ANGyQ0qQihM3hnAa-ot73\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/9e7c0563f88bbaa4.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
6:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"}
|
|
6
6
|
7:{"display":"inline-block"}
|
|
7
7
|
8:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0}
|
|
8
|
-
0:["
|
|
8
|
+
0:["ANGyQ0qQihM3hnAa-ot73",[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["/_not-found",{"children":["__PAGE__",{},[["$L1",[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null],null],null]},[null,["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","/_not-found","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/9e7c0563f88bbaa4.css","precedence":"next","crossOrigin":"$undefined"}]],["$","$L4",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$5","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$6","children":"404"}],["$","div",null,{"style":"$7","children":["$","h2",null,{"style":"$8","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}],"params":{}}]],null],null],["$L9",["$","meta",null,{"name":"robots","content":"noindex"}]]]]]
|
|
9
9
|
9:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}]]
|
|
10
10
|
1:null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=675,e.ids=[675],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7790:e=>{e.exports=require("assert")},8893:e=>{e.exports=require("buffer")},9714:e=>{e.exports=require("constants")},4770:e=>{e.exports=require("crypto")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},6162:e=>{e.exports=require("stream")},1764:e=>{e.exports=require("util")},28:(e,s,t)=>{t.r(s),t.d(s,{originalPathname:()=>
|
|
1
|
+
"use strict";(()=>{var e={};e.id=675,e.ids=[675],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7790:e=>{e.exports=require("assert")},8893:e=>{e.exports=require("buffer")},9714:e=>{e.exports=require("constants")},4770:e=>{e.exports=require("crypto")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},6162:e=>{e.exports=require("stream")},1764:e=>{e.exports=require("util")},28:(e,s,t)=>{t.r(s),t.d(s,{originalPathname:()=>m,patchFetch:()=>g,requestAsyncStorage:()=>d,routeModule:()=>R,serverHooks:()=>E,staticGenerationAsyncStorage:()=>x});var r={};t.r(r),t.d(r,{DELETE:()=>l,GET:()=>j,PUT:()=>N});var n=t(9303),a=t(8716),o=t(670),u=t(7070),i=t(7431),p=t(8855),c=t(53);let j=async(e,{params:s})=>{try{let{resource:t,id:r}=s,n=await (0,c.VK)();if(!n[t])return u.NextResponse.json({message:i.Qj.RESOURCE_NOT_FOUND},{status:404});if(n.rules?.[t]==="private"&&!(0,p.lj)(e))return u.NextResponse.json({message:i.Qj.NO_TOKEN},{status:401});let a=Number(r);if(isNaN(a)||a<1)return u.NextResponse.json({message:i.Qj.INVALID_ID_FORMAT},{status:400});let o=n[t].find(e=>e.id===a);if(!o)return u.NextResponse.json({message:i.Qj.ITEM_NOT_FOUND},{status:404});return u.NextResponse.json(o)}catch(e){if(console.error("GET resource by ID error:",e),e.message?.includes("database")||e.message?.includes("DB"))return u.NextResponse.json({message:i.Qj.DATABASE_ERROR},{status:500});return u.NextResponse.json({message:i.Qj.FETCH_FAILED},{status:500})}},N=async(e,{params:s})=>{try{let{resource:t,id:r}=s,n=await (0,c.VK)();if(!n[t])return u.NextResponse.json({message:i.Qj.RESOURCE_NOT_FOUND},{status:404});if(n.rules?.[t]==="private"&&!(0,p.lj)(e))return u.NextResponse.json({message:i.Qj.NO_TOKEN},{status:401});let a=Number(r);if(isNaN(a)||a<1)return u.NextResponse.json({message:i.Qj.INVALID_ID_FORMAT},{status:400});let o=n[t].findIndex(e=>e.id===a);if(-1===o)return u.NextResponse.json({message:i.Qj.ITEM_NOT_FOUND},{status:404});let j=await e.json();if(!j||"object"!=typeof j||Array.isArray(j))return u.NextResponse.json({message:i.Qj.INVALID_BODY},{status:400});if(0===Object.keys(j).length)return u.NextResponse.json({message:i.Qj.MISSING_REQUIRED_FIELDS},{status:422});if(JSON.stringify(j).length>1048576)return u.NextResponse.json({message:i.Qj.PAYLOAD_TOO_LARGE},{status:413});let N={...n[t][o],...j,id:a};return n[t][o]=N,await (0,c.bY)(n),u.NextResponse.json(N)}catch(e){if(console.error("PUT resource error:",e),e instanceof SyntaxError)return u.NextResponse.json({message:i.Qj.INVALID_BODY},{status:400});if(e.message?.includes("database")||e.message?.includes("DB")||e.message?.includes("save"))return u.NextResponse.json({message:i.Qj.DATABASE_ERROR},{status:500});return u.NextResponse.json({message:i.Qj.UPDATE_FAILED},{status:500})}},l=async(e,{params:s})=>{try{let{resource:t,id:r}=s,n=await (0,c.VK)();if(!n[t])return u.NextResponse.json({message:i.Qj.RESOURCE_NOT_FOUND},{status:404});if(n.rules?.[t]==="private"&&!(0,p.lj)(e))return u.NextResponse.json({message:i.Qj.NO_TOKEN},{status:401});let a=Number(r);if(isNaN(a)||a<1)return u.NextResponse.json({message:i.Qj.INVALID_ID_FORMAT},{status:400});let o=n[t].findIndex(e=>e.id===a);if(-1===o)return u.NextResponse.json({message:i.Qj.ITEM_NOT_FOUND},{status:404});let j=n[t][o];return n[t].splice(o,1),await (0,c.bY)(n),u.NextResponse.json(j)}catch(e){if(console.error("DELETE resource error:",e),e.message?.includes("database")||e.message?.includes("DB")||e.message?.includes("save"))return u.NextResponse.json({message:i.Qj.DATABASE_ERROR},{status:500});return u.NextResponse.json({message:i.Qj.DELETE_FAILED},{status:500})}},R=new n.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/[resource]/[id]/route",pathname:"/api/[resource]/[id]",filename:"route",bundlePath:"app/api/[resource]/[id]/route"},resolvedPagePath:"D:\\잡동사니\\db-json-cli\\app\\api\\[resource]\\[id]\\route.js",nextConfigOutput:"standalone",userland:r}),{requestAsyncStorage:d,staticGenerationAsyncStorage:x,serverHooks:E}=R,m="/api/[resource]/[id]/route";function g(){return(0,o.patchFetch)({serverHooks:E,staticGenerationAsyncStorage:x})}},8855:(e,s,t)=>{t.d(s,{Oe:()=>i,X8:()=>p,c_:()=>u,lj:()=>j});var r=t(1482),n=t(2023);let a=process.env.ACCESS_SECRET||"access-secret",o=process.env.REFRESH_SECRET||"refresh-secret",u=async e=>{let s=await n.genSalt(10);return n.hash(e,s)},i=async(e,s)=>n.compare(e,s),p=e=>({accessToken:r.sign(e,a,{expiresIn:"1h"}),refreshToken:r.sign(e,o,{expiresIn:"7d"})}),c=e=>{try{return r.verify(e,a)}catch(e){return null}},j=e=>{let s=e.headers.get("authorization");return s?c(s.split(" ")[1]):null}}};var s=require("../../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[276,610,944,759],()=>t(28));module.exports=r})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../../db.json","../../../../../../node_modules/next/dist/client/components/action-async-storage-instance.js","../../../../../../node_modules/next/dist/client/components/action-async-storage.external.js","../../../../../../node_modules/next/dist/client/components/async-local-storage.js","../../../../../../node_modules/next/dist/client/components/request-async-storage-instance.js","../../../../../../node_modules/next/dist/client/components/request-async-storage.external.js","../../../../../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../../../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/276.js","../../../../chunks/610.js","../../../../chunks/
|
|
1
|
+
{"version":1,"files":["../../../../../../db.json","../../../../../../node_modules/next/dist/client/components/action-async-storage-instance.js","../../../../../../node_modules/next/dist/client/components/action-async-storage.external.js","../../../../../../node_modules/next/dist/client/components/async-local-storage.js","../../../../../../node_modules/next/dist/client/components/request-async-storage-instance.js","../../../../../../node_modules/next/dist/client/components/request-async-storage.external.js","../../../../../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../../../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/276.js","../../../../chunks/610.js","../../../../chunks/759.js","../../../../chunks/944.js","../../../../webpack-runtime.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=174,e.ids=[174],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7790:e=>{e.exports=require("assert")},8893:e=>{e.exports=require("buffer")},9714:e=>{e.exports=require("constants")},4770:e=>{e.exports=require("crypto")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},6162:e=>{e.exports=require("stream")},1764:e=>{e.exports=require("util")},7555:(e,s,
|
|
1
|
+
"use strict";(()=>{var e={};e.id=174,e.ids=[174],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7790:e=>{e.exports=require("assert")},8893:e=>{e.exports=require("buffer")},9714:e=>{e.exports=require("constants")},4770:e=>{e.exports=require("crypto")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},6162:e=>{e.exports=require("stream")},1764:e=>{e.exports=require("util")},7555:(e,s,r)=>{r.r(s),r.d(s,{originalPathname:()=>m,patchFetch:()=>N,requestAsyncStorage:()=>x,routeModule:()=>R,serverHooks:()=>g,staticGenerationAsyncStorage:()=>d});var t={};r.r(t),r.d(t,{GET:()=>c,POST:()=>j});var n=r(9303),a=r(8716),o=r(670),u=r(7070),i=r(7431),p=r(8855),l=r(53);let c=async(e,{params:s})=>{try{let{resource:r}=s,t=await (0,l.VK)();if(!t[r])return u.NextResponse.json({message:i.Qj.RESOURCE_NOT_FOUND},{status:404});if(t.rules?.[r]==="private"&&!(0,p.lj)(e))return u.NextResponse.json({message:i.Qj.NO_TOKEN},{status:401});let{searchParams:n}=new URL(e.url),a=n.get("from"),o=n.get("to"),c=t[r];if(a||o){let e=a?Number(a):null,s=o?Number(o):null;if(a&&isNaN(e)||o&&isNaN(s)||null!==e&&null!==s&&e>s)return u.NextResponse.json({message:i.Qj.INVALID_QUERY_PARAMS},{status:400});null!==e&&null!==s&&(c=c.filter(r=>r.id>=e&&r.id<=s))}return u.NextResponse.json(c)}catch(e){if(console.error("GET resource error:",e),e.message?.includes("database")||e.message?.includes("DB"))return u.NextResponse.json({message:i.Qj.DATABASE_ERROR},{status:500});return u.NextResponse.json({message:i.Qj.FETCH_FAILED},{status:500})}},j=async(e,{params:s})=>{try{let{resource:r}=s,t=await (0,l.VK)();if(!t[r])return u.NextResponse.json({message:i.Qj.RESOURCE_NOT_FOUND},{status:404});if(t.rules?.[r]==="private"&&!(0,p.lj)(e))return u.NextResponse.json({message:i.Qj.NO_TOKEN},{status:401});let n=await e.json();if(!n||"object"!=typeof n||Array.isArray(n))return u.NextResponse.json({message:i.Qj.INVALID_BODY},{status:400});if(0===Object.keys(n).length)return u.NextResponse.json({message:i.Qj.MISSING_REQUIRED_FIELDS},{status:422});if(JSON.stringify(n).length>1048576)return u.NextResponse.json({message:i.Qj.PAYLOAD_TOO_LARGE},{status:413});let a={id:t[r].length?Math.max(...t[r].map(e=>e.id))+1:1,...n};return t[r].push(a),await (0,l.bY)(t),u.NextResponse.json(a)}catch(e){if(console.error("POST resource error:",e),e instanceof SyntaxError)return u.NextResponse.json({message:i.Qj.INVALID_BODY},{status:400});if(e.message?.includes("database")||e.message?.includes("DB")||e.message?.includes("save"))return u.NextResponse.json({message:i.Qj.DATABASE_ERROR},{status:500});return u.NextResponse.json({message:i.Qj.CREATE_FAILED},{status:500})}},R=new n.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/[resource]/route",pathname:"/api/[resource]",filename:"route",bundlePath:"app/api/[resource]/route"},resolvedPagePath:"D:\\잡동사니\\db-json-cli\\app\\api\\[resource]\\route.js",nextConfigOutput:"standalone",userland:t}),{requestAsyncStorage:x,staticGenerationAsyncStorage:d,serverHooks:g}=R,m="/api/[resource]/route";function N(){return(0,o.patchFetch)({serverHooks:g,staticGenerationAsyncStorage:d})}},8855:(e,s,r)=>{r.d(s,{Oe:()=>i,X8:()=>p,c_:()=>u,lj:()=>c});var t=r(1482),n=r(2023);let a=process.env.ACCESS_SECRET||"access-secret",o=process.env.REFRESH_SECRET||"refresh-secret",u=async e=>{let s=await n.genSalt(10);return n.hash(e,s)},i=async(e,s)=>n.compare(e,s),p=e=>({accessToken:t.sign(e,a,{expiresIn:"1h"}),refreshToken:t.sign(e,o,{expiresIn:"7d"})}),l=e=>{try{return t.verify(e,a)}catch(e){return null}},c=e=>{let s=e.headers.get("authorization");return s?l(s.split(" ")[1]):null}}};var s=require("../../../webpack-runtime.js");s.C(e);var r=e=>s(s.s=e),t=s.X(0,[276,610,944,759],()=>r(7555));module.exports=t})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../db.json","../../../../../node_modules/next/dist/client/components/action-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/action-async-storage.external.js","../../../../../node_modules/next/dist/client/components/async-local-storage.js","../../../../../node_modules/next/dist/client/components/request-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/request-async-storage.external.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/276.js","../../../chunks/610.js","../../../chunks/
|
|
1
|
+
{"version":1,"files":["../../../../../db.json","../../../../../node_modules/next/dist/client/components/action-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/action-async-storage.external.js","../../../../../node_modules/next/dist/client/components/async-local-storage.js","../../../../../node_modules/next/dist/client/components/request-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/request-async-storage.external.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/276.js","../../../chunks/610.js","../../../chunks/759.js","../../../chunks/944.js","../../../webpack-runtime.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=874,e.ids=[874],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7790:e=>{e.exports=require("assert")},9714:e=>{e.exports=require("constants")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},6162:e=>{e.exports=require("stream")},1764:e=>{e.exports=require("util")},2935:(e,
|
|
1
|
+
"use strict";(()=>{var e={};e.id=874,e.ids=[874],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7790:e=>{e.exports=require("assert")},9714:e=>{e.exports=require("constants")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},6162:e=>{e.exports=require("stream")},1764:e=>{e.exports=require("util")},2935:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>f,patchFetch:()=>h,requestAsyncStorage:()=>l,routeModule:()=>d,serverHooks:()=>m,staticGenerationAsyncStorage:()=>x});var s={};t.r(s),t.d(s,{GET:()=>c});var o=t(9303),i=t(8716),a=t(670),n=t(7070),p=t(7431),u=t(53);let c=async()=>{try{let e=await (0,u.VK)(),r=Object.keys(e).filter(e=>"users"!==e&&"config"!==e&&"rules"!==e).map(r=>({key:r,count:e[r]?.length||0,permission:e.rules?.[r]||"public"})),t={...p.MP};return(0,p.R9)(r).forEach(e=>{t[e.id]=e}),n.NextResponse.json({routeList:r,port:process.env.PORT||4e3,apiSchemas:t})}catch(e){return n.NextResponse.json({message:"API 정보를 불러오는데 실패했습니다"},{status:500})}},d=new o.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/info/route",pathname:"/api/info",filename:"route",bundlePath:"app/api/info/route"},resolvedPagePath:"D:\\잡동사니\\db-json-cli\\app\\api\\info\\route.js",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:l,staticGenerationAsyncStorage:x,serverHooks:m}=d,f="/api/info/route";function h(){return(0,a.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:x})}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[276,610,759],()=>t(2935));module.exports=s})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../db.json","../../../../../node_modules/next/dist/client/components/action-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/action-async-storage.external.js","../../../../../node_modules/next/dist/client/components/async-local-storage.js","../../../../../node_modules/next/dist/client/components/request-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/request-async-storage.external.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/276.js","../../../chunks/610.js","../../../webpack-runtime.js"]}
|
|
1
|
+
{"version":1,"files":["../../../../../db.json","../../../../../node_modules/next/dist/client/components/action-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/action-async-storage.external.js","../../../../../node_modules/next/dist/client/components/async-local-storage.js","../../../../../node_modules/next/dist/client/components/request-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/request-async-storage.external.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/276.js","../../../chunks/610.js","../../../chunks/759.js","../../../webpack-runtime.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"routeList":[{"key":"test1","count":3,"permission":"public"},{"key":"test2","count":3,"permission":"private"},{"key":"list","count":12,"permission":"public"}],"port":4000,"apiSchemas":{"register":{"id":"register","method":"POST","path":"/register","summary":"새 사용자 계정 등록","description":"이메일과 비밀번호로 새로운 사용자를 등록합니다.","auth":false,"requestBody":{"email":"user@example.com","password":"securepassword123","name":"홍길동"},"responses":{"200":{"description":"성공적으로 등록됨","example":{"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refreshToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","userInfo":{"id":1,"email":"user@example.com","name":"홍길동"}}},"400":{"description":"필수 필드 누락 또는 유효하지 않은 입력","example":{"message":"이메일/비밀번호가 필요합니다"}},"409":{"description":"이미 존재하는 사용자","example":{"message":"사용자가 이미 존재합니다"}},"422":{"description":"유효성 검증 실패","example":{"message":"올바른 이메일 형식이 아닙니다"}},"500":{"description":"서버 오류","example":{"message":"등록에 실패했습니다"}}}},"login":{"id":"login","method":"POST","path":"/login","summary":"로그인 및 액세스 토큰 받기","description":"이메일과 비밀번호로 로그인하여 JWT 토큰을 받습니다.","auth":false,"requestBody":{"email":"user@example.com","password":"securepassword123"},"responses":{"200":{"description":"로그인 성공","example":{"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refreshToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","userInfo":{"id":1,"email":"user@example.com","name":"홍길동"}}},"400":{"description":"필수 필드 누락","example":{"message":"이메일/비밀번호가 필요합니다"}},"401":{"description":"잘못된 인증 정보","example":{"message":"인증 정보가 올바르지 않습니다"}},"429":{"description":"너무 많은 로그인 시도","example":{"message":"너무 많은 요청이 발생했습니다. 잠시 후 다시 시도해주세요"}},"500":{"description":"서버 오류","example":{"message":"로그인에 실패했습니다"}}}},"get-test1":{"id":"get-test1","method":"GET","path":"/test1","summary":"모든 test1 조회","description":"모든 test1 항목을 조회하거나 ID 범위로 필터링합니다.","auth":false,"permission":"public","count":3,"parameters":[{"name":"from","in":"query","type":"number","description":"시작 ID","required":false},{"name":"to","in":"query","type":"number","description":"종료 ID","required":false}],"responses":{"200":{"description":"성공","example":[{"id":1,"message":"예시 데이터"},{"id":2,"message":"예시 데이터"}]},"400":{"description":"잘못된 쿼리 파라미터","example":{"message":"올바르지 않은 쿼리 파라미터입니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"리소스를 찾을 수 없음","example":{"message":"리소스를 찾을 수 없습니다"}},"500":{"description":"서버 오류","example":{"message":"조회에 실패했습니다"}}}},"get-test1-id":{"id":"get-test1-id","method":"GET","path":"/test1/:id","summary":"특정 test1 조회","description":"ID로 특정 test1 항목을 조회합니다.","auth":false,"permission":"public","parameters":[{"name":"id","in":"path","type":"number","description":"항목 ID","required":true}],"responses":{"200":{"description":"성공","example":{"id":1,"message":"예시 데이터"}},"400":{"description":"잘못된 ID 형식","example":{"message":"올바른 ID 형식이 아닙니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"항목을 찾을 수 없음","example":{"message":"찾을 수 없습니다"}},"500":{"description":"서버 오류","example":{"message":"조회에 실패했습니다"}}}},"post-test1":{"id":"post-test1","method":"POST","path":"/test1","summary":"새 test1 생성","description":"새로운 test1 항목을 생성합니다. ID는 자동으로 생성됩니다.","auth":false,"permission":"public","requestBody":{"message":"여기에 메시지를 입력하세요"},"responses":{"200":{"description":"생성 성공","example":{"id":4,"message":"여기에 메시지를 입력하세요"}},"400":{"description":"잘못된 요청 본문","example":{"message":"잘못된 본문입니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"리소스를 찾을 수 없음","example":{"message":"리소스를 찾을 수 없습니다"}},"409":{"description":"중복된 항목","example":{"message":"중복된 항목입니다"}},"413":{"description":"요청 데이터 크기 초과","example":{"message":"요청 데이터가 너무 큽니다"}},"422":{"description":"유효성 검증 실패","example":{"message":"필수 필드가 누락되었습니다"}},"500":{"description":"서버 오류","example":{"message":"생성에 실패했습니다"}}}},"put-test1-id":{"id":"put-test1-id","method":"PUT","path":"/test1/:id","summary":"test1 수정","description":"ID로 특정 test1 항목을 수정합니다.","auth":false,"permission":"public","parameters":[{"name":"id","in":"path","type":"number","description":"항목 ID","required":true}],"requestBody":{"message":"수정된 메시지"},"responses":{"200":{"description":"수정 성공","example":{"id":1,"message":"수정된 메시지"}},"400":{"description":"잘못된 요청 본문","example":{"message":"잘못된 본문입니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"항목을 찾을 수 없음","example":{"message":"찾을 수 없습니다"}},"409":{"description":"충돌","example":{"message":"요청이 현재 서버 상태와 충돌합니다"}},"422":{"description":"유효성 검증 실패","example":{"message":"필수 필드가 누락되었습니다"}},"500":{"description":"서버 오류","example":{"message":"수정에 실패했습니다"}}}},"delete-test1-id":{"id":"delete-test1-id","method":"DELETE","path":"/test1/:id","summary":"test1 삭제","description":"ID로 특정 test1 항목을 삭제합니다.","auth":false,"permission":"public","parameters":[{"name":"id","in":"path","type":"number","description":"항목 ID","required":true}],"responses":{"200":{"description":"삭제 성공","example":{"id":1,"message":"삭제된 메시지"}},"400":{"description":"잘못된 ID 형식","example":{"message":"올바른 ID 형식이 아닙니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"항목을 찾을 수 없음","example":{"message":"찾을 수 없습니다"}},"500":{"description":"서버 오류","example":{"message":"삭제에 실패했습니다"}}}},"get-test2":{"id":"get-test2","method":"GET","path":"/test2","summary":"모든 test2 조회","description":"모든 test2 항목을 조회하거나 ID 범위로 필터링합니다.","auth":true,"permission":"private","count":3,"parameters":[{"name":"from","in":"query","type":"number","description":"시작 ID","required":false},{"name":"to","in":"query","type":"number","description":"종료 ID","required":false}],"responses":{"200":{"description":"성공","example":[{"id":1,"message":"예시 데이터"},{"id":2,"message":"예시 데이터"}]},"400":{"description":"잘못된 쿼리 파라미터","example":{"message":"올바르지 않은 쿼리 파라미터입니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"리소스를 찾을 수 없음","example":{"message":"리소스를 찾을 수 없습니다"}},"500":{"description":"서버 오류","example":{"message":"조회에 실패했습니다"}}}},"get-test2-id":{"id":"get-test2-id","method":"GET","path":"/test2/:id","summary":"특정 test2 조회","description":"ID로 특정 test2 항목을 조회합니다.","auth":true,"permission":"private","parameters":[{"name":"id","in":"path","type":"number","description":"항목 ID","required":true}],"responses":{"200":{"description":"성공","example":{"id":1,"message":"예시 데이터"}},"400":{"description":"잘못된 ID 형식","example":{"message":"올바른 ID 형식이 아닙니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"항목을 찾을 수 없음","example":{"message":"찾을 수 없습니다"}},"500":{"description":"서버 오류","example":{"message":"조회에 실패했습니다"}}}},"post-test2":{"id":"post-test2","method":"POST","path":"/test2","summary":"새 test2 생성","description":"새로운 test2 항목을 생성합니다. ID는 자동으로 생성됩니다.","auth":true,"permission":"private","requestBody":{"message":"여기에 메시지를 입력하세요"},"responses":{"200":{"description":"생성 성공","example":{"id":4,"message":"여기에 메시지를 입력하세요"}},"400":{"description":"잘못된 요청 본문","example":{"message":"잘못된 본문입니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"리소스를 찾을 수 없음","example":{"message":"리소스를 찾을 수 없습니다"}},"409":{"description":"중복된 항목","example":{"message":"중복된 항목입니다"}},"413":{"description":"요청 데이터 크기 초과","example":{"message":"요청 데이터가 너무 큽니다"}},"422":{"description":"유효성 검증 실패","example":{"message":"필수 필드가 누락되었습니다"}},"500":{"description":"서버 오류","example":{"message":"생성에 실패했습니다"}}}},"put-test2-id":{"id":"put-test2-id","method":"PUT","path":"/test2/:id","summary":"test2 수정","description":"ID로 특정 test2 항목을 수정합니다.","auth":true,"permission":"private","parameters":[{"name":"id","in":"path","type":"number","description":"항목 ID","required":true}],"requestBody":{"message":"수정된 메시지"},"responses":{"200":{"description":"수정 성공","example":{"id":1,"message":"수정된 메시지"}},"400":{"description":"잘못된 요청 본문","example":{"message":"잘못된 본문입니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"항목을 찾을 수 없음","example":{"message":"찾을 수 없습니다"}},"409":{"description":"충돌","example":{"message":"요청이 현재 서버 상태와 충돌합니다"}},"422":{"description":"유효성 검증 실패","example":{"message":"필수 필드가 누락되었습니다"}},"500":{"description":"서버 오류","example":{"message":"수정에 실패했습니다"}}}},"delete-test2-id":{"id":"delete-test2-id","method":"DELETE","path":"/test2/:id","summary":"test2 삭제","description":"ID로 특정 test2 항목을 삭제합니다.","auth":true,"permission":"private","parameters":[{"name":"id","in":"path","type":"number","description":"항목 ID","required":true}],"responses":{"200":{"description":"삭제 성공","example":{"id":1,"message":"삭제된 메시지"}},"400":{"description":"잘못된 ID 형식","example":{"message":"올바른 ID 형식이 아닙니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"항목을 찾을 수 없음","example":{"message":"찾을 수 없습니다"}},"500":{"description":"서버 오류","example":{"message":"삭제에 실패했습니다"}}}},"get-list":{"id":"get-list","method":"GET","path":"/list","summary":"모든 list 조회","description":"모든 list 항목을 조회하거나 ID 범위로 필터링합니다.","auth":false,"permission":"public","count":12,"parameters":[{"name":"from","in":"query","type":"number","description":"시작 ID","required":false},{"name":"to","in":"query","type":"number","description":"종료 ID","required":false}],"responses":{"200":{"description":"성공","example":[{"id":1,"message":"예시 데이터"},{"id":2,"message":"예시 데이터"}]},"400":{"description":"잘못된 쿼리 파라미터","example":{"message":"올바르지 않은 쿼리 파라미터입니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"리소스를 찾을 수 없음","example":{"message":"리소스를 찾을 수 없습니다"}},"500":{"description":"서버 오류","example":{"message":"조회에 실패했습니다"}}}},"get-list-id":{"id":"get-list-id","method":"GET","path":"/list/:id","summary":"특정 list 조회","description":"ID로 특정 list 항목을 조회합니다.","auth":false,"permission":"public","parameters":[{"name":"id","in":"path","type":"number","description":"항목 ID","required":true}],"responses":{"200":{"description":"성공","example":{"id":1,"message":"예시 데이터"}},"400":{"description":"잘못된 ID 형식","example":{"message":"올바른 ID 형식이 아닙니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"항목을 찾을 수 없음","example":{"message":"찾을 수 없습니다"}},"500":{"description":"서버 오류","example":{"message":"조회에 실패했습니다"}}}},"post-list":{"id":"post-list","method":"POST","path":"/list","summary":"새 list 생성","description":"새로운 list 항목을 생성합니다. ID는 자동으로 생성됩니다.","auth":false,"permission":"public","requestBody":{"message":"여기에 메시지를 입력하세요"},"responses":{"200":{"description":"생성 성공","example":{"id":4,"message":"여기에 메시지를 입력하세요"}},"400":{"description":"잘못된 요청 본문","example":{"message":"잘못된 본문입니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"리소스를 찾을 수 없음","example":{"message":"리소스를 찾을 수 없습니다"}},"409":{"description":"중복된 항목","example":{"message":"중복된 항목입니다"}},"413":{"description":"요청 데이터 크기 초과","example":{"message":"요청 데이터가 너무 큽니다"}},"422":{"description":"유효성 검증 실패","example":{"message":"필수 필드가 누락되었습니다"}},"500":{"description":"서버 오류","example":{"message":"생성에 실패했습니다"}}}},"put-list-id":{"id":"put-list-id","method":"PUT","path":"/list/:id","summary":"list 수정","description":"ID로 특정 list 항목을 수정합니다.","auth":false,"permission":"public","parameters":[{"name":"id","in":"path","type":"number","description":"항목 ID","required":true}],"requestBody":{"message":"수정된 메시지"},"responses":{"200":{"description":"수정 성공","example":{"id":1,"message":"수정된 메시지"}},"400":{"description":"잘못된 요청 본문","example":{"message":"잘못된 본문입니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"항목을 찾을 수 없음","example":{"message":"찾을 수 없습니다"}},"409":{"description":"충돌","example":{"message":"요청이 현재 서버 상태와 충돌합니다"}},"422":{"description":"유효성 검증 실패","example":{"message":"필수 필드가 누락되었습니다"}},"500":{"description":"서버 오류","example":{"message":"수정에 실패했습니다"}}}},"delete-list-id":{"id":"delete-list-id","method":"DELETE","path":"/list/:id","summary":"list 삭제","description":"ID로 특정 list 항목을 삭제합니다.","auth":false,"permission":"public","parameters":[{"name":"id","in":"path","type":"number","description":"항목 ID","required":true}],"responses":{"200":{"description":"삭제 성공","example":{"id":1,"message":"삭제된 메시지"}},"400":{"description":"잘못된 ID 형식","example":{"message":"올바른 ID 형식이 아닙니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"항목을 찾을 수 없음","example":{"message":"찾을 수 없습니다"}},"500":{"description":"서버 오류","example":{"message":"삭제에 실패했습니다"}}}}}}
|
|
1
|
+
{"routeList":[{"key":"test1","count":3,"permission":"public"}],"port":4000,"apiSchemas":{"register":{"id":"register","method":"POST","path":"/register","summary":"새 사용자 계정 등록","description":"이메일과 비밀번호로 새로운 사용자를 등록합니다.","auth":false,"requestBody":{"email":"user@example.com","password":"securepassword123","name":"홍길동"},"responses":{"200":{"description":"성공적으로 등록됨","example":{"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refreshToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","userInfo":{"id":1,"email":"user@example.com","name":"홍길동"}}},"400":{"description":"필수 필드 누락 또는 유효하지 않은 입력","example":{"message":"이메일/비밀번호가 필요합니다"}},"409":{"description":"이미 존재하는 사용자","example":{"message":"사용자가 이미 존재합니다"}},"422":{"description":"유효성 검증 실패","example":{"message":"올바른 이메일 형식이 아닙니다"}},"500":{"description":"서버 오류","example":{"message":"등록에 실패했습니다"}}}},"login":{"id":"login","method":"POST","path":"/login","summary":"로그인 및 액세스 토큰 받기","description":"이메일과 비밀번호로 로그인하여 JWT 토큰을 받습니다.","auth":false,"requestBody":{"email":"user@example.com","password":"securepassword123"},"responses":{"200":{"description":"로그인 성공","example":{"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refreshToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","userInfo":{"id":1,"email":"user@example.com","name":"홍길동"}}},"400":{"description":"필수 필드 누락","example":{"message":"이메일/비밀번호가 필요합니다"}},"401":{"description":"잘못된 인증 정보","example":{"message":"인증 정보가 올바르지 않습니다"}},"429":{"description":"너무 많은 로그인 시도","example":{"message":"너무 많은 요청이 발생했습니다. 잠시 후 다시 시도해주세요"}},"500":{"description":"서버 오류","example":{"message":"로그인에 실패했습니다"}}}},"get-test1":{"id":"get-test1","method":"GET","path":"/test1","summary":"모든 test1 조회","description":"모든 test1 항목을 조회하거나 ID 범위로 필터링합니다.","auth":false,"permission":"public","count":3,"parameters":[{"name":"from","in":"query","type":"number","description":"시작 ID","required":false},{"name":"to","in":"query","type":"number","description":"종료 ID","required":false}],"responses":{"200":{"description":"성공","example":[{"id":1,"message":"예시 데이터"},{"id":2,"message":"예시 데이터"}]},"400":{"description":"잘못된 쿼리 파라미터","example":{"message":"올바르지 않은 쿼리 파라미터입니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"리소스를 찾을 수 없음","example":{"message":"리소스를 찾을 수 없습니다"}},"500":{"description":"서버 오류","example":{"message":"조회에 실패했습니다"}}}},"get-test1-id":{"id":"get-test1-id","method":"GET","path":"/test1/:id","summary":"특정 test1 조회","description":"ID로 특정 test1 항목을 조회합니다.","auth":false,"permission":"public","parameters":[{"name":"id","in":"path","type":"number","description":"항목 ID","required":true}],"responses":{"200":{"description":"성공","example":{"id":1,"message":"예시 데이터"}},"400":{"description":"잘못된 ID 형식","example":{"message":"올바른 ID 형식이 아닙니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"항목을 찾을 수 없음","example":{"message":"찾을 수 없습니다"}},"500":{"description":"서버 오류","example":{"message":"조회에 실패했습니다"}}}},"post-test1":{"id":"post-test1","method":"POST","path":"/test1","summary":"새 test1 생성","description":"새로운 test1 항목을 생성합니다. ID는 자동으로 생성됩니다.","auth":false,"permission":"public","requestBody":{"message":"여기에 메시지를 입력하세요"},"responses":{"200":{"description":"생성 성공","example":{"id":4,"message":"여기에 메시지를 입력하세요"}},"400":{"description":"잘못된 요청 본문","example":{"message":"잘못된 본문입니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"리소스를 찾을 수 없음","example":{"message":"리소스를 찾을 수 없습니다"}},"409":{"description":"중복된 항목","example":{"message":"중복된 항목입니다"}},"413":{"description":"요청 데이터 크기 초과","example":{"message":"요청 데이터가 너무 큽니다"}},"422":{"description":"유효성 검증 실패","example":{"message":"필수 필드가 누락되었습니다"}},"500":{"description":"서버 오류","example":{"message":"생성에 실패했습니다"}}}},"put-test1-id":{"id":"put-test1-id","method":"PUT","path":"/test1/:id","summary":"test1 수정","description":"ID로 특정 test1 항목을 수정합니다.","auth":false,"permission":"public","parameters":[{"name":"id","in":"path","type":"number","description":"항목 ID","required":true}],"requestBody":{"message":"수정된 메시지"},"responses":{"200":{"description":"수정 성공","example":{"id":1,"message":"수정된 메시지"}},"400":{"description":"잘못된 요청 본문","example":{"message":"잘못된 본문입니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"항목을 찾을 수 없음","example":{"message":"찾을 수 없습니다"}},"409":{"description":"충돌","example":{"message":"요청이 현재 서버 상태와 충돌합니다"}},"422":{"description":"유효성 검증 실패","example":{"message":"필수 필드가 누락되었습니다"}},"500":{"description":"서버 오류","example":{"message":"수정에 실패했습니다"}}}},"delete-test1-id":{"id":"delete-test1-id","method":"DELETE","path":"/test1/:id","summary":"test1 삭제","description":"ID로 특정 test1 항목을 삭제합니다.","auth":false,"permission":"public","parameters":[{"name":"id","in":"path","type":"number","description":"항목 ID","required":true}],"responses":{"200":{"description":"삭제 성공","example":{"id":1,"message":"삭제된 메시지"}},"400":{"description":"잘못된 ID 형식","example":{"message":"올바른 ID 형식이 아닙니다"}},"401":{"description":"인증 필요","example":{"message":"토큰이 없습니다"}},"403":{"description":"접근 금지","example":{"message":"접근이 금지되었습니다"}},"404":{"description":"항목을 찾을 수 없음","example":{"message":"찾을 수 없습니다"}},"500":{"description":"서버 오류","example":{"message":"삭제에 실패했습니다"}}}}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=740,e.ids=[740],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7790:e=>{e.exports=require("assert")},8893:e=>{e.exports=require("buffer")},9714:e=>{e.exports=require("constants")},4770:e=>{e.exports=require("crypto")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},6162:e=>{e.exports=require("stream")},1764:e=>{e.exports=require("util")},659:(e,s,r)=>{r.r(s),r.d(s,{originalPathname:()=>
|
|
1
|
+
"use strict";(()=>{var e={};e.id=740,e.ids=[740],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7790:e=>{e.exports=require("assert")},8893:e=>{e.exports=require("buffer")},9714:e=>{e.exports=require("constants")},4770:e=>{e.exports=require("crypto")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},6162:e=>{e.exports=require("stream")},1764:e=>{e.exports=require("util")},659:(e,s,r)=>{r.r(s),r.d(s,{originalPathname:()=>R,patchFetch:()=>j,requestAsyncStorage:()=>m,routeModule:()=>d,serverHooks:()=>g,staticGenerationAsyncStorage:()=>x});var t={};r.r(t),r.d(t,{POST:()=>c});var a=r(9303),n=r(8716),o=r(670),i=r(7070),u=r(7431),p=r(8855),l=r(53);let c=async e=>{try{let{email:s,password:r}=await e.json();if(!s||!r)return i.NextResponse.json({message:u.Qj.EMAIL_PASSWORD_REQUIRED},{status:400});if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s))return i.NextResponse.json({message:u.Qj.INVALID_EMAIL_FORMAT},{status:422});let t=(await (0,l.VK)()).users.find(e=>e.email===s);if(!t||!await (0,p.Oe)(r,t.password))return i.NextResponse.json({message:u.Qj.INVALID_CREDENTIALS},{status:401});let a=(0,p.X8)({id:t.id,email:t.email});return i.NextResponse.json({...a,userInfo:{id:t.id,email:t.email,name:t.name||""}})}catch(e){if(console.error("Login error:",e),e instanceof SyntaxError)return i.NextResponse.json({message:u.Qj.INVALID_BODY},{status:400});if(e.message?.includes("database")||e.message?.includes("DB"))return i.NextResponse.json({message:u.Qj.DATABASE_ERROR},{status:500});return i.NextResponse.json({message:u.Qj.LOGIN_FAILED},{status:500})}},d=new a.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/login/route",pathname:"/api/login",filename:"route",bundlePath:"app/api/login/route"},resolvedPagePath:"D:\\잡동사니\\db-json-cli\\app\\api\\login\\route.js",nextConfigOutput:"standalone",userland:t}),{requestAsyncStorage:m,staticGenerationAsyncStorage:x,serverHooks:g}=d,R="/api/login/route";function j(){return(0,o.patchFetch)({serverHooks:g,staticGenerationAsyncStorage:x})}},8855:(e,s,r)=>{r.d(s,{Oe:()=>u,X8:()=>p,c_:()=>i,lj:()=>c});var t=r(1482),a=r(2023);let n=process.env.ACCESS_SECRET||"access-secret",o=process.env.REFRESH_SECRET||"refresh-secret",i=async e=>{let s=await a.genSalt(10);return a.hash(e,s)},u=async(e,s)=>a.compare(e,s),p=e=>({accessToken:t.sign(e,n,{expiresIn:"1h"}),refreshToken:t.sign(e,o,{expiresIn:"7d"})}),l=e=>{try{return t.verify(e,n)}catch(e){return null}},c=e=>{let s=e.headers.get("authorization");return s?l(s.split(" ")[1]):null}}};var s=require("../../../webpack-runtime.js");s.C(e);var r=e=>s(s.s=e),t=s.X(0,[276,610,944,759],()=>r(659));module.exports=t})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../db.json","../../../../../node_modules/next/dist/client/components/action-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/action-async-storage.external.js","../../../../../node_modules/next/dist/client/components/async-local-storage.js","../../../../../node_modules/next/dist/client/components/request-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/request-async-storage.external.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/276.js","../../../chunks/610.js","../../../chunks/
|
|
1
|
+
{"version":1,"files":["../../../../../db.json","../../../../../node_modules/next/dist/client/components/action-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/action-async-storage.external.js","../../../../../node_modules/next/dist/client/components/async-local-storage.js","../../../../../node_modules/next/dist/client/components/request-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/request-async-storage.external.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/276.js","../../../chunks/610.js","../../../chunks/759.js","../../../chunks/944.js","../../../webpack-runtime.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=569,e.ids=[569],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7790:e=>{e.exports=require("assert")},8893:e=>{e.exports=require("buffer")},9714:e=>{e.exports=require("constants")},4770:e=>{e.exports=require("crypto")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},6162:e=>{e.exports=require("stream")},1764:e=>{e.exports=require("util")},3883:(e,s,r)=>{r.r(s),r.d(s,{originalPathname:()=>
|
|
1
|
+
"use strict";(()=>{var e={};e.id=569,e.ids=[569],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7790:e=>{e.exports=require("assert")},8893:e=>{e.exports=require("buffer")},9714:e=>{e.exports=require("constants")},4770:e=>{e.exports=require("crypto")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},6162:e=>{e.exports=require("stream")},1764:e=>{e.exports=require("util")},3883:(e,s,r)=>{r.r(s),r.d(s,{originalPathname:()=>m,patchFetch:()=>h,requestAsyncStorage:()=>g,routeModule:()=>d,serverHooks:()=>R,staticGenerationAsyncStorage:()=>x});var t={};r.r(t),r.d(t,{POST:()=>l});var a=r(9303),n=r(8716),o=r(670),i=r(7070),u=r(7431),p=r(8855),c=r(53);let l=async e=>{try{let{email:s,password:r,name:t}=await e.json();if(!s||!r)return i.NextResponse.json({message:u.Qj.EMAIL_PASSWORD_REQUIRED},{status:400});if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s))return i.NextResponse.json({message:u.Qj.INVALID_EMAIL_FORMAT},{status:422});if(r.length<8)return i.NextResponse.json({message:u.Qj.PASSWORD_TOO_SHORT},{status:422});let a=await (0,c.VK)();if(a.users.find(e=>e.email===s))return i.NextResponse.json({message:u.Qj.USER_ALREADY_EXISTS},{status:409});let n=await (0,p.c_)(r),o=a.users.length?Math.max(...a.users.map(e=>e.id))+1:1;a.users.push({id:o,email:s,name:t||"",password:n}),await (0,c.bY)(a);let l=(0,p.X8)({id:o,email:s});return i.NextResponse.json({...l,userInfo:{id:o,email:s,name:t||""}})}catch(e){if(console.error("Register error:",e),e instanceof SyntaxError)return i.NextResponse.json({message:u.Qj.INVALID_BODY},{status:400});if(e.message?.includes("database")||e.message?.includes("DB")||e.message?.includes("save"))return i.NextResponse.json({message:u.Qj.DATABASE_ERROR},{status:500});return i.NextResponse.json({message:u.Qj.REGISTER_FAILED},{status:500})}},d=new a.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/register/route",pathname:"/api/register",filename:"route",bundlePath:"app/api/register/route"},resolvedPagePath:"D:\\잡동사니\\db-json-cli\\app\\api\\register\\route.js",nextConfigOutput:"standalone",userland:t}),{requestAsyncStorage:g,staticGenerationAsyncStorage:x,serverHooks:R}=d,m="/api/register/route";function h(){return(0,o.patchFetch)({serverHooks:R,staticGenerationAsyncStorage:x})}},8855:(e,s,r)=>{r.d(s,{Oe:()=>u,X8:()=>p,c_:()=>i,lj:()=>l});var t=r(1482),a=r(2023);let n=process.env.ACCESS_SECRET||"access-secret",o=process.env.REFRESH_SECRET||"refresh-secret",i=async e=>{let s=await a.genSalt(10);return a.hash(e,s)},u=async(e,s)=>a.compare(e,s),p=e=>({accessToken:t.sign(e,n,{expiresIn:"1h"}),refreshToken:t.sign(e,o,{expiresIn:"7d"})}),c=e=>{try{return t.verify(e,n)}catch(e){return null}},l=e=>{let s=e.headers.get("authorization");return s?c(s.split(" ")[1]):null}}};var s=require("../../../webpack-runtime.js");s.C(e);var r=e=>s(s.s=e),t=s.X(0,[276,610,944,759],()=>r(3883));module.exports=t})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../db.json","../../../../../node_modules/next/dist/client/components/action-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/action-async-storage.external.js","../../../../../node_modules/next/dist/client/components/async-local-storage.js","../../../../../node_modules/next/dist/client/components/request-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/request-async-storage.external.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/276.js","../../../chunks/610.js","../../../chunks/
|
|
1
|
+
{"version":1,"files":["../../../../../db.json","../../../../../node_modules/next/dist/client/components/action-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/action-async-storage.external.js","../../../../../node_modules/next/dist/client/components/async-local-storage.js","../../../../../node_modules/next/dist/client/components/request-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/request-async-storage.external.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/276.js","../../../chunks/610.js","../../../chunks/759.js","../../../chunks/944.js","../../../webpack-runtime.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="ko"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/9e7c0563f88bbaa4.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/d5eb02ddce896298.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-020ce2426d70958e.js"/><script src="/_next/static/chunks/fd9d1056-13294f02aa6fd7af.js" async=""></script><script src="/_next/static/chunks/117-69b8841dc3821afe.js" async=""></script><script src="/_next/static/chunks/main-app-9982ced3bf7037dc.js" async=""></script><script src="/_next/static/chunks/954-b2c56f3f904cc664.js" async=""></script><script src="/_next/static/chunks/463-043b417c5568631f.js" async=""></script><script src="/_next/static/chunks/app/page-4c8ddca89b830386.js" async=""></script><script src="/_next/static/chunks/app/layout-fa3af872c59446d2.js" async=""></script><title>db-json-cli</title><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_746a73"><div class="page_loading-container__j4AFh">로딩 중...</div><script src="/_next/static/chunks/webpack-020ce2426d70958e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/9e7c0563f88bbaa4.css\",\"style\"]\n2:HL[\"/_next/static/css/d5eb02ddce896298.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"3:I[2846,[],\"\"]\n5:I[9107,[],\"ClientPageRoot\"]\n6:I[1984,[\"954\",\"static/chunks/954-b2c56f3f904cc664.js\",\"463\",\"static/chunks/463-043b417c5568631f.js\",\"931\",\"static/chunks/app/page-4c8ddca89b830386.js\"],\"default\",1]\n7:I[6984,[\"954\",\"static/chunks/954-b2c56f3f904cc664.js\",\"185\",\"static/chunks/app/layout-fa3af872c59446d2.js\"],\"default\",1]\n8:I[4707,[],\"\"]\n9:I[6423,[],\"\"]\nc:I[1060,[],\"\"]\na:{}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L3\",null,{\"buildId\":\"
|
|
1
|
+
<!DOCTYPE html><html lang="ko"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/9e7c0563f88bbaa4.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/d5eb02ddce896298.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-020ce2426d70958e.js"/><script src="/_next/static/chunks/fd9d1056-13294f02aa6fd7af.js" async=""></script><script src="/_next/static/chunks/117-69b8841dc3821afe.js" async=""></script><script src="/_next/static/chunks/main-app-9982ced3bf7037dc.js" async=""></script><script src="/_next/static/chunks/954-b2c56f3f904cc664.js" async=""></script><script src="/_next/static/chunks/463-043b417c5568631f.js" async=""></script><script src="/_next/static/chunks/app/page-4c8ddca89b830386.js" async=""></script><script src="/_next/static/chunks/app/layout-fa3af872c59446d2.js" async=""></script><title>db-json-cli</title><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_746a73"><div class="page_loading-container__j4AFh">로딩 중...</div><script src="/_next/static/chunks/webpack-020ce2426d70958e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/9e7c0563f88bbaa4.css\",\"style\"]\n2:HL[\"/_next/static/css/d5eb02ddce896298.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"3:I[2846,[],\"\"]\n5:I[9107,[],\"ClientPageRoot\"]\n6:I[1984,[\"954\",\"static/chunks/954-b2c56f3f904cc664.js\",\"463\",\"static/chunks/463-043b417c5568631f.js\",\"931\",\"static/chunks/app/page-4c8ddca89b830386.js\"],\"default\",1]\n7:I[6984,[\"954\",\"static/chunks/954-b2c56f3f904cc664.js\",\"185\",\"static/chunks/app/layout-fa3af872c59446d2.js\"],\"default\",1]\n8:I[4707,[],\"\"]\n9:I[6423,[],\"\"]\nc:I[1060,[],\"\"]\na:{}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L3\",null,{\"buildId\":\"ANGyQ0qQihM3hnAa-ot73\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"\"],\"initialTree\":[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"__PAGE__\",{},[[\"$L4\",[\"$\",\"$L5\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$6\"}],[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d5eb02ddce896298.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]]],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/9e7c0563f88bbaa4.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":\"$a\"}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n4:null\n"])</script></body></html>
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
5:I[4707,[],""]
|
|
5
5
|
6:I[6423,[],""]
|
|
6
6
|
7:{}
|
|
7
|
-
0:["
|
|
7
|
+
0:["ANGyQ0qQihM3hnAa-ot73",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/d5eb02ddce896298.css","precedence":"next","crossOrigin":"$undefined"}]]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/9e7c0563f88bbaa4.css","precedence":"next","crossOrigin":"$undefined"}]],["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}],"params":"$7"}]],null],null],["$L8",null]]]]
|
|
8
8
|
8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}]]
|
|
9
9
|
1:null
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"/_not-found/page": "app/_not-found/page.js",
|
|
3
3
|
"/page": "app/page.js",
|
|
4
|
-
"/api/register/route": "app/api/register/route.js",
|
|
5
4
|
"/api/info/route": "app/api/info/route.js",
|
|
6
|
-
"/api/
|
|
5
|
+
"/api/login/route": "app/api/login/route.js",
|
|
7
6
|
"/api/[resource]/route": "app/api/[resource]/route.js",
|
|
8
|
-
"/api/
|
|
7
|
+
"/api/register/route": "app/api/register/route.js",
|
|
8
|
+
"/api/[resource]/[id]/route": "app/api/[resource]/[id]/route.js"
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=
|
|
1
|
+
"use strict";exports.id=759,exports.ids=[759],exports.modules={7431:(e,s,i)=>{i.d(s,{MP:()=>p,Qj:()=>a,R9:()=>r});let a={EMAIL_PASSWORD_REQUIRED:"이메일/비밀번호가 필요합니다",INVALID_CREDENTIALS:"인증 정보가 올바르지 않습니다",USER_ALREADY_EXISTS:"사용자가 이미 존재합니다",NO_TOKEN:"토큰이 없습니다",INVALID_TOKEN:"유효하지 않은 토큰입니다",TOKEN_EXPIRED:"토큰이 만료되었습니다",UNAUTHORIZED:"권한이 없습니다",INVALID_EMAIL_FORMAT:"올바른 이메일 형식이 아닙니다",PASSWORD_TOO_SHORT:"비밀번호는 최소 8자 이상이어야 합니다",INVALID_ID_FORMAT:"올바른 ID 형식이 아닙니다",INVALID_QUERY_PARAMS:"올바르지 않은 쿼리 파라미터입니다",MISSING_REQUIRED_FIELDS:"필수 필드가 누락되었습니다",RESOURCE_NOT_FOUND:"리소스를 찾을 수 없습니다",ITEM_NOT_FOUND:"찾을 수 없습니다",INVALID_BODY:"잘못된 본문입니다",DUPLICATE_ENTRY:"중복된 항목입니다",RESOURCE_ALREADY_EXISTS:"이미 존재하는 리소스입니다",LOGIN_FAILED:"로그인에 실패했습니다",REGISTER_FAILED:"등록에 실패했습니다",FETCH_FAILED:"조회에 실패했습니다",CREATE_FAILED:"생성에 실패했습니다",UPDATE_FAILED:"수정에 실패했습니다",DELETE_FAILED:"삭제에 실패했습니다",DATABASE_ERROR:"데이터베이스 오류가 발생했습니다",SERVER_ERROR:"서버 오류가 발생했습니다",DATABASE_CONNECTION_FAILED:"데이터베이스 연결에 실패했습니다",TOO_MANY_REQUESTS:"너무 많은 요청이 발생했습니다. 잠시 후 다시 시도해주세요",RATE_LIMIT_EXCEEDED:"요청 제한을 초과했습니다",PAYLOAD_TOO_LARGE:"요청 데이터가 너무 큽니다",FILE_TOO_LARGE:"파일 크기가 너무 큽니다",METHOD_NOT_ALLOWED:"허용되지 않은 메서드입니다",FORBIDDEN:"접근이 금지되었습니다",SERVICE_UNAVAILABLE:"서비스를 일시적으로 사용할 수 없습니다",CONFLICT:"요청이 현재 서버 상태와 충돌합니다",GONE:"요청한 리소스가 더 이상 존재하지 않습니다"},p={register:{id:"register",method:"POST",path:"/register",summary:"새 사용자 계정 등록",description:"이메일과 비밀번호로 새로운 사용자를 등록합니다.",auth:!1,requestBody:{email:"user@example.com",password:"securepassword123",name:"홍길동"},responses:{200:{description:"성공적으로 등록됨",example:{accessToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",refreshToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",userInfo:{id:1,email:"user@example.com",name:"홍길동"}}},400:{description:"필수 필드 누락 또는 유효하지 않은 입력",example:{message:a.EMAIL_PASSWORD_REQUIRED}},409:{description:"이미 존재하는 사용자",example:{message:a.USER_ALREADY_EXISTS}},422:{description:"유효성 검증 실패",example:{message:a.INVALID_EMAIL_FORMAT}},500:{description:"서버 오류",example:{message:a.REGISTER_FAILED}}}},login:{id:"login",method:"POST",path:"/login",summary:"로그인 및 액세스 토큰 받기",description:"이메일과 비밀번호로 로그인하여 JWT 토큰을 받습니다.",auth:!1,requestBody:{email:"user@example.com",password:"securepassword123"},responses:{200:{description:"로그인 성공",example:{accessToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",refreshToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",userInfo:{id:1,email:"user@example.com",name:"홍길동"}}},400:{description:"필수 필드 누락",example:{message:a.EMAIL_PASSWORD_REQUIRED}},401:{description:"잘못된 인증 정보",example:{message:a.INVALID_CREDENTIALS}},429:{description:"너무 많은 로그인 시도",example:{message:a.TOO_MANY_REQUESTS}},500:{description:"서버 오류",example:{message:a.LOGIN_FAILED}}}}},r=e=>{let s=[];return e.forEach(e=>{let i="private"===e.permission;s.push({id:`get-${e.key}`,method:"GET",path:`/${e.key}`,summary:`모든 ${e.key} 조회`,description:`모든 ${e.key} 항목을 조회하거나 ID 범위로 필터링합니다.`,auth:i,permission:e.permission,count:e.count,parameters:[{name:"from",in:"query",type:"number",description:"시작 ID",required:!1},{name:"to",in:"query",type:"number",description:"종료 ID",required:!1}],responses:{200:{description:"성공",example:[{id:1,message:"예시 데이터"},{id:2,message:"예시 데이터"}]},400:{description:"잘못된 쿼리 파라미터",example:{message:a.INVALID_QUERY_PARAMS}},401:{description:"인증 필요",example:{message:a.NO_TOKEN}},403:{description:"접근 금지",example:{message:a.FORBIDDEN}},404:{description:"리소스를 찾을 수 없음",example:{message:a.RESOURCE_NOT_FOUND}},500:{description:"서버 오류",example:{message:a.FETCH_FAILED}}}}),s.push({id:`get-${e.key}-id`,method:"GET",path:`/${e.key}/:id`,summary:`특정 ${e.key} 조회`,description:`ID로 특정 ${e.key} 항목을 조회합니다.`,auth:i,permission:e.permission,parameters:[{name:"id",in:"path",type:"number",description:"항목 ID",required:!0}],responses:{200:{description:"성공",example:{id:1,message:"예시 데이터"}},400:{description:"잘못된 ID 형식",example:{message:a.INVALID_ID_FORMAT}},401:{description:"인증 필요",example:{message:a.NO_TOKEN}},403:{description:"접근 금지",example:{message:a.FORBIDDEN}},404:{description:"항목을 찾을 수 없음",example:{message:a.ITEM_NOT_FOUND}},500:{description:"서버 오류",example:{message:a.FETCH_FAILED}}}}),s.push({id:`post-${e.key}`,method:"POST",path:`/${e.key}`,summary:`새 ${e.key} 생성`,description:`새로운 ${e.key} 항목을 생성합니다. ID는 자동으로 생성됩니다.`,auth:i,permission:e.permission,requestBody:{message:"여기에 메시지를 입력하세요"},responses:{200:{description:"생성 성공",example:{id:4,message:"여기에 메시지를 입력하세요"}},400:{description:"잘못된 요청 본문",example:{message:a.INVALID_BODY}},401:{description:"인증 필요",example:{message:a.NO_TOKEN}},403:{description:"접근 금지",example:{message:a.FORBIDDEN}},404:{description:"리소스를 찾을 수 없음",example:{message:a.RESOURCE_NOT_FOUND}},409:{description:"중복된 항목",example:{message:a.DUPLICATE_ENTRY}},413:{description:"요청 데이터 크기 초과",example:{message:a.PAYLOAD_TOO_LARGE}},422:{description:"유효성 검증 실패",example:{message:a.MISSING_REQUIRED_FIELDS}},500:{description:"서버 오류",example:{message:a.CREATE_FAILED}}}}),s.push({id:`put-${e.key}-id`,method:"PUT",path:`/${e.key}/:id`,summary:`${e.key} 수정`,description:`ID로 특정 ${e.key} 항목을 수정합니다.`,auth:i,permission:e.permission,parameters:[{name:"id",in:"path",type:"number",description:"항목 ID",required:!0}],requestBody:{message:"수정된 메시지"},responses:{200:{description:"수정 성공",example:{id:1,message:"수정된 메시지"}},400:{description:"잘못된 요청 본문",example:{message:a.INVALID_BODY}},401:{description:"인증 필요",example:{message:a.NO_TOKEN}},403:{description:"접근 금지",example:{message:a.FORBIDDEN}},404:{description:"항목을 찾을 수 없음",example:{message:a.ITEM_NOT_FOUND}},409:{description:"충돌",example:{message:a.CONFLICT}},422:{description:"유효성 검증 실패",example:{message:a.MISSING_REQUIRED_FIELDS}},500:{description:"서버 오류",example:{message:a.UPDATE_FAILED}}}}),s.push({id:`delete-${e.key}-id`,method:"DELETE",path:`/${e.key}/:id`,summary:`${e.key} 삭제`,description:`ID로 특정 ${e.key} 항목을 삭제합니다.`,auth:i,permission:e.permission,parameters:[{name:"id",in:"path",type:"number",description:"항목 ID",required:!0}],responses:{200:{description:"삭제 성공",example:{id:1,message:"삭제된 메시지"}},400:{description:"잘못된 ID 형식",example:{message:a.INVALID_ID_FORMAT}},401:{description:"인증 필요",example:{message:a.NO_TOKEN}},403:{description:"접근 금지",example:{message:a.FORBIDDEN}},404:{description:"항목을 찾을 수 없음",example:{message:a.ITEM_NOT_FOUND}},500:{description:"서버 오류",example:{message:a.DELETE_FAILED}}}})}),s}},53:(e,s,i)=>{i.d(s,{VK:()=>t,bY:()=>n});var a=i(788),p=i(5315);let r=null,m=null,o=()=>{if(process.env.DB_PATH)return p.resolve(process.env.DB_PATH);let e=process.cwd(),s=p.parse(e).root;for(;e!==s;){let s=p.join(e,"db.json");if(a.existsSync(s))return console.log(`✅ Found db.json at: ${s}`),s;e=p.dirname(e)}let i=p.join(process.cwd(),"db.json");return console.log(`📝 Creating new db.json at: ${i}`),i},t=async()=>{if(r)return r;m||(m=o());let e={users:[],rules:{test1:"public",test2:"private",test3:"public"},test1:[{id:1,message:"good"},{id:2,message:"good"},{id:3,message:"good"}],test2:[{id:1,message:"good"},{id:2,message:"good"},{id:3,message:"good"}],test3:[{id:1,message:"good"},{id:2,message:"good"},{id:3,message:"good"}]};return a.existsSync(m)?(console.log(`📖 Reading existing db.json from: ${m}`),r=await a.readJson(m)):(console.log(`🆕 Creating default db.json at: ${m}`),r=e,await a.writeJson(m,e,{spaces:2})),r},n=async e=>{m||(m=o()),r=e,await a.writeJson(m,e,{spaces:2})}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="ko"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/9e7c0563f88bbaa4.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-020ce2426d70958e.js"/><script src="/_next/static/chunks/fd9d1056-13294f02aa6fd7af.js" async=""></script><script src="/_next/static/chunks/117-69b8841dc3821afe.js" async=""></script><script src="/_next/static/chunks/main-app-9982ced3bf7037dc.js" async=""></script><script src="/_next/static/chunks/954-b2c56f3f904cc664.js" async=""></script><script src="/_next/static/chunks/app/layout-fa3af872c59446d2.js" async=""></script><meta name="robots" content="noindex"/><title>db-json-cli</title><title>404: This page could not be found.</title><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_746a73"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-020ce2426d70958e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/9e7c0563f88bbaa4.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[2846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[6423,[],\"\"]\n6:I[6984,[\"954\",\"static/chunks/954-b2c56f3f904cc664.js\",\"185\",\"static/chunks/app/layout-fa3af872c59446d2.js\"],\"default\",1]\nc:I[1060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"
|
|
1
|
+
<!DOCTYPE html><html lang="ko"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/9e7c0563f88bbaa4.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-020ce2426d70958e.js"/><script src="/_next/static/chunks/fd9d1056-13294f02aa6fd7af.js" async=""></script><script src="/_next/static/chunks/117-69b8841dc3821afe.js" async=""></script><script src="/_next/static/chunks/main-app-9982ced3bf7037dc.js" async=""></script><script src="/_next/static/chunks/954-b2c56f3f904cc664.js" async=""></script><script src="/_next/static/chunks/app/layout-fa3af872c59446d2.js" async=""></script><meta name="robots" content="noindex"/><title>db-json-cli</title><title>404: This page could not be found.</title><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_746a73"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-020ce2426d70958e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/9e7c0563f88bbaa4.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[2846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[6423,[],\"\"]\n6:I[6984,[\"954\",\"static/chunks/954-b2c56f3f904cc664.js\",\"185\",\"static/chunks/app/layout-fa3af872c59446d2.js\"],\"default\",1]\nc:I[1060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"ANGyQ0qQihM3hnAa-ot73\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/9e7c0563f88bbaa4.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-020ce2426d70958e.js" defer=""></script><script src="/_next/static/chunks/framework-f66176bb897dc684.js" defer=""></script><script src="/_next/static/chunks/main-a3aef5995f5a9328.js" defer=""></script><script src="/_next/static/chunks/pages/_app-72b849fbd24ac258.js" defer=""></script><script src="/_next/static/chunks/pages/_error-7ba65e1336b92748.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-020ce2426d70958e.js" defer=""></script><script src="/_next/static/chunks/framework-f66176bb897dc684.js" defer=""></script><script src="/_next/static/chunks/main-a3aef5995f5a9328.js" defer=""></script><script src="/_next/static/chunks/pages/_app-72b849fbd24ac258.js" defer=""></script><script src="/_next/static/chunks/pages/_error-7ba65e1336b92748.js" defer=""></script><script src="/_next/static/ANGyQ0qQihM3hnAa-ot73/_buildManifest.js" defer=""></script><script src="/_next/static/ANGyQ0qQihM3hnAa-ot73/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"ANGyQ0qQihM3hnAa-ot73","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"4+hI0r0+LBPEo/KppZM1Avye8esPrzazLt8kw3wB1ck="}
|
package/.next/standalone/db.json
CHANGED
|
@@ -1,105 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"users": [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"id": 2,
|
|
22
|
-
"message": "good"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"id": 3,
|
|
26
|
-
"message": "good"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"test2": [
|
|
30
|
-
{
|
|
31
|
-
"id": 1,
|
|
32
|
-
"message": "good"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"id": 2,
|
|
36
|
-
"message": "good"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"id": 3,
|
|
40
|
-
"message": "good"
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
"list": [
|
|
44
|
-
{
|
|
45
|
-
"id": 1,
|
|
46
|
-
"page": 1,
|
|
47
|
-
"pageSize": 1000000
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"id": 2,
|
|
51
|
-
"page": 1,
|
|
52
|
-
"pageSize": 1000000
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"id": 3,
|
|
56
|
-
"page": 1,
|
|
57
|
-
"pageSize": 1000000
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"id": 4,
|
|
61
|
-
"page": 1,
|
|
62
|
-
"pageSize": 5
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"id": 5,
|
|
66
|
-
"page": 1,
|
|
67
|
-
"pageSize": 1000000
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"id": 6,
|
|
71
|
-
"page": 1,
|
|
72
|
-
"pageSize": 1000000
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"id": 7,
|
|
76
|
-
"page": 1,
|
|
77
|
-
"pageSize": 5
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"id": 8,
|
|
81
|
-
"page": 1,
|
|
82
|
-
"pageSize": 5
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"id": 9,
|
|
86
|
-
"page": 1,
|
|
87
|
-
"pageSize": 5
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"id": 10,
|
|
91
|
-
"page": 1,
|
|
92
|
-
"pageSize": 1000000
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"id": 11,
|
|
96
|
-
"page": 1,
|
|
97
|
-
"pageSize": 5
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"id": 12,
|
|
101
|
-
"page": 1,
|
|
102
|
-
"pageSize": 1000000
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"users": [],
|
|
3
|
+
"rules": {
|
|
4
|
+
"test1": "public"
|
|
5
|
+
},
|
|
6
|
+
"test1": [
|
|
7
|
+
{
|
|
8
|
+
"id": 1,
|
|
9
|
+
"message": "good"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": 2,
|
|
13
|
+
"message": "good"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": 3,
|
|
17
|
+
"message": "good"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
package/bin/cli.js
CHANGED
|
@@ -5,14 +5,21 @@ import { hideBin } from "yargs/helpers";
|
|
|
5
5
|
import path from "path";
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
7
7
|
import { spawn } from "child_process";
|
|
8
|
+
import fs from "fs"; // ← 이거 추가!
|
|
8
9
|
|
|
9
10
|
const __filename = fileURLToPath(import.meta.url);
|
|
10
11
|
const __dirname = path.dirname(__filename);
|
|
11
12
|
|
|
13
|
+
// package.json에서 버전 읽기
|
|
14
|
+
const packageJsonPath = path.join(__dirname, "..", "package.json");
|
|
15
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
|
16
|
+
const version = packageJson.version;
|
|
17
|
+
|
|
12
18
|
const argv = yargs(hideBin(process.argv))
|
|
13
19
|
.option("port", { alias: "p", type: "number", default: 4000 })
|
|
14
20
|
.option("db", { alias: "d", type: "string", default: "./db.json" })
|
|
15
21
|
.option("watch", { alias: "w", type: "boolean", default: false })
|
|
22
|
+
.version(version)
|
|
16
23
|
.help().argv;
|
|
17
24
|
|
|
18
25
|
const standalonePath = path.join(__dirname, "..", ".next", "standalone");
|
|
@@ -21,7 +28,7 @@ process.env.DB_PATH = path.resolve(argv.db);
|
|
|
21
28
|
process.env.PORT = argv.port.toString();
|
|
22
29
|
process.env.HOSTNAME = "0.0.0.0";
|
|
23
30
|
|
|
24
|
-
console.log(`✅ db-json-cli running on http://localhost:${argv.port}\n`);
|
|
31
|
+
console.log(`✅ db-json-cli v${version} running on http://localhost:${argv.port}\n`);
|
|
25
32
|
|
|
26
33
|
spawn("node", [path.join(standalonePath, "server.js")], {
|
|
27
34
|
cwd: standalonePath,
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|