@toa.io/extensions.exposition 1.0.0-alpha.271 → 1.0.0-alpha.273
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 +40 -0
- package/components/{exposition.stash → exposition.atom}/manifest.toa.yaml +4 -4
- package/components/{exposition.stash → exposition.atom}/operations/meter.js +1 -1
- package/components/exposition.octets/manifest.toa.yaml +28 -10
- package/components/exposition.octets/operations/put.js +20 -5
- package/components/identity.bans/manifest.toa.yaml +26 -7
- package/components/identity.bans/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.basic/manifest.toa.yaml +106 -30
- package/components/identity.basic/operations/authenticate.js +6 -3
- package/components/identity.basic/operations/authenticate.js.map +1 -1
- package/components/identity.basic/operations/incept.js +3 -2
- package/components/identity.basic/operations/incept.js.map +1 -1
- package/components/identity.basic/operations/transit.js +16 -5
- package/components/identity.basic/operations/transit.js.map +1 -1
- package/components/identity.basic/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.basic/source/authenticate.ts +7 -3
- package/components/identity.basic/source/incept.ts +3 -2
- package/components/identity.basic/source/transit.ts +19 -5
- package/components/identity.credentials/manifest.toa.yaml +34 -13
- package/components/identity.credentials/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.federation/manifest.toa.yaml +120 -28
- package/components/identity.federation/operations/authenticate.js +3 -2
- package/components/identity.federation/operations/authenticate.js.map +1 -1
- package/components/identity.federation/operations/create.js +4 -2
- package/components/identity.federation/operations/create.js.map +1 -1
- package/components/identity.federation/operations/lib/errors.d.ts +70 -11
- package/components/identity.federation/operations/lib/errors.js +40 -11
- package/components/identity.federation/operations/lib/errors.js.map +1 -1
- package/components/identity.federation/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.federation/source/authenticate.ts +3 -2
- package/components/identity.federation/source/create.ts +4 -2
- package/components/identity.federation/source/lib/errors.ts +49 -12
- package/components/identity.keys/manifest.toa.yaml +14 -6
- package/components/identity.keys/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.otp/manifest.toa.yaml +44 -15
- package/components/identity.otp/operations/authenticate.js +9 -4
- package/components/identity.otp/operations/authenticate.js.map +1 -1
- package/components/identity.otp/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.otp/source/authenticate.ts +11 -4
- package/components/identity.passkeys/manifest.toa.yaml +38 -8
- package/components/identity.passkeys/operations/authenticate.js +3 -2
- package/components/identity.passkeys/operations/authenticate.js.map +1 -1
- package/components/identity.passkeys/operations/create.js +6 -3
- package/components/identity.passkeys/operations/create.js.map +1 -1
- package/components/identity.passkeys/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.passkeys/operations/use.js +6 -3
- package/components/identity.passkeys/operations/use.js.map +1 -1
- package/components/identity.passkeys/source/authenticate.ts +3 -2
- package/components/identity.passkeys/source/create.ts +7 -3
- package/components/identity.passkeys/source/use.ts +7 -3
- package/components/identity.roles/manifest.toa.yaml +41 -10
- package/components/identity.roles/operations/grant.js +3 -2
- package/components/identity.roles/operations/grant.js.map +1 -1
- package/components/identity.roles/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.roles/source/grant.ts +3 -2
- package/components/identity.tokens/manifest.toa.yaml +99 -39
- package/components/identity.tokens/operations/authenticate.js +6 -3
- package/components/identity.tokens/operations/authenticate.js.map +1 -1
- package/components/identity.tokens/operations/decrypt.js +9 -4
- package/components/identity.tokens/operations/decrypt.js.map +1 -1
- package/components/identity.tokens/operations/encrypt.js +3 -2
- package/components/identity.tokens/operations/encrypt.js.map +1 -1
- package/components/identity.tokens/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.tokens/source/authenticate.ts +7 -3
- package/components/identity.tokens/source/decrypt.ts +11 -4
- package/components/identity.tokens/source/encrypt.ts +3 -2
- package/documentation/identity.md +4 -1
- package/documentation/notes/throttling.md +1 -1
- package/features/cors.feature +1 -1
- package/features/dev.feature +1 -1
- package/features/identity.federation.feature +3 -2
- package/features/{identtiy.tokens.custom.feature → identity.tokens.custom.feature} +39 -0
- package/features/introspection.feature +27 -34
- package/features/map.feature +1 -1
- package/features/octets.download.feature +1 -1
- package/features/octets.meta.feature +1 -1
- package/features/passkeys.feature +8 -8
- package/features/query.feature +27 -0
- package/features/require.feature +2 -2
- package/features/response.feature +3 -3
- package/features/steps/Components.ts +12 -4
- package/features/steps/Database.ts +9 -0
- package/features/steps/Gateway.ts +13 -13
- package/features/steps/HTTP.ts +3 -5
- package/features/steps/Parameters.ts +2 -3
- package/features/steps/Realtime.ts +4 -4
- package/features/steps/Workspace.ts +8 -3
- package/features/steps/components/audit/manifest.toa.yaml +12 -5
- package/features/steps/components/echo/manifest.toa.yaml +33 -8
- package/features/steps/components/notify/manifest.toa.yaml +12 -5
- package/features/steps/components/octets.tester/manifest.toa.yaml +43 -14
- package/features/steps/components/orders/manifest.toa.yaml +22 -5
- package/features/steps/components/pots/manifest.toa.yaml +71 -17
- package/features/steps/components/pricing/manifest.toa.yaml +8 -2
- package/features/steps/components/sequences/manifest.toa.yaml +3 -1
- package/features/steps/components/users/manifest.toa.yaml +18 -3
- package/features/steps/components/users.properties/manifest.toa.yaml +12 -2
- package/package.json +6 -7
- package/schemas/annotation.cos.yaml +37 -17
- package/schemas/directive.cos.yaml +7 -3
- package/schemas/io/throttle.cos.yaml +47 -8
- package/schemas/method.cos.yaml +21 -9
- package/schemas/node.cos.yaml +22 -7
- package/schemas/octets/delete.cos.yaml +15 -2
- package/schemas/octets/get.cos.yaml +5 -2
- package/schemas/octets/put.cos.yaml +6 -3
- package/schemas/octets/workflow.cos.yaml +0 -1
- package/schemas/query.cos.yaml +31 -14
- package/schemas/querystring.cos.yaml +19 -7
- package/schemas/range.cos.yaml +10 -2
- package/schemas/route.cos.yaml +6 -2
- package/source/Branch.test.ts +37 -0
- package/source/Branch.ts +37 -0
- package/source/Factory.ts +5 -5
- package/source/Gateway.ts +29 -14
- package/source/HTTP/formats/yaml.test.ts +4 -2
- package/source/RTD/Tree.ts +4 -1
- package/source/Tenant.ts +15 -4
- package/source/deployment.ts +3 -4
- package/source/directives/io/IO.ts +2 -2
- package/source/directives/io/lib/throttle/Sync.ts +4 -4
- package/source/directives/map/Headers.ts +8 -1
- package/source/directives/octets/Put.ts +6 -3
- package/source/root.ts +2 -2
- package/transpiled/Branch.d.ts +23 -0
- package/transpiled/Branch.js +16 -0
- package/transpiled/Branch.js.map +1 -1
- package/transpiled/Factory.js +4 -4
- package/transpiled/Factory.js.map +1 -1
- package/transpiled/Gateway.d.ts +7 -0
- package/transpiled/Gateway.js +26 -8
- package/transpiled/Gateway.js.map +1 -1
- package/transpiled/RTD/Tree.js +4 -1
- package/transpiled/RTD/Tree.js.map +1 -1
- package/transpiled/Tenant.d.ts +8 -2
- package/transpiled/Tenant.js +12 -2
- package/transpiled/Tenant.js.map +1 -1
- package/transpiled/deployment.js +3 -4
- package/transpiled/deployment.js.map +1 -1
- package/transpiled/directives/io/IO.d.ts +1 -1
- package/transpiled/directives/io/IO.js +2 -2
- package/transpiled/directives/io/IO.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/Sync.d.ts +2 -2
- package/transpiled/directives/io/lib/throttle/Sync.js +4 -4
- package/transpiled/directives/io/lib/throttle/Sync.js.map +1 -1
- package/transpiled/directives/map/Headers.js +7 -1
- package/transpiled/directives/map/Headers.js.map +1 -1
- package/transpiled/directives/octets/Put.js.map +1 -1
- package/transpiled/root.js +1 -1
- package/transpiled/root.js.map +1 -1
- package/transpiled/tsconfig.tsbuildinfo +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Err } from 'error-value'
|
|
2
1
|
import type { Entity } from './lib/Entity'
|
|
3
2
|
|
|
4
3
|
export async function transition (input: Input, object: Entity): Promise<Entity | Error> {
|
|
@@ -20,7 +19,9 @@ function within (role: string, scopes: string[]): boolean {
|
|
|
20
19
|
return scopes.some((scope) => role === scope || role.startsWith(scope + ':'))
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
const ERR_INACCESSIBLE_SCOPE = new
|
|
22
|
+
const ERR_INACCESSIBLE_SCOPE = new (class InaccessibleScopeError extends Error {
|
|
23
|
+
public readonly code = 'INACCESSIBLE_SCOPE'
|
|
24
|
+
})()
|
|
24
25
|
|
|
25
26
|
export interface Input {
|
|
26
27
|
identity: string
|
|
@@ -3,55 +3,102 @@ name: tokens
|
|
|
3
3
|
|
|
4
4
|
entity:
|
|
5
5
|
schema:
|
|
6
|
-
|
|
6
|
+
properties:
|
|
7
|
+
revokedAt:
|
|
8
|
+
type: integer
|
|
9
|
+
type: object
|
|
7
10
|
associated: true
|
|
8
11
|
|
|
9
12
|
operations:
|
|
10
13
|
encrypt:
|
|
11
14
|
input:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
scopes: [string]
|
|
20
|
-
permissions:
|
|
21
|
-
~: [string]
|
|
22
|
-
key:
|
|
23
|
-
type: object
|
|
24
|
-
properties:
|
|
25
|
-
id:
|
|
26
|
-
type: string
|
|
27
|
-
key:
|
|
15
|
+
properties:
|
|
16
|
+
lifetime:
|
|
17
|
+
type: number
|
|
18
|
+
minimum: 0
|
|
19
|
+
scopes:
|
|
20
|
+
type: array
|
|
21
|
+
items:
|
|
28
22
|
type: string
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
permissions:
|
|
24
|
+
type: object
|
|
25
|
+
patternProperties:
|
|
26
|
+
^.*$:
|
|
27
|
+
type: array
|
|
28
|
+
items:
|
|
29
|
+
type: string
|
|
30
|
+
key:
|
|
31
|
+
type: object
|
|
32
|
+
properties:
|
|
33
|
+
id:
|
|
34
|
+
type: string
|
|
35
|
+
key:
|
|
36
|
+
type: string
|
|
37
|
+
required:
|
|
38
|
+
- id
|
|
39
|
+
- key
|
|
40
|
+
authority:
|
|
41
|
+
type: string
|
|
42
|
+
identity:
|
|
43
|
+
properties:
|
|
44
|
+
id:
|
|
45
|
+
type: string
|
|
46
|
+
additionalProperties: true
|
|
47
|
+
type: object
|
|
48
|
+
type: object
|
|
49
|
+
required:
|
|
50
|
+
- authority
|
|
51
|
+
- identity
|
|
32
52
|
output:
|
|
33
53
|
type: string
|
|
34
54
|
errors:
|
|
35
55
|
- ERR_INACCESSIBLE_SCOPE
|
|
36
56
|
decrypt:
|
|
37
|
-
input:
|
|
57
|
+
input:
|
|
58
|
+
type: string
|
|
38
59
|
output:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
60
|
+
properties:
|
|
61
|
+
authority:
|
|
62
|
+
type: string
|
|
63
|
+
identity:
|
|
64
|
+
properties:
|
|
65
|
+
id:
|
|
66
|
+
type: string
|
|
67
|
+
additionalProperties: true
|
|
68
|
+
type: object
|
|
69
|
+
iat:
|
|
70
|
+
type: string
|
|
71
|
+
exp:
|
|
72
|
+
type: string
|
|
73
|
+
refresh:
|
|
74
|
+
type: boolean
|
|
75
|
+
type: object
|
|
44
76
|
errors:
|
|
45
77
|
- INVALID_TOKEN
|
|
46
78
|
- INVALID_KEY
|
|
47
79
|
- FORGED_KEY
|
|
48
80
|
authenticate:
|
|
49
81
|
input:
|
|
50
|
-
|
|
51
|
-
|
|
82
|
+
properties:
|
|
83
|
+
authority:
|
|
84
|
+
type: string
|
|
85
|
+
credentials:
|
|
86
|
+
type: string
|
|
87
|
+
type: object
|
|
88
|
+
required:
|
|
89
|
+
- authority
|
|
90
|
+
- credentials
|
|
52
91
|
output:
|
|
53
|
-
|
|
54
|
-
|
|
92
|
+
properties:
|
|
93
|
+
identity:
|
|
94
|
+
properties:
|
|
95
|
+
id:
|
|
96
|
+
type: string
|
|
97
|
+
additionalProperties: true
|
|
98
|
+
type: object
|
|
99
|
+
refresh:
|
|
100
|
+
type: boolean
|
|
101
|
+
type: object
|
|
55
102
|
errors:
|
|
56
103
|
- AUTHORITY_MISMATCH
|
|
57
104
|
- TOKEN_REVOKED
|
|
@@ -63,7 +110,9 @@ operations:
|
|
|
63
110
|
type: string
|
|
64
111
|
identity:
|
|
65
112
|
type: string
|
|
66
|
-
lifetime:
|
|
113
|
+
lifetime:
|
|
114
|
+
type: number
|
|
115
|
+
minimum: 0
|
|
67
116
|
scopes:
|
|
68
117
|
type: array
|
|
69
118
|
items:
|
|
@@ -83,9 +132,14 @@ operations:
|
|
|
83
132
|
- identity
|
|
84
133
|
- label
|
|
85
134
|
output:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
135
|
+
properties:
|
|
136
|
+
kid:
|
|
137
|
+
type: string
|
|
138
|
+
exp:
|
|
139
|
+
type: number
|
|
140
|
+
token:
|
|
141
|
+
type: string
|
|
142
|
+
type: object
|
|
89
143
|
errors:
|
|
90
144
|
- ERR_INACCESSIBLE_SCOPE
|
|
91
145
|
revoke:
|
|
@@ -105,7 +159,8 @@ configuration:
|
|
|
105
159
|
contains:
|
|
106
160
|
properties:
|
|
107
161
|
format:
|
|
108
|
-
enum:
|
|
162
|
+
enum:
|
|
163
|
+
- jwe
|
|
109
164
|
items:
|
|
110
165
|
type: object
|
|
111
166
|
properties:
|
|
@@ -116,9 +171,13 @@ configuration:
|
|
|
116
171
|
type: string
|
|
117
172
|
format:
|
|
118
173
|
type: string
|
|
119
|
-
enum:
|
|
174
|
+
enum:
|
|
175
|
+
- jwe
|
|
176
|
+
- paseto
|
|
120
177
|
default: jwe
|
|
121
|
-
required:
|
|
178
|
+
required:
|
|
179
|
+
- id
|
|
180
|
+
- key
|
|
122
181
|
additionalProperties: false
|
|
123
182
|
lifetime:
|
|
124
183
|
description: Token expiration time in seconds (default 30 days)
|
|
@@ -138,7 +197,8 @@ configuration:
|
|
|
138
197
|
type: integer
|
|
139
198
|
default: 600000
|
|
140
199
|
default: {}
|
|
141
|
-
required:
|
|
200
|
+
required:
|
|
201
|
+
- keys
|
|
142
202
|
|
|
143
203
|
exposition:
|
|
144
204
|
/:identity:
|
|
@@ -146,6 +206,6 @@ exposition:
|
|
|
146
206
|
auth:role: system:identity:tokens
|
|
147
207
|
POST:
|
|
148
208
|
map:authority: authority
|
|
149
|
-
io:input: [
|
|
209
|
+
io:input: [lifetime, label, scopes, permissions]
|
|
150
210
|
io:output: [kid, exp, token, label]
|
|
151
211
|
endpoint: issue
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Computation = void 0;
|
|
4
|
-
const error_value_1 = require("error-value");
|
|
5
4
|
class Computation {
|
|
6
5
|
refresh = 0;
|
|
7
6
|
decrypt;
|
|
@@ -34,6 +33,10 @@ class Computation {
|
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
exports.Computation = Computation;
|
|
37
|
-
const ERR_AUTHORITY = new
|
|
38
|
-
|
|
36
|
+
const ERR_AUTHORITY = new (class AuthorityMismatchError extends Error {
|
|
37
|
+
code = 'AUTHORITY_MISMATCH';
|
|
38
|
+
})();
|
|
39
|
+
const ERR_TOKEN_REVOKED = new (class TokenRevokedError extends Error {
|
|
40
|
+
code = 'TOKEN_REVOKED';
|
|
41
|
+
})();
|
|
39
42
|
//# sourceMappingURL=authenticate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticate.js","sourceRoot":"","sources":["../source/authenticate.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"authenticate.js","sourceRoot":"","sources":["../source/authenticate.ts"],"names":[],"mappings":";;;AAGA,MAAa,WAAW;IACd,OAAO,GAAW,CAAC,CAAA;IACnB,OAAO,CAA8B;IACrC,OAAO,CAA8B;IAEtC,KAAK,CAAE,OAAgB;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,OAAO,GAAG,IAAI,CAAA;QACnD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAA;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAA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,GAAG,eAAe,CAAA;CACvC,CAAC,EAAE,CAAA"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Computation = void 0;
|
|
4
4
|
const paseto_1 = require("paseto");
|
|
5
|
-
const error_value_1 = require("error-value");
|
|
6
5
|
const lru_cache_1 = require("lru-cache");
|
|
7
6
|
const lib_1 = require("./lib");
|
|
8
7
|
const jose_1 = require("./lib/jose");
|
|
@@ -122,7 +121,13 @@ async function decryptJWE(token, key) {
|
|
|
122
121
|
return ERR_INVALID_TOKEN;
|
|
123
122
|
}
|
|
124
123
|
}
|
|
125
|
-
const ERR_INVALID_TOKEN = new
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
const ERR_INVALID_TOKEN = new (class InvalidTokenError extends Error {
|
|
125
|
+
code = 'INVALID_TOKEN';
|
|
126
|
+
})();
|
|
127
|
+
const ERR_INVALID_KEY = new (class InvalidKeyError extends Error {
|
|
128
|
+
code = 'INVALID_KEY';
|
|
129
|
+
})();
|
|
130
|
+
const ERR_FORGED_KEY = new (class ForgedKeyError extends Error {
|
|
131
|
+
code = 'FORGED_KEY';
|
|
132
|
+
})();
|
|
128
133
|
//# sourceMappingURL=decrypt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decrypt.js","sourceRoot":"","sources":["../source/decrypt.ts"],"names":[],"mappings":";;;AAAA,mCAA2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"decrypt.js","sourceRoot":"","sources":["../source/decrypt.ts"],"names":[],"mappings":";;;AAAA,mCAA2B;AAC3B,yCAAoC;AACpC,+BAA8B;AAC9B,qCAAiC;AAIjC,MAAa,WAAW;IACL,IAAI,GAAwB,EAAE,CAAA;IAC9B,MAAM,GAAwB,EAAE,CAAA;IACzC,KAAK,CAA6B;IAClC,MAAM,CAAS;IACf,MAAM,CAAwC;IAC9C,IAAI,CAAkB;IAEvB,KAAK,CAAE,OAAgB;QAC5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AI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;YACzF,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAA;IACH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,iBAAiB,CAAA;IAC1B,CAAC;AACH,CAAC;AAWD,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,iBAAkB,SAAQ,KAAK;IAClD,IAAI,GAAG,eAAe,CAAA;CACvC,CAAC,EAAE,CAAA;AAEJ,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,eAAgB,SAAQ,KAAK;IAC9C,IAAI,GAAG,aAAa,CAAA;CACrC,CAAC,EAAE,CAAA;AAEJ,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,cAAe,SAAQ,KAAK;IAC5C,IAAI,GAAG,YAAY,CAAA;CACpC,CAAC,EAAE,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Effect = void 0;
|
|
4
|
-
const error_value_1 = require("error-value");
|
|
5
4
|
const lib_1 = require("./lib");
|
|
6
5
|
const jose_1 = require("./lib/jose");
|
|
7
6
|
class Effect {
|
|
@@ -39,5 +38,7 @@ exports.Effect = Effect;
|
|
|
39
38
|
function within(scope, roles) {
|
|
40
39
|
return roles.some((role) => role === scope || scope.startsWith(role + ':'));
|
|
41
40
|
}
|
|
42
|
-
const ERR_INACCESSIBLE_SCOPE = new
|
|
41
|
+
const ERR_INACCESSIBLE_SCOPE = new (class InaccessibleScopeError extends Error {
|
|
42
|
+
code = 'INACCESSIBLE_SCOPE';
|
|
43
|
+
})();
|
|
43
44
|
//# sourceMappingURL=encrypt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encrypt.js","sourceRoot":"","sources":["../source/encrypt.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"encrypt.js","sourceRoot":"","sources":["../source/encrypt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