proto.io 0.0.203 → 0.0.205
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/adapters/file/aliyun-oss.d.ts +3 -3
- package/dist/adapters/file/aliyun-oss.js +2 -2
- package/dist/adapters/file/aliyun-oss.mjs +2 -2
- package/dist/adapters/file/database.d.ts +2 -2
- package/dist/adapters/file/database.js +1 -1
- package/dist/adapters/file/database.mjs +1 -1
- package/dist/adapters/file/filesystem.d.ts +3 -3
- package/dist/adapters/file/filesystem.js +2 -2
- package/dist/adapters/file/filesystem.mjs +2 -2
- package/dist/adapters/file/google-cloud-storage.d.ts +3 -3
- package/dist/adapters/file/google-cloud-storage.js +2 -2
- package/dist/adapters/file/google-cloud-storage.mjs +2 -2
- package/dist/adapters/storage/progres.d.ts +1 -1
- package/dist/client.d.ts +3 -3
- package/dist/client.js +1 -1
- package/dist/client.mjs +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internals/{base-NsJYo2MG.js → base-BFKQpiws.js} +3 -3
- package/dist/internals/{base-NsJYo2MG.js.map → base-BFKQpiws.js.map} +1 -1
- package/dist/internals/{base-CtUDLbLn.d.ts → base-Cf7WkDhO.d.ts} +2 -2
- package/dist/internals/base-Cf7WkDhO.d.ts.map +1 -0
- package/dist/internals/{base-DYc1_peK.mjs → base-CfQi0T0I.mjs} +3 -3
- package/dist/internals/{base-DYc1_peK.mjs.map → base-CfQi0T0I.mjs.map} +1 -1
- package/dist/internals/{chunk-CdEGTub2.js → chunk-BuMQw4dz.js} +2 -2
- package/dist/internals/{chunk-CdEGTub2.js.map → chunk-BuMQw4dz.js.map} +1 -1
- package/dist/internals/{chunk-3nNdftWC.mjs → chunk-DxYhYVky.mjs} +2 -2
- package/dist/internals/{chunk-3nNdftWC.mjs.map → chunk-DxYhYVky.mjs.map} +1 -1
- package/dist/internals/{chunk-CCL93x6B.d.ts → chunk-ONaLyXL0.d.ts} +3 -3
- package/dist/internals/chunk-ONaLyXL0.d.ts.map +1 -0
- package/dist/internals/{index-DTLC7DDs.js → index-DByHjIHI.js} +9 -10
- package/dist/internals/index-DByHjIHI.js.map +1 -0
- package/dist/internals/{index-Dd3St1Sr.d.ts → index-DI-jPA6f.d.ts} +2 -2
- package/dist/internals/index-DI-jPA6f.d.ts.map +1 -0
- package/dist/internals/{index-BSY-fDMe.mjs → index-DtCgllhg.mjs} +10 -11
- package/dist/internals/index-DtCgllhg.mjs.map +1 -0
- package/dist/internals/{index-DUnOrgWu.d.ts → index-JdEs5VLY.d.ts} +5 -5
- package/dist/internals/index-JdEs5VLY.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/internals/base-CtUDLbLn.d.ts.map +0 -1
- package/dist/internals/chunk-CCL93x6B.d.ts.map +0 -1
- package/dist/internals/index-BSY-fDMe.mjs.map +0 -1
- package/dist/internals/index-DTLC7DDs.js.map +0 -1
- package/dist/internals/index-DUnOrgWu.d.ts.map +0 -1
- package/dist/internals/index-Dd3St1Sr.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as ProtoService } from '../../internals/index-
|
|
1
|
+
import { P as ProtoService } from '../../internals/index-JdEs5VLY.js';
|
|
2
2
|
import OSS from 'ali-oss';
|
|
3
|
-
import { a as FileStorageOptions } from '../../internals/base-
|
|
4
|
-
import { F as FileChunkStorageBase } from '../../internals/chunk-
|
|
3
|
+
import { a as FileStorageOptions } from '../../internals/base-Cf7WkDhO.js';
|
|
4
|
+
import { F as FileChunkStorageBase } from '../../internals/chunk-ONaLyXL0.js';
|
|
5
5
|
import '@o2ter/utils-js';
|
|
6
6
|
import 'jsonwebtoken';
|
|
7
7
|
import '@o2ter/server-js';
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _ = require('lodash');
|
|
6
|
-
require('../../internals/base-
|
|
7
|
-
var chunk = require('../../internals/chunk-
|
|
6
|
+
require('../../internals/base-BFKQpiws.js');
|
|
7
|
+
var chunk = require('../../internals/chunk-BuMQw4dz.js');
|
|
8
8
|
require('util');
|
|
9
9
|
require('zlib');
|
|
10
10
|
require('@o2ter/utils-js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
-
import '../../internals/base-
|
|
3
|
-
import { F as FileChunkStorageBase } from '../../internals/chunk-
|
|
2
|
+
import '../../internals/base-CfQi0T0I.mjs';
|
|
3
|
+
import { F as FileChunkStorageBase } from '../../internals/chunk-DxYhYVky.mjs';
|
|
4
4
|
import 'util';
|
|
5
5
|
import 'zlib';
|
|
6
6
|
import '@o2ter/utils-js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TSchema, P as ProtoService } from '../../internals/index-
|
|
2
|
-
import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/base-
|
|
1
|
+
import { T as TSchema, P as ProtoService } from '../../internals/index-JdEs5VLY.js';
|
|
2
|
+
import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/base-Cf7WkDhO.js';
|
|
3
3
|
import '@o2ter/utils-js';
|
|
4
4
|
import 'jsonwebtoken';
|
|
5
5
|
import '@o2ter/server-js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _ = require('lodash');
|
|
6
|
-
var base = require('../../internals/base-
|
|
6
|
+
var base = require('../../internals/base-BFKQpiws.js');
|
|
7
7
|
var index = require('../../internals/index-C4vwSN74.js');
|
|
8
8
|
var utilsJs = require('@o2ter/utils-js');
|
|
9
9
|
require('util');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
-
import { F as FileStorageBase } from '../../internals/base-
|
|
2
|
+
import { F as FileStorageBase } from '../../internals/base-CfQi0T0I.mjs';
|
|
3
3
|
import { Q as QuerySelector } from '../../internals/index-Blw7vAq5.mjs';
|
|
4
4
|
import { bufferToBase64, base64ToBuffer } from '@o2ter/utils-js';
|
|
5
5
|
import 'util';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as ProtoService } from '../../internals/index-
|
|
2
|
-
import { a as FileStorageOptions } from '../../internals/base-
|
|
3
|
-
import { F as FileChunkStorageBase } from '../../internals/chunk-
|
|
1
|
+
import { P as ProtoService } from '../../internals/index-JdEs5VLY.js';
|
|
2
|
+
import { a as FileStorageOptions } from '../../internals/base-Cf7WkDhO.js';
|
|
3
|
+
import { F as FileChunkStorageBase } from '../../internals/chunk-ONaLyXL0.js';
|
|
4
4
|
import '@o2ter/utils-js';
|
|
5
5
|
import 'jsonwebtoken';
|
|
6
6
|
import '@o2ter/server-js';
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _ = require('lodash');
|
|
6
6
|
var path = require('path');
|
|
7
7
|
var fs = require('fs/promises');
|
|
8
|
-
var chunk = require('../../internals/chunk-
|
|
9
|
-
require('../../internals/base-
|
|
8
|
+
var chunk = require('../../internals/chunk-BuMQw4dz.js');
|
|
9
|
+
require('../../internals/base-BFKQpiws.js');
|
|
10
10
|
require('util');
|
|
11
11
|
require('zlib');
|
|
12
12
|
require('@o2ter/utils-js');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import fs from 'fs/promises';
|
|
4
|
-
import { F as FileChunkStorageBase } from '../../internals/chunk-
|
|
5
|
-
import '../../internals/base-
|
|
4
|
+
import { F as FileChunkStorageBase } from '../../internals/chunk-DxYhYVky.mjs';
|
|
5
|
+
import '../../internals/base-CfQi0T0I.mjs';
|
|
6
6
|
import 'util';
|
|
7
7
|
import 'zlib';
|
|
8
8
|
import '@o2ter/utils-js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _google_cloud_storage from '@google-cloud/storage';
|
|
2
2
|
import { File, Storage } from '@google-cloud/storage';
|
|
3
|
-
import { P as ProtoService } from '../../internals/index-
|
|
4
|
-
import { a as FileStorageOptions } from '../../internals/base-
|
|
5
|
-
import { F as FileChunkStorageBase } from '../../internals/chunk-
|
|
3
|
+
import { P as ProtoService } from '../../internals/index-JdEs5VLY.js';
|
|
4
|
+
import { a as FileStorageOptions } from '../../internals/base-Cf7WkDhO.js';
|
|
5
|
+
import { F as FileChunkStorageBase } from '../../internals/chunk-ONaLyXL0.js';
|
|
6
6
|
import '@o2ter/utils-js';
|
|
7
7
|
import 'jsonwebtoken';
|
|
8
8
|
import '@o2ter/server-js';
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _ = require('lodash');
|
|
6
|
-
var chunk = require('../../internals/chunk-
|
|
7
|
-
require('../../internals/base-
|
|
6
|
+
var chunk = require('../../internals/chunk-BuMQw4dz.js');
|
|
7
|
+
require('../../internals/base-BFKQpiws.js');
|
|
8
8
|
require('util');
|
|
9
9
|
require('zlib');
|
|
10
10
|
require('@o2ter/utils-js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
-
import { F as FileChunkStorageBase } from '../../internals/chunk-
|
|
3
|
-
import '../../internals/base-
|
|
2
|
+
import { F as FileChunkStorageBase } from '../../internals/chunk-DxYhYVky.mjs';
|
|
3
|
+
import '../../internals/base-CfQi0T0I.mjs';
|
|
4
4
|
import 'util';
|
|
5
5
|
import 'zlib';
|
|
6
6
|
import '@o2ter/utils-js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Pool, PoolClient, PoolConfig } from 'pg';
|
|
2
|
-
import { a as TValueWithoutObject, T as TSchema, r as TValueWithUndefined, t as TValue, u as TUpdateOp, F as FieldSelectorExpression, Q as QueryExpression, R as RelationOptions, v as QuerySelector, w as DecodedSortOption, x as DecodedQuery, y as FindOptions, I as InsertOptions, z as FindOneOptions, A as TStorage, B as TransactionOptions, i as TObject, C as TQueryRandomOptions, G as TPubSub } from '../../internals/index-
|
|
2
|
+
import { a as TValueWithoutObject, T as TSchema, r as TValueWithUndefined, t as TValue, u as TUpdateOp, F as FieldSelectorExpression, Q as QueryExpression, R as RelationOptions, v as QuerySelector, w as DecodedSortOption, x as DecodedQuery, y as FindOptions, I as InsertOptions, z as FindOneOptions, A as TStorage, B as TransactionOptions, i as TObject, C as TQueryRandomOptions, G as TPubSub } from '../../internals/index-JdEs5VLY.js';
|
|
3
3
|
import * as _o2ter_utils_js from '@o2ter/utils-js';
|
|
4
4
|
import { asyncStream } from '@o2ter/utils-js';
|
|
5
5
|
import 'jsonwebtoken';
|
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as ProtoClient } from './internals/index-
|
|
2
|
-
export { c as classExtends, e as isFile, f as isJob, a as isObject, i as isQuery, d as isRole, b as isUser } from './internals/index-
|
|
1
|
+
import { P as ProtoClient } from './internals/index-DI-jPA6f.js';
|
|
2
|
+
export { c as classExtends, e as isFile, f as isJob, a as isObject, i as isQuery, d as isRole, b as isUser } from './internals/index-DI-jPA6f.js';
|
|
3
3
|
export { Decimal } from 'decimal.js';
|
|
4
|
-
export { D as DeserializeOptions, S as SerializeOptions, e as TSerializable, f as deserialize, s as serialize } from './internals/index-
|
|
4
|
+
export { D as DeserializeOptions, S as SerializeOptions, e as TSerializable, f as deserialize, s as serialize } from './internals/index-JdEs5VLY.js';
|
|
5
5
|
import '@o2ter/utils-js';
|
|
6
6
|
import 'socket.io-client';
|
|
7
7
|
import '@socket.io/component-emitter';
|
package/dist/client.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./internals/index-
|
|
5
|
+
var index = require('./internals/index-DByHjIHI.js');
|
|
6
6
|
var Decimal = require('decimal.js');
|
|
7
7
|
require('@o2ter/utils-js');
|
|
8
8
|
require('./internals/private-Ciddhure.js');
|
package/dist/client.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as ProtoClient } from './internals/index-
|
|
2
|
-
export { f as classExtends, d as deserialize, k as isFile, l as isJob, g as isObject, i as isQuery, j as isRole, h as isUser, s as serialize } from './internals/index-
|
|
1
|
+
import { e as ProtoClient } from './internals/index-DtCgllhg.mjs';
|
|
2
|
+
export { f as classExtends, d as deserialize, k as isFile, l as isJob, g as isObject, i as isQuery, j as isRole, h as isUser, s as serialize } from './internals/index-DtCgllhg.mjs';
|
|
3
3
|
export { Decimal } from 'decimal.js';
|
|
4
4
|
import '@o2ter/utils-js';
|
|
5
5
|
import './internals/private-CNw40LZ7.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as socket_io from 'socket.io';
|
|
2
2
|
import { Router } from 'express';
|
|
3
3
|
import { Server } from '@o2ter/server-js';
|
|
4
|
-
import { T as TSchema, a as TValueWithoutObject, P as ProtoService, b as ProtoServiceOptions, c as ProtoServiceKeyOptions } from './internals/index-
|
|
5
|
-
export { D as DeserializeOptions, S as SerializeOptions, d as TFileStorage, e as TSerializable, f as deserialize, s as serialize } from './internals/index-
|
|
4
|
+
import { T as TSchema, a as TValueWithoutObject, P as ProtoService, b as ProtoServiceOptions, c as ProtoServiceKeyOptions } from './internals/index-JdEs5VLY.js';
|
|
5
|
+
export { D as DeserializeOptions, S as SerializeOptions, d as TFileStorage, e as TSerializable, f as deserialize, s as serialize } from './internals/index-JdEs5VLY.js';
|
|
6
6
|
import Decimal from 'decimal.js';
|
|
7
7
|
export { Decimal } from 'decimal.js';
|
|
8
|
-
export { P as ProtoClient, c as classExtends, e as isFile, f as isJob, a as isObject, i as isQuery, d as isRole, b as isUser } from './internals/index-
|
|
8
|
+
export { P as ProtoClient, c as classExtends, e as isFile, f as isJob, a as isObject, i as isQuery, d as isRole, b as isUser } from './internals/index-DI-jPA6f.js';
|
|
9
9
|
import '@o2ter/utils-js';
|
|
10
10
|
import 'jsonwebtoken';
|
|
11
11
|
import 'lodash';
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var serverJs = require('@o2ter/server-js');
|
|
|
7
7
|
var random = require('./internals/random-Dk3OhDNU.js');
|
|
8
8
|
var _private = require('./internals/private-Ciddhure.js');
|
|
9
9
|
var utilsJs = require('@o2ter/utils-js');
|
|
10
|
-
var index = require('./internals/index-
|
|
10
|
+
var index = require('./internals/index-DByHjIHI.js');
|
|
11
11
|
var index$1 = require('./internals/index-B8TESzd9.js');
|
|
12
12
|
var jwt = require('jsonwebtoken');
|
|
13
13
|
var node_buffer = require('node:buffer');
|
|
@@ -2168,12 +2168,14 @@ var filesRoute = (router, proto) => {
|
|
|
2168
2168
|
let stream;
|
|
2169
2169
|
if (_.isArray(ranges) && ranges.type === 'bytes') {
|
|
2170
2170
|
const startBytes = _.minBy(ranges, r => r.start)?.start ?? 0;
|
|
2171
|
-
const endBytes = _.maxBy(ranges, r => r.end)?.end ?? file.size;
|
|
2171
|
+
const endBytes = _.maxBy(ranges, r => r.end)?.end ?? (file.size - 1);
|
|
2172
|
+
res.setHeader('Content-Length', endBytes - startBytes + 1);
|
|
2172
2173
|
res.setHeader('Content-Range', `bytes ${startBytes}-${endBytes}/${file.size}`);
|
|
2173
2174
|
res.status(206);
|
|
2174
2175
|
stream = payload.fileStorage.fileData(payload, file.token, startBytes, endBytes);
|
|
2175
2176
|
}
|
|
2176
2177
|
else {
|
|
2178
|
+
res.setHeader('Content-Length', file.size);
|
|
2177
2179
|
res.status(200);
|
|
2178
2180
|
stream = payload.fileStorage.fileData(payload, file.token);
|
|
2179
2181
|
}
|