@things-factory/codelingua 10.0.0-beta.7 → 10.0.0-beta.72
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/CHANGELOG.md +30 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/ai-client.d.ts +4 -0
- package/dist-server/controllers/ai-client.js +46 -0
- package/dist-server/controllers/ai-client.js.map +1 -0
- package/dist-server/controllers/decipher-error-code.js +30 -22
- package/dist-server/controllers/decipher-error-code.js.map +1 -1
- package/dist-server/controllers/i18n-completion.d.ts +3 -1
- package/dist-server/controllers/i18n-completion.js +27 -22
- package/dist-server/controllers/i18n-completion.js.map +1 -1
- package/dist-server/controllers/index.d.ts +2 -7
- package/dist-server/controllers/index.js +2 -7
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/routes.js +5 -46
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/code-decipher/code-decipher-resolver.d.ts +0 -1
- package/dist-server/service/code-decipher/code-decipher-resolver.js +4 -20
- package/dist-server/service/code-decipher/code-decipher-resolver.js.map +1 -1
- package/dist-server/service/code-decipher/code-decipher-type.d.ts +3 -0
- package/dist-server/service/code-decipher/code-decipher-type.js.map +1 -1
- package/dist-server/service/code-decipher/index.d.ts +0 -2
- package/dist-server/service/code-decipher/index.js +1 -3
- package/dist-server/service/code-decipher/index.js.map +1 -1
- package/dist-server/service/i18n-completion/i18n-completion-resolver.js +5 -3
- package/dist-server/service/i18n-completion/i18n-completion-resolver.js.map +1 -1
- package/dist-server/service/i18n-completion/i18n-completion-type.d.ts +11 -0
- package/dist-server/service/i18n-completion/i18n-completion-type.js +8 -0
- package/dist-server/service/i18n-completion/i18n-completion-type.js.map +1 -1
- package/dist-server/service/index.d.ts +1 -1
- package/dist-server/service/index.js +1 -7
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/dist-server/controllers/api-doc-completion.d.ts +0 -4
- package/dist-server/controllers/api-doc-completion.js +0 -32
- package/dist-server/controllers/api-doc-completion.js.map +0 -1
- package/dist-server/controllers/chat-completion.d.ts +0 -3
- package/dist-server/controllers/chat-completion.js +0 -31
- package/dist-server/controllers/chat-completion.js.map +0 -1
- package/dist-server/controllers/codereview-completion.d.ts +0 -1
- package/dist-server/controllers/codereview-completion.js +0 -40
- package/dist-server/controllers/codereview-completion.js.map +0 -1
- package/dist-server/controllers/decipher-code.d.ts +0 -5
- package/dist-server/controllers/decipher-code.js +0 -33
- package/dist-server/controllers/decipher-code.js.map +0 -1
- package/dist-server/controllers/image-completion.d.ts +0 -5
- package/dist-server/controllers/image-completion.js +0 -29
- package/dist-server/controllers/image-completion.js.map +0 -1
- package/dist-server/controllers/openai-connection.d.ts +0 -2
- package/dist-server/controllers/openai-connection.js +0 -16
- package/dist-server/controllers/openai-connection.js.map +0 -1
- package/dist-server/service/api-doc-completion/api-doc-completion-resolver.d.ts +0 -5
- package/dist-server/service/api-doc-completion/api-doc-completion-resolver.js +0 -31
- package/dist-server/service/api-doc-completion/api-doc-completion-resolver.js.map +0 -1
- package/dist-server/service/api-doc-completion/api-doc-completion-type.d.ts +0 -7
- package/dist-server/service/api-doc-completion/api-doc-completion-type.js +0 -30
- package/dist-server/service/api-doc-completion/api-doc-completion-type.js.map +0 -1
- package/dist-server/service/api-doc-completion/index.d.ts +0 -4
- package/dist-server/service/api-doc-completion/index.js +0 -8
- package/dist-server/service/api-doc-completion/index.js.map +0 -1
- package/dist-server/service/chat-completion/chat-completion-resolver.d.ts +0 -5
- package/dist-server/service/chat-completion/chat-completion-resolver.js +0 -30
- package/dist-server/service/chat-completion/chat-completion-resolver.js.map +0 -1
- package/dist-server/service/chat-completion/chat-completion-type.d.ts +0 -6
- package/dist-server/service/chat-completion/chat-completion-type.js +0 -26
- package/dist-server/service/chat-completion/chat-completion-type.js.map +0 -1
- package/dist-server/service/chat-completion/index.d.ts +0 -4
- package/dist-server/service/chat-completion/index.js +0 -8
- package/dist-server/service/chat-completion/index.js.map +0 -1
- package/dist-server/service/image-completion/image-completion-resolver.d.ts +0 -5
- package/dist-server/service/image-completion/image-completion-resolver.js +0 -30
- package/dist-server/service/image-completion/image-completion-resolver.js.map +0 -1
- package/dist-server/service/image-completion/image-completion-type.d.ts +0 -8
- package/dist-server/service/image-completion/image-completion-type.js +0 -34
- package/dist-server/service/image-completion/image-completion-type.js.map +0 -1
- package/dist-server/service/image-completion/index.d.ts +0 -4
- package/dist-server/service/image-completion/index.js +0 -8
- package/dist-server/service/image-completion/index.js.map +0 -1
package/dist-server/routes.js
CHANGED
|
@@ -2,38 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const controllers_1 = require("./controllers");
|
|
4
4
|
process.on('bootstrap-module-global-public-route', (app, globalPublicRouter) => {
|
|
5
|
-
/*
|
|
6
|
-
* can add global public routes to application (auth not required, tenancy not required)
|
|
7
|
-
*
|
|
8
|
-
* ex) routes.get('/path', async(context, next) => {})
|
|
9
|
-
* ex) routes.post('/path', async(context, next) => {})
|
|
10
|
-
*/
|
|
11
|
-
globalPublicRouter.post('/chat-completion', async (context, next) => {
|
|
12
|
-
const { content } = context.request.body;
|
|
13
|
-
const message = await (0, controllers_1.chatCompletion)({ content });
|
|
14
|
-
context.body = {
|
|
15
|
-
message
|
|
16
|
-
};
|
|
17
|
-
});
|
|
18
|
-
globalPublicRouter.post('/api-doc-completion', async (context, next) => {
|
|
19
|
-
const { code, language: requestedLanguage } = context.request.body;
|
|
20
|
-
const language = requestedLanguage || context.language;
|
|
21
|
-
const message = await (0, controllers_1.apiDocCompletion)({ code, language });
|
|
22
|
-
context.body = {
|
|
23
|
-
message
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
5
|
globalPublicRouter.post('/i18n-completion', async (context, next) => {
|
|
27
|
-
const { json } = context.request.body;
|
|
28
|
-
const message = await (0, controllers_1.i18nCompletion)({ json });
|
|
29
|
-
context.body = {
|
|
30
|
-
message
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
|
-
globalPublicRouter.post('/code-decipher', async (context, next) => {
|
|
34
|
-
const { code, system, language: requestedLanguage } = context.request.body;
|
|
35
|
-
const language = requestedLanguage || context.language;
|
|
36
|
-
const message = await (0, controllers_1.decipherCode)({ code, system, language });
|
|
6
|
+
const { json, sourceLocale, targetLocales } = context.request.body;
|
|
7
|
+
const message = await (0, controllers_1.i18nCompletion)({ json, sourceLocale, targetLocales });
|
|
37
8
|
context.body = {
|
|
38
9
|
message
|
|
39
10
|
};
|
|
@@ -47,19 +18,7 @@ process.on('bootstrap-module-global-public-route', (app, globalPublicRouter) =>
|
|
|
47
18
|
};
|
|
48
19
|
});
|
|
49
20
|
});
|
|
50
|
-
process.on('bootstrap-module-global-private-route', (app, globalPrivateRouter) => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
*/
|
|
54
|
-
});
|
|
55
|
-
process.on('bootstrap-module-domain-public-route', (app, domainPublicRouter) => {
|
|
56
|
-
/*
|
|
57
|
-
* can add domain public routes to application (auth not required, tenancy required)
|
|
58
|
-
*/
|
|
59
|
-
});
|
|
60
|
-
process.on('bootstrap-module-domain-private-route', (app, domainPrivateRouter) => {
|
|
61
|
-
/*
|
|
62
|
-
* can add domain private routes to application (auth required, tenancy required)
|
|
63
|
-
*/
|
|
64
|
-
});
|
|
21
|
+
process.on('bootstrap-module-global-private-route', (app, globalPrivateRouter) => { });
|
|
22
|
+
process.on('bootstrap-module-domain-public-route', (app, domainPublicRouter) => { });
|
|
23
|
+
process.on('bootstrap-module-domain-private-route', (app, domainPrivateRouter) => { });
|
|
65
24
|
//# sourceMappingURL=routes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":";;AAYA,+CAAiE;AAGjE,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF,kBAAkB,CAAC,IAAI,CAAC,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAClE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,IAA2B,CAAA;QAEzF,MAAM,OAAO,GAAG,MAAM,IAAA,4BAAc,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC,CAAA;QAE3E,OAAO,CAAC,IAAI,GAAG;YACb,OAAO;SACR,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,kBAAkB,CAAC,IAAI,CAAC,sBAAsB,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QACtE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,IAAyB,CAAA;QAC/F,MAAM,QAAQ,GAAG,iBAAiB,IAAK,OAAe,CAAC,QAAQ,CAAA;QAE/D,MAAM,OAAO,GAAG,MAAM,IAAA,+BAAiB,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAA;QAEnE,OAAO,CAAC,IAAI,GAAG;YACb,OAAO;SACR,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE,GAAE,CAAC,CAAC,CAAA;AAC5F,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE,GAAE,CAAC,CAAC,CAAA;AAC1F,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE,GAAE,CAAC,CAAC,CAAA","sourcesContent":["/**\n * codelingua HTTP routes — global public.\n *\n * 노출되는 두 endpoint 가 패키지의 정체성:\n * - POST /error-code-decipher : 에러 메시지 → 사용자 친화 설명 (decipherErrorCode)\n * - POST /i18n-completion : i18n JSON 다국어 자동 번역\n *\n * 5개 legacy endpoint (chat-completion / api-doc-completion / code-decipher /\n * codereview-completion / image-completion) 는 v10 에서 제거됨. board-ai 의 자연어\n * 인터페이스가 더 풍부한 대안.\n */\nimport { CodeDecipherInput } from './service/code-decipher/code-decipher-type'\nimport { decipherErrorCode, i18nCompletion } from './controllers'\nimport { i18nCompletionInput } from './service/i18n-completion/i18n-completion-type'\n\nprocess.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {\n globalPublicRouter.post('/i18n-completion', async (context, next) => {\n const { json, sourceLocale, targetLocales } = context.request.body as i18nCompletionInput\n\n const message = await i18nCompletion({ json, sourceLocale, targetLocales })\n\n context.body = {\n message\n }\n })\n\n globalPublicRouter.post('/error-code-decipher', async (context, next) => {\n const { code, system, language: requestedLanguage } = context.request.body as CodeDecipherInput\n const language = requestedLanguage || (context as any).language\n\n const message = await decipherErrorCode({ code, system, language })\n\n context.body = {\n message\n }\n })\n})\n\nprocess.on('bootstrap-module-global-private-route' as any, (app, globalPrivateRouter) => {})\nprocess.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {})\nprocess.on('bootstrap-module-domain-private-route' as any, (app, domainPrivateRouter) => {})\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '@things-factory/auth-base';
|
|
2
2
|
import { CodeDecipherInput, CodeDecipherOutput } from './code-decipher-type';
|
|
3
3
|
export declare class CodeDecipherResolver {
|
|
4
|
-
decipherCode(input: CodeDecipherInput, context: ResolverContext): Promise<CodeDecipherOutput>;
|
|
5
4
|
decipherErrorCode(input: CodeDecipherInput, context: ResolverContext): Promise<CodeDecipherOutput>;
|
|
6
5
|
}
|
|
@@ -7,34 +7,18 @@ require("@things-factory/auth-base"); // for ResolverContext
|
|
|
7
7
|
const code_decipher_type_1 = require("./code-decipher-type");
|
|
8
8
|
const controllers_1 = require("../../controllers");
|
|
9
9
|
let CodeDecipherResolver = class CodeDecipherResolver {
|
|
10
|
-
async decipherCode(input, context) {
|
|
11
|
-
const { code, system, language: requestedLanguage } = input;
|
|
12
|
-
const language = requestedLanguage || context.language;
|
|
13
|
-
const message = await (0, controllers_1.decipherCode)({ code, system, language });
|
|
14
|
-
return {
|
|
15
|
-
message
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
10
|
async decipherErrorCode(input, context) {
|
|
19
11
|
const { code, system, language: requestedLanguage } = input;
|
|
20
12
|
const language = requestedLanguage || context.language;
|
|
21
13
|
const message = await (0, controllers_1.decipherErrorCode)({ code, system, language });
|
|
22
|
-
return {
|
|
23
|
-
message
|
|
24
|
-
};
|
|
14
|
+
return { message };
|
|
25
15
|
}
|
|
26
16
|
};
|
|
27
17
|
exports.CodeDecipherResolver = CodeDecipherResolver;
|
|
28
18
|
tslib_1.__decorate([
|
|
29
|
-
(0, type_graphql_1.Query)(() => code_decipher_type_1.CodeDecipherOutput
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
tslib_1.__metadata("design:type", Function),
|
|
33
|
-
tslib_1.__metadata("design:paramtypes", [code_decipher_type_1.CodeDecipherInput, Object]),
|
|
34
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
35
|
-
], CodeDecipherResolver.prototype, "decipherCode", null);
|
|
36
|
-
tslib_1.__decorate([
|
|
37
|
-
(0, type_graphql_1.Query)(() => code_decipher_type_1.CodeDecipherOutput),
|
|
19
|
+
(0, type_graphql_1.Query)(() => code_decipher_type_1.CodeDecipherOutput, {
|
|
20
|
+
description: 'Translate a cryptic system / framework / database error message into a concise, localized, actionable explanation for end users.'
|
|
21
|
+
}),
|
|
38
22
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('input')),
|
|
39
23
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
40
24
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-decipher-resolver.js","sourceRoot":"","sources":["../../../server/service/code-decipher/code-decipher-resolver.ts"],"names":[],"mappings":";;;;AAAA,+CAAwD;AACxD,qCAAkC,CAAC,sBAAsB;AACzD,6DAA4E;AAC5E,
|
|
1
|
+
{"version":3,"file":"code-decipher-resolver.js","sourceRoot":"","sources":["../../../server/service/code-decipher/code-decipher-resolver.ts"],"names":[],"mappings":";;;;AAAA,+CAAwD;AACxD,qCAAkC,CAAC,sBAAsB;AACzD,6DAA4E;AAC5E,mDAAqD;AAG9C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAKzB,AAAN,KAAK,CAAC,iBAAiB,CACP,KAAwB,EAC/B,OAAwB;QAE/B,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAA;QAC3D,MAAM,QAAQ,GAAG,iBAAiB,IAAK,OAAe,CAAC,QAAQ,CAAA;QAE/D,MAAM,OAAO,GAAG,MAAM,IAAA,+BAAiB,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAA;QAEnE,OAAO,EAAE,OAAO,EAAE,CAAA;IACpB,CAAC;CACF,CAAA;AAhBY,oDAAoB;AAKzB;IAJL,IAAA,oBAAK,EAAC,GAAG,EAAE,CAAC,uCAAkB,EAAE;QAC/B,WAAW,EACT,kIAAkI;KACrI,CAAC;IAEC,mBAAA,IAAA,kBAAG,EAAC,OAAO,CAAC,CAAA;IACZ,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CADe,sCAAiB;;6DASvC;+BAfU,oBAAoB;IADhC,IAAA,uBAAQ,GAAE;GACE,oBAAoB,CAgBhC","sourcesContent":["import { Resolver, Query, Arg, Ctx } from 'type-graphql'\nimport '@things-factory/auth-base' // for ResolverContext\nimport { CodeDecipherInput, CodeDecipherOutput } from './code-decipher-type'\nimport { decipherErrorCode } from '../../controllers'\n\n@Resolver()\nexport class CodeDecipherResolver {\n @Query(() => CodeDecipherOutput, {\n description:\n 'Translate a cryptic system / framework / database error message into a concise, localized, actionable explanation for end users.'\n })\n async decipherErrorCode(\n @Arg('input') input: CodeDecipherInput,\n @Ctx() context: ResolverContext\n ): Promise<CodeDecipherOutput> {\n const { code, system, language: requestedLanguage } = input\n const language = requestedLanguage || (context as any).language\n\n const message = await decipherErrorCode({ code, system, language })\n\n return { message }\n }\n}\n"]}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export declare class CodeDecipherInput {
|
|
2
|
+
/** 풀어쓸 에러 메시지 / 코드 / 시스템 출력 텍스트. */
|
|
2
3
|
code: string;
|
|
4
|
+
/** 에러가 발생한 시스템 이름 (선택). 예: 'TypeORM', 'Koa', 'PostgreSQL'. */
|
|
3
5
|
system?: string;
|
|
6
|
+
/** 응답 locale BCP-47. 예: 'ko-KR', 'en-US'. 미지정 시 'en-US'. */
|
|
4
7
|
language?: string;
|
|
5
8
|
}
|
|
6
9
|
export declare class CodeDecipherOutput {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-decipher-type.js","sourceRoot":"","sources":["../../../server/service/code-decipher/code-decipher-type.ts"],"names":[],"mappings":";;;;AAAA,+CAA2D;AAGpD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;
|
|
1
|
+
{"version":3,"file":"code-decipher-type.js","sourceRoot":"","sources":["../../../server/service/code-decipher/code-decipher-type.ts"],"names":[],"mappings":";;;;AAAA,+CAA2D;AAGpD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAY7B,CAAA;AAZY,8CAAiB;AAG5B;IADC,IAAA,oBAAK,GAAE;;+CACK;AAIb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACX;AAIf;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACT;4BAXN,iBAAiB;IAD7B,IAAA,wBAAS,GAAE;GACC,iBAAiB,CAY7B;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAG9B,CAAA;AAHY,gDAAkB;AAE7B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACV;6BAFL,kBAAkB;IAD9B,IAAA,yBAAU,GAAE;GACA,kBAAkB,CAG9B","sourcesContent":["import { ObjectType, Field, InputType } from 'type-graphql'\n\n@InputType()\nexport class CodeDecipherInput {\n /** 풀어쓸 에러 메시지 / 코드 / 시스템 출력 텍스트. */\n @Field()\n code!: string\n\n /** 에러가 발생한 시스템 이름 (선택). 예: 'TypeORM', 'Koa', 'PostgreSQL'. */\n @Field({ nullable: true })\n system?: string\n\n /** 응답 locale BCP-47. 예: 'ko-KR', 'en-US'. 미지정 시 'en-US'. */\n @Field({ nullable: true })\n language?: string\n}\n\n@ObjectType()\nexport class CodeDecipherOutput {\n @Field({ nullable: true })\n message?: string\n}\n"]}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.resolvers = void 0;
|
|
4
4
|
const code_decipher_resolver_1 = require("./code-decipher-resolver");
|
|
5
|
-
exports.entities = [];
|
|
6
5
|
exports.resolvers = [code_decipher_resolver_1.CodeDecipherResolver];
|
|
7
|
-
exports.subscribers = [];
|
|
8
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/code-decipher/index.ts"],"names":[],"mappings":";;;AAAA,qEAA+D;AAElD,QAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/code-decipher/index.ts"],"names":[],"mappings":";;;AAAA,qEAA+D;AAElD,QAAA,SAAS,GAAG,CAAC,6CAAoB,CAAC,CAAA","sourcesContent":["import { CodeDecipherResolver } from './code-decipher-resolver'\n\nexport const resolvers = [CodeDecipherResolver]\n"]}
|
|
@@ -8,8 +8,8 @@ const i18n_completion_type_1 = require("./i18n-completion-type");
|
|
|
8
8
|
const controllers_1 = require("../../controllers");
|
|
9
9
|
let i18nCompletionResolver = class i18nCompletionResolver {
|
|
10
10
|
async i18nCompletion(input, context) {
|
|
11
|
-
const { json } = input;
|
|
12
|
-
const message = await (0, controllers_1.i18nCompletion)({ json });
|
|
11
|
+
const { json, sourceLocale, targetLocales } = input;
|
|
12
|
+
const message = await (0, controllers_1.i18nCompletion)({ json, sourceLocale, targetLocales });
|
|
13
13
|
return {
|
|
14
14
|
message
|
|
15
15
|
};
|
|
@@ -17,7 +17,9 @@ let i18nCompletionResolver = class i18nCompletionResolver {
|
|
|
17
17
|
};
|
|
18
18
|
exports.i18nCompletionResolver = i18nCompletionResolver;
|
|
19
19
|
tslib_1.__decorate([
|
|
20
|
-
(0, type_graphql_1.Query)(() => i18n_completion_type_1.i18nCompletionOutput
|
|
20
|
+
(0, type_graphql_1.Query)(() => i18n_completion_type_1.i18nCompletionOutput, {
|
|
21
|
+
description: 'Translate an i18n JSON (key-value) from a source locale into multiple target locales. Source/target locales are configurable; defaults preserve historical "ko → en/ja/zh/ms" behavior.'
|
|
22
|
+
}),
|
|
21
23
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('input')),
|
|
22
24
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
23
25
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-completion-resolver.js","sourceRoot":"","sources":["../../../server/service/i18n-completion/i18n-completion-resolver.ts"],"names":[],"mappings":";;;;AAAA,+CAAwD;AACxD,qCAAkC,CAAC,sBAAsB;AACzD,iEAAkF;AAClF,mDAAkD;AAG3C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;
|
|
1
|
+
{"version":3,"file":"i18n-completion-resolver.js","sourceRoot":"","sources":["../../../server/service/i18n-completion/i18n-completion-resolver.ts"],"names":[],"mappings":";;;;AAAA,+CAAwD;AACxD,qCAAkC,CAAC,sBAAsB;AACzD,iEAAkF;AAClF,mDAAkD;AAG3C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAK3B,AAAN,KAAK,CAAC,cAAc,CACJ,KAA0B,EACjC,OAAwB;QAE/B,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,KAAK,CAAA;QAEnD,MAAM,OAAO,GAAG,MAAM,IAAA,4BAAc,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC,CAAA;QAE3E,OAAO;YACL,OAAO;SACR,CAAA;IACH,CAAC;CACF,CAAA;AAjBY,wDAAsB;AAK3B;IAJL,IAAA,oBAAK,EAAC,GAAG,EAAE,CAAC,2CAAoB,EAAE;QACjC,WAAW,EACT,yLAAyL;KAC5L,CAAC;IAEC,mBAAA,IAAA,kBAAG,EAAC,OAAO,CAAC,CAAA;IACZ,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CADe,0CAAmB;;4DAUzC;iCAhBU,sBAAsB;IADlC,IAAA,uBAAQ,GAAE;GACE,sBAAsB,CAiBlC","sourcesContent":["import { Resolver, Query, Arg, Ctx } from 'type-graphql'\nimport '@things-factory/auth-base' // for ResolverContext\nimport { i18nCompletionInput, i18nCompletionOutput } from './i18n-completion-type'\nimport { i18nCompletion } from '../../controllers'\n\n@Resolver()\nexport class i18nCompletionResolver {\n @Query(() => i18nCompletionOutput, {\n description:\n 'Translate an i18n JSON (key-value) from a source locale into multiple target locales. Source/target locales are configurable; defaults preserve historical \"ko → en/ja/zh/ms\" behavior.'\n })\n async i18nCompletion(\n @Arg('input') input: i18nCompletionInput,\n @Ctx() context: ResolverContext\n ): Promise<i18nCompletionOutput> {\n const { json, sourceLocale, targetLocales } = input\n\n const message = await i18nCompletion({ json, sourceLocale, targetLocales })\n\n return {\n message\n }\n }\n}\n"]}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
export declare class i18nCompletionInput {
|
|
2
|
+
/** Source JSON (key-value pairs). 보통 한 언어로 작성된 i18n 파일 내용. */
|
|
2
3
|
json: string;
|
|
4
|
+
/**
|
|
5
|
+
* 원본 언어 BCP-47 코드. 예: 'ko', 'en', 'ja'.
|
|
6
|
+
* 미지정 시 'ko' (codelingua 의 historical default).
|
|
7
|
+
*/
|
|
8
|
+
sourceLocale?: string;
|
|
9
|
+
/**
|
|
10
|
+
* 번역할 대상 언어 코드 배열. 예: ['en', 'ja', 'zh', 'ms'].
|
|
11
|
+
* 미지정 시 ['en', 'ja', 'zh', 'ms'] (codelingua 의 historical default).
|
|
12
|
+
*/
|
|
13
|
+
targetLocales?: string[];
|
|
3
14
|
}
|
|
4
15
|
export declare class i18nCompletionOutput {
|
|
5
16
|
message?: string;
|
|
@@ -10,6 +10,14 @@ tslib_1.__decorate([
|
|
|
10
10
|
(0, type_graphql_1.Field)(),
|
|
11
11
|
tslib_1.__metadata("design:type", String)
|
|
12
12
|
], i18nCompletionInput.prototype, "json", void 0);
|
|
13
|
+
tslib_1.__decorate([
|
|
14
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
15
|
+
tslib_1.__metadata("design:type", String)
|
|
16
|
+
], i18nCompletionInput.prototype, "sourceLocale", void 0);
|
|
17
|
+
tslib_1.__decorate([
|
|
18
|
+
(0, type_graphql_1.Field)(() => [String], { nullable: true }),
|
|
19
|
+
tslib_1.__metadata("design:type", Array)
|
|
20
|
+
], i18nCompletionInput.prototype, "targetLocales", void 0);
|
|
13
21
|
exports.i18nCompletionInput = i18nCompletionInput = tslib_1.__decorate([
|
|
14
22
|
(0, type_graphql_1.InputType)()
|
|
15
23
|
], i18nCompletionInput);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-completion-type.js","sourceRoot":"","sources":["../../../server/service/i18n-completion/i18n-completion-type.ts"],"names":[],"mappings":";;;;AAAA,+CAA2D;AAGpD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;
|
|
1
|
+
{"version":3,"file":"i18n-completion-type.js","sourceRoot":"","sources":["../../../server/service/i18n-completion/i18n-completion-type.ts"],"names":[],"mappings":";;;;AAAA,+CAA2D;AAGpD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAkB/B,CAAA;AAlBY,kDAAmB;AAG9B;IADC,IAAA,oBAAK,GAAE;;iDACK;AAOb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACL;AAOrB;IADC,IAAA,oBAAK,EAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DAClB;8BAjBb,mBAAmB;IAD/B,IAAA,wBAAS,GAAE;GACC,mBAAmB,CAkB/B;AAGM,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAGhC,CAAA;AAHY,oDAAoB;AAE/B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACV;+BAFL,oBAAoB;IADhC,IAAA,yBAAU,GAAE;GACA,oBAAoB,CAGhC","sourcesContent":["import { ObjectType, Field, InputType } from 'type-graphql'\n\n@InputType()\nexport class i18nCompletionInput {\n /** Source JSON (key-value pairs). 보통 한 언어로 작성된 i18n 파일 내용. */\n @Field()\n json!: string\n\n /**\n * 원본 언어 BCP-47 코드. 예: 'ko', 'en', 'ja'.\n * 미지정 시 'ko' (codelingua 의 historical default).\n */\n @Field({ nullable: true })\n sourceLocale?: string\n\n /**\n * 번역할 대상 언어 코드 배열. 예: ['en', 'ja', 'zh', 'ms'].\n * 미지정 시 ['en', 'ja', 'zh', 'ms'] (codelingua 의 historical default).\n */\n @Field(() => [String], { nullable: true })\n targetLocales?: string[]\n}\n\n@ObjectType()\nexport class i18nCompletionOutput {\n @Field({ nullable: true })\n message?: string\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const entities: any[];
|
|
2
2
|
export declare const schema: {
|
|
3
|
-
resolverClasses: (typeof import("./
|
|
3
|
+
resolverClasses: (typeof import("./i18n-completion/i18n-completion-resolver").i18nCompletionResolver | typeof import("./code-decipher/code-decipher-resolver").CodeDecipherResolver)[];
|
|
4
4
|
};
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
/* EXPORT ENTITY TYPES */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.schema = exports.entities = void 0;
|
|
5
|
-
/* IMPORT
|
|
6
|
-
const chat_completion_1 = require("./chat-completion");
|
|
7
|
-
const image_completion_1 = require("./image-completion");
|
|
8
|
-
const api_doc_completion_1 = require("./api-doc-completion");
|
|
5
|
+
/* IMPORT RESOLVERS */
|
|
9
6
|
const i18n_completion_1 = require("./i18n-completion");
|
|
10
7
|
const code_decipher_1 = require("./code-decipher");
|
|
11
8
|
exports.entities = [
|
|
@@ -14,9 +11,6 @@ exports.entities = [
|
|
|
14
11
|
exports.schema = {
|
|
15
12
|
resolverClasses: [
|
|
16
13
|
/* RESOLVER CLASSES */
|
|
17
|
-
...chat_completion_1.resolvers,
|
|
18
|
-
...image_completion_1.resolvers,
|
|
19
|
-
...api_doc_completion_1.resolvers,
|
|
20
14
|
...i18n_completion_1.resolvers,
|
|
21
15
|
...code_decipher_1.resolvers
|
|
22
16
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";AAAA,yBAAyB;;;AAEzB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";AAAA,yBAAyB;;;AAEzB,sBAAsB;AACtB,uDAAwE;AACxE,mDAAoE;AAEvD,QAAA,QAAQ,GAAG;AACtB,cAAc;CACf,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACtB,GAAG,2BAAuB;QAC1B,GAAG,yBAAqB;KACzB;CACF,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\n\n/* IMPORT RESOLVERS */\nimport { resolvers as i18nCompletionResolvers } from './i18n-completion'\nimport { resolvers as CodeDecipherResolvers } from './code-decipher'\n\nexport const entities = [\n /* ENTITIES */\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n ...i18nCompletionResolvers,\n ...CodeDecipherResolvers\n ]\n}\n"]}
|