deukpack 1.0.0
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/LICENSE +201 -0
- package/NOTICE +6 -0
- package/README.ko.md +138 -0
- package/README.md +182 -0
- package/RELEASING.md +71 -0
- package/bin/deukpack.js +9 -0
- package/dist/ast/DeukPackASTBuilder.d.ts +153 -0
- package/dist/ast/DeukPackASTBuilder.d.ts.map +1 -0
- package/dist/ast/DeukPackASTBuilder.js +931 -0
- package/dist/ast/DeukPackASTBuilder.js.map +1 -0
- package/dist/codegen/CSharpGenerator.d.ts +136 -0
- package/dist/codegen/CSharpGenerator.d.ts.map +1 -0
- package/dist/codegen/CSharpGenerator.js +2303 -0
- package/dist/codegen/CSharpGenerator.js.map +1 -0
- package/dist/codegen/CodeGenerator.d.ts +11 -0
- package/dist/codegen/CodeGenerator.d.ts.map +1 -0
- package/dist/codegen/CodeGenerator.js +11 -0
- package/dist/codegen/CodeGenerator.js.map +1 -0
- package/dist/codegen/CppGenerator.d.ts +23 -0
- package/dist/codegen/CppGenerator.d.ts.map +1 -0
- package/dist/codegen/CppGenerator.js +215 -0
- package/dist/codegen/CppGenerator.js.map +1 -0
- package/dist/codegen/HighPerformanceCSharpGenerator.d.ts +29 -0
- package/dist/codegen/HighPerformanceCSharpGenerator.d.ts.map +1 -0
- package/dist/codegen/HighPerformanceCSharpGenerator.js +486 -0
- package/dist/codegen/HighPerformanceCSharpGenerator.js.map +1 -0
- package/dist/core/DeukPackEngine.d.ts +69 -0
- package/dist/core/DeukPackEngine.d.ts.map +1 -0
- package/dist/core/DeukPackEngine.js +379 -0
- package/dist/core/DeukPackEngine.js.map +1 -0
- package/dist/core/DeukPackGenerator.d.ts +9 -0
- package/dist/core/DeukPackGenerator.d.ts.map +1 -0
- package/dist/core/DeukPackGenerator.js +15 -0
- package/dist/core/DeukPackGenerator.js.map +1 -0
- package/dist/core/DeukParser.d.ts +12 -0
- package/dist/core/DeukParser.d.ts.map +1 -0
- package/dist/core/DeukParser.js +27 -0
- package/dist/core/DeukParser.js.map +1 -0
- package/dist/core/IdlParser.d.ts +27 -0
- package/dist/core/IdlParser.d.ts.map +1 -0
- package/dist/core/IdlParser.js +157 -0
- package/dist/core/IdlParser.js.map +1 -0
- package/dist/core/ProtoParser.d.ts +12 -0
- package/dist/core/ProtoParser.d.ts.map +1 -0
- package/dist/core/ProtoParser.js +27 -0
- package/dist/core/ProtoParser.js.map +1 -0
- package/dist/csharp/DpExcelProtocol.cs +3005 -0
- package/dist/csharp/DpProtocolLibrary.cs +13 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/lexer/DeukLexer.d.ts +31 -0
- package/dist/lexer/DeukLexer.d.ts.map +1 -0
- package/dist/lexer/DeukLexer.js +292 -0
- package/dist/lexer/DeukLexer.js.map +1 -0
- package/dist/lexer/IdlLexer.d.ts +33 -0
- package/dist/lexer/IdlLexer.d.ts.map +1 -0
- package/dist/lexer/IdlLexer.js +286 -0
- package/dist/lexer/IdlLexer.js.map +1 -0
- package/dist/native/NativeDeukPackEngine.d.ts +30 -0
- package/dist/native/NativeDeukPackEngine.d.ts.map +1 -0
- package/dist/native/NativeDeukPackEngine.js +99 -0
- package/dist/native/NativeDeukPackEngine.js.map +1 -0
- package/dist/proto/ProtoASTBuilder.d.ts +29 -0
- package/dist/proto/ProtoASTBuilder.d.ts.map +1 -0
- package/dist/proto/ProtoASTBuilder.js +239 -0
- package/dist/proto/ProtoASTBuilder.js.map +1 -0
- package/dist/proto/ProtoLexer.d.ts +29 -0
- package/dist/proto/ProtoLexer.d.ts.map +1 -0
- package/dist/proto/ProtoLexer.js +264 -0
- package/dist/proto/ProtoLexer.js.map +1 -0
- package/dist/proto/ProtoTypes.d.ts +40 -0
- package/dist/proto/ProtoTypes.d.ts.map +1 -0
- package/dist/proto/ProtoTypes.js +37 -0
- package/dist/proto/ProtoTypes.js.map +1 -0
- package/dist/protocols/BinaryProtocol.d.ts +7 -0
- package/dist/protocols/BinaryProtocol.d.ts.map +1 -0
- package/dist/protocols/BinaryProtocol.js +11 -0
- package/dist/protocols/BinaryProtocol.js.map +1 -0
- package/dist/protocols/BinaryWriter.d.ts +22 -0
- package/dist/protocols/BinaryWriter.d.ts.map +1 -0
- package/dist/protocols/BinaryWriter.js +104 -0
- package/dist/protocols/BinaryWriter.js.map +1 -0
- package/dist/protocols/CompactProtocol.d.ts +7 -0
- package/dist/protocols/CompactProtocol.d.ts.map +1 -0
- package/dist/protocols/CompactProtocol.js +11 -0
- package/dist/protocols/CompactProtocol.js.map +1 -0
- package/dist/protocols/ExcelProtocol.d.ts +98 -0
- package/dist/protocols/ExcelProtocol.d.ts.map +1 -0
- package/dist/protocols/ExcelProtocol.js +639 -0
- package/dist/protocols/ExcelProtocol.js.map +1 -0
- package/dist/protocols/JsonProtocol.d.ts +68 -0
- package/dist/protocols/JsonProtocol.d.ts.map +1 -0
- package/dist/protocols/JsonProtocol.js +422 -0
- package/dist/protocols/JsonProtocol.js.map +1 -0
- package/dist/protocols/WireProtocol.d.ts +348 -0
- package/dist/protocols/WireProtocol.d.ts.map +1 -0
- package/dist/protocols/WireProtocol.js +912 -0
- package/dist/protocols/WireProtocol.js.map +1 -0
- package/dist/serialization/WireDeserializer.d.ts +8 -0
- package/dist/serialization/WireDeserializer.d.ts.map +1 -0
- package/dist/serialization/WireDeserializer.js +13 -0
- package/dist/serialization/WireDeserializer.js.map +1 -0
- package/dist/serialization/WireSerializer.d.ts +20 -0
- package/dist/serialization/WireSerializer.d.ts.map +1 -0
- package/dist/serialization/WireSerializer.js +100 -0
- package/dist/serialization/WireSerializer.js.map +1 -0
- package/dist/types/DeukPackTypes.d.ts +291 -0
- package/dist/types/DeukPackTypes.d.ts.map +1 -0
- package/dist/types/DeukPackTypes.js +76 -0
- package/dist/types/DeukPackTypes.js.map +1 -0
- package/dist/utils/EndianUtils.d.ts +11 -0
- package/dist/utils/EndianUtils.d.ts.map +1 -0
- package/dist/utils/EndianUtils.js +32 -0
- package/dist/utils/EndianUtils.js.map +1 -0
- package/dist/utils/PerformanceMonitor.d.ts +26 -0
- package/dist/utils/PerformanceMonitor.d.ts.map +1 -0
- package/dist/utils/PerformanceMonitor.js +57 -0
- package/dist/utils/PerformanceMonitor.js.map +1 -0
- package/package.json +77 -0
- package/scripts/build_deukpack.js +669 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2024 gplat-team
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.ko.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# DeukPack
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
4
|
+
[](https://www.npmjs.com/package/deukpack)
|
|
5
|
+
|
|
6
|
+
**한 줄 요약:** **득팩(DeukPack)** 은 **네이티브 `.deuk` IDL** 을 중심으로 **Protobuf·OpenAPI·JSON Schema·CSV·레거시 `.thrift`** 까지 한 파이프라인에서 **C#·C++·JavaScript** 코드·스키마를 뽑는 **고속 파싱·코드 생성 엔진**이다. **표준에 가까운 Protobuf 호환(와이어)** 을 먼저 두고, 레거시 공존은 선택.
|
|
7
|
+
|
|
8
|
+
**v1.0.0 공개 약속**은 **IDL·프로토콜 코드젠·CLI·Binary/Compact/JSON 와이어**만. **Excel 프로토콜·Excel 애드인은 별도 배포** → [DEUKPACK_EXCEL_SEPARATE_DISTRIBUTION.md](docs/DEUKPACK_EXCEL_SEPARATE_DISTRIBUTION.md), [DEUKPACK_V1_RELEASE_SCOPE.md](docs/DEUKPACK_V1_RELEASE_SCOPE.md).
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 왜 DeukPack인가?
|
|
13
|
+
|
|
14
|
+
- **속도:** 대량 IDL도 수십 배 빠른 파싱·코드 생성(예: 160파일 ~1초 vs 15–25초). 런타임 직렬화/역직렬화도 약 10배 빠른 수준.
|
|
15
|
+
- **단일 소스:** **`.deuk` 우선**; `.proto`, `.thrift`, OpenAPI 등과 **한 빌드**에 섞을 수 있음. 직렬화·SQLite 등은 코드 생성. *(v1: Excel·완결 테이블 파이프라인은 비공약.)*
|
|
16
|
+
- **와이어:** **Protobuf 호환(Binary/Compact)** 을 표준으로; 필요 시 레거시 스택과 공존. 득팩을 “Thrift 전용 호환”으로 소개하지 않음.
|
|
17
|
+
- **득팩만의 레이어:** GetSchema, SQLite, msgId·ProtocolRegistry 등 — 게임·백엔드·툴에 맞춘 **득팩 런타임**이 본체. *(메타 테이블·Excel 완결은 후속.)*
|
|
18
|
+
- **AI·에이전트:** `.deuk`, `.proto`, `.thrift`, OpenAPI 입력 → **결정론적 코드·직렬화**. [AI 파이프라인](docs/DEUKPACK_AI_PIPELINE_INTEGRATION.md).
|
|
19
|
+
|
|
20
|
+
→ [전체 문서](docs/) · [코어 엔진 소개](docs/intro/INTRO_DEUKPACK_CORE_ENGINE.md) · [README (English)](README.md)
|
|
21
|
+
→ **상세 문서(튜토리얼·API 가이드)**: [deukpack.app](https://deukpack.app/)
|
|
22
|
+
→ **스타터 키트(유니티·C++·네트워크·TS·Java 등)**: [deukpack.app/starter-kits](https://deukpack.app/starter-kits/)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 기능 요약
|
|
27
|
+
|
|
28
|
+
- **고속 성능:** 대량 IDL 파싱·코드 생성
|
|
29
|
+
- **다언어:** TypeScript, JavaScript, C++, C#
|
|
30
|
+
- **네이티브 바인딩:** C++ 네이티브 모듈로 최대 성능
|
|
31
|
+
- **크로스 플랫폼:** Windows, macOS, Linux
|
|
32
|
+
- **메모리 최적화:** 버퍼 풀링으로 효율적 메모리 사용
|
|
33
|
+
- **타입 안전:** 생성 타입으로 풀 TypeScript 지원
|
|
34
|
+
|
|
35
|
+
## 설치
|
|
36
|
+
|
|
37
|
+
**npm 패키지만 쓸 때 (소스 클론 없음)**: [npm 패키지 사용](docs/NPM_PACKAGE.md).
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install deukpack
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 간단한 사용방법 (CLI)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# C# + C++ 코드 생성 (.deuk 또는 .thrift)
|
|
47
|
+
npx deukpack ./schema.deuk ./out --csharp --cpp
|
|
48
|
+
|
|
49
|
+
# include 경로·프로토콜 지정
|
|
50
|
+
npx deukpack ./api.deuk ./gen -I ./includes --csharp --protocol binary
|
|
51
|
+
|
|
52
|
+
# 파이프라인 (여러 작업 일괄)
|
|
53
|
+
npx deukpack --pipeline ./deukpack-pipeline.json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**빠른 시작 (C# / C++ / TS / JS)**: [docs/QUICKSTART.md](docs/QUICKSTART.md) — 언어별 예제 실행.
|
|
57
|
+
**디테일한 문서**(튜토리얼, IDL 가이드, API 레퍼런스): **[deukpack.app](https://deukpack.app/)** → [튜토리얼](https://deukpack.app/tutorial/) · [레퍼런스](https://deukpack.app/reference/).
|
|
58
|
+
|
|
59
|
+
## 지원 언어
|
|
60
|
+
|
|
61
|
+
- **TypeScript:** 타입 생성 및 IntelliSense
|
|
62
|
+
- **JavaScript:** ES6+ 호환
|
|
63
|
+
- **C++:** 네이티브 C++ 바인딩, STL 컨테이너
|
|
64
|
+
- **C#:** .NET 호환, LINQ 지원
|
|
65
|
+
|
|
66
|
+
## 성능 (레거시 컴파일러류 워크플로 대비)
|
|
67
|
+
|
|
68
|
+
| 항목 | 일반적 IDL 컴파일러류 흐름 | DeukPack | 개선 |
|
|
69
|
+
|------|----------------|----------|------|
|
|
70
|
+
| 160파일 파싱 | 15–25초 | 0.5–1초 | **25–50배** |
|
|
71
|
+
| TypeScript 코드젠 | 2–3초 | 0.1–0.2초 | **15–30배** |
|
|
72
|
+
| 직렬화 | 0.5ms | 0.05ms | **10배** |
|
|
73
|
+
| 역직렬화 | 0.8ms | 0.08ms | **10배** |
|
|
74
|
+
| 메모리 | 100MB | 20MB | **약 5배 절감** |
|
|
75
|
+
|
|
76
|
+
## 개발
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npm install
|
|
80
|
+
npm run build
|
|
81
|
+
npm run build:native
|
|
82
|
+
npm test
|
|
83
|
+
npm run benchmark
|
|
84
|
+
npm run dev
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 프로젝트 구조
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
DeukPack/
|
|
91
|
+
├── deukpack.app/ # 제품 소개 사이트 (서브모듈)
|
|
92
|
+
├── docs/ # 기술 문서
|
|
93
|
+
├── src/ # TypeScript 소스
|
|
94
|
+
├── native/ # C++/C# 네이티브
|
|
95
|
+
└── dist/ # 빌드 결과물
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 문서
|
|
99
|
+
|
|
100
|
+
- **제품 소개(외부):** [deukpack.app](https://deukpack.app/) — 라인업·포지셔닝·라이선스
|
|
101
|
+
- **기술 문서:** [docs/](docs/) — 설계·가이드·목차는 `docs/README.md` 참고
|
|
102
|
+
|
|
103
|
+
## 문의
|
|
104
|
+
|
|
105
|
+
문의·피드백은 **contact@deukpack.app** 또는 [deukpack.app](https://deukpack.app/) 문의 안내를 이용해 주세요.
|
|
106
|
+
|
|
107
|
+
## 릴리즈·tarball 설치
|
|
108
|
+
|
|
109
|
+
**[RELEASING.md](RELEASING.md)** 참고 — 태그 `v*.*.*` 푸시 시 GitHub Release에 **`deukpack-x.y.z.tgz`** 첨부. 설치: `npm install ./deukpack-x.y.z.tgz`. CLI: `deukpack` / `npx deukpack`.
|
|
110
|
+
|
|
111
|
+
## 개발 후원
|
|
112
|
+
|
|
113
|
+
득팩은 **Apache-2.0** 으로 **무료**입니다. 상용·내부 도구에 막힘 없이 쓸 수 있는 대신, **지속 가능한 OSS**가 되려면 문서·CI·호환성 수정·파서·코드젠 개선·이슈/PR 대응 같은 **유지 비용**이 필요합니다.
|
|
114
|
+
|
|
115
|
+
득팩이 **CI 시간을 줄였거나**, **수작업 직렬화 대신 안정적인 타입·와이어**를 주거나, **게임·서버 스택을 한 IDL로 맞추는 데** 도움이 되었다면, **후원**으로 그 다음 릴리스·[deukpack.app](https://deukpack.app/) 문서·엔진 개선을 응원해 주실 수 있습니다. 금액은 부담 없는 선에서 **일시·정기** 모두 환영입니다.
|
|
116
|
+
|
|
117
|
+
**개인 PayPal 계정**으로 받습니다. 후원금은 **법인·단체가 아닌**, 유지보수자 개인 계정(**`joygram@gmail.com`**)으로 들어갑니다. 운영 부담을 줄이고 개발 시간에 쓰기 위한 방식입니다.
|
|
118
|
+
|
|
119
|
+
- **[PayPal로 후원하기](https://www.paypal.com/donate/?business=joygram%40gmail.com¤cy_code=USD&item_name=DeukPack%20development)**
|
|
120
|
+
- 위 링크가 안 열리면 PayPal에서 **송금** → 수신 **`joygram@gmail.com`**. [PayPal.Me](https://www.paypal.com/paypalme/) 링크를 만드시면 README에 추가해 두면 더 편합니다.
|
|
121
|
+
|
|
122
|
+
**기부금 영수증(세액공제)** 성격이 아닙니다. 등록 단체 기부가 아니라 **개인 OSS 활동 지원(팁)** 으로 이해해 주시면 됩니다.
|
|
123
|
+
|
|
124
|
+
후원이 어렵다면 **저장소 Star**, **재현 가능한 이슈**, **PR**, 또는 **득팩이 맞는 팀에 소개**만으로도 큰 힘이 됩니다.
|
|
125
|
+
|
|
126
|
+
## 기여
|
|
127
|
+
|
|
128
|
+
1. 저장소 Fork
|
|
129
|
+
2. 기능 브랜치 생성 (`git checkout -b feature/amazing-feature`)
|
|
130
|
+
3. 커밋 후 푸시, Pull Request
|
|
131
|
+
|
|
132
|
+
## 라이선스
|
|
133
|
+
|
|
134
|
+
**Apache License 2.0** — [LICENSE](LICENSE), [NOTICE](NOTICE) 참고.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
**DeukPack** — **득팩 IDL 파이프라인**으로 스펙부터 배포까지. 🚀
|
package/README.md
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# DeukPack
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
4
|
+
[](https://www.npmjs.com/package/deukpack)
|
|
5
|
+
|
|
6
|
+
**DeukPack** — one toolchain for specs, code, and data.
|
|
7
|
+
**Native `.deuk` IDL** plus **Protobuf, OpenAPI, JSON Schema, CSV**, and **legacy `.thrift`** in a **single fast pipeline** → **C#, C++, JavaScript**, registries, and **network-ready message layouts**.
|
|
8
|
+
|
|
9
|
+
**v1.0.0 (npm / OSS)**: **IDL → multi-language codegen, CLI**, Binary/Compact/JSON wire. **Excel protocol and Excel add-in are distributed separately** — not part of core npm. See [DEUKPACK_V1_RELEASE_SCOPE.md](docs/DEUKPACK_V1_RELEASE_SCOPE.md) and [DEUKPACK_EXCEL_SEPARATE_DISTRIBUTION.md](docs/DEUKPACK_EXCEL_SEPARATE_DISTRIBUTION.md).
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## At a glance
|
|
14
|
+
|
|
15
|
+
| | What you get |
|
|
16
|
+
|---|----------------|
|
|
17
|
+
| **Interop** | **Protobuf-style / Binary·Compact** wire first; optional coexistence with legacy stacks. DeukPack is the **product**, not a fork of any single format. |
|
|
18
|
+
| **Inputs** | **`.deuk` first-class**; **`.proto`, `.thrift`, OpenAPI, JSON Schema, CSV** in the **same build** — bring definitions without rewriting everything first. |
|
|
19
|
+
| **Speed** | **Parse & codegen orders of magnitude faster** than typical single-tool IDL workflows at scale; leaner runtime serialize path. |
|
|
20
|
+
| **Integration** | One AST → **multi-language outputs**, **SQLite DDL**, **schema JSON**, **IDL-driven registries** — fewer hand-maintained DTO layers. *(v1: table/Excel workflow out of scope.)* |
|
|
21
|
+
| **Agents** | **Deterministic** codegen from `.deuk`, `.proto`, `.thrift`, or OpenAPI — specs in, typed code out. [AI pipeline →](docs/DEUKPACK_AI_PIPELINE_INTEGRATION.md) |
|
|
22
|
+
| **Extensibility** | **CLI + pluggable generators** (C#, C++, TS, JS). *(v1: use CLI for production emit; library `generateCode` not fully wired.)* |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Why DeukPack (impact)
|
|
27
|
+
|
|
28
|
+
### 1. Compatibility & legacy migration
|
|
29
|
+
|
|
30
|
+
- **One engine, many inputs**: **`.deuk`** alongside `.proto`, `.thrift`, OpenAPI — same AST, same codegen rules.
|
|
31
|
+
- **Wire profiles**: **Protobuf-aligned** Binary/Compact first; coexistence with legacy services where needed.
|
|
32
|
+
- **Structural CSV import** — treat wide or headered CSV as schema input where it fits your migration story.
|
|
33
|
+
- **OpenAPI 3.x & JSON Schema** — REST-era contracts feed the same codegen and validation story as your game or backend IDL.
|
|
34
|
+
|
|
35
|
+
### 2. Performance where it hurts
|
|
36
|
+
|
|
37
|
+
Large trees of IDL files are where traditional compile steps hurt CI and local iteration. DeukPack is built for **high-throughput parse + multi-language emit** so **integration stays fast** as the spec grows.
|
|
38
|
+
|
|
39
|
+
| Area | Typical gain (order of magnitude) |
|
|
40
|
+
|------|-------------------------------------|
|
|
41
|
+
| Parse + codegen (many files) | **~25–50×** faster vs classic compiler-style IDL flows on comparable workloads |
|
|
42
|
+
| TS / JS emit | **~15–30×** faster |
|
|
43
|
+
| Runtime serialize / deserialize | **~10×** faster (vs naive hand-rolled paths) |
|
|
44
|
+
|
|
45
|
+
*See [benchmark notes](docs/DEUKPACK_VS_THRIFT_TEST_REPORT.md) for methodology.*
|
|
46
|
+
|
|
47
|
+
### 3. Integration, not fragmentation
|
|
48
|
+
|
|
49
|
+
- **Single source of truth** → **C#, C++, TypeScript, JavaScript** types and serializers together.
|
|
50
|
+
- **Registries & protocol helpers** from IDL — **message / handler wiring** (e.g. msgId-style dispatch). *(Full Deuk table + Excel pipeline: not v1 public scope.)*
|
|
51
|
+
- **Multiple on-the-wire styles** — **Binary**, **Compact**, **JSON** bridging where you need HTTP or debuggability alongside binary frames.
|
|
52
|
+
- **SQLite** path from schema when you want **local / embedded** structured storage aligned with the same types.
|
|
53
|
+
|
|
54
|
+
### 4. Built for AI & agent workflows
|
|
55
|
+
|
|
56
|
+
- Agents produce or refine **OpenAPI, `.deuk`, `.proto`, or `.thrift`**; DeukPack turns them into **repeatable, reviewable code** — no ambiguous “rewrite the service by hand” step.
|
|
57
|
+
- **CLI** (and parse-oriented library use) for **scripts, CI, or orchestration** — same as an agent invoking a compiler. *(v1 production codegen: prefer CLI.)*
|
|
58
|
+
|
|
59
|
+
→ [DEUKPACK_AI_PIPELINE_INTEGRATION.md](docs/DEUKPACK_AI_PIPELINE_INTEGRATION.md)
|
|
60
|
+
|
|
61
|
+
### 5. Major languages, one IDL story
|
|
62
|
+
|
|
63
|
+
| Output | Role |
|
|
64
|
+
|--------|------|
|
|
65
|
+
| **C#** | .NET / Unity / servers — full runtime types, `GetSchema()`, protocol helpers. |
|
|
66
|
+
| **C++** | Native services, performance-critical paths. |
|
|
67
|
+
| **TypeScript / JavaScript** | BFFs, tools, editors, Node pipelines. |
|
|
68
|
+
|
|
69
|
+
*Same struct names, same field IDs, same wire — across stacks.*
|
|
70
|
+
|
|
71
|
+
### 6. API & generator extension
|
|
72
|
+
|
|
73
|
+
- **Engine API** for parse → AST → emit; suitable for **custom pipelines** and **wrapped CLIs**.
|
|
74
|
+
- **Code generators** as clear extension points — add languages or corporate templates without reimplementing the front-end.
|
|
75
|
+
- **`deukpack` CLI** for zero-code integration in CI (`npx deukpack …`).
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Installation
|
|
80
|
+
|
|
81
|
+
**Using only the npm package (no source clone)?** → [npm package usage](docs/NPM_PACKAGE.md).
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm install deukpack
|
|
85
|
+
# or
|
|
86
|
+
npm install ./deukpack-x.y.z.tgz # from GitHub Release asset
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Global CLI:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm i -g deukpack
|
|
93
|
+
deukpack --help
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Simple usage (CLI)
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Install (or use npx without installing)
|
|
102
|
+
npm install deukpack
|
|
103
|
+
|
|
104
|
+
# Generate C# + C++ from one IDL (.deuk or .thrift)
|
|
105
|
+
npx deukpack ./schema.deuk ./out --csharp --cpp
|
|
106
|
+
|
|
107
|
+
# With include paths and protocol
|
|
108
|
+
npx deukpack ./api.deuk ./gen -I ./includes --csharp --protocol binary
|
|
109
|
+
|
|
110
|
+
# Pipeline (multiple jobs)
|
|
111
|
+
npx deukpack --pipeline ./deukpack-pipeline.json
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Quick start by language**: [docs/QUICKSTART.md](docs/QUICKSTART.md) (C# · C++ · TypeScript · JavaScript).
|
|
115
|
+
**Detailed docs** (tutorials, IDL guide, API reference): **[deukpack.app](https://deukpack.app/)** → [Tutorial](https://deukpack.app/tutorial/) · [Reference](https://deukpack.app/reference/).
|
|
116
|
+
|
|
117
|
+
Programmatic: `DeukPackEngine` parse / AST — see `src` and [docs](docs/). **Multi-language emit: use CLI** for v1 ([scope](docs/DEUKPACK_V1_RELEASE_SCOPE.md)).
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Documentation & links
|
|
122
|
+
|
|
123
|
+
| | |
|
|
124
|
+
|--|--|
|
|
125
|
+
| **npm only (no clone)** | [docs/NPM_PACKAGE.md](docs/NPM_PACKAGE.md) — install, CLI, pipeline |
|
|
126
|
+
| **Quick start (C# / C++ / TS / JS)** | [docs/QUICKSTART.md](docs/QUICKSTART.md) — run examples by language |
|
|
127
|
+
| **Detailed docs (tutorial, API, guides)** | **[deukpack.app](https://deukpack.app/)** — IDL guide, C#/C++ guides, protocol, API reference |
|
|
128
|
+
| **AI / agents** | [DEUKPACK_AI_PIPELINE_INTEGRATION.md](docs/DEUKPACK_AI_PIPELINE_INTEGRATION.md) |
|
|
129
|
+
| **Korean intro** | [README.ko.md](README.ko.md) · [INTRO_DEUKPACK_CORE_ENGINE.md](docs/intro/INTRO_DEUKPACK_CORE_ENGINE.md) |
|
|
130
|
+
| **Releases** | [RELEASING.md](RELEASING.md) — tags, GitHub Release tarballs |
|
|
131
|
+
| **Full doc tree** | [docs/README.md](docs/README.md) |
|
|
132
|
+
| **CI/CD · samples (C#/C++/TS/JS)** | [DEUKPACK_CI_CD_AND_DEV_PIPELINE.md](docs/DEUKPACK_CI_CD_AND_DEV_PIPELINE.md) · [examples/README.md](examples/README.md) |
|
|
133
|
+
| **Starter kits** | [deukpack.app/starter-kits](https://deukpack.app/starter-kits/) (Unity, C++, network, TS, Java…) |
|
|
134
|
+
|
|
135
|
+
**Product / site:** [deukpack.app](https://deukpack.app/) · **contact:** contact@deukpack.app
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Development
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
npm ci
|
|
143
|
+
npm run build
|
|
144
|
+
npm test
|
|
145
|
+
npm run benchmark # optional
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Support development
|
|
151
|
+
|
|
152
|
+
DeukPack stays **free and Apache-2.0** — you can ship products on it without a license fee. That only works if the project stays **maintained**: documentation, CI, compatibility fixes, faster parsers, new language targets, and time to review issues and PRs.
|
|
153
|
+
|
|
154
|
+
If DeukPack **saves you CI minutes**, **replaces brittle hand-rolled serializers**, or **keeps your game/server stacks aligned on one IDL**, consider **chipping in**. A one-time or recurring tip **directly supports continued OSS work** on the engine, docs ([deukpack.app](https://deukpack.app/)), and releases — at any amount you’re comfortable with.
|
|
155
|
+
|
|
156
|
+
**Personal PayPal (maintainer)** — tips go to the **individual account** tied to **`joygram@gmail.com`**, not a separate legal entity. That keeps overhead low and funds time on DeukPack directly.
|
|
157
|
+
|
|
158
|
+
- **[Donate via PayPal](https://www.paypal.com/donate/?business=joygram%40gmail.com¤cy_code=USD&item_name=DeukPack%20development)**
|
|
159
|
+
- If the button doesn’t open in your region, use PayPal **Send** to **`joygram@gmail.com`** (or your [PayPal.Me](https://www.paypal.com/paypalme/) link once you create one and we can add it here).
|
|
160
|
+
|
|
161
|
+
This is **not** a tax-deductible charity donation unless you have a separate registered nonprofit; treat it as **support for the maintainer’s OSS work**.
|
|
162
|
+
|
|
163
|
+
Not in a position to donate? **Star the repo**, **open clear issues**, **send PRs**, or **tell a team** that’s juggling Protobuf + Thrift + OpenAPI — that helps too.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Contributing
|
|
168
|
+
|
|
169
|
+
1. Fork → feature branch → PR.
|
|
170
|
+
2. See [RELEASING.md](RELEASING.md) for release layout.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## License
|
|
175
|
+
|
|
176
|
+
**Apache License 2.0** — [LICENSE](LICENSE) · [NOTICE](NOTICE).
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Acknowledgments
|
|
181
|
+
|
|
182
|
+
The broader IDL / OpenAPI / schema communities; DeukPack is a **standalone pipeline** (not an Apache Thrift subproject).
|
package/RELEASING.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# DeukPack OSS — 릴리즈·배포
|
|
2
|
+
|
|
3
|
+
## v1.0.0 공개 스펙
|
|
4
|
+
|
|
5
|
+
**1.0.0 태그·npm 공개 시 “지원한다”고 말할 수 있는 범위**는 [docs/DEUKPACK_V1_RELEASE_SCOPE.md](docs/DEUKPACK_V1_RELEASE_SCOPE.md)에 고정한다.
|
|
6
|
+
(테이블·Excel 연동은 v1 공약에서 제외; **Excel 프로토콜·Excel 애드인은 별도 배포** — [docs/DEUKPACK_EXCEL_SEPARATE_DISTRIBUTION.md](docs/DEUKPACK_EXCEL_SEPARATE_DISTRIBUTION.md).)
|
|
7
|
+
|
|
8
|
+
## 사전 확인
|
|
9
|
+
|
|
10
|
+
1. **`package.json`의 `repository` / `bugs` / `homepage`**
|
|
11
|
+
실제 GitHub 경로로 바꾼다. OSS: `https://github.com/joygram/DeukPack` .
|
|
12
|
+
|
|
13
|
+
2. **빌드·테스트 (로컬)**
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm ci
|
|
17
|
+
npm run build
|
|
18
|
+
npm test
|
|
19
|
+
npm pack --dry-run
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
3. **CLI**
|
|
23
|
+
|
|
24
|
+
- 전역: `npm i -g deukpack` 후 `deukpack <args>`
|
|
25
|
+
- 일회: `npx deukpack <args>`
|
|
26
|
+
- 저장소 클론 시: `node scripts/build_deukpack.js` (동일 인자)
|
|
27
|
+
|
|
28
|
+
## GitHub Release (바이너리 = npm tarball)
|
|
29
|
+
|
|
30
|
+
태그를 푸시하면 **GitHub Actions → Release** 가 돌아가고, **`deukpack-x.y.z.tgz`** 가 릴리즈 자산으로 붙는다.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git tag v1.0.0
|
|
34
|
+
git push origin v1.0.0
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- 워크플로: `.github/workflows/release.yml`
|
|
38
|
+
- 태그 `v1.2.3` → `package.json` 버전을 `1.2.3`에 맞춘 뒤 `npm pack` 실행.
|
|
39
|
+
|
|
40
|
+
사용자는 Release 페이지에서 `.tgz` 받아 `npm install ./deukpack-1.0.0.tgz` 로 설치 가능.
|
|
41
|
+
|
|
42
|
+
## npm registry (선택)
|
|
43
|
+
|
|
44
|
+
1. [npm](https://www.npmjs.com/) 계정·토큰 생성.
|
|
45
|
+
2. GitHub 저장소 **Settings → Secrets** 에 `NPM_TOKEN` 추가.
|
|
46
|
+
3. `.github/workflows/release.yml` 맨 아래 **Publish to npm** 단계 주석 해제.
|
|
47
|
+
4. 또는 로컬에서:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm run build && npm test
|
|
51
|
+
npm publish --access public
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`prepublishOnly` 가 publish 직전에 다시 `build` 를 돌린다.
|
|
55
|
+
|
|
56
|
+
## CI
|
|
57
|
+
|
|
58
|
+
- **push / PR**: `.github/workflows/ci.yml` — Ubuntu·Windows, Node 18·20, `build` + `test` + **example IDL codegen smoke**.
|
|
59
|
+
- 소비자 파이프라인·샘플: [docs/DEUKPACK_CI_CD_AND_DEV_PIPELINE.md](docs/DEUKPACK_CI_CD_AND_DEV_PIPELINE.md).
|
|
60
|
+
|
|
61
|
+
## 공개(OSS) vs 내부 (GitLab 정본)
|
|
62
|
+
|
|
63
|
+
| 구분 | 경로 | npm / 공개 GitHub |
|
|
64
|
+
|------|------|-------------------|
|
|
65
|
+
| **레거시 Thrift→.deuk** | `scripts/internal/legacy-migration/` | **제외** (`.npmignore`) |
|
|
66
|
+
| **GPLAT 문건** | `docs/internal/` | **제외** |
|
|
67
|
+
| **코어 CLI·코드젠** | `bin/`, `scripts/build_deukpack.js`, `dist/` | **포함** |
|
|
68
|
+
|
|
69
|
+
GitHub 미러 동기화 시 `scripts/internal/`, `docs/internal/` 는 **올리지 않는다.**
|
|
70
|
+
|
|
71
|
+
**형제 클론**: `i/DeukPack` · `i/DeukPackOSS` 구조일 때 동기화 → [docs/OSS_PUBLISH_SCOPE.md](docs/OSS_PUBLISH_SCOPE.md) §로컬 DeukPackOSS.
|
package/bin/deukpack.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* DeukPack CLI (npm global / npx).
|
|
4
|
+
* Forwards to scripts/build_deukpack.js after ensuring cwd-independent resolution.
|
|
5
|
+
*/
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const root = path.join(__dirname, '..');
|
|
8
|
+
process.chdir(root);
|
|
9
|
+
require(path.join(root, 'scripts', 'build_deukpack.js'));
|