@zuplo/runtime 5.2153.0 → 5.2155.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/{index.min.cjs → out/cjs/index.js} +1 -1
- package/{internal.min.cjs → out/cjs/internal/index.js} +1 -1
- package/{mocks.min.cjs → out/cjs/mocks/index.js} +1 -1
- package/out/cjs/policies/axiomatics-authz-inbound/exports.js +36 -0
- package/out/cjs/policies/axiomatics-authz-inbound/exports.js.LEGAL.txt +10 -0
- package/out/esm/chunk-4DUPDUSC.js +26 -0
- package/out/esm/chunk-CI735RIK.js +36 -0
- package/out/esm/chunk-CI735RIK.js.LEGAL.txt +10 -0
- package/out/esm/chunk-HPMPWPKQ.js +26 -0
- package/out/esm/chunk-HPMPWPKQ.js.LEGAL.txt +0 -0
- package/out/esm/chunk-QSL25HFO.js +26 -0
- package/out/esm/chunk-QSL25HFO.js.LEGAL.txt +0 -0
- package/out/esm/index.js +65 -0
- package/{index.min.js.LEGAL.txt → out/esm/index.js.LEGAL.txt} +0 -10
- package/out/esm/internal/index.js +26 -0
- package/out/esm/internal/index.js.LEGAL.txt +0 -0
- package/out/esm/mocks/index.js +26 -0
- package/out/esm/mocks/index.js.LEGAL.txt +0 -0
- package/out/esm/policies/axiomatics-authz-inbound/exports.js +26 -0
- package/out/esm/policies/axiomatics-authz-inbound/exports.js.LEGAL.txt +0 -0
- package/out/types/policies/axiomatics-authz-inbound/exports.d.ts +106 -0
- package/package.json +16 -24
- package/index.min.js +0 -75
- package/mocks.min.js +0 -26
- package/types-public.d.ts +0 -3796
- /package/{index.min.cjs.LEGAL.txt → out/cjs/index.js.LEGAL.txt} +0 -0
- /package/{internal.min.cjs.LEGAL.txt → out/cjs/internal/index.js.LEGAL.txt} +0 -0
- /package/{mocks.min.cjs.LEGAL.txt → out/cjs/mocks/index.js.LEGAL.txt} +0 -0
- /package/{mocks.min.js.LEGAL.txt → out/esm/chunk-4DUPDUSC.js.LEGAL.txt} +0 -0
- /package/{types-beta.d.ts → out/types/index.d.ts} +0 -0
- /package/{internal.d.ts → out/types/internal/index.d.ts} +0 -0
- /package/{mocks.d.ts → out/types/mocks/index.d.ts} +0 -0
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Echos the value of a value. Trys to print the value out
|
|
3
|
-
* in the best way possible given the different types.
|
|
4
|
-
*
|
|
5
|
-
* @param {Object} obj The object to print out.
|
|
6
|
-
* @param {boolean} showHidden
|
|
7
|
-
* @param {number} depth
|
|
8
|
-
* @param {boolean} colors
|
|
9
|
-
* @license MIT (© Joyent)
|
|
10
|
-
*/
|
|
11
1
|
/*!
|
|
12
2
|
* cookie
|
|
13
3
|
* Copyright(c) 2012-2014 Roman Shtylman
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Zuplo, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This software and associated documentation files (the "Software") is intended to be used
|
|
6
|
+
* only by Zuplo customers solely to develop and test applications that will be deployed
|
|
7
|
+
* to Zuplo hosted services. You and others in your organization may use these files on your
|
|
8
|
+
* Development Devices solely for the above stated purpose.
|
|
9
|
+
*
|
|
10
|
+
* Outside of uses stated above, no license is granted for any other purpose including
|
|
11
|
+
* without limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
12
|
+
* sublicense, host, and/or sell copies of the Software.
|
|
13
|
+
*
|
|
14
|
+
* The software may include third party components with separate legal notices or governed by
|
|
15
|
+
* other agreements, as described in licenses either embedded in or accompanying the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
18
|
+
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
19
|
+
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
20
|
+
* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
* DEALINGS IN THE SOFTWARE.
|
|
23
|
+
*--------------------------------------------------------------------------------------------*/
|
|
24
|
+
|
|
25
|
+
import{b as e,c as t,e as a,f as o,g as r,h as i,i as n}from"../chunk-QSL25HFO.js";import"../chunk-HPMPWPKQ.js";import"../chunk-4DUPDUSC.js";export{o as getIdForParameterSchema,i as getIdForRefSchema,r as getIdForRequestBodySchema,a as getRawOperationDataIdentifierName,e as isRestrictedEnvVariableName,t as isZuploReadableEnvVariableName,n as sanitizedIdentifierName};
|
|
26
|
+
/*! For license information please see index.js.LEGAL.txt */
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Zuplo, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This software and associated documentation files (the "Software") is intended to be used
|
|
6
|
+
* only by Zuplo customers solely to develop and test applications that will be deployed
|
|
7
|
+
* to Zuplo hosted services. You and others in your organization may use these files on your
|
|
8
|
+
* Development Devices solely for the above stated purpose.
|
|
9
|
+
*
|
|
10
|
+
* Outside of uses stated above, no license is granted for any other purpose including
|
|
11
|
+
* without limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
12
|
+
* sublicense, host, and/or sell copies of the Software.
|
|
13
|
+
*
|
|
14
|
+
* The software may include third party components with separate legal notices or governed by
|
|
15
|
+
* other agreements, as described in licenses either embedded in or accompanying the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
18
|
+
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
19
|
+
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
20
|
+
* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
* DEALINGS IN THE SOFTWARE.
|
|
23
|
+
*--------------------------------------------------------------------------------------------*/
|
|
24
|
+
|
|
25
|
+
import{a as n}from"../chunk-4DUPDUSC.js";function l(i={request:new Request("https://api.example.com")}){let e=[];function o(t){e.push(Promise.resolve(t))}return n(o,"waitUntil"),{context:new r({event:{waitUntil:o},route:i.route}),invokeResponse:n(async()=>{await Promise.all(e)},"invokeResponse")}}n(l,"createMockContext");var a={path:"/",methods:["GET"],handler:{module:{},export:"default"},version:"none",raw:()=>({})},r=class extends EventTarget{static{n(this,"MockZuploContext")}#e;requestId;log;route;custom;incomingRequestProperties;constructor({event:e,route:o=a}){super(),this.requestId=crypto.randomUUID(),this.log={info:console.info,log:console.log,debug:console.debug,warn:console.warn,error:console.error},this.custom={},this.route=o,this.incomingRequestProperties={asn:1234,asOrganization:"ORGANIZATION",city:"Seattle",region:"Washington",regionCode:"WA",colo:"SEA",continent:"NA",country:"US",postalCode:"98004",metroCode:"SEA",latitude:void 0,longitude:void 0,timezone:void 0},this.#e=e}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,o){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addEventListener(e,o,s){let u=n(t=>{try{typeof o=="function"?o(t):o.handleEvent(t)}catch(d){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),d}},"wrapped");super.addEventListener(e,u,s)}};export{r as MockZuploContext,l as createMockContext};
|
|
26
|
+
/*! For license information please see index.js.LEGAL.txt */
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Zuplo, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This software and associated documentation files (the "Software") is intended to be used
|
|
6
|
+
* only by Zuplo customers solely to develop and test applications that will be deployed
|
|
7
|
+
* to Zuplo hosted services. You and others in your organization may use these files on your
|
|
8
|
+
* Development Devices solely for the above stated purpose.
|
|
9
|
+
*
|
|
10
|
+
* Outside of uses stated above, no license is granted for any other purpose including
|
|
11
|
+
* without limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
12
|
+
* sublicense, host, and/or sell copies of the Software.
|
|
13
|
+
*
|
|
14
|
+
* The software may include third party components with separate legal notices or governed by
|
|
15
|
+
* other agreements, as described in licenses either embedded in or accompanying the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
18
|
+
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
19
|
+
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
20
|
+
* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
* DEALINGS IN THE SOFTWARE.
|
|
23
|
+
*--------------------------------------------------------------------------------------------*/
|
|
24
|
+
|
|
25
|
+
import{g as o}from"../../chunk-CI735RIK.js";import"../../chunk-HPMPWPKQ.js";import"../../chunk-4DUPDUSC.js";export{o as PdpService};
|
|
26
|
+
/*! For license information please see exports.js.LEGAL.txt */
|
|
File without changes
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export declare interface Attribute {
|
|
2
|
+
AttributeId: string;
|
|
3
|
+
Value: string | boolean | number | string[] | boolean[] | number[];
|
|
4
|
+
Issuer?: string;
|
|
5
|
+
DataType?: string;
|
|
6
|
+
IncludeInResult?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export declare interface AttributeAssignment {
|
|
10
|
+
AttributeId: string;
|
|
11
|
+
Value: string;
|
|
12
|
+
Category?: string;
|
|
13
|
+
DataType?: string;
|
|
14
|
+
Issuer?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare interface Category {
|
|
18
|
+
Id?: string;
|
|
19
|
+
CategoryId?: string;
|
|
20
|
+
Content?: string;
|
|
21
|
+
Attribute: Attribute[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export declare interface MultiRequests {
|
|
25
|
+
RequestReference: RequestReference;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export declare interface ObligationOrAdvice {
|
|
29
|
+
Id: string;
|
|
30
|
+
AttributeAssignment?: AttributeAssignment[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A service for making requests to a Policy Decision Point (PDP) service.
|
|
35
|
+
*/
|
|
36
|
+
export declare class PdpService {
|
|
37
|
+
private options;
|
|
38
|
+
private authHeader;
|
|
39
|
+
private authorizationUrl;
|
|
40
|
+
constructor(options: {
|
|
41
|
+
pdpUrl: string;
|
|
42
|
+
pdpUsername: string;
|
|
43
|
+
pdpPassword: string;
|
|
44
|
+
tokenHeaderName?: string;
|
|
45
|
+
});
|
|
46
|
+
makePdpRequest(request: XacmlRequest): Promise<XacmlResponse>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export declare interface PolicyIdentifierList {
|
|
50
|
+
Id: string;
|
|
51
|
+
Version?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare interface RequestReference {
|
|
55
|
+
ReferenceId: string[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export declare interface Status {
|
|
59
|
+
StatusCode: {
|
|
60
|
+
Value: string;
|
|
61
|
+
StatusCode?: Status;
|
|
62
|
+
};
|
|
63
|
+
StatusMessage?: string;
|
|
64
|
+
StatusDetail?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The request to the PDP
|
|
69
|
+
*/
|
|
70
|
+
export declare interface XacmlRequest {
|
|
71
|
+
Request: {
|
|
72
|
+
ReturnPolicyIdList?: boolean;
|
|
73
|
+
CombinedDecision?: boolean;
|
|
74
|
+
XPathVersion?: string;
|
|
75
|
+
Category?: Omit<Category, "CategoryId"> & {
|
|
76
|
+
CategoryId: string;
|
|
77
|
+
}[];
|
|
78
|
+
Resource?: Category[];
|
|
79
|
+
Action?: Category[];
|
|
80
|
+
Environment?: Category[];
|
|
81
|
+
AccessSubject?: Category[];
|
|
82
|
+
RecipientSubject?: Category[];
|
|
83
|
+
IntermediarySubject?: Category[];
|
|
84
|
+
RequestingMachine?: Category[];
|
|
85
|
+
CodeBase?: Category[];
|
|
86
|
+
MultiRequests?: MultiRequests;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The response from the PDP
|
|
92
|
+
*/
|
|
93
|
+
export declare interface XacmlResponse {
|
|
94
|
+
Response: [XacmlResult];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export declare interface XacmlResult {
|
|
98
|
+
Decision: "Permit" | "Deny" | "NotApplicable" | "Indeterminate";
|
|
99
|
+
Status?: Status;
|
|
100
|
+
Obligations?: ObligationOrAdvice[];
|
|
101
|
+
AssociatedAdvice?: ObligationOrAdvice[];
|
|
102
|
+
Category?: Category[];
|
|
103
|
+
PolicyIdentifierList?: PolicyIdentifierList[];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/runtime",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2155.0",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
|
-
"node": "./index.
|
|
9
|
-
"worker": "./index.
|
|
10
|
-
"types": "./types
|
|
8
|
+
"node": "./out/cjs/index.common.js",
|
|
9
|
+
"worker": "./out/esm/index.js",
|
|
10
|
+
"types": "./out/types/index.d.ts"
|
|
11
11
|
},
|
|
12
12
|
"./mocks": {
|
|
13
|
-
"node": "./mocks.
|
|
14
|
-
"
|
|
13
|
+
"node": "./out/cjs/mocks/index.js",
|
|
14
|
+
"worker": "./out/esm/mocks/index.js",
|
|
15
|
+
"types": "./out/types/mocks/index.d.ts"
|
|
15
16
|
},
|
|
16
17
|
"./internal": {
|
|
17
|
-
"
|
|
18
|
-
"
|
|
18
|
+
"node": "./out/cjs/internal/index.js",
|
|
19
|
+
"worker": "./out/esm/internal/index.js",
|
|
20
|
+
"types": "./out/types/internal/index.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./policies/axiomatics-authz-inbound": {
|
|
23
|
+
"node": "./out/cjs/policies/axiomatics-authz-inbound/exports.js",
|
|
24
|
+
"worker": "./out/esm/policies/axiomatics-authz-inbound/exports.js",
|
|
25
|
+
"types": "./out/types/policies/axiomatics-authz-inbound/exports.d.ts"
|
|
19
26
|
}
|
|
20
27
|
},
|
|
21
|
-
"types": "./types-beta.d.ts",
|
|
22
28
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
23
29
|
"engines": {
|
|
24
30
|
"node": ">=18.0.0"
|
|
@@ -28,21 +34,7 @@
|
|
|
28
34
|
"registry": "https://registry.npmjs.org"
|
|
29
35
|
},
|
|
30
36
|
"files": [
|
|
31
|
-
"
|
|
32
|
-
"index.min.cjs",
|
|
33
|
-
"index.min.cjs.LEGAL.txt",
|
|
34
|
-
"index.min.js",
|
|
35
|
-
"index.min.js.LEGAL.txt",
|
|
36
|
-
"mocks.d.ts",
|
|
37
|
-
"mocks.min.cjs",
|
|
38
|
-
"mocks.min.cjs.LEGAL.txt",
|
|
39
|
-
"mocks.min.js",
|
|
40
|
-
"mocks.min.js.LEGAL.txt",
|
|
41
|
-
"internal.d.ts",
|
|
42
|
-
"internal.min.cjs",
|
|
43
|
-
"internal.min.cjs.LEGAL.txt",
|
|
44
|
-
"types-beta.d.ts",
|
|
45
|
-
"types-public.d.ts",
|
|
37
|
+
"out/**/*",
|
|
46
38
|
"README.md",
|
|
47
39
|
"LICENSE.txt"
|
|
48
40
|
],
|