@travetto/model-sql 7.0.4 → 7.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-sql",
3
- "version": "7.0.4",
3
+ "version": "7.0.6",
4
4
  "type": "module",
5
5
  "description": "SQL backing for the travetto model module, with real-time modeling support for SQL schemas.",
6
6
  "keywords": [
@@ -28,14 +28,14 @@
28
28
  "directory": "module/model-sql"
29
29
  },
30
30
  "dependencies": {
31
- "@travetto/config": "^7.0.4",
32
- "@travetto/context": "^7.0.4",
33
- "@travetto/model": "^7.0.4",
34
- "@travetto/model-query": "^7.0.4"
31
+ "@travetto/config": "^7.0.6",
32
+ "@travetto/context": "^7.0.6",
33
+ "@travetto/model": "^7.0.6",
34
+ "@travetto/model-query": "^7.0.6"
35
35
  },
36
36
  "peerDependencies": {
37
- "@travetto/cli": "^7.0.4",
38
- "@travetto/test": "^7.0.4"
37
+ "@travetto/cli": "^7.0.7",
38
+ "@travetto/test": "^7.0.6"
39
39
  },
40
40
  "peerDependenciesMeta": {
41
41
  "@travetto/cli": {
@@ -1,5 +1,5 @@
1
1
  import { castTo, Util } from '@travetto/runtime';
2
- import { AsyncContext, AsyncContextValue } from '@travetto/context';
2
+ import { type AsyncContext, AsyncContextValue } from '@travetto/context';
3
3
 
4
4
  export type TransactionType = 'required' | 'isolated' | 'force';
5
5
 
@@ -1,5 +1,5 @@
1
- import { AsyncIterableMethodDescriptor, AsyncMethodDescriptor } from '@travetto/runtime';
2
- import { Connection, TransactionType } from './base.ts';
1
+ import type { AsyncIterableMethodDescriptor, AsyncMethodDescriptor } from '@travetto/runtime';
2
+ import type { Connection, TransactionType } from './base.ts';
3
3
 
4
4
  /**
5
5
  * Indicating something is aware of connections
@@ -1,13 +1,13 @@
1
1
  /* eslint-disable @stylistic/indent */
2
- import { DataUtil, SchemaFieldConfig, Schema, SchemaRegistryIndex, type Point } from '@travetto/schema';
3
- import { Class, AppError, TypedObject, TimeUtil, castTo, castKey, toConcrete } from '@travetto/runtime';
4
- import { SelectClause, Query, SortClause, WhereClause, RetainQueryPrimitiveFields, ModelQueryUtil } from '@travetto/model-query';
5
- import { BulkResponse, IndexConfig, ModelType } from '@travetto/model';
2
+ import { DataUtil, type SchemaFieldConfig, Schema, SchemaRegistryIndex, type Point } from '@travetto/schema';
3
+ import { type Class, AppError, TypedObject, TimeUtil, castTo, castKey, toConcrete } from '@travetto/runtime';
4
+ import { type SelectClause, type Query, type SortClause, type WhereClause, type RetainQueryPrimitiveFields, ModelQueryUtil } from '@travetto/model-query';
5
+ import type { BulkResponse, IndexConfig, ModelType } from '@travetto/model';
6
6
 
7
7
  import { SQLModelUtil } from '../util.ts';
8
- import { DeleteWrapper, InsertWrapper, DialectState } from '../internal/types.ts';
9
- import { Connection } from '../connection/base.ts';
10
- import { VisitStack } from '../types.ts';
8
+ import type { DeleteWrapper, InsertWrapper, DialectState } from '../internal/types.ts';
9
+ import type { Connection } from '../connection/base.ts';
10
+ import type { VisitStack } from '../types.ts';
11
11
 
12
12
  const PointConcrete = toConcrete<Point>();
13
13
 
@@ -1,6 +1,6 @@
1
1
  import type { SchemaFieldConfig, SchemaClassConfig } from '@travetto/schema';
2
2
 
3
- import { VisitStack } from '../types.ts';
3
+ import type { VisitStack } from '../types.ts';
4
4
 
5
5
  /**
6
6
  * Insertion wrapper
package/src/service.ts CHANGED
@@ -1,27 +1,27 @@
1
1
  import {
2
- ModelType,
3
- BulkOperation, BulkResponse, ModelCrudSupport, ModelStorageSupport, ModelBulkSupport,
4
- NotFoundError, ModelRegistryIndex, ExistsError, OptionalId, ModelIdSource,
2
+ type ModelType,
3
+ type BulkOperation, type BulkResponse, type ModelCrudSupport, type ModelStorageSupport, type ModelBulkSupport,
4
+ NotFoundError, ModelRegistryIndex, ExistsError, type OptionalId, type ModelIdSource,
5
5
  ModelExpiryUtil, ModelCrudUtil, ModelStorageUtil, ModelBulkUtil,
6
6
  } from '@travetto/model';
7
- import { castTo, Class } from '@travetto/runtime';
7
+ import { castTo, type Class } from '@travetto/runtime';
8
8
  import { DataUtil } from '@travetto/schema';
9
- import { AsyncContext } from '@travetto/context';
9
+ import type { AsyncContext } from '@travetto/context';
10
10
  import { Injectable } from '@travetto/di';
11
11
  import {
12
- ModelQuery, ModelQueryCrudSupport, ModelQueryFacetSupport, ModelQuerySupport,
13
- PageableModelQuery, ValidStringFields, WhereClauseRaw, QueryVerifier, ModelQuerySuggestSupport,
12
+ type ModelQuery, type ModelQueryCrudSupport, type ModelQueryFacetSupport, type ModelQuerySupport,
13
+ type PageableModelQuery, type ValidStringFields, type WhereClauseRaw, QueryVerifier, type ModelQuerySuggestSupport,
14
14
  ModelQueryUtil, ModelQuerySuggestUtil, ModelQueryCrudUtil,
15
- ModelQueryFacet,
15
+ type ModelQueryFacet,
16
16
  } from '@travetto/model-query';
17
17
 
18
- import { SQLModelConfig } from './config.ts';
18
+ import type { SQLModelConfig } from './config.ts';
19
19
  import { Connected, ConnectedIterator, Transactional } from './connection/decorator.ts';
20
20
  import { SQLModelUtil } from './util.ts';
21
- import { SQLDialect } from './dialect/base.ts';
21
+ import type { SQLDialect } from './dialect/base.ts';
22
22
  import { TableManager } from './table-manager.ts';
23
- import { Connection } from './connection/base.ts';
24
- import { InsertWrapper } from './internal/types.ts';
23
+ import type { Connection } from './connection/base.ts';
24
+ import type { InsertWrapper } from './internal/types.ts';
25
25
 
26
26
  /**
27
27
  * Core for SQL Model Source. Should not have any direct queries,
@@ -1,13 +1,13 @@
1
- import { AsyncContext, WithAsyncContext } from '@travetto/context';
1
+ import { type AsyncContext, WithAsyncContext } from '@travetto/context';
2
2
  import { ModelRegistryIndex } from '@travetto/model';
3
- import { Class } from '@travetto/runtime';
3
+ import { type Class } from '@travetto/runtime';
4
4
  import { SchemaRegistryIndex, type SchemaFieldConfig } from '@travetto/schema';
5
5
 
6
6
  import { Connected, Transactional } from './connection/decorator.ts';
7
- import { SQLDialect } from './dialect/base.ts';
7
+ import type { SQLDialect } from './dialect/base.ts';
8
8
  import { SQLModelUtil } from './util.ts';
9
- import { Connection } from './connection/base.ts';
10
- import { VisitStack } from './types.ts';
9
+ import type { Connection } from './connection/base.ts';
10
+ import type { VisitStack } from './types.ts';
11
11
 
12
12
  type UpsertStructure = { dropIndex: string[], createIndex: string[], table: string[] };
13
13
  const isSimpleField = (input: VisitStack | undefined): input is SchemaFieldConfig =>
package/src/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Class } from '@travetto/runtime';
1
+ import { type Class } from '@travetto/runtime';
2
2
 
3
3
  export const TableSymbol = Symbol.for('@travetto/model-sql:table');
4
4
 
package/src/util.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { castKey, castTo, Class, TypedObject } from '@travetto/runtime';
2
- import { SelectClause, SortClause } from '@travetto/model-query';
3
- import { ModelRegistryIndex, ModelType, OptionalId } from '@travetto/model';
4
- import { SchemaClassConfig, SchemaFieldConfig, DataUtil, SchemaRegistryIndex } from '@travetto/schema';
1
+ import { castKey, castTo, type Class, TypedObject } from '@travetto/runtime';
2
+ import type { SelectClause, SortClause } from '@travetto/model-query';
3
+ import { ModelRegistryIndex, type ModelType, type OptionalId } from '@travetto/model';
4
+ import { type SchemaClassConfig, type SchemaFieldConfig, DataUtil, SchemaRegistryIndex } from '@travetto/schema';
5
5
 
6
- import { DialectState, InsertWrapper, VisitHandler, VisitState, VisitInstanceNode, OrderBy } from './internal/types.ts';
7
- import { TableSymbol, VisitStack } from './types.ts';
6
+ import type { DialectState, InsertWrapper, VisitHandler, VisitState, VisitInstanceNode, OrderBy } from './internal/types.ts';
7
+ import { TableSymbol, type VisitStack } from './types.ts';
8
8
 
9
9
  type FieldCacheEntry = {
10
10
  local: SchemaFieldConfig[];
@@ -1,12 +1,12 @@
1
1
  import assert from 'node:assert';
2
2
 
3
- import { Schema, SchemaFieldConfig } from '@travetto/schema';
3
+ import { Schema, type SchemaFieldConfig } from '@travetto/schema';
4
4
  import { Suite, Test } from '@travetto/test';
5
5
  import { castTo } from '@travetto/runtime';
6
6
  import { BaseModelSuite } from '@travetto/model/support/test/base.ts';
7
7
 
8
- import { VisitStack } from '../../src/types.ts';
9
- import { SQLModelService } from '../../src/service.ts';
8
+ import type { VisitStack } from '../../src/types.ts';
9
+ import type { SQLModelService } from '../../src/service.ts';
10
10
 
11
11
  @Schema()
12
12
  class User {