@voltro/plugin-storage 0.84.0 → 0.86.0
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/CHANGELOG.md +1215 -0
- package/README.md +50 -0
- package/THIRD-PARTY-NOTICES.md +91 -365
- package/dist/access.js +47 -0
- package/dist/assetRef.js +13 -0
- package/dist/avatar.js +39 -0
- package/dist/constraints.js +93 -0
- package/dist/derivatives.js +30 -0
- package/dist/env.js +156 -0
- package/dist/grant.js +112 -0
- package/dist/index.d.ts +175 -65
- package/dist/index.js +620 -3072
- package/dist/ingest.js +81 -0
- package/dist/ingestPolicy.js +1 -0
- package/dist/metadataError.js +19 -0
- package/dist/objectLifecycle.js +209 -0
- package/dist/objectMetadata.js +150 -0
- package/dist/objectWriter.js +58 -0
- package/dist/pathDurability.js +16 -0
- package/dist/providers.js +493 -0
- package/dist/referenceCatalogue.js +31 -0
- package/dist/rpc.d.ts +212 -166
- package/dist/rpc.js +63 -40
- package/dist/scanners.js +46 -0
- package/dist/service.js +1084 -0
- package/dist/storageNamespaces.js +56 -0
- package/dist/storageNumbers.js +13 -0
- package/dist/storageObjectNamespaces.js +194 -0
- package/dist/storageReferenceInstances.js +52 -0
- package/dist/streamBridge.js +30 -0
- package/dist/table.js +53 -0
- package/dist/transcodeVideo.js +53 -0
- package/dist/transform.js +90 -0
- package/dist/transformCache.js +31 -0
- package/dist/types.d.ts +31 -45
- package/dist/types.js +5 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -20,7 +20,57 @@ Installation, guides, the full API reference, and examples all live in the
|
|
|
20
20
|
**[Voltro documentation](https://docs.voltro.dev/docs/intro/getting-started)** — the single source of truth. This README is
|
|
21
21
|
deliberately short so there is nothing here to drift out of date.
|
|
22
22
|
|
|
23
|
+
### Bounded HTTP source reader
|
|
24
|
+
|
|
25
|
+
Server integrations may use `fetchIngestBody(url, maxBytes?, policy?)` to collect
|
|
26
|
+
bounded, interruptible HTTP bytes before validating an expected digest or size.
|
|
27
|
+
The default limit is 64 MiB. Redirects and internal addresses use `IngestPolicy`;
|
|
28
|
+
`allowHosts` exempts named internal hosts, not an exclusive source allow-list.
|
|
29
|
+
The reader creates no references and performs no authorization, scanning or
|
|
30
|
+
persistence. Use `StorageService.put` after validation for the complete storage
|
|
31
|
+
pipeline, bound request duration, and protect network egress against DNS rebinding.
|
|
32
|
+
Redact capability URLs from errors. Bounded buffering is not a process-RSS limit.
|
|
33
|
+
|
|
23
34
|
## License
|
|
24
35
|
|
|
36
|
+
|
|
25
37
|
Proprietary. © 2026 Voltro UG. Your use is governed by the
|
|
26
38
|
[Terms of Service](https://voltro.cloud/legal/terms). See the bundled `LICENSE`.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Reference catalogues and combined replica inspection
|
|
42
|
+
|
|
43
|
+
A physical provider namespace identifies object bytes. A reference catalogue identifies the metadata view that lists those objects. They are separate: independent reference stores may use the same provider, and one database may contain views for independent providers or named storage instances.
|
|
44
|
+
|
|
45
|
+
`RefStore.catalogueId` is a required `Effect<string, StorageError>` with a stable SHA-256 identity for its actual catalogue view. Replicas reading the same view must agree; independent catalogues must differ even if their reference IDs or contents match. Custom stores must retain this identity with their metadata. Wrappers forward the underlying effect. `memoryRefStore()` creates one identity per actual map, not per read.
|
|
46
|
+
|
|
47
|
+
Configured default stores initialize `_voltro_storage_reference_catalogue` after normal schema reconciliation. Production starts still require applying the normal schema first. Preserve the catalogue marker on restart, backup and restore. If database copies will run concurrently as independent catalogues, assign them distinct markers through a reviewed stopped-service data migration. Do not treat two independent copies as one catalogue merely because a backup copied its marker.
|
|
48
|
+
|
|
49
|
+
Direct `dataStoreRefStore` consumers register `storageReferenceCatalogueTable`, reconcile their schema and call `ensureStorageReferenceCatalogue(store)` once at boot before inspection. The adapter's `catalogueId` read never writes or repairs missing or corrupt identity. Its view identity additionally includes the configured storage instance and physical provider namespace.
|
|
50
|
+
|
|
51
|
+
The `/refs` and `/stats` inspect reads report their catalogue, provider namespace and storage instance in `source`. Combined reads expose `sources` and attach source identity and answering replica IDs to each reference. Shared catalogue rows and counters appear once; independent catalogues remain separate, including equal reference IDs. The observation envelope retains unavailable-replica evidence. Counts describe reference metadata, not a complete inventory of unindexed provider objects.
|
|
52
|
+
|
|
53
|
+
Each catalogue contributes up to 50 references for the requested page offset. Combined pages can therefore contain more than 50 files. Page advancement moves the same 50-reference window across all catalogues; ordering is newest first within the combined window. This is not global pagination across a single merged index. Divergent snapshots from the same shared catalogue are refused with an explicit comparison/retry message; no responder wins silently and counters are not guessed.
|
|
54
|
+
|
|
55
|
+
The shared Storage browser displays file provenance and catalogue page semantics. Choose one replica before uploading, downloading, sharing, revoking access or deleting. Multi-replica browsing does not fan out file operations. Custom hosts must pass `StoragePage.operationTargetAvailable={false}` while multiple replicas or all replicas are selected, and use a distinct upload scope when the target changes. Server authorization and explicit mutation-target checks remain authoritative.
|
|
56
|
+
|
|
57
|
+
Combined instance choosers offer only identical plugin declarations from every answering replica. Differing or absent installations are named explicitly; select a single replica to inspect those instances. Missing replica answers remain visible in the observation notice.
|
|
58
|
+
|
|
59
|
+
## Through-app ticket retries
|
|
60
|
+
|
|
61
|
+
With the application's DataStore and default reference/grant stores bound, ordinary and Inspect through-app upload tickets carry one native object operation. The ordinary ticket response exposes its optional `operationId`. Keep the issued upload URL to retry the same transfer: repeated or concurrent POSTs with the same bytes converge on one reference in that physical storage namespace.
|
|
62
|
+
|
|
63
|
+
A provider failure retains the operation's intent and reservation until it is resumed or explicitly retired through the server's object-operation lifecycle. Ticket expiry alone does not release that reservation. Its reference becomes visible after the bytes are confirmed; retrying the same ticket resumes that intent. Different bytes or immutable inputs under that operation are refused with HTTP 409. Upload and resumable HTTP responses retain a provider's declared error status.
|
|
64
|
+
|
|
65
|
+
Pass the returned `operationId` in a fresh authorized `storage.mintUploadTicket` request with the same metadata to renew an expired ticket and resume its retained transfer. A caller can also choose a stable `operationId` before the first request to recover a lost ticket acknowledgement. This identity is scoped to the current upload owner, tenant and configured storage instance; it is not an authorization credential. Omitting `operationId` starts another operation. Custom reference or grant stores do not bind the native object-operation boundary and do not advertise its operation ID. Presigned, resumable and multipart transfers retain their separate transport contracts. Provider I/O stays outside retryable metadata transactions; the operation does not add a later business-authorization check.
|
|
66
|
+
|
|
67
|
+
`useUpload` retains an advertised ticket `operationId` across its automatic through-app retries. To recover a lost first mint reply or an explicit later UI retry, choose `operationId` before the first `upload(file, { operationId, prefer: 'through-app' })` call and retain it with that same file and metadata. A new file or business scope needs a new identity. `uploadMany` rejects one explicit identity shared by multiple files before dispatch. Without native operation support, omit the explicit identity; custom stores do not acquire an exactly-once guarantee. This does not persist a browser transfer across a page reload or extend presigned, resumable or multipart contracts.
|
|
68
|
+
|
|
69
|
+
Object keys are physical provider keys. Native operation-backed writes use their existing content-addressed namespace; use the reference ID and approved ticket binding instead of inferring authority from a logical path inside a physical key.
|
|
70
|
+
|
|
71
|
+
## Signed token deadlines
|
|
72
|
+
|
|
73
|
+
Native signed read grants and upload, finalize, resumable and multipart tickets expire at their signed Unix-second deadline. Verification refuses the exact deadline and every later instant; a zero-second lifetime grants no usable interval. Obtain a new token through the authorized issuer when another transfer or read is needed.
|
|
74
|
+
|
|
75
|
+
The ticket keeps its approved owner, tenant, key and access policy. Its deadline does not turn redemption into a session login or rerun the application's authorization function. Provider-presigned URLs retain their provider's expiry contract; this rule concerns Voltro's native signed tokens.
|
|
76
|
+
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Third-Party Notices — @voltro/plugin-storage
|
|
2
2
|
|
|
3
|
-
This package
|
|
3
|
+
This package uses the open-source software listed below. Each is the
|
|
4
4
|
property of its respective copyright holders and is used under the terms of
|
|
5
5
|
its license. This file is provided for attribution; it grants no rights in
|
|
6
6
|
@voltro/plugin-storage itself, which is proprietary (see LICENSE).
|
|
7
7
|
|
|
8
|
-
Generated from the resolved runtime dependency closure (
|
|
8
|
+
Generated from the resolved runtime dependency closure (108 packages).
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -3900,63 +3900,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
3900
3900
|
SOFTWARE.
|
|
3901
3901
|
```
|
|
3902
3902
|
|
|
3903
|
-
## @effect/
|
|
3904
|
-
|
|
3905
|
-
License: MIT
|
|
3906
|
-
|
|
3907
|
-
```
|
|
3908
|
-
MIT License
|
|
3909
|
-
|
|
3910
|
-
Copyright (c) 2023-present The Contributors
|
|
3911
|
-
|
|
3912
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
3913
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
3914
|
-
in the Software without restriction, including without limitation the rights
|
|
3915
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
3916
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
3917
|
-
furnished to do so, subject to the following conditions:
|
|
3918
|
-
|
|
3919
|
-
The above copyright notice and this permission notice shall be included in all
|
|
3920
|
-
copies or substantial portions of the Software.
|
|
3921
|
-
|
|
3922
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
3923
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
3924
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
3925
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
3926
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
3927
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
3928
|
-
SOFTWARE.
|
|
3929
|
-
```
|
|
3930
|
-
|
|
3931
|
-
## @effect/experimental@0.61.1
|
|
3932
|
-
|
|
3933
|
-
License: MIT
|
|
3934
|
-
|
|
3935
|
-
```
|
|
3936
|
-
MIT License
|
|
3937
|
-
|
|
3938
|
-
Copyright (c) 2023-present The Contributors
|
|
3939
|
-
|
|
3940
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
3941
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
3942
|
-
in the Software without restriction, including without limitation the rights
|
|
3943
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
3944
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
3945
|
-
furnished to do so, subject to the following conditions:
|
|
3946
|
-
|
|
3947
|
-
The above copyright notice and this permission notice shall be included in all
|
|
3948
|
-
copies or substantial portions of the Software.
|
|
3949
|
-
|
|
3950
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
3951
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
3952
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
3953
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
3954
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
3955
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
3956
|
-
SOFTWARE.
|
|
3957
|
-
```
|
|
3958
|
-
|
|
3959
|
-
## @effect/platform-node@0.108.2
|
|
3903
|
+
## @effect/platform-node@4.0.1
|
|
3960
3904
|
|
|
3961
3905
|
License: MIT
|
|
3962
3906
|
|
|
@@ -3984,7 +3928,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
3984
3928
|
SOFTWARE.
|
|
3985
3929
|
```
|
|
3986
3930
|
|
|
3987
|
-
## @effect/platform-node-shared@0.
|
|
3931
|
+
## @effect/platform-node-shared@4.0.1
|
|
3988
3932
|
|
|
3989
3933
|
License: MIT
|
|
3990
3934
|
|
|
@@ -4012,62 +3956,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
4012
3956
|
SOFTWARE.
|
|
4013
3957
|
```
|
|
4014
3958
|
|
|
4015
|
-
## @effect/sql@0.52.1
|
|
4016
|
-
|
|
4017
|
-
License: MIT
|
|
4018
|
-
|
|
4019
|
-
```
|
|
4020
|
-
MIT License
|
|
4021
|
-
|
|
4022
|
-
Copyright (c) 2023-present The Contributors
|
|
4023
|
-
|
|
4024
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4025
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
4026
|
-
in the Software without restriction, including without limitation the rights
|
|
4027
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
4028
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
4029
|
-
furnished to do so, subject to the following conditions:
|
|
4030
|
-
|
|
4031
|
-
The above copyright notice and this permission notice shall be included in all
|
|
4032
|
-
copies or substantial portions of the Software.
|
|
4033
|
-
|
|
4034
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
4035
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
4036
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
4037
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
4038
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
4039
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
4040
|
-
SOFTWARE.
|
|
4041
|
-
```
|
|
4042
|
-
|
|
4043
|
-
## @effect/workflow@0.19.1
|
|
4044
|
-
|
|
4045
|
-
License: MIT
|
|
4046
|
-
|
|
4047
|
-
```
|
|
4048
|
-
MIT License
|
|
4049
|
-
|
|
4050
|
-
Copyright (c) 2023-present The Contributors
|
|
4051
|
-
|
|
4052
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4053
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
4054
|
-
in the Software without restriction, including without limitation the rights
|
|
4055
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
4056
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
4057
|
-
furnished to do so, subject to the following conditions:
|
|
4058
|
-
|
|
4059
|
-
The above copyright notice and this permission notice shall be included in all
|
|
4060
|
-
copies or substantial portions of the Software.
|
|
4061
|
-
|
|
4062
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
4063
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
4064
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
4065
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
4066
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
4067
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
4068
|
-
SOFTWARE.
|
|
4069
|
-
```
|
|
4070
|
-
|
|
4071
3959
|
## @img/colour@1.1.0
|
|
4072
3960
|
|
|
4073
3961
|
License: MIT
|
|
@@ -7516,62 +7404,6 @@ Apache License
|
|
|
7516
7404
|
limitations under the License.
|
|
7517
7405
|
```
|
|
7518
7406
|
|
|
7519
|
-
## @parcel/watcher@2.5.6
|
|
7520
|
-
|
|
7521
|
-
License: MIT
|
|
7522
|
-
|
|
7523
|
-
```
|
|
7524
|
-
MIT License
|
|
7525
|
-
|
|
7526
|
-
Copyright (c) 2017-present Devon Govett
|
|
7527
|
-
|
|
7528
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7529
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7530
|
-
in the Software without restriction, including without limitation the rights
|
|
7531
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7532
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
7533
|
-
furnished to do so, subject to the following conditions:
|
|
7534
|
-
|
|
7535
|
-
The above copyright notice and this permission notice shall be included in all
|
|
7536
|
-
copies or substantial portions of the Software.
|
|
7537
|
-
|
|
7538
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
7539
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
7540
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
7541
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
7542
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
7543
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
7544
|
-
SOFTWARE.
|
|
7545
|
-
```
|
|
7546
|
-
|
|
7547
|
-
## @parcel/watcher-linux-x64-glibc@2.5.6
|
|
7548
|
-
|
|
7549
|
-
License: MIT
|
|
7550
|
-
|
|
7551
|
-
```
|
|
7552
|
-
MIT License
|
|
7553
|
-
|
|
7554
|
-
Copyright (c) 2017-present Devon Govett
|
|
7555
|
-
|
|
7556
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7557
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7558
|
-
in the Software without restriction, including without limitation the rights
|
|
7559
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7560
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
7561
|
-
furnished to do so, subject to the following conditions:
|
|
7562
|
-
|
|
7563
|
-
The above copyright notice and this permission notice shall be included in all
|
|
7564
|
-
copies or substantial portions of the Software.
|
|
7565
|
-
|
|
7566
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
7567
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
7568
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
7569
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
7570
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
7571
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
7572
|
-
SOFTWARE.
|
|
7573
|
-
```
|
|
7574
|
-
|
|
7575
7407
|
## @smithy/core@3.33.3
|
|
7576
7408
|
|
|
7577
7409
|
License: Apache-2.0
|
|
@@ -8820,6 +8652,62 @@ Apache License
|
|
|
8820
8652
|
limitations under the License.
|
|
8821
8653
|
```
|
|
8822
8654
|
|
|
8655
|
+
## @types/node@26.4.1
|
|
8656
|
+
|
|
8657
|
+
License: MIT
|
|
8658
|
+
|
|
8659
|
+
```
|
|
8660
|
+
MIT License
|
|
8661
|
+
|
|
8662
|
+
Copyright (c) Microsoft Corporation.
|
|
8663
|
+
|
|
8664
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8665
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8666
|
+
in the Software without restriction, including without limitation the rights
|
|
8667
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8668
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8669
|
+
furnished to do so, subject to the following conditions:
|
|
8670
|
+
|
|
8671
|
+
The above copyright notice and this permission notice shall be included in all
|
|
8672
|
+
copies or substantial portions of the Software.
|
|
8673
|
+
|
|
8674
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
8675
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
8676
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
8677
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
8678
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
8679
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
8680
|
+
SOFTWARE
|
|
8681
|
+
```
|
|
8682
|
+
|
|
8683
|
+
## @types/ws@8.18.1
|
|
8684
|
+
|
|
8685
|
+
License: MIT
|
|
8686
|
+
|
|
8687
|
+
```
|
|
8688
|
+
MIT License
|
|
8689
|
+
|
|
8690
|
+
Copyright (c) Microsoft Corporation.
|
|
8691
|
+
|
|
8692
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8693
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8694
|
+
in the Software without restriction, including without limitation the rights
|
|
8695
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8696
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8697
|
+
furnished to do so, subject to the following conditions:
|
|
8698
|
+
|
|
8699
|
+
The above copyright notice and this permission notice shall be included in all
|
|
8700
|
+
copies or substantial portions of the Software.
|
|
8701
|
+
|
|
8702
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
8703
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
8704
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
8705
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
8706
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
8707
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
8708
|
+
SOFTWARE
|
|
8709
|
+
```
|
|
8710
|
+
|
|
8823
8711
|
## @typespec/ts-http-runtime@0.3.5
|
|
8824
8712
|
|
|
8825
8713
|
License: MIT
|
|
@@ -9680,62 +9568,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
9680
9568
|
SOFTWARE.
|
|
9681
9569
|
```
|
|
9682
9570
|
|
|
9683
|
-
## is-extglob@2.1.1
|
|
9684
|
-
|
|
9685
|
-
License: MIT
|
|
9686
|
-
|
|
9687
|
-
```
|
|
9688
|
-
The MIT License (MIT)
|
|
9689
|
-
|
|
9690
|
-
Copyright (c) 2014-2016, Jon Schlinkert
|
|
9691
|
-
|
|
9692
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9693
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9694
|
-
in the Software without restriction, including without limitation the rights
|
|
9695
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9696
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
9697
|
-
furnished to do so, subject to the following conditions:
|
|
9698
|
-
|
|
9699
|
-
The above copyright notice and this permission notice shall be included in
|
|
9700
|
-
all copies or substantial portions of the Software.
|
|
9701
|
-
|
|
9702
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
9703
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
9704
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
9705
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
9706
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
9707
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
9708
|
-
THE SOFTWARE.
|
|
9709
|
-
```
|
|
9710
|
-
|
|
9711
|
-
## is-glob@4.0.3
|
|
9712
|
-
|
|
9713
|
-
License: MIT
|
|
9714
|
-
|
|
9715
|
-
```
|
|
9716
|
-
The MIT License (MIT)
|
|
9717
|
-
|
|
9718
|
-
Copyright (c) 2014-2017, Jon Schlinkert.
|
|
9719
|
-
|
|
9720
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9721
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9722
|
-
in the Software without restriction, including without limitation the rights
|
|
9723
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9724
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
9725
|
-
furnished to do so, subject to the following conditions:
|
|
9726
|
-
|
|
9727
|
-
The above copyright notice and this permission notice shall be included in
|
|
9728
|
-
all copies or substantial portions of the Software.
|
|
9729
|
-
|
|
9730
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
9731
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
9732
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
9733
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
9734
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
9735
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
9736
|
-
THE SOFTWARE.
|
|
9737
|
-
```
|
|
9738
|
-
|
|
9739
9571
|
## isomorphic.js@0.2.5
|
|
9740
9572
|
|
|
9741
9573
|
License: MIT
|
|
@@ -9792,40 +9624,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
9792
9624
|
SOFTWARE.
|
|
9793
9625
|
```
|
|
9794
9626
|
|
|
9795
|
-
## kubernetes-types@1.30.0
|
|
9796
|
-
|
|
9797
|
-
License: Apache-2.0
|
|
9798
|
-
|
|
9799
|
-
_(no bundled license text found in the package; see its npm page.)_
|
|
9800
|
-
|
|
9801
|
-
## layerr@3.0.0
|
|
9802
|
-
|
|
9803
|
-
License: MIT
|
|
9804
|
-
|
|
9805
|
-
```
|
|
9806
|
-
MIT License
|
|
9807
|
-
|
|
9808
|
-
Copyright (c) 2020 Perry Mitchell
|
|
9809
|
-
|
|
9810
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9811
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9812
|
-
in the Software without restriction, including without limitation the rights
|
|
9813
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9814
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
9815
|
-
furnished to do so, subject to the following conditions:
|
|
9816
|
-
|
|
9817
|
-
The above copyright notice and this permission notice shall be included in all
|
|
9818
|
-
copies or substantial portions of the Software.
|
|
9819
|
-
|
|
9820
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
9821
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
9822
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
9823
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
9824
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
9825
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
9826
|
-
SOFTWARE.
|
|
9827
|
-
```
|
|
9828
|
-
|
|
9829
9627
|
## lib0@0.2.117
|
|
9830
9628
|
|
|
9831
9629
|
License: MIT
|
|
@@ -9854,34 +9652,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
9854
9652
|
SOFTWARE.
|
|
9855
9653
|
```
|
|
9856
9654
|
|
|
9857
|
-
## mime@3.0.0
|
|
9858
|
-
|
|
9859
|
-
License: MIT
|
|
9860
|
-
|
|
9861
|
-
```
|
|
9862
|
-
The MIT License (MIT)
|
|
9863
|
-
|
|
9864
|
-
Copyright (c) 2010 Benjamin Thomas, Robert Kieffer
|
|
9865
|
-
|
|
9866
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9867
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9868
|
-
in the Software without restriction, including without limitation the rights
|
|
9869
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9870
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
9871
|
-
furnished to do so, subject to the following conditions:
|
|
9872
|
-
|
|
9873
|
-
The above copyright notice and this permission notice shall be included in
|
|
9874
|
-
all copies or substantial portions of the Software.
|
|
9875
|
-
|
|
9876
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
9877
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
9878
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
9879
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
9880
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
9881
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
9882
|
-
THE SOFTWARE.
|
|
9883
|
-
```
|
|
9884
|
-
|
|
9885
9655
|
## ms@2.1.3
|
|
9886
9656
|
|
|
9887
9657
|
License: MIT
|
|
@@ -9910,50 +9680,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
9910
9680
|
SOFTWARE.
|
|
9911
9681
|
```
|
|
9912
9682
|
|
|
9913
|
-
## multipasta@0.2.8
|
|
9914
|
-
|
|
9915
|
-
License: MIT
|
|
9916
|
-
|
|
9917
|
-
```
|
|
9918
|
-
MIT License
|
|
9919
|
-
|
|
9920
|
-
Copyright (c) 2023-present The Contributors
|
|
9921
|
-
|
|
9922
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9923
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9924
|
-
in the Software without restriction, including without limitation the rights
|
|
9925
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9926
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
9927
|
-
furnished to do so, subject to the following conditions:
|
|
9928
|
-
|
|
9929
|
-
The above copyright notice and this permission notice shall be included in all
|
|
9930
|
-
copies or substantial portions of the Software.
|
|
9931
|
-
|
|
9932
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
9933
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
9934
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
9935
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
9936
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
9937
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
9938
|
-
SOFTWARE.
|
|
9939
|
-
```
|
|
9940
|
-
|
|
9941
|
-
## node-addon-api@7.1.1
|
|
9942
|
-
|
|
9943
|
-
License: MIT
|
|
9944
|
-
|
|
9945
|
-
```
|
|
9946
|
-
The MIT License (MIT)
|
|
9947
|
-
|
|
9948
|
-
Copyright (c) 2017 [Node.js API collaborators](https://github.com/nodejs/node-addon-api#collaborators)
|
|
9949
|
-
|
|
9950
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
9951
|
-
|
|
9952
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
9953
|
-
|
|
9954
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
9955
|
-
```
|
|
9956
|
-
|
|
9957
9683
|
## path-expression-matcher@1.5.0
|
|
9958
9684
|
|
|
9959
9685
|
License: MIT
|
|
@@ -9982,34 +9708,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
9982
9708
|
SOFTWARE.
|
|
9983
9709
|
```
|
|
9984
9710
|
|
|
9985
|
-
## picomatch@4.0.7
|
|
9986
|
-
|
|
9987
|
-
License: MIT
|
|
9988
|
-
|
|
9989
|
-
```
|
|
9990
|
-
The MIT License (MIT)
|
|
9991
|
-
|
|
9992
|
-
Copyright (c) 2017-present, Jon Schlinkert.
|
|
9993
|
-
|
|
9994
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9995
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9996
|
-
in the Software without restriction, including without limitation the rights
|
|
9997
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9998
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
9999
|
-
furnished to do so, subject to the following conditions:
|
|
10000
|
-
|
|
10001
|
-
The above copyright notice and this permission notice shall be included in
|
|
10002
|
-
all copies or substantial portions of the Software.
|
|
10003
|
-
|
|
10004
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
10005
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
10006
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
10007
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
10008
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
10009
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
10010
|
-
THE SOFTWARE.
|
|
10011
|
-
```
|
|
10012
|
-
|
|
10013
9711
|
## readable-stream@3.6.2
|
|
10014
9712
|
|
|
10015
9713
|
License: MIT
|
|
@@ -10733,14 +10431,14 @@ Apache License
|
|
|
10733
10431
|
limitations under the License.
|
|
10734
10432
|
```
|
|
10735
10433
|
|
|
10736
|
-
##
|
|
10434
|
+
## ulid@3.0.2
|
|
10737
10435
|
|
|
10738
10436
|
License: MIT
|
|
10739
10437
|
|
|
10740
10438
|
```
|
|
10741
|
-
MIT License
|
|
10439
|
+
The MIT License (MIT)
|
|
10742
10440
|
|
|
10743
|
-
Copyright (c)
|
|
10441
|
+
Copyright (c) 2017 Alizain Feerasta
|
|
10744
10442
|
|
|
10745
10443
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10746
10444
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -10817,6 +10515,34 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
10817
10515
|
SOFTWARE.
|
|
10818
10516
|
```
|
|
10819
10517
|
|
|
10518
|
+
## undici-types@8.3.0
|
|
10519
|
+
|
|
10520
|
+
License: MIT
|
|
10521
|
+
|
|
10522
|
+
```
|
|
10523
|
+
MIT License
|
|
10524
|
+
|
|
10525
|
+
Copyright (c) Matteo Collina and Undici contributors
|
|
10526
|
+
|
|
10527
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10528
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10529
|
+
in the Software without restriction, including without limitation the rights
|
|
10530
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10531
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10532
|
+
furnished to do so, subject to the following conditions:
|
|
10533
|
+
|
|
10534
|
+
The above copyright notice and this permission notice shall be included in all
|
|
10535
|
+
copies or substantial portions of the Software.
|
|
10536
|
+
|
|
10537
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
10538
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
10539
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
10540
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
10541
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
10542
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
10543
|
+
SOFTWARE.
|
|
10544
|
+
```
|
|
10545
|
+
|
|
10820
10546
|
## util-deprecate@1.0.2
|
|
10821
10547
|
|
|
10822
10548
|
License: MIT
|
package/dist/access.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { randomBytes as e, scryptSync as t, timingSafeEqual as n } from "node:crypto";
|
|
2
|
+
import { Effect as r } from "effect";
|
|
3
|
+
//#region src/access.ts
|
|
4
|
+
var i = (n) => {
|
|
5
|
+
let r = e(16).toString("hex");
|
|
6
|
+
return `${r}:${t(n, r, 32).toString("hex")}`;
|
|
7
|
+
}, a = (e, r) => {
|
|
8
|
+
if (!e || !r) return !1;
|
|
9
|
+
let [i, a] = r.split(":");
|
|
10
|
+
if (!i || !a) return !1;
|
|
11
|
+
let o = Buffer.from(a, "hex"), s = t(e, i, o.length);
|
|
12
|
+
return s.length === o.length && n(s, o);
|
|
13
|
+
}, o = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "string") : [], s = (e) => o(e.metadata?.roles), c = (e) => o(e.scopes), l = (e, t) => e.some((e) => t.includes(e)), u = (e) => o(e.metadata?.groups), d = (e) => typeof e == "boolean" ? r.succeed(e) : r.isEffect(e) ? e : r.promise(() => e), f = (e, t, n = {}) => r.gen(function* () {
|
|
14
|
+
if (t.id && e.ownerId && t.id === e.ownerId) return !0;
|
|
15
|
+
let i = e.accessPolicy ?? [];
|
|
16
|
+
if (i.length === 0) return !1;
|
|
17
|
+
let a = n.resolveGroups ? yield* r.promise(async () => await n.resolveGroups(t)) : u(t);
|
|
18
|
+
for (let r of i) if (yield* p(r, e, t, a, n)) return !0;
|
|
19
|
+
return !1;
|
|
20
|
+
}), p = (e, t, n, i, o) => r.gen(function* () {
|
|
21
|
+
let r = !1, u = (e) => (r = !0, e);
|
|
22
|
+
if (e.owner !== void 0 && e.owner && !u(!!n.id && !!t.ownerId && n.id === t.ownerId) || e.tenant !== void 0 && e.tenant && !u(!!n.tenantId && n.tenantId === t.tenantId) || e.apiKey !== void 0 && e.apiKey && !u(n.type === "apiKey") || e.roles && e.roles.length > 0 && !u(l(s(n), e.roles)) || e.groups && e.groups.length > 0 && !u(l(i, e.groups)) || e.scopes && e.scopes.length > 0 && !u(l(c(n), e.scopes)) || e.password !== void 0 && e.password && !u(a(o.password, t.passwordHash))) return !1;
|
|
23
|
+
if (e.guard) {
|
|
24
|
+
let r = o.guards?.[e.guard];
|
|
25
|
+
if (!u(r ? yield* d(r({
|
|
26
|
+
subject: n,
|
|
27
|
+
ref: t
|
|
28
|
+
})) : !1)) return !1;
|
|
29
|
+
}
|
|
30
|
+
return r;
|
|
31
|
+
}), m = (e, t) => {
|
|
32
|
+
let n = [];
|
|
33
|
+
e.id && n.push({
|
|
34
|
+
type: e.type === "apiKey" ? "apiKey" : "user",
|
|
35
|
+
id: e.id
|
|
36
|
+
});
|
|
37
|
+
for (let e of t) n.push({
|
|
38
|
+
type: "group",
|
|
39
|
+
id: e
|
|
40
|
+
});
|
|
41
|
+
return n;
|
|
42
|
+
}, h = (e, t, n, r, i) => {
|
|
43
|
+
let a = m(t, n);
|
|
44
|
+
return e.some((e) => e.expiresAt && e.expiresAt.getTime() < i || r === "write" && e.permission !== "write" ? !1 : a.some((t) => t.type === e.principalType && t.id === e.principalId));
|
|
45
|
+
}, g = (e, t) => t.resolveGroups ? r.promise(async () => await t.resolveGroups(e)) : r.succeed(u(e));
|
|
46
|
+
//#endregion
|
|
47
|
+
export { f as evaluatePolicy, h as grantsAllow, i as hashPassword, g as resolveSubjectGroups, m as subjectPrincipals, a as verifyPassword };
|
package/dist/assetRef.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { _voltroStorageRefsTable as e } from "./table.js";
|
|
2
|
+
import { mixin as t, reference as n, text as r } from "@voltro/database";
|
|
3
|
+
//#region src/assetRef.ts
|
|
4
|
+
function i(t = {}) {
|
|
5
|
+
let i = t.nullable ?? !0, a = t.fk === !1 ? r().externalId() : n(() => e, { onDelete: t.onDelete ?? "setNull" });
|
|
6
|
+
return i ? a.nullable() : a;
|
|
7
|
+
}
|
|
8
|
+
var a = () => t({
|
|
9
|
+
id: "@voltro/plugin-storage/withStorage",
|
|
10
|
+
fields: { asset: i() }
|
|
11
|
+
});
|
|
12
|
+
//#endregion
|
|
13
|
+
export { i as assetRef, a as withStorage };
|