@zodic/shared 0.0.245 → 0.0.247
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/app/services/ConceptService.ts +26 -0
- package/db/migrations/0002_reflective_firelord.sql +13 -0
- package/db/migrations/meta/0002_snapshot.json +2284 -0
- package/db/migrations/meta/_journal.json +7 -0
- package/db/schema.ts +18 -0
- package/package.json +1 -1
- package/types/scopes/generic.ts +29 -9
- package/types/scopes/legacy.ts +41 -0
- package/utils/astroPrompts/index.ts +78 -0
|
@@ -10,6 +10,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
10
10
|
import { cleanText, schema } from '../..';
|
|
11
11
|
import {
|
|
12
12
|
aspectReports,
|
|
13
|
+
astroFeatureReports,
|
|
13
14
|
astroReports,
|
|
14
15
|
conceptsData,
|
|
15
16
|
houseReports,
|
|
@@ -2048,6 +2049,31 @@ export class ConceptService {
|
|
|
2048
2049
|
eq(aspectReports.aspect, params.aspectingType)
|
|
2049
2050
|
);
|
|
2050
2051
|
break;
|
|
2052
|
+
case "feature":
|
|
2053
|
+
table = astroFeatureReports;
|
|
2054
|
+
let nameValue: string;
|
|
2055
|
+
if (params.featureType === "element") {
|
|
2056
|
+
switch (params.subtype) {
|
|
2057
|
+
case "balanced":
|
|
2058
|
+
nameValue = "balanced";
|
|
2059
|
+
break;
|
|
2060
|
+
case "pure":
|
|
2061
|
+
nameValue = params.dominantElement;
|
|
2062
|
+
break;
|
|
2063
|
+
case "preponderant_lacking":
|
|
2064
|
+
nameValue = `${params.dominantElement}-${params.lackingElement}`;
|
|
2065
|
+
break;
|
|
2066
|
+
default:
|
|
2067
|
+
throw new Error(`Unknown element subtype: ${(params as any).subtype}`);
|
|
2068
|
+
}
|
|
2069
|
+
} else {
|
|
2070
|
+
nameValue = params.name;
|
|
2071
|
+
}
|
|
2072
|
+
whereClause = and(
|
|
2073
|
+
eq(astroFeatureReports.featureType, params.featureType),
|
|
2074
|
+
eq(astroFeatureReports.name, nameValue)
|
|
2075
|
+
);
|
|
2076
|
+
break;
|
|
2051
2077
|
default:
|
|
2052
2078
|
throw new Error(`Unknown report type: ${(params as any).reportType}`);
|
|
2053
2079
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
CREATE TABLE `astro_feature_reports` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`feature_type` text NOT NULL,
|
|
4
|
+
`name` text NOT NULL,
|
|
5
|
+
`en_description` text,
|
|
6
|
+
`pt_description` text,
|
|
7
|
+
`en_report` text,
|
|
8
|
+
`pt_report` text,
|
|
9
|
+
`created_at` integer DEFAULT CURRENT_TIMESTAMP,
|
|
10
|
+
`updated_at` integer DEFAULT CURRENT_TIMESTAMP
|
|
11
|
+
);
|
|
12
|
+
--> statement-breakpoint
|
|
13
|
+
CREATE INDEX `astro_feature_reports_type_name_idx` ON `astro_feature_reports` (`feature_type`,`name`);
|