@famgia/omnify-typescript 0.0.73 → 0.0.74
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/index.cjs +11 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin.cjs +11 -10
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-NFJACF72.js +0 -2220
- package/dist/chunk-NFJACF72.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2032,9 +2032,10 @@ export function getMessages(locale: string): Record<string, string> {
|
|
|
2032
2032
|
}
|
|
2033
2033
|
function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
|
|
2034
2034
|
const parts = [generateBaseHeader()];
|
|
2035
|
+
const ext = getImportExt(options);
|
|
2035
2036
|
parts.push(`// Common Types
|
|
2036
2037
|
`);
|
|
2037
|
-
parts.push(`export type { LocaleMap, Locale, ValidationRule, DateTimeString, DateString } from './common
|
|
2038
|
+
parts.push(`export type { LocaleMap, Locale, ValidationRule, DateTimeString, DateString } from './common${ext}';
|
|
2038
2039
|
|
|
2039
2040
|
`);
|
|
2040
2041
|
parts.push(`// i18n (Internationalization)
|
|
@@ -2053,7 +2054,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
|
|
|
2053
2054
|
`);
|
|
2054
2055
|
parts.push(` getMessages,
|
|
2055
2056
|
`);
|
|
2056
|
-
parts.push(`} from './i18n
|
|
2057
|
+
parts.push(`} from './i18n${ext}';
|
|
2057
2058
|
|
|
2058
2059
|
`);
|
|
2059
2060
|
const enumPrefix = options.enumImportPrefix ?? "./enum";
|
|
@@ -2073,7 +2074,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
|
|
|
2073
2074
|
`);
|
|
2074
2075
|
parts.push(` get${enumDef.name}Extra,
|
|
2075
2076
|
`);
|
|
2076
|
-
parts.push(`} from '${enumPrefix}/${enumDef.name}
|
|
2077
|
+
parts.push(`} from '${enumPrefix}/${enumDef.name}${ext}';
|
|
2077
2078
|
`);
|
|
2078
2079
|
}
|
|
2079
2080
|
parts.push("\n");
|
|
@@ -2094,7 +2095,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
|
|
|
2094
2095
|
`);
|
|
2095
2096
|
parts.push(` get${enumDef.name}Extra,
|
|
2096
2097
|
`);
|
|
2097
|
-
parts.push(`} from '${enumPrefix}/plugin/${enumDef.name}
|
|
2098
|
+
parts.push(`} from '${enumPrefix}/plugin/${enumDef.name}${ext}';
|
|
2098
2099
|
`);
|
|
2099
2100
|
}
|
|
2100
2101
|
parts.push("\n");
|
|
@@ -2115,7 +2116,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
|
|
|
2115
2116
|
`);
|
|
2116
2117
|
parts.push(` get${alias.name}Extra,
|
|
2117
2118
|
`);
|
|
2118
|
-
parts.push(`} from '${enumPrefix}/${alias.name}
|
|
2119
|
+
parts.push(`} from '${enumPrefix}/${alias.name}${ext}';
|
|
2119
2120
|
`);
|
|
2120
2121
|
}
|
|
2121
2122
|
parts.push("\n");
|
|
@@ -2127,7 +2128,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
|
|
|
2127
2128
|
if (schema.kind === "enum") continue;
|
|
2128
2129
|
if (schema.options?.hidden === true) continue;
|
|
2129
2130
|
const lowerName = schema.name.charAt(0).toLowerCase() + schema.name.slice(1);
|
|
2130
|
-
parts.push(`export type { ${schema.name}, ${schema.name}Create, ${schema.name}Update } from './${schema.name}
|
|
2131
|
+
parts.push(`export type { ${schema.name}, ${schema.name}Create, ${schema.name}Update } from './${schema.name}${ext}';
|
|
2131
2132
|
`);
|
|
2132
2133
|
parts.push(`export {
|
|
2133
2134
|
`);
|
|
@@ -2145,7 +2146,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
|
|
|
2145
2146
|
`);
|
|
2146
2147
|
parts.push(` get${schema.name}FieldPlaceholder,
|
|
2147
2148
|
`);
|
|
2148
|
-
parts.push(`} from './${schema.name}
|
|
2149
|
+
parts.push(`} from './${schema.name}${ext}';
|
|
2149
2150
|
`);
|
|
2150
2151
|
}
|
|
2151
2152
|
} else {
|
|
@@ -2154,9 +2155,9 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
|
|
|
2154
2155
|
for (const schema of Object.values(schemas)) {
|
|
2155
2156
|
if (schema.kind === "enum") continue;
|
|
2156
2157
|
if (schema.options?.hidden === true) continue;
|
|
2157
|
-
parts.push(`export type { ${schema.name} } from './${schema.name}
|
|
2158
|
+
parts.push(`export type { ${schema.name} } from './${schema.name}${ext}';
|
|
2158
2159
|
`);
|
|
2159
|
-
parts.push(`export type { ${schema.name}Create, ${schema.name}Update } from './base/${schema.name}
|
|
2160
|
+
parts.push(`export type { ${schema.name}Create, ${schema.name}Update } from './base/${schema.name}${ext}';
|
|
2160
2161
|
`);
|
|
2161
2162
|
}
|
|
2162
2163
|
if (options.generateRules) {
|
|
@@ -2174,7 +2175,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
|
|
|
2174
2175
|
`);
|
|
2175
2176
|
parts.push(` get${schema.name}PropertyDisplayName,
|
|
2176
2177
|
`);
|
|
2177
|
-
parts.push(`} from './rules/${schema.name}.rules
|
|
2178
|
+
parts.push(`} from './rules/${schema.name}.rules${ext}';
|
|
2178
2179
|
`);
|
|
2179
2180
|
}
|
|
2180
2181
|
}
|