sonamu 0.10.2 → 0.10.4
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/dist/api/sonamu.js +1 -1
- package/dist/database/puri.d.ts +4 -1
- package/dist/database/puri.d.ts.map +1 -1
- package/dist/database/puri.js +18 -1
- package/dist/database/puri.types.d.ts +16 -2
- package/dist/database/puri.types.d.ts.map +1 -1
- package/dist/database/puri.types.js +1 -1
- package/dist/migration/postgresql-schema-reader.d.ts.map +1 -1
- package/dist/migration/postgresql-schema-reader.js +2 -3
- package/dist/naite/naite-reporter.d.ts.map +1 -1
- package/dist/naite/naite-reporter.js +10 -2
- package/dist/template/implementations/generated.template.d.ts.map +1 -1
- package/dist/template/implementations/generated.template.js +8 -3
- package/dist/ui-web/assets/index-CDd6xT-F.js +170 -0
- package/dist/ui-web/index.html +1 -1
- package/package.json +2 -2
- package/src/api/__tests__/sonamu.websocket.test.ts +100 -2
- package/src/api/sonamu.ts +3 -3
- package/src/database/__tests__/puri.test.ts +66 -0
- package/src/database/puri.ts +40 -0
- package/src/database/puri.types.test-d.ts +115 -1
- package/src/database/puri.types.ts +26 -2
- package/src/migration/postgresql-schema-reader.ts +1 -2
- package/src/naite/naite-reporter.ts +10 -1
- package/src/skills/sonamu/puri.md +28 -0
- package/src/template/__tests__/generated.template.search-text.test.ts +17 -2
- package/src/template/generated.template.test-d.ts +21 -1
- package/src/template/implementations/generated.template.ts +15 -1
- package/dist/ui-web/assets/index-DFStGyd0.js +0 -202
|
@@ -215,6 +215,14 @@ export class Template__generated extends Template {
|
|
|
215
215
|
.filter((prop) => prop.type === "vector" || prop.type === "vector[]")
|
|
216
216
|
.map((prop) => prop.name);
|
|
217
217
|
|
|
218
|
+
/**
|
|
219
|
+
* JSON props
|
|
220
|
+
* - json 타입인 컬럼
|
|
221
|
+
*/
|
|
222
|
+
const jsonColumns = entity.props
|
|
223
|
+
.filter((prop) => prop.type === "json")
|
|
224
|
+
.map((prop) => prop.name);
|
|
225
|
+
|
|
218
226
|
/**
|
|
219
227
|
* generated props
|
|
220
228
|
* - generated 속성이 있는 컬럼 (INSERT/UPDATE 시 값 제공 불가)
|
|
@@ -232,7 +240,8 @@ export class Template__generated extends Template {
|
|
|
232
240
|
virtualQueryProps.length > 0 ||
|
|
233
241
|
hasDefaultColumns.length > 0 ||
|
|
234
242
|
generatedColumns.length > 0 ||
|
|
235
|
-
hasVectorColumns.length > 0
|
|
243
|
+
hasVectorColumns.length > 0 ||
|
|
244
|
+
jsonColumns.length > 0;
|
|
236
245
|
|
|
237
246
|
const lines = [
|
|
238
247
|
`export const ${schemaName} = ${schemaBody};`,
|
|
@@ -264,6 +273,11 @@ export class Template__generated extends Template {
|
|
|
264
273
|
? `readonly __vector__: readonly [${hasVectorColumns
|
|
265
274
|
.map((col) => `"${col}"`)
|
|
266
275
|
.join(", ")}],`
|
|
276
|
+
: "") +
|
|
277
|
+
(jsonColumns.length > 0
|
|
278
|
+
? `readonly __json__: readonly [${jsonColumns
|
|
279
|
+
.map((col) => `"${col}"`)
|
|
280
|
+
.join(", ")}],`
|
|
267
281
|
: "")
|
|
268
282
|
}}`
|
|
269
283
|
: "") +
|