@lossless.org/objectstorage 9.0.1 → 10.0.1

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/.smartconfig.json +0 -1
  2. package/dist_rust/ruststorage_linux_amd64 +0 -0
  3. package/dist_rust/ruststorage_linux_amd64.tsrust-build.json +4 -4
  4. package/dist_rust/ruststorage_linux_arm64 +0 -0
  5. package/dist_rust/ruststorage_linux_arm64.tsrust-build.json +4 -4
  6. package/dist_ts/00_commitinfo_data.js +2 -2
  7. package/dist_ts/index.d.ts +0 -2
  8. package/dist_ts/index.js +3 -20
  9. package/dist_ts/plugins.d.ts +1 -2
  10. package/dist_ts/plugins.js +2 -3
  11. package/package.json +9 -1
  12. package/readme.md +12 -0
  13. package/third-party-notices.md +103 -0
  14. package/third_party_licenses/aho-corasick-1.1.4-license.txt +21 -0
  15. package/third_party_licenses/cargo-dependencies.html +4817 -0
  16. package/third_party_licenses/compiler-builtins-license.txt +275 -0
  17. package/third_party_licenses/crc32c-0.6.8-zlib-notice.txt +60 -0
  18. package/third_party_licenses/glibc-lgpl-2.1.txt +502 -0
  19. package/third_party_licenses/glibc-license.txt +412 -0
  20. package/third_party_licenses/inventory.json +2136 -0
  21. package/third_party_licenses/linux-raw-sys-0.12.1-copyright.txt +29 -0
  22. package/third_party_licenses/mit-source-attributions.txt +34 -0
  23. package/third_party_licenses/ring-0.17.14/source-attributions.txt +1544 -0
  24. package/third_party_licenses/rust-standard-library.html +8266 -0
  25. package/third_party_licenses/rustix-1.1.4-copyright.txt +29 -0
  26. package/third_party_licenses/valuable-license.txt +25 -0
  27. package/third_party_licenses/zerocopy-derive-0.8.47-license.txt +26 -0
  28. package/ts/00_commitinfo_data.ts +1 -1
  29. package/ts/index.ts +2 -20
  30. package/ts/plugins.ts +1 -2
@@ -0,0 +1,29 @@
1
+ Short version for non-lawyers:
2
+
3
+ `rustix` is triple-licensed under Apache 2.0 with the LLVM Exception,
4
+ Apache 2.0, and MIT terms.
5
+
6
+
7
+ Longer version:
8
+
9
+ Copyrights in the `rustix` project are retained by their contributors.
10
+ No copyright assignment is required to contribute to the `rustix`
11
+ project.
12
+
13
+ Some files include code derived from Rust's `libstd`; see the comments in
14
+ the code for details.
15
+
16
+ Except as otherwise noted (below and/or in individual files), `rustix`
17
+ is licensed under:
18
+
19
+ - the Apache License, Version 2.0, with the LLVM Exception
20
+ <LICENSE-Apache-2.0_WITH_LLVM-exception> or
21
+ <http://llvm.org/foundation/relicensing/LICENSE.txt>
22
+ - the Apache License, Version 2.0
23
+ <LICENSE-APACHE> or
24
+ <http://www.apache.org/licenses/LICENSE-2.0>,
25
+ - or the MIT license
26
+ <LICENSE-MIT> or
27
+ <http://opensource.org/licenses/MIT>,
28
+
29
+ at your option.
@@ -0,0 +1,25 @@
1
+ Copyright (c) 2021 Valuable Contributors
2
+
3
+ Permission is hereby granted, free of charge, to any
4
+ person obtaining a copy of this software and associated
5
+ documentation files (the "Software"), to deal in the
6
+ Software without restriction, including without
7
+ limitation the rights to use, copy, modify, merge,
8
+ publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software
10
+ is furnished to do so, subject to the following
11
+ conditions:
12
+
13
+ The above copyright notice and this permission notice
14
+ shall be included in all copies or substantial portions
15
+ of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25
+ DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,26 @@
1
+ Copyright 2023 The Fuchsia Authors
2
+
3
+ Permission is hereby granted, free of charge, to any
4
+ person obtaining a copy of this software and associated
5
+ documentation files (the "Software"), to deal in the
6
+ Software without restriction, including without
7
+ limitation the rights to use, copy, modify, merge,
8
+ publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software
10
+ is furnished to do so, subject to the following
11
+ conditions:
12
+
13
+ The above copyright notice and this permission notice
14
+ shall be included in all copies or substantial portions
15
+ of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25
+ DEALINGS IN THE SOFTWARE.
26
+
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@lossless.org/objectstorage',
6
- version: '9.0.1',
6
+ version: '10.0.1',
7
7
  description: 'A Node.js TypeScript package to create a local S3-compatible storage server using mapped local directories for development and testing purposes.'
8
8
  }
package/ts/index.ts CHANGED
@@ -1399,7 +1399,6 @@ export class ObjectStorage {
1399
1399
  pool: poolArg,
1400
1400
  },
1401
1401
  });
1402
- await objectStorageInstance.ensureLocalBinariesExecutable();
1403
1402
  const spawned = await objectStorageInstance.bridge.spawn();
1404
1403
  if (!spawned) {
1405
1404
  throw new Error(
@@ -1418,7 +1417,6 @@ export class ObjectStorage {
1418
1417
 
1419
1418
  // INSTANCE
1420
1419
  public config: Required<IObjectStorageConfig>;
1421
- private localBinaryPaths: string[];
1422
1420
  private bridge: InstanceType<typeof plugins.RustBridge<TRustStorageCommands>>;
1423
1421
  private running = false;
1424
1422
  private completedStopResult: IStorageStopResult | undefined;
@@ -1430,33 +1428,18 @@ export class ObjectStorage {
1430
1428
 
1431
1429
  constructor(configArg: IObjectStorageConfig = {}) {
1432
1430
  this.config = mergeConfig(configArg);
1433
- this.localBinaryPaths = getRustStorageBinaryNames().map((binaryNameArg) =>
1431
+ const localBinaryPaths = getRustStorageBinaryNames().map((binaryNameArg) =>
1434
1432
  plugins.path.join(paths.packageDir, 'dist_rust', binaryNameArg),
1435
1433
  );
1436
1434
  this.bridge = new plugins.RustBridge<TRustStorageCommands>({
1437
1435
  binaryName: 'ruststorage',
1438
- localPaths: this.localBinaryPaths,
1436
+ localPaths: localBinaryPaths,
1439
1437
  readyTimeoutMs: 30000,
1440
1438
  requestTimeoutMs: 300000,
1441
1439
  maxPayloadSize: MAXIMUM_MANAGEMENT_PAYLOAD_BYTES,
1442
1440
  });
1443
1441
  }
1444
1442
 
1445
- private async ensureLocalBinariesExecutable() {
1446
- for (const localBinaryPath of this.localBinaryPaths) {
1447
- const binaryStat = await plugins.fs.stat(localBinaryPath).catch((errorArg: NodeJS.ErrnoException) => {
1448
- if (errorArg.code !== 'ENOENT') {
1449
- throw errorArg;
1450
- }
1451
- return null;
1452
- });
1453
- if (!binaryStat || (binaryStat.mode & 0o111) !== 0) {
1454
- continue;
1455
- }
1456
- await plugins.fs.chmod(localBinaryPath, binaryStat.mode | 0o755);
1457
- }
1458
- }
1459
-
1460
1443
  public start(): Promise<void> {
1461
1444
  if (this.stopRequested && !this.stopCompleted) {
1462
1445
  return Promise.reject(new Error('Storage shutdown must complete before restarting.'));
@@ -1487,7 +1470,6 @@ export class ObjectStorage {
1487
1470
 
1488
1471
  private async startInternal(): Promise<void> {
1489
1472
  try {
1490
- await this.ensureLocalBinariesExecutable();
1491
1473
  // A failed spawn can still own a transport whose termination needs retrying.
1492
1474
  this.bridgeOwned = true;
1493
1475
  const spawned = await this.bridge.spawn();
package/ts/plugins.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  // node native
2
2
  import * as crypto from 'crypto';
3
- import * as fs from 'node:fs/promises';
4
3
  import * as path from 'path';
5
4
 
6
- export { crypto, fs, path };
5
+ export { crypto, path };
7
6
 
8
7
  // @push.rocks scope
9
8
  import * as smartpath from '@push.rocks/smartpath';