create-specment 0.2.8 → 0.3.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.
Files changed (174) hide show
  1. package/bin/commands/create.d.ts +0 -1
  2. package/bin/constants/languages.d.ts +0 -1
  3. package/bin/core/interactive-setup.d.ts +0 -1
  4. package/bin/core/interactive-setup.js +17 -10
  5. package/bin/core/interactive-setup.js.map +1 -1
  6. package/bin/core/interactive-setup.test.d.ts +0 -1
  7. package/bin/core/interactive-setup.test.js +7 -7
  8. package/bin/core/interactive-setup.test.js.map +1 -1
  9. package/bin/core/project-generator.d.ts +0 -1
  10. package/bin/core/project-generator.js +5 -8
  11. package/bin/core/project-generator.js.map +1 -1
  12. package/bin/features/index.d.ts +0 -1
  13. package/bin/features/index.js +15 -13
  14. package/bin/features/index.js.map +1 -1
  15. package/bin/generators/docusaurus-config.d.ts +0 -1
  16. package/bin/generators/docusaurus-config.js +211 -264
  17. package/bin/generators/docusaurus-config.js.map +1 -1
  18. package/bin/generators/package-json.d.ts +0 -1
  19. package/bin/generators/package-json.js +45 -91
  20. package/bin/generators/package-json.js.map +1 -1
  21. package/bin/generators/template-files.d.ts +0 -1
  22. package/bin/generators/template-files.js +625 -229
  23. package/bin/generators/template-files.js.map +1 -1
  24. package/bin/index.d.ts +0 -1
  25. package/bin/index.js.map +1 -1
  26. package/bin/templates/index.d.ts +0 -1
  27. package/bin/templates/index.js +36 -24
  28. package/bin/templates/index.js.map +1 -1
  29. package/bin/tests/integration.test.d.ts +0 -1
  30. package/bin/tests/integration.test.js +34 -34
  31. package/bin/tests/integration.test.js.map +1 -1
  32. package/bin/types/index.d.ts +1 -21
  33. package/bin/utils/config-merger.d.ts +0 -1
  34. package/bin/utils/config-merger.js +0 -1
  35. package/bin/utils/config-merger.js.map +1 -1
  36. package/bin/utils/errors.d.ts +0 -1
  37. package/bin/utils/install.d.ts +0 -1
  38. package/bin/utils/install.js +3 -3
  39. package/bin/utils/install.js.map +1 -1
  40. package/bin/utils/message-formatter.d.ts +0 -1
  41. package/bin/utils/template-processor.d.ts +0 -1
  42. package/bin/utils/template-processor.js +2 -3
  43. package/bin/utils/template-processor.js.map +1 -1
  44. package/bin/utils/template-processor.test.d.ts +0 -1
  45. package/bin/utils/template-processor.test.js +22 -22
  46. package/bin/utils/template-processor.test.js.map +1 -1
  47. package/bin/utils/version.d.ts +0 -1
  48. package/bin/utils/version.js +3 -3
  49. package/bin/utils/version.js.map +1 -1
  50. package/package.json +2 -7
  51. package/templates/docs/01-overview/_assumptions-constraints.mdx +19 -0
  52. package/templates/docs/01-overview/_business-context.mdx +18 -0
  53. package/templates/docs/01-overview/_firm-proposal.mdx +52 -0
  54. package/templates/docs/01-overview/_gap-analysis.mdx +18 -0
  55. package/templates/docs/01-overview/_project/342/200/221charter.mdx +23 -0
  56. package/templates/docs/01-overview/_requirements-specification.mdx +73 -0
  57. package/templates/docs/01-overview/_risks.mdx +16 -0
  58. package/templates/docs/01-overview/_scope.mdx +24 -0
  59. package/templates/docs/01-overview/_stakeholders.mdx +24 -0
  60. package/templates/docs/01-overview/as-is.mdx +64 -0
  61. package/templates/docs/01-overview/glossary.mdx +41 -0
  62. package/templates/docs/01-overview/index.mdx +41 -0
  63. package/templates/docs/01-overview/odsc.mdx +72 -0
  64. package/templates/docs/01-overview/roadmap.mdx +27 -0
  65. package/templates/docs/01-overview/system-context.mdx +22 -0
  66. package/templates/docs/01-overview/to-be.mdx +102 -0
  67. package/templates/docs/02-requirements/_category_.yaml +2 -0
  68. package/templates/docs/02-requirements/functional/_category_.json +8 -0
  69. package/templates/docs/02-requirements/functional/_req-template.mdx +46 -0
  70. package/templates/docs/02-requirements/functional/req-001.mdx +52 -0
  71. package/templates/docs/02-requirements/index.mdx +14 -0
  72. package/templates/docs/02-requirements/non-functional/_category_.json +8 -0
  73. package/templates/docs/02-requirements/non-functional/_nfr-template.mdx +42 -0
  74. package/templates/docs/02-requirements/non-functional/nfr-001.mdx +57 -0
  75. package/templates/docs/02-requirements/non-functional/nfr-002.mdx +57 -0
  76. package/templates/docs/03-external/business-model.mdx +14 -0
  77. package/templates/docs/03-external/img/business-model-by-claude.xml +107 -0
  78. package/templates/docs/03-external/img/business-model.xml +84 -0
  79. package/templates/docs/03-external/img/docsVersionDropdown.png +0 -0
  80. package/templates/docs/03-external/img/gantt.xml +1 -0
  81. package/templates/docs/03-external/img/localeDropdown.png +0 -0
  82. package/templates/docs/03-external/index.mdx +46 -0
  83. package/templates/docs/04-internal/batches/_category_.yaml +2 -0
  84. package/templates/docs/04-internal/batches/import-products.mdx +64 -0
  85. package/templates/docs/04-internal/batches/index.mdx +25 -0
  86. package/templates/docs/04-internal/index.mdx +32 -0
  87. package/templates/docs/04-internal/policies/_category_.yaml +2 -0
  88. package/templates/docs/04-internal/policies/branch-naming-rules.mdx +110 -0
  89. package/templates/docs/04-internal/policies/github.mdx +100 -0
  90. package/templates/docs/04-internal/policies/pull-request-operation-flow.mdx +118 -0
  91. package/templates/docs/04-internal/rules/_category_.yaml +2 -0
  92. package/templates/docs/04-internal/rules/database.mdx +139 -0
  93. package/templates/docs/04-internal/rules/document-creation-rules.mdx +39 -0
  94. package/templates/docs/04-internal/rules/index.mdx +10 -0
  95. package/templates/docs/04-internal/rules/markdown.mdx +148 -0
  96. package/templates/docs/04-internal/rules/review-process.mdx +32 -0
  97. package/templates/docs/04-internal/screens/_category_.yaml +2 -0
  98. package/templates/docs/04-internal/screens/dashboard.mdx +17 -0
  99. package/templates/docs/04-internal/screens/index.mdx +20 -0
  100. package/templates/docs/04-internal/screens/login.mdx +18 -0
  101. package/templates/docs/04-internal/screens/menu.mdx +17 -0
  102. package/templates/docs/04-internal/tables/_category_.yaml +2 -0
  103. package/templates/docs/04-internal/tables/customer_details.mdx +35 -0
  104. package/templates/docs/04-internal/tables/customers.mdx +35 -0
  105. package/templates/docs/04-internal/tables/index.mdx +11 -0
  106. package/templates/docs/index.module.css +96 -0
  107. package/templates/docs/index.tsx +48 -0
  108. package/templates/docs/intro.md +47 -0
  109. package/templates/docs/introduction/document-editing/_category_.yml +2 -0
  110. package/templates/docs/introduction/document-editing/how-to.mdx +31 -0
  111. package/templates/docs/introduction/index.mdx +35 -0
  112. package/templates/docs/introduction/operational-policies/_category_.yaml +2 -0
  113. package/templates/docs/introduction/operational-policies/github.mdx +33 -0
  114. package/templates/docs/introduction/operational-policies/img/branch-naming-rules.svg +73 -0
  115. package/templates/docs/introduction/operational-policies/sharepoint.mdx +28 -0
  116. package/templates/package.json.template +46 -0
  117. package/templates/src/components/Highlight/index.tsx +68 -0
  118. package/templates/src/components/PriorityMatrix/index.tsx +97 -0
  119. package/templates/src/components/TBD/index.tsx +16 -0
  120. package/templates/src/css/custom.css +81 -0
  121. package/templates/src/types/requirements.ts +19 -0
  122. package/templates/static/img/business-model.drawio.svg +4 -0
  123. package/templates/static/img/gantt.drawio.svg +1152 -0
  124. package/templates/static/img/logo.svg +21 -0
  125. package/bin/commands/create.d.ts.map +0 -1
  126. package/bin/constants/languages.d.ts.map +0 -1
  127. package/bin/core/interactive-setup.d.ts.map +0 -1
  128. package/bin/core/interactive-setup.test.d.ts.map +0 -1
  129. package/bin/core/project-generator.d.ts.map +0 -1
  130. package/bin/features/index.d.ts.map +0 -1
  131. package/bin/generators/docusaurus-config.d.ts.map +0 -1
  132. package/bin/generators/package-json.d.ts.map +0 -1
  133. package/bin/generators/template-files.d.ts.map +0 -1
  134. package/bin/index.d.ts.map +0 -1
  135. package/bin/plugins/i18n-integration.d.ts +0 -25
  136. package/bin/plugins/i18n-integration.d.ts.map +0 -1
  137. package/bin/plugins/i18n-integration.js +0 -310
  138. package/bin/plugins/i18n-integration.js.map +0 -1
  139. package/bin/plugins/plantuml-integration.d.ts +0 -17
  140. package/bin/plugins/plantuml-integration.d.ts.map +0 -1
  141. package/bin/plugins/plantuml-integration.js +0 -112
  142. package/bin/plugins/plantuml-integration.js.map +0 -1
  143. package/bin/plugins/redoc-integration.d.ts +0 -25
  144. package/bin/plugins/redoc-integration.d.ts.map +0 -1
  145. package/bin/plugins/redoc-integration.js +0 -373
  146. package/bin/plugins/redoc-integration.js.map +0 -1
  147. package/bin/plugins/search-integration.d.ts +0 -20
  148. package/bin/plugins/search-integration.d.ts.map +0 -1
  149. package/bin/plugins/search-integration.js +0 -169
  150. package/bin/plugins/search-integration.js.map +0 -1
  151. package/bin/templates/index.d.ts.map +0 -1
  152. package/bin/templates/template-definitions.d.ts +0 -10
  153. package/bin/templates/template-definitions.d.ts.map +0 -1
  154. package/bin/templates/template-definitions.js +0 -517
  155. package/bin/templates/template-definitions.js.map +0 -1
  156. package/bin/tests/integration.test.d.ts.map +0 -1
  157. package/bin/types/index.d.ts.map +0 -1
  158. package/bin/utils/config-merger.d.ts.map +0 -1
  159. package/bin/utils/errors.d.ts.map +0 -1
  160. package/bin/utils/install.d.ts.map +0 -1
  161. package/bin/utils/message-formatter.d.ts.map +0 -1
  162. package/bin/utils/template-processor.d.ts.map +0 -1
  163. package/bin/utils/template-processor.test.d.ts.map +0 -1
  164. package/bin/utils/version.d.ts.map +0 -1
  165. package/templates/classic-spec/docusaurus.config.js.template +0 -106
  166. package/templates/classic-spec/package.json.template +0 -36
  167. package/templates/external-design/docusaurus.config.js.template +0 -123
  168. package/templates/external-design/package.json.template +0 -36
  169. package/templates/internal-design/docusaurus.config.js.template +0 -123
  170. package/templates/internal-design/package.json.template +0 -36
  171. package/templates/project-analysis/docusaurus.config.js.template +0 -113
  172. package/templates/project-analysis/package.json.template +0 -36
  173. package/templates/requirements/docusaurus.config.js.template +0 -119
  174. package/templates/requirements/package.json.template +0 -36
@@ -1,373 +0,0 @@
1
- // biome-ignore lint/complexity/noStaticOnlyClass: 統合クラスは静的メソッドを持つユーティリティ名前空間として設計されており、より良い組織化のため
2
- export class RedocIntegration {
3
- static getDefaultConfig() {
4
- return {
5
- specs: [
6
- {
7
- spec: 'static/openapi.yaml',
8
- route: '/api/',
9
- id: 'main-api',
10
- },
11
- ],
12
- theme: {
13
- primaryColor: '#1976d2',
14
- primaryColorDark: '#1565c0',
15
- },
16
- };
17
- }
18
- static generateDocusaurusConfig(feature) {
19
- const config = feature.config?.redocusaurus || RedocIntegration.getDefaultConfig();
20
- return {
21
- plugins: [
22
- [
23
- 'redocusaurus',
24
- {
25
- specs: config.specs || RedocIntegration.getDefaultConfig().specs,
26
- theme: config.theme || RedocIntegration.getDefaultConfig().theme,
27
- },
28
- ],
29
- ],
30
- };
31
- }
32
- static getDependencies() {
33
- return {
34
- redocusaurus: '^2.0.0',
35
- };
36
- }
37
- static generateSampleOpenAPISpec() {
38
- return `openapi: 3.0.3
39
- info:
40
- title: Sample API
41
- description: |
42
- これはサンプルAPIの仕様書です。
43
-
44
- This is a sample API specification.
45
- version: 1.0.0
46
- contact:
47
- name: API Support
48
- email: support@example.com
49
- license:
50
- name: MIT
51
- url: https://opensource.org/licenses/MIT
52
-
53
- servers:
54
- - url: https://api.example.com/v1
55
- description: Production server
56
- - url: https://staging-api.example.com/v1
57
- description: Staging server
58
-
59
- paths:
60
- /users:
61
- get:
62
- summary: ユーザー一覧を取得 (Get list of users)
63
- description: システムに登録されているユーザーの一覧を取得します
64
- tags:
65
- - Users
66
- parameters:
67
- - name: limit
68
- in: query
69
- description: 取得する件数の上限
70
- required: false
71
- schema:
72
- type: integer
73
- minimum: 1
74
- maximum: 100
75
- default: 20
76
- - name: offset
77
- in: query
78
- description: 取得開始位置
79
- required: false
80
- schema:
81
- type: integer
82
- minimum: 0
83
- default: 0
84
- responses:
85
- '200':
86
- description: ユーザー一覧の取得に成功
87
- content:
88
- application/json:
89
- schema:
90
- type: object
91
- properties:
92
- users:
93
- type: array
94
- items:
95
- $ref: '#/components/schemas/User'
96
- total:
97
- type: integer
98
- description: 総件数
99
- limit:
100
- type: integer
101
- description: 取得件数の上限
102
- offset:
103
- type: integer
104
- description: 取得開始位置
105
- '400':
106
- description: リクエストパラメータが不正
107
- content:
108
- application/json:
109
- schema:
110
- $ref: '#/components/schemas/Error'
111
- '500':
112
- description: サーバーエラー
113
- content:
114
- application/json:
115
- schema:
116
- $ref: '#/components/schemas/Error'
117
- post:
118
- summary: 新しいユーザーを作成 (Create a new user)
119
- description: 新しいユーザーをシステムに登録します
120
- tags:
121
- - Users
122
- requestBody:
123
- required: true
124
- content:
125
- application/json:
126
- schema:
127
- $ref: '#/components/schemas/CreateUserRequest'
128
- responses:
129
- '201':
130
- description: ユーザーの作成に成功
131
- content:
132
- application/json:
133
- schema:
134
- $ref: '#/components/schemas/User'
135
- '400':
136
- description: リクエストボディが不正
137
- content:
138
- application/json:
139
- schema:
140
- $ref: '#/components/schemas/Error'
141
- '409':
142
- description: ユーザーが既に存在
143
- content:
144
- application/json:
145
- schema:
146
- $ref: '#/components/schemas/Error'
147
- '500':
148
- description: サーバーエラー
149
- content:
150
- application/json:
151
- schema:
152
- $ref: '#/components/schemas/Error'
153
-
154
- /users/{userId}:
155
- get:
156
- summary: ユーザー詳細を取得 (Get user details)
157
- description: 指定されたIDのユーザー詳細情報を取得します
158
- tags:
159
- - Users
160
- parameters:
161
- - name: userId
162
- in: path
163
- required: true
164
- description: ユーザーID
165
- schema:
166
- type: string
167
- format: uuid
168
- responses:
169
- '200':
170
- description: ユーザー詳細の取得に成功
171
- content:
172
- application/json:
173
- schema:
174
- $ref: '#/components/schemas/User'
175
- '404':
176
- description: ユーザーが見つからない
177
- content:
178
- application/json:
179
- schema:
180
- $ref: '#/components/schemas/Error'
181
- '500':
182
- description: サーバーエラー
183
- content:
184
- application/json:
185
- schema:
186
- $ref: '#/components/schemas/Error'
187
-
188
- components:
189
- schemas:
190
- User:
191
- type: object
192
- required:
193
- - id
194
- - name
195
- - email
196
- - createdAt
197
- properties:
198
- id:
199
- type: string
200
- format: uuid
201
- description: ユーザーID
202
- example: "123e4567-e89b-12d3-a456-426614174000"
203
- name:
204
- type: string
205
- description: ユーザー名
206
- minLength: 1
207
- maxLength: 100
208
- example: "田中太郎"
209
- email:
210
- type: string
211
- format: email
212
- description: メールアドレス
213
- example: "tanaka@example.com"
214
- age:
215
- type: integer
216
- description: 年齢
217
- minimum: 0
218
- maximum: 150
219
- example: 30
220
- createdAt:
221
- type: string
222
- format: date-time
223
- description: 作成日時
224
- example: "2023-01-01T00:00:00Z"
225
- updatedAt:
226
- type: string
227
- format: date-time
228
- description: 更新日時
229
- example: "2023-01-01T00:00:00Z"
230
-
231
- CreateUserRequest:
232
- type: object
233
- required:
234
- - name
235
- - email
236
- properties:
237
- name:
238
- type: string
239
- description: ユーザー名
240
- minLength: 1
241
- maxLength: 100
242
- example: "田中太郎"
243
- email:
244
- type: string
245
- format: email
246
- description: メールアドレス
247
- example: "tanaka@example.com"
248
- age:
249
- type: integer
250
- description: 年齢
251
- minimum: 0
252
- maximum: 150
253
- example: 30
254
-
255
- Error:
256
- type: object
257
- required:
258
- - code
259
- - message
260
- properties:
261
- code:
262
- type: string
263
- description: エラーコード
264
- example: "INVALID_REQUEST"
265
- message:
266
- type: string
267
- description: エラーメッセージ
268
- example: "リクエストパラメータが不正です"
269
- details:
270
- type: object
271
- description: エラーの詳細情報
272
- additionalProperties: true
273
-
274
- securitySchemes:
275
- BearerAuth:
276
- type: http
277
- scheme: bearer
278
- bearerFormat: JWT
279
-
280
- security:
281
- - BearerAuth: []
282
-
283
- tags:
284
- - name: Users
285
- description: ユーザー管理API (User management API)
286
- `;
287
- }
288
- static generateSampleDocumentation() {
289
- return `# API Documentation
290
-
291
- このページではRedocを使用してOpenAPI仕様書を表示しています。
292
-
293
- ## API概要
294
-
295
- Sample APIは、ユーザー管理機能を提供するRESTful APIです。
296
-
297
- ### 主な機能
298
-
299
- 1. **ユーザー管理**
300
- - ユーザー一覧の取得
301
- - ユーザー詳細の取得
302
- - 新しいユーザーの作成
303
-
304
- ### 認証
305
-
306
- このAPIはJWT(JSON Web Token)を使用したBearer認証を採用しています。
307
-
308
- ### レスポンス形式
309
-
310
- すべてのAPIレスポンスはJSON形式で返されます。
311
-
312
- ### エラーハンドリング
313
-
314
- エラーが発生した場合、適切なHTTPステータスコードとエラー情報を含むJSONレスポンスが返されます。
315
-
316
- ## API仕様書
317
-
318
- 以下のRedocビューアーでAPI仕様書の詳細を確認できます:
319
-
320
- import Redoc from '@theme/Redoc';
321
-
322
- <Redoc specUrl="/openapi.yaml" />
323
-
324
- ## 使用例
325
-
326
- ### ユーザー一覧の取得
327
-
328
- \`\`\`bash
329
- curl -X GET "https://api.example.com/v1/users?limit=10&offset=0" \\
330
- -H "Authorization: Bearer YOUR_JWT_TOKEN"
331
- \`\`\`
332
-
333
- ### 新しいユーザーの作成
334
-
335
- \`\`\`bash
336
- curl -X POST "https://api.example.com/v1/users" \\
337
- -H "Content-Type: application/json" \\
338
- -H "Authorization: Bearer YOUR_JWT_TOKEN" \\
339
- -d '{
340
- "name": "田中太郎",
341
- "email": "tanaka@example.com",
342
- "age": 30
343
- }'
344
- \`\`\`
345
-
346
- 詳細な使用方法については、上記のAPI仕様書を参照してください。
347
- `;
348
- }
349
- static validateConfig(config) {
350
- if (!config.specs || config.specs.length === 0) {
351
- return {
352
- valid: false,
353
- message: 'At least one OpenAPI spec must be configured',
354
- };
355
- }
356
- for (const spec of config.specs) {
357
- if (!spec.spec || !spec.route) {
358
- return {
359
- valid: false,
360
- message: 'Each spec must have both "spec" and "route" properties',
361
- };
362
- }
363
- if (!spec.route.startsWith('/')) {
364
- return {
365
- valid: false,
366
- message: 'Route must start with "/"',
367
- };
368
- }
369
- }
370
- return { valid: true };
371
- }
372
- }
373
- //# sourceMappingURL=redoc-integration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redoc-integration.js","sourceRoot":"","sources":["../../src/plugins/redoc-integration.ts"],"names":[],"mappings":"AAgBA,kGAAkG;AAClG,MAAM,OAAO,gBAAgB;IAC3B,MAAM,CAAC,gBAAgB;QACrB,OAAO;YACL,KAAK,EAAE;gBACL;oBACE,IAAI,EAAE,qBAAqB;oBAC3B,KAAK,EAAE,OAAO;oBACd,EAAE,EAAE,UAAU;iBACf;aACF;YACD,KAAK,EAAE;gBACL,YAAY,EAAE,SAAS;gBACvB,gBAAgB,EAAE,SAAS;aAC5B;SACF,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,OAAyB;QACvD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,YAAY,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,CAAC;QAEnF,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,cAAc;oBACd;wBACE,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,CAAC,KAAK;wBAChE,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,CAAC,KAAK;qBACjE;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,eAAe;QACpB,OAAO;YACL,YAAY,EAAE,QAAQ;SACvB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,yBAAyB;QAC9B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwPV,CAAC;IACA,CAAC;IAED,MAAM,CAAC,2BAA2B;QAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DV,CAAC;IACA,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,MAAmB;QACvC,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/C,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,8CAA8C;aACxD,CAAC;QACJ,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;gBAC9B,OAAO;oBACL,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,wDAAwD;iBAClE,CAAC;YACJ,CAAC;YAED,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;gBAChC,OAAO;oBACL,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,2BAA2B;iBACrC,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;CACF"}
@@ -1,20 +0,0 @@
1
- import type { FeatureSelection } from '../types/index.js';
2
- export interface SearchConfig {
3
- hashed?: boolean;
4
- language?: string[];
5
- removeDefaultStopWordFilter?: boolean;
6
- highlightSearchTermsOnTargetPage?: boolean;
7
- searchResultLimits?: number;
8
- searchResultContextMaxLength?: number;
9
- }
10
- export declare class SearchIntegration {
11
- static getDefaultConfig(): SearchConfig;
12
- static generateDocusaurusConfig(feature: FeatureSelection): any;
13
- static getDependencies(): Record<string, string>;
14
- static generateSearchDocumentation(): string;
15
- static validateConfig(config: SearchConfig): {
16
- valid: boolean;
17
- message?: string;
18
- };
19
- }
20
- //# sourceMappingURL=search-integration.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-integration.d.ts","sourceRoot":"","sources":["../../src/plugins/search-integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4BAA4B,CAAC,EAAE,MAAM,CAAC;CACvC;AAGD,qBAAa,iBAAiB;IAC5B,MAAM,CAAC,gBAAgB,IAAI,YAAY;IAWvC,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,GAAG,GAAG;IA0B/D,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAMhD,MAAM,CAAC,2BAA2B,IAAI,MAAM;IAsG5C,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;CA+BlF"}
@@ -1,169 +0,0 @@
1
- import { LANG } from '../constants/languages.js';
2
- // biome-ignore lint/complexity/noStaticOnlyClass: 統合クラスは静的メソッドを持つユーティリティ名前空間として設計されており、より良い組織化のため
3
- export class SearchIntegration {
4
- static getDefaultConfig() {
5
- return {
6
- hashed: false,
7
- language: [LANG.EN.code, 'ja'],
8
- removeDefaultStopWordFilter: false,
9
- highlightSearchTermsOnTargetPage: true,
10
- searchResultLimits: 8,
11
- searchResultContextMaxLength: 50,
12
- };
13
- }
14
- static generateDocusaurusConfig(feature) {
15
- const config = feature.config?.search || SearchIntegration.getDefaultConfig();
16
- return {
17
- themes: [
18
- [
19
- '@easyops-cn/docusaurus-search-local',
20
- {
21
- hashed: config.hashed,
22
- language: config.language,
23
- removeDefaultStopWordFilter: config.removeDefaultStopWordFilter,
24
- highlightSearchTermsOnTargetPage: config.highlightSearchTermsOnTargetPage,
25
- searchResultLimits: config.searchResultLimits,
26
- searchResultContextMaxLength: config.searchResultContextMaxLength,
27
- // 日本語検索の最適化
28
- indexDocs: true,
29
- indexBlog: true,
30
- indexPages: false,
31
- docsRouteBasePath: '/docs',
32
- blogRouteBasePath: '/blog',
33
- },
34
- ],
35
- ],
36
- };
37
- }
38
- static getDependencies() {
39
- return {
40
- '@easyops-cn/docusaurus-search-local': '^0.52.2',
41
- };
42
- }
43
- static generateSearchDocumentation() {
44
- return `# 検索機能 (Search Functionality)
45
-
46
- このドキュメントサイトには@easyops-cn/docusaurus-search-localを使用したローカル検索機能が統合されています。
47
-
48
- ## 使用方法
49
-
50
- 1. **キーボードショートカット**
51
- - \`Ctrl + K\` (Windows/Linux) または \`Cmd + K\` (Mac) で検索ボックスを開く
52
- - \`/\` キーでも検索ボックスを開くことができます
53
-
54
- 2. **検索ボックス**
55
- - ナビゲーションバーの検索アイコンをクリック
56
- - 検索したいキーワードを入力
57
-
58
- ## 検索のコツ
59
-
60
- ### 基本的な検索
61
-
62
- - **単語検索**: 単語を入力するだけで関連するページを検索
63
- - **フレーズ検索**: 引用符で囲むと完全一致検索
64
- - **部分一致**: 単語の一部でも検索可能
65
-
66
- ### 高度な検索
67
-
68
- - **AND検索**: 複数のキーワードをスペースで区切る
69
- - **除外検索**: \`-keyword\` で特定の単語を除外
70
-
71
- ### 日本語検索
72
-
73
- - ひらがな、カタカナ、漢字での検索に対応
74
- - 部分一致検索が可能
75
- - 英語と日本語の混在検索も可能
76
-
77
- ## 検索対象
78
-
79
- 以下のコンテンツが検索対象となります:
80
-
81
- - ドキュメントページのタイトル
82
- - ドキュメントの本文
83
- - ヘッダー(見出し)
84
- - ブログ記事(有効な場合)
85
-
86
- ## 検索結果
87
-
88
- 検索結果には以下の情報が表示されます:
89
-
90
- - **ページタイトル**: 該当するページの名前
91
- - **セクション**: 該当する見出しレベル
92
- - **プレビュー**: 検索キーワード周辺のテキスト
93
- - **パンくずリスト**: ページの階層構造
94
-
95
- ## 設定オプション
96
-
97
- ### 基本設定
98
-
99
- - **hashed**: 検索インデックスのハッシュ化(デフォルト: false)
100
- - **language**: 検索対象言語(デフォルト: ['en', 'ja'])
101
- - **removeDefaultStopWordFilter**: デフォルトストップワードフィルターの無効化
102
- - **highlightSearchTermsOnTargetPage**: 検索語のハイライト表示
103
- - **searchResultLimits**: 検索結果の表示件数制限
104
- - **searchResultContextMaxLength**: 検索結果コンテキストの最大長
105
-
106
- ### 詳細設定
107
-
108
- - **indexDocs**: ドキュメントのインデックス化(デフォルト: true)
109
- - **indexBlog**: ブログのインデックス化(デフォルト: true)
110
- - **indexPages**: 静的ページのインデックス化(デフォルト: false)
111
-
112
- ## トラブルシューティング
113
-
114
- ### 検索結果が表示されない場合
115
-
116
- 1. **キーワードの確認**
117
- - スペルミスがないか確認
118
- - 別の表現や類義語を試す
119
-
120
- 2. **検索範囲の確認**
121
- - 該当するコンテンツが存在するか確認
122
- - 最近追加されたコンテンツは検索インデックスの更新が必要な場合があります
123
-
124
- 3. **ブラウザの確認**
125
- - ブラウザのキャッシュをクリア
126
- - JavaScriptが有効になっているか確認
127
-
128
- ### 検索が遅い場合
129
-
130
- - より具体的なキーワードを使用
131
- - 検索結果を絞り込むために追加のキーワードを使用
132
-
133
- ### 日本語検索で問題がある場合
134
-
135
- - 異なる表記(ひらがな/カタカナ/漢字)を試す
136
- - 英語での検索も併用する
137
-
138
- ## 参考資料
139
-
140
- - [@easyops-cn/docusaurus-search-local ドキュメント](https://github.com/easyops-cn/docusaurus-search-local)
141
- - [Docusaurus 検索ガイド](https://docusaurus.io/docs/search)
142
- `;
143
- }
144
- static validateConfig(config) {
145
- if (config.language && !Array.isArray(config.language)) {
146
- return {
147
- valid: false,
148
- message: 'Search language must be an array',
149
- };
150
- }
151
- if (config.searchResultLimits &&
152
- (typeof config.searchResultLimits !== 'number' || config.searchResultLimits <= 0)) {
153
- return {
154
- valid: false,
155
- message: 'Search result limits must be a positive number',
156
- };
157
- }
158
- if (config.searchResultContextMaxLength &&
159
- (typeof config.searchResultContextMaxLength !== 'number' ||
160
- config.searchResultContextMaxLength <= 0)) {
161
- return {
162
- valid: false,
163
- message: 'Search result context max length must be a positive number',
164
- };
165
- }
166
- return { valid: true };
167
- }
168
- }
169
- //# sourceMappingURL=search-integration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-integration.js","sourceRoot":"","sources":["../../src/plugins/search-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAWjD,kGAAkG;AAClG,MAAM,OAAO,iBAAiB;IAC5B,MAAM,CAAC,gBAAgB;QACrB,OAAO;YACL,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;YAC9B,2BAA2B,EAAE,KAAK;YAClC,gCAAgC,EAAE,IAAI;YACtC,kBAAkB,EAAE,CAAC;YACrB,4BAA4B,EAAE,EAAE;SACjC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,OAAyB;QACvD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,MAAM,IAAI,iBAAiB,CAAC,gBAAgB,EAAE,CAAC;QAE9E,OAAO;YACL,MAAM,EAAE;gBACN;oBACE,qCAAqC;oBACrC;wBACE,MAAM,EAAE,MAAM,CAAC,MAAM;wBACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;wBACzB,2BAA2B,EAAE,MAAM,CAAC,2BAA2B;wBAC/D,gCAAgC,EAAE,MAAM,CAAC,gCAAgC;wBACzE,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;wBAC7C,4BAA4B,EAAE,MAAM,CAAC,4BAA4B;wBACjE,YAAY;wBACZ,SAAS,EAAE,IAAI;wBACf,SAAS,EAAE,IAAI;wBACf,UAAU,EAAE,KAAK;wBACjB,iBAAiB,EAAE,OAAO;wBAC1B,iBAAiB,EAAE,OAAO;qBAC3B;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,eAAe;QACpB,OAAO;YACL,qCAAqC,EAAE,SAAS;SACjD,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,2BAA2B;QAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGV,CAAC;IACA,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,MAAoB;QACxC,IAAI,MAAM,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YACvD,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,kCAAkC;aAC5C,CAAC;QACJ,CAAC;QAED,IACE,MAAM,CAAC,kBAAkB;YACzB,CAAC,OAAO,MAAM,CAAC,kBAAkB,KAAK,QAAQ,IAAI,MAAM,CAAC,kBAAkB,IAAI,CAAC,CAAC,EACjF,CAAC;YACD,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,gDAAgD;aAC1D,CAAC;QACJ,CAAC;QAED,IACE,MAAM,CAAC,4BAA4B;YACnC,CAAC,OAAO,MAAM,CAAC,4BAA4B,KAAK,QAAQ;gBACtD,MAAM,CAAC,4BAA4B,IAAI,CAAC,CAAC,EAC3C,CAAC;YACD,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,4DAA4D;aACtE,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAkEhE,wBAAgB,qBAAqB,CAAC,QAAQ,GAAE,QAAuB,GAAG,YAAY,EAAE,CAOvF"}
@@ -1,10 +0,0 @@
1
- import type { TemplateConfig } from '../types/index.js';
2
- export declare const templateDefinitions: Record<string, TemplateConfig>;
3
- export declare function getTemplateDefinition(templateName: string): TemplateConfig | undefined;
4
- export declare function getAllTemplateNames(): string[];
5
- export declare function getTemplateDisplayNames(): Array<{
6
- name: string;
7
- displayName: string;
8
- description: string;
9
- }>;
10
- //# sourceMappingURL=template-definitions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"template-definitions.d.ts","sourceRoot":"","sources":["../../src/templates/template-definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CA8f9D,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAEtF;AAED,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C;AAED,wBAAgB,uBAAuB,IAAI,KAAK,CAAC;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC,CAMD"}