@nestia/migrate 0.9.0-dev.20240222 → 0.9.1-dev.20240222
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.
@@ -65,7 +65,7 @@ exports.NEST_TEMPLATE = [
|
|
65
65
|
{
|
66
66
|
"location": "packages/api",
|
67
67
|
"file": "package.json",
|
68
|
-
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"npm run build:sdk && npm run compile\",\r\n \"build:sdk\": \"rimraf ../../src/api/functional && cd ../.. && npx nestia sdk && cd packages/api\",\r\n \"compile\": \"rimraf lib && tsc\",\r\n \"deploy\": \"npm run build && npm publish\",\r\n \"prepare\": \"ts-patch install && typia patch\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"swagger.json\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.2\",\r\n \"ts-patch\": \"^3.1.2\",\r\n \"typescript\": \"^5.3.3\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.5.8\",\r\n \"typia\": \"^5.4.
|
68
|
+
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"npm run build:sdk && npm run compile\",\r\n \"build:sdk\": \"rimraf ../../src/api/functional && cd ../.. && npx nestia sdk && cd packages/api\",\r\n \"compile\": \"rimraf lib && tsc\",\r\n \"deploy\": \"npm run build && npm publish\",\r\n \"prepare\": \"ts-patch install && typia patch\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"swagger.json\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.2\",\r\n \"ts-patch\": \"^3.1.2\",\r\n \"typescript\": \"^5.3.3\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.5.8\",\r\n \"typia\": \"^5.4.11\"\r\n }\r\n}"
|
69
69
|
},
|
70
70
|
{
|
71
71
|
"location": "packages/api",
|
package/lib/utils/StringUtil.js
CHANGED
@@ -16,13 +16,14 @@ var StringUtil;
|
|
16
16
|
.split("/")
|
17
17
|
.map((str) => StringUtil.normalize(str.trim()))
|
18
18
|
.filter((str) => !!str.length);
|
19
|
-
StringUtil.reJoinWithDecimalParameters = (path) =>
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
19
|
+
StringUtil.reJoinWithDecimalParameters = (path) => "/" +
|
20
|
+
path
|
21
|
+
.split("/")
|
22
|
+
.filter((str) => !!str.length)
|
23
|
+
.map((str) => str[0] === "{" && str[str.length - 1] === "}"
|
24
|
+
? `:${str.substring(1, str.length - 1)}`
|
25
|
+
: str)
|
26
|
+
.join("/");
|
26
27
|
StringUtil.normalize = (str) => str.split(".").join("_").split("-").join("_");
|
27
28
|
StringUtil.commonPrefix = (strs) => {
|
28
29
|
if (strs.length === 0)
|
@@ -35,10 +36,11 @@ var StringUtil;
|
|
35
36
|
return "";
|
36
37
|
}
|
37
38
|
}
|
38
|
-
return
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
return ("/" +
|
40
|
+
prefix
|
41
|
+
.split("/")
|
42
|
+
.filter((str) => str[0] !== "{" || str[str.length - 1] === "}")
|
43
|
+
.join("/"));
|
42
44
|
};
|
43
45
|
StringUtil.escapeDuplicate = (keep) => (change) => keep.includes(change) ? StringUtil.escapeDuplicate(keep)(`_${change}`) : change;
|
44
46
|
})(StringUtil || (exports.StringUtil = StringUtil = {}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StringUtil.js","sourceRoot":"","sources":["../../src/utils/StringUtil.ts"],"names":[],"mappings":";;;AAAA,uEAAoE;AAEpE,IAAiB,UAAU,
|
1
|
+
{"version":3,"file":"StringUtil.js","sourceRoot":"","sources":["../../src/utils/StringUtil.ts"],"names":[],"mappings":";;;AAAA,uEAAoE;AAEpE,IAAiB,UAAU,CA6D1B;AA7DD,WAAiB,UAAU;IACZ,qBAAU,GAAG,CAAC,GAAW,EAAE,EAAE,CACxC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAEvC,iBAAM,GAAG,CAAC,IAAY,EAAE,EAAE,CACrC,WAAA,sBAAsB,CAAC,IAAI,CAAC;SACzB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC;SAC/B,GAAG,CAAC,mCAAgB,CAAC,MAAM,CAAC;SAC5B,IAAI,CAAC,EAAE,CAAC,CAAC;IAED,gBAAK,GAAG,CAAC,IAAY,EAAE,EAAE,CACpC,WAAA,sBAAsB,CAAC,IAAI,CAAC;SACzB,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAC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AE,CAAC;QAEjC,IAAI,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;gBACrC,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBAChD,IAAI,MAAM,KAAK,EAAE;oBAAE,OAAO,EAAE,CAAC;YAC/B,CAAC;QACH,CAAC;QACD,OAAO,CACL,GAAG;YACH,MAAM;iBACH,KAAK,CAAC,GAAG,CAAC;iBACV,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC;iBAC9D,IAAI,CAAC,GAAG,CAAC,CACb,CAAC;IACJ,CAAC,CAAC;IAEW,0BAAe,GAC1B,CAAC,IAAc,EAAE,EAAE,CACnB,CAAC,MAAc,EAAU,EAAE,CACzB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAA,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAC3E,CAAC,EA7DgB,UAAU,0BAAV,UAAU,QA6D1B"}
|
package/package.json
CHANGED
@@ -62,7 +62,7 @@ export const NEST_TEMPLATE = [
|
|
62
62
|
{
|
63
63
|
"location": "packages/api",
|
64
64
|
"file": "package.json",
|
65
|
-
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"npm run build:sdk && npm run compile\",\r\n \"build:sdk\": \"rimraf ../../src/api/functional && cd ../.. && npx nestia sdk && cd packages/api\",\r\n \"compile\": \"rimraf lib && tsc\",\r\n \"deploy\": \"npm run build && npm publish\",\r\n \"prepare\": \"ts-patch install && typia patch\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"swagger.json\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.2\",\r\n \"ts-patch\": \"^3.1.2\",\r\n \"typescript\": \"^5.3.3\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.5.8\",\r\n \"typia\": \"^5.4.
|
65
|
+
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"npm run build:sdk && npm run compile\",\r\n \"build:sdk\": \"rimraf ../../src/api/functional && cd ../.. && npx nestia sdk && cd packages/api\",\r\n \"compile\": \"rimraf lib && tsc\",\r\n \"deploy\": \"npm run build && npm publish\",\r\n \"prepare\": \"ts-patch install && typia patch\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"swagger.json\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.2\",\r\n \"ts-patch\": \"^3.1.2\",\r\n \"typescript\": \"^5.3.3\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.5.8\",\r\n \"typia\": \"^5.4.11\"\r\n }\r\n}"
|
66
66
|
},
|
67
67
|
{
|
68
68
|
"location": "packages/api",
|
package/src/utils/StringUtil.ts
CHANGED
@@ -24,6 +24,7 @@ export namespace StringUtil {
|
|
24
24
|
.filter((str) => !!str.length);
|
25
25
|
|
26
26
|
export const reJoinWithDecimalParameters = (path: string) =>
|
27
|
+
"/" +
|
27
28
|
path
|
28
29
|
.split("/")
|
29
30
|
.filter((str) => !!str.length)
|
@@ -47,10 +48,13 @@ export namespace StringUtil {
|
|
47
48
|
if (prefix === "") return "";
|
48
49
|
}
|
49
50
|
}
|
50
|
-
return
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
return (
|
52
|
+
"/" +
|
53
|
+
prefix
|
54
|
+
.split("/")
|
55
|
+
.filter((str) => str[0] !== "{" || str[str.length - 1] === "}")
|
56
|
+
.join("/")
|
57
|
+
);
|
54
58
|
};
|
55
59
|
|
56
60
|
export const escapeDuplicate =
|