@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.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  toEnumName,
25
25
  toInterfaceName,
26
26
  toPropertyName
27
- } from "./chunk-NFJACF72.js";
27
+ } from "./chunk-LHNMWILH.js";
28
28
 
29
29
  // src/stubs.ts
30
30
  import fs from "fs";
package/dist/plugin.cjs CHANGED
@@ -1992,9 +1992,10 @@ export function getMessages(locale: string): Record<string, string> {
1992
1992
  }
1993
1993
  function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
1994
1994
  const parts = [generateBaseHeader()];
1995
+ const ext = getImportExt(options);
1995
1996
  parts.push(`// Common Types
1996
1997
  `);
1997
- parts.push(`export type { LocaleMap, Locale, ValidationRule, DateTimeString, DateString } from './common.js';
1998
+ parts.push(`export type { LocaleMap, Locale, ValidationRule, DateTimeString, DateString } from './common${ext}';
1998
1999
 
1999
2000
  `);
2000
2001
  parts.push(`// i18n (Internationalization)
@@ -2013,7 +2014,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
2013
2014
  `);
2014
2015
  parts.push(` getMessages,
2015
2016
  `);
2016
- parts.push(`} from './i18n.js';
2017
+ parts.push(`} from './i18n${ext}';
2017
2018
 
2018
2019
  `);
2019
2020
  const enumPrefix = options.enumImportPrefix ?? "./enum";
@@ -2033,7 +2034,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
2033
2034
  `);
2034
2035
  parts.push(` get${enumDef.name}Extra,
2035
2036
  `);
2036
- parts.push(`} from '${enumPrefix}/${enumDef.name}.js';
2037
+ parts.push(`} from '${enumPrefix}/${enumDef.name}${ext}';
2037
2038
  `);
2038
2039
  }
2039
2040
  parts.push("\n");
@@ -2054,7 +2055,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
2054
2055
  `);
2055
2056
  parts.push(` get${enumDef.name}Extra,
2056
2057
  `);
2057
- parts.push(`} from '${enumPrefix}/plugin/${enumDef.name}.js';
2058
+ parts.push(`} from '${enumPrefix}/plugin/${enumDef.name}${ext}';
2058
2059
  `);
2059
2060
  }
2060
2061
  parts.push("\n");
@@ -2075,7 +2076,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
2075
2076
  `);
2076
2077
  parts.push(` get${alias.name}Extra,
2077
2078
  `);
2078
- parts.push(`} from '${enumPrefix}/${alias.name}.js';
2079
+ parts.push(`} from '${enumPrefix}/${alias.name}${ext}';
2079
2080
  `);
2080
2081
  }
2081
2082
  parts.push("\n");
@@ -2087,7 +2088,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
2087
2088
  if (schema.kind === "enum") continue;
2088
2089
  if (schema.options?.hidden === true) continue;
2089
2090
  const lowerName = schema.name.charAt(0).toLowerCase() + schema.name.slice(1);
2090
- parts.push(`export type { ${schema.name}, ${schema.name}Create, ${schema.name}Update } from './${schema.name}.js';
2091
+ parts.push(`export type { ${schema.name}, ${schema.name}Create, ${schema.name}Update } from './${schema.name}${ext}';
2091
2092
  `);
2092
2093
  parts.push(`export {
2093
2094
  `);
@@ -2105,7 +2106,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
2105
2106
  `);
2106
2107
  parts.push(` get${schema.name}FieldPlaceholder,
2107
2108
  `);
2108
- parts.push(`} from './${schema.name}.js';
2109
+ parts.push(`} from './${schema.name}${ext}';
2109
2110
  `);
2110
2111
  }
2111
2112
  } else {
@@ -2114,9 +2115,9 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
2114
2115
  for (const schema of Object.values(schemas)) {
2115
2116
  if (schema.kind === "enum") continue;
2116
2117
  if (schema.options?.hidden === true) continue;
2117
- parts.push(`export type { ${schema.name} } from './${schema.name}.js';
2118
+ parts.push(`export type { ${schema.name} } from './${schema.name}${ext}';
2118
2119
  `);
2119
- parts.push(`export type { ${schema.name}Create, ${schema.name}Update } from './base/${schema.name}.js';
2120
+ parts.push(`export type { ${schema.name}Create, ${schema.name}Update } from './base/${schema.name}${ext}';
2120
2121
  `);
2121
2122
  }
2122
2123
  if (options.generateRules) {
@@ -2134,7 +2135,7 @@ function generateIndexFile(schemas, enums, pluginEnums, typeAliases, options) {
2134
2135
  `);
2135
2136
  parts.push(` get${schema.name}PropertyDisplayName,
2136
2137
  `);
2137
- parts.push(`} from './rules/${schema.name}.rules.js';
2138
+ parts.push(`} from './rules/${schema.name}.rules${ext}';
2138
2139
  `);
2139
2140
  }
2140
2141
  }