arkormx 2.12.1 → 2.12.2

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/cli.mjs CHANGED
@@ -4383,28 +4383,22 @@ var CliApp = class {
4383
4383
  syncModelRegistryTypes(modelFiles) {
4384
4384
  const registryDir = join$1(realpathSync(process.cwd()), ".arkormx");
4385
4385
  const registryPath = join$1(registryDir, "models.d.ts");
4386
- const models = modelFiles.map((filePath) => {
4387
- const parsed = this.parseModelSyncSource(readFileSync$1(filePath, "utf-8"));
4388
- if (!parsed) return null;
4389
- return {
4390
- className: parsed.className,
4391
- importPath: this.resolveModelRegistryImportPath(registryPath, filePath)
4392
- };
4393
- }).filter((model) => model !== null).sort((left, right) => left.className.localeCompare(right.className));
4394
- const importLines = models.map((model) => {
4395
- return `import type { ${model.className} } from '${model.importPath}'`;
4396
- });
4397
- const registryLines = models.map((model) => {
4398
- return ` ${model.className}: typeof ${model.className}`;
4399
- });
4400
4386
  const content = [
4401
4387
  "/* eslint-disable */",
4402
4388
  "// This file is generated by `arkorm models:sync`.",
4403
- ...importLines,
4404
4389
  "",
4405
4390
  "declare module 'arkormx' {",
4406
4391
  " interface ArkormModelRegistry {",
4407
- ...registryLines,
4392
+ ...modelFiles.map((filePath) => {
4393
+ const parsed = this.parseModelSyncSource(readFileSync$1(filePath, "utf-8"));
4394
+ if (!parsed) return null;
4395
+ return {
4396
+ className: parsed.className,
4397
+ importPath: this.resolveModelRegistryImportPath(registryPath, filePath)
4398
+ };
4399
+ }).filter((model) => model !== null).sort((left, right) => left.className.localeCompare(right.className)).map((model) => {
4400
+ return ` ${model.className}: typeof import('${model.importPath}')['${model.className}']`;
4401
+ }),
4408
4402
  " }",
4409
4403
  "}",
4410
4404
  "",
package/dist/index.cjs CHANGED
@@ -3255,28 +3255,22 @@ var CliApp = class {
3255
3255
  syncModelRegistryTypes(modelFiles) {
3256
3256
  const registryDir = (0, path.join)((0, fs.realpathSync)(process.cwd()), ".arkormx");
3257
3257
  const registryPath = (0, path.join)(registryDir, "models.d.ts");
3258
- const models = modelFiles.map((filePath) => {
3259
- const parsed = this.parseModelSyncSource((0, fs.readFileSync)(filePath, "utf-8"));
3260
- if (!parsed) return null;
3261
- return {
3262
- className: parsed.className,
3263
- importPath: this.resolveModelRegistryImportPath(registryPath, filePath)
3264
- };
3265
- }).filter((model) => model !== null).sort((left, right) => left.className.localeCompare(right.className));
3266
- const importLines = models.map((model) => {
3267
- return `import type { ${model.className} } from '${model.importPath}'`;
3268
- });
3269
- const registryLines = models.map((model) => {
3270
- return ` ${model.className}: typeof ${model.className}`;
3271
- });
3272
3258
  const content = [
3273
3259
  "/* eslint-disable */",
3274
3260
  "// This file is generated by `arkorm models:sync`.",
3275
- ...importLines,
3276
3261
  "",
3277
3262
  "declare module 'arkormx' {",
3278
3263
  " interface ArkormModelRegistry {",
3279
- ...registryLines,
3264
+ ...modelFiles.map((filePath) => {
3265
+ const parsed = this.parseModelSyncSource((0, fs.readFileSync)(filePath, "utf-8"));
3266
+ if (!parsed) return null;
3267
+ return {
3268
+ className: parsed.className,
3269
+ importPath: this.resolveModelRegistryImportPath(registryPath, filePath)
3270
+ };
3271
+ }).filter((model) => model !== null).sort((left, right) => left.className.localeCompare(right.className)).map((model) => {
3272
+ return ` ${model.className}: typeof import('${model.importPath}')['${model.className}']`;
3273
+ }),
3280
3274
  " }",
3281
3275
  "}",
3282
3276
  "",
package/dist/index.mjs CHANGED
@@ -3254,28 +3254,22 @@ var CliApp = class {
3254
3254
  syncModelRegistryTypes(modelFiles) {
3255
3255
  const registryDir = join$1(realpathSync(process.cwd()), ".arkormx");
3256
3256
  const registryPath = join$1(registryDir, "models.d.ts");
3257
- const models = modelFiles.map((filePath) => {
3258
- const parsed = this.parseModelSyncSource(readFileSync$1(filePath, "utf-8"));
3259
- if (!parsed) return null;
3260
- return {
3261
- className: parsed.className,
3262
- importPath: this.resolveModelRegistryImportPath(registryPath, filePath)
3263
- };
3264
- }).filter((model) => model !== null).sort((left, right) => left.className.localeCompare(right.className));
3265
- const importLines = models.map((model) => {
3266
- return `import type { ${model.className} } from '${model.importPath}'`;
3267
- });
3268
- const registryLines = models.map((model) => {
3269
- return ` ${model.className}: typeof ${model.className}`;
3270
- });
3271
3257
  const content = [
3272
3258
  "/* eslint-disable */",
3273
3259
  "// This file is generated by `arkorm models:sync`.",
3274
- ...importLines,
3275
3260
  "",
3276
3261
  "declare module 'arkormx' {",
3277
3262
  " interface ArkormModelRegistry {",
3278
- ...registryLines,
3263
+ ...modelFiles.map((filePath) => {
3264
+ const parsed = this.parseModelSyncSource(readFileSync$1(filePath, "utf-8"));
3265
+ if (!parsed) return null;
3266
+ return {
3267
+ className: parsed.className,
3268
+ importPath: this.resolveModelRegistryImportPath(registryPath, filePath)
3269
+ };
3270
+ }).filter((model) => model !== null).sort((left, right) => left.className.localeCompare(right.className)).map((model) => {
3271
+ return ` ${model.className}: typeof import('${model.importPath}')['${model.className}']`;
3272
+ }),
3279
3273
  " }",
3280
3274
  "}",
3281
3275
  "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkormx",
3
- "version": "2.12.1",
3
+ "version": "2.12.2",
4
4
  "description": "Modern TypeScript-first ORM for Node.js.",
5
5
  "keywords": [
6
6
  "orm",