proto.io 0.0.159 → 0.0.161

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.
Files changed (30) hide show
  1. package/dist/adapters/file/database.d.ts +2 -2
  2. package/dist/adapters/file/filesystem.d.ts +2 -2
  3. package/dist/adapters/file/google-cloud-storage.d.ts +2 -2
  4. package/dist/adapters/storage/progres.d.ts +1 -1
  5. package/dist/adapters/storage/progres.js +6 -5
  6. package/dist/adapters/storage/progres.js.map +1 -1
  7. package/dist/adapters/storage/progres.mjs +6 -5
  8. package/dist/adapters/storage/progres.mjs.map +1 -1
  9. package/dist/client.d.ts +3 -3
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.js +18 -6
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +18 -6
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/internals/{index-BraAbRER.d.ts → index-2EQQyKaU.d.ts} +2 -2
  16. package/dist/internals/index-2EQQyKaU.d.ts.map +1 -0
  17. package/dist/internals/{index-sFLwlp-C.d.ts → index-CHKUNXoz.d.ts} +2 -2
  18. package/dist/internals/index-CHKUNXoz.d.ts.map +1 -0
  19. package/dist/internals/{index-CXPH5Pup.d.ts → index-CXLttbg-.d.ts} +3 -3
  20. package/dist/internals/index-CXLttbg-.d.ts.map +1 -0
  21. package/dist/internals/{random-Dst9-WVo.mjs → random-DifCxbl6.mjs} +6 -6
  22. package/dist/internals/random-DifCxbl6.mjs.map +1 -0
  23. package/dist/internals/{random-B5INLcHZ.js → random-uT4D0y_q.js} +6 -6
  24. package/dist/internals/random-uT4D0y_q.js.map +1 -0
  25. package/package.json +1 -1
  26. package/dist/internals/index-BraAbRER.d.ts.map +0 -1
  27. package/dist/internals/index-CXPH5Pup.d.ts.map +0 -1
  28. package/dist/internals/index-sFLwlp-C.d.ts.map +0 -1
  29. package/dist/internals/random-B5INLcHZ.js.map +0 -1
  30. package/dist/internals/random-Dst9-WVo.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
- import { T as TSchema, P as ProtoService } from '../../internals/index-CXPH5Pup.js';
2
- import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/index-BraAbRER.js';
1
+ import { T as TSchema, P as ProtoService } from '../../internals/index-CXLttbg-.js';
2
+ import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/index-2EQQyKaU.js';
3
3
  import '@o2ter/utils-js';
4
4
  import 'jsonwebtoken';
5
5
  import '@o2ter/server-js';
@@ -1,5 +1,5 @@
1
- import { P as ProtoService } from '../../internals/index-CXPH5Pup.js';
2
- import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/index-BraAbRER.js';
1
+ import { P as ProtoService } from '../../internals/index-CXLttbg-.js';
2
+ import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/index-2EQQyKaU.js';
3
3
  import '@o2ter/utils-js';
4
4
  import 'jsonwebtoken';
5
5
  import '@o2ter/server-js';
@@ -1,7 +1,7 @@
1
1
  import * as _google_cloud_storage from '@google-cloud/storage';
2
2
  import { Storage } from '@google-cloud/storage';
3
- import { P as ProtoService } from '../../internals/index-CXPH5Pup.js';
4
- import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/index-BraAbRER.js';
3
+ import { P as ProtoService } from '../../internals/index-CXLttbg-.js';
4
+ import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/index-2EQQyKaU.js';
5
5
  import '@o2ter/utils-js';
6
6
  import 'jsonwebtoken';
7
7
  import '@o2ter/server-js';
@@ -1,5 +1,5 @@
1
1
  import { Pool, PoolClient, PoolConfig } from 'pg';
2
- import { _ as _TValue, n as EventData, T as TSchema, o as DecodedQuery, F as FindOptions, R as RelationOptions, Q as QuerySelector, p as DecodedSortOption, I as InsertOptions, q as TValue, r as FindOneOptions, t as TUpdateOp, u as FieldSelectorExpression, v as QueryExpression, w as TStorage, x as TransactionOptions, h as TObject, y as TQueryRandomOptions, z as TPubSub } from '../../internals/index-CXPH5Pup.js';
2
+ import { _ as _TValue, n as EventData, T as TSchema, o as DecodedQuery, F as FindOptions, R as RelationOptions, Q as QuerySelector, p as DecodedSortOption, I as InsertOptions, q as TValue, r as FindOneOptions, t as TUpdateOp, u as FieldSelectorExpression, v as QueryExpression, w as TStorage, x as TransactionOptions, h as TObject, y as TQueryRandomOptions, z as TPubSub } from '../../internals/index-CXLttbg-.js';
3
3
  import * as _o2ter_utils_js from '@o2ter/utils-js';
4
4
  import { asyncStream } from '@o2ter/utils-js';
5
5
  import 'jsonwebtoken';
@@ -11,7 +11,7 @@ var Decimal = require('decimal.js');
11
11
  var utils = require('pg/lib/utils');
12
12
  var index$1 = require('../../internals/index-CSNRyhjB.js');
13
13
  require('@o2ter/crypto-js');
14
- var random$1 = require('../../internals/random-B5INLcHZ.js');
14
+ var random$1 = require('../../internals/random-uT4D0y_q.js');
15
15
  var _private = require('../../internals/private-CSB1Ep4g.js');
16
16
 
17
17
  //
@@ -2345,8 +2345,8 @@ const encodeForeignField = (compiler, context, parent, foreignField, remix) => {
2345
2345
  return {
2346
2346
  joins: [],
2347
2347
  field: sql `(
2348
- SELECT ${sql `(${{ quote: parent.className + '$' }} || ${_foreign('_id')})`}
2349
- FROM ${encodeRemix(parent, remix)} AS ${{ identifier: tempName }}
2348
+ SELECT ${sql `(${{ quote: dataType.target + '$' }} || ${_foreign('_id')})`}
2349
+ FROM ${encodeRemix({ className: dataType.target }, remix)} AS ${{ identifier: tempName }}
2350
2350
  ${!_.isEmpty(joins) ? { literal: joins, separator: '\n' } : sql ``}
2351
2351
  WHERE ${sql `(${{ quote: parent.className + '$' }} || ${_local('_id')})`} = ${array || rows ? sql `ANY(${field})` : field}
2352
2352
  )`,
@@ -2368,7 +2368,7 @@ const encodeForeignField = (compiler, context, parent, foreignField, remix) => {
2368
2368
  if (index.isPointer(dataType)) {
2369
2369
  return {
2370
2370
  joins: [sql `
2371
- LEFT JOIN ${encodeRemix(parent, remix)} AS ${{ identifier: tempName }}
2371
+ LEFT JOIN ${encodeRemix({ className: dataType.target }, remix)} AS ${{ identifier: tempName }}
2372
2372
  ON ${sql `(${{ quote: dataType.target + '$' }} || ${_foreign('_id')})`} = ${_local(colname)}
2373
2373
  `, ...joins],
2374
2374
  field,
@@ -2389,7 +2389,8 @@ const encodeForeignField = (compiler, context, parent, foreignField, remix) => {
2389
2389
  return {
2390
2390
  joins: [],
2391
2391
  field: sql `(
2392
- SELECT ${array ? sql `UNNEST(${field})` : field} FROM ${encodeRemix(parent, remix)} AS ${{ identifier: tempName }}
2392
+ SELECT ${array ? sql `UNNEST(${field})` : field}
2393
+ FROM ${encodeRemix({ className: dataType.target }, remix)} AS ${{ identifier: tempName }}
2393
2394
  ${!_.isEmpty(joins) ? { literal: joins, separator: '\n' } : sql ``}
2394
2395
  WHERE ${cond}
2395
2396
  )`,