@cmflow/atlas 3.7.1 → 3.8.1
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/README.md +14 -0
- package/dist/{UserConfig-BlRknCRh.d.mts → UserConfig-CIMgqCt1.d.mts} +9 -4
- package/dist/bin/atlas.mjs +270 -157
- package/dist/bin/atlas.mjs.map +1 -1
- package/dist/{dist-D8VumL0r.mjs → dist-DIU2ATkt.mjs} +231 -10
- package/dist/dist-DIU2ATkt.mjs.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +24 -7
- package/dist/index.mjs.map +1 -1
- package/dist/rules/lodashGetRule.d.mts +1 -1
- package/dist/rules/mappingUtilityRule.d.mts +1 -1
- package/dist/rules/memberGetFieldRule.d.mts +1 -1
- package/package.json +2 -1
- package/dist/dist-D8VumL0r.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -109,17 +109,31 @@ type BackendProperty =
|
|
|
109
109
|
document: string;
|
|
110
110
|
field: string;
|
|
111
111
|
description?: string;
|
|
112
|
+
data_type?: PropertyDataType;
|
|
113
|
+
original_type?: string;
|
|
114
|
+
format?: string;
|
|
115
|
+
pattern?: string;
|
|
116
|
+
is_nullable?: boolean;
|
|
117
|
+
enum_values?: string[];
|
|
112
118
|
}
|
|
113
119
|
| {
|
|
114
120
|
route: string;
|
|
115
121
|
method: string;
|
|
116
122
|
field: string;
|
|
117
123
|
description?: string;
|
|
124
|
+
data_type?: PropertyDataType;
|
|
125
|
+
original_type?: string;
|
|
126
|
+
format?: string;
|
|
127
|
+
pattern?: string;
|
|
128
|
+
is_nullable?: boolean;
|
|
129
|
+
enum_values?: string[];
|
|
118
130
|
};
|
|
119
131
|
```
|
|
120
132
|
|
|
121
133
|
The generated mapping preserves this shape. In particular, `document` is a separate property: Atlas does not turn a Quable field into an artificial path such as `products.product_geographical_area`.
|
|
122
134
|
|
|
135
|
+
`data_type` is the canonical Atlas value used to resolve the `data_type` predefined value in Directus (`string`, `integer`, `boolean`, `string[]`, ...). `original_type`, `format`, `pattern`, `is_nullable`, `enum_values`, and `description` are preserved from the configured source and written to their matching Directus fields. Use `original_type` for the backend's unnormalized keyword, such as `localized_text`; it is not inferred from `data_type`.
|
|
136
|
+
|
|
123
137
|
## Resolved backend metadata artifacts
|
|
124
138
|
|
|
125
139
|
At the start of `generate:graph` and `generate:catalog`, Atlas resolves every configured backend source and writes its metadata for inspection:
|
|
@@ -23,22 +23,27 @@ type Direction = "input" | "output";
|
|
|
23
23
|
type PropertyLocation = "query" | "path" | "header" | "body";
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/interfaces/PropertyMetadata.d.ts
|
|
26
|
+
type PropertyDataType = "unknow" | "string" | "uuid" | "number" | "integer" | "float" | "double" | "long" | "decimal" | "boolean" | "date" | "date-time" | "time" | "timestamp" | "object" | "uuid[]" | "string[]" | "number[]" | "integer[]" | "float[]" | "double[]" | "long[]" | "decimal[]" | "boolean[]" | "date[]" | "date-time[]" | "time[]" | "timestamp[]" | "object[]";
|
|
26
27
|
interface PropertyMetadata {
|
|
27
28
|
direction?: Direction;
|
|
28
29
|
location?: PropertyLocation;
|
|
29
|
-
|
|
30
|
+
data_type?: PropertyDataType;
|
|
31
|
+
original_type?: string;
|
|
32
|
+
format?: string;
|
|
33
|
+
pattern?: string;
|
|
34
|
+
is_nullable?: boolean;
|
|
35
|
+
enum_values?: string[];
|
|
36
|
+
description?: string;
|
|
30
37
|
}
|
|
31
38
|
//#endregion
|
|
32
39
|
//#region src/interfaces/BackendProperty.d.ts
|
|
33
40
|
type BackendProperty = PropertyMetadata & ({
|
|
34
41
|
document: string;
|
|
35
42
|
field: string;
|
|
36
|
-
description?: string;
|
|
37
43
|
} | {
|
|
38
44
|
route: string;
|
|
39
45
|
method: string;
|
|
40
46
|
field: string;
|
|
41
|
-
description?: string;
|
|
42
47
|
});
|
|
43
48
|
//#endregion
|
|
44
49
|
//#region src/interfaces/BackendSource.d.ts
|
|
@@ -139,4 +144,4 @@ interface UserConfig {
|
|
|
139
144
|
}
|
|
140
145
|
//#endregion
|
|
141
146
|
export { defineExpressionRule as a, FieldExtractionRule as i, BackendSource as n, BackendProperty as r, UserConfig as t };
|
|
142
|
-
//# sourceMappingURL=UserConfig-
|
|
147
|
+
//# sourceMappingURL=UserConfig-CIMgqCt1.d.mts.map
|