@janssenproject/cedarling_wasm 0.0.338 → 0.0.339-nodejs
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/README.md +4 -25
- package/cedarling_wasm.d.ts +35 -154
- package/cedarling_wasm.js +300 -176
- package/cedarling_wasm_bg.wasm +0 -0
- package/package.json +2 -6
package/README.md
CHANGED
|
@@ -46,14 +46,14 @@ After building WASM bindings in folder `pkg` you can find where you can find `ce
|
|
|
46
46
|
In `index.html` described simple usage of `cedarling wasm` API:
|
|
47
47
|
|
|
48
48
|
```js
|
|
49
|
-
import { BOOTSTRAP_CONFIG,
|
|
49
|
+
import { BOOTSTRAP_CONFIG, REQUEST_UNSIGNED } from "/example_data.js"; // Import js objects: bootstrap config and request
|
|
50
50
|
import initWasm, { init } from "/pkg/cedarling_wasm.js";
|
|
51
51
|
|
|
52
52
|
async function main() {
|
|
53
53
|
await initWasm(); // Initialize the WebAssembly module
|
|
54
54
|
|
|
55
55
|
let instance = await init(BOOTSTRAP_CONFIG);
|
|
56
|
-
let result = await instance.
|
|
56
|
+
let result = await instance.authorize_unsigned(REQUEST_UNSIGNED);
|
|
57
57
|
console.log("result:", result);
|
|
58
58
|
}
|
|
59
59
|
main().catch(console.error);
|
|
@@ -103,11 +103,6 @@ export class Cedarling {
|
|
|
103
103
|
* Assume that config is `Map`
|
|
104
104
|
*/
|
|
105
105
|
static new_from_map(config: Map<any, any>): Promise<Cedarling>;
|
|
106
|
-
/**
|
|
107
|
-
* Authorize request
|
|
108
|
-
* makes authorization decision based on the [`Request`]
|
|
109
|
-
*/
|
|
110
|
-
authorize(request: any): Promise<AuthorizeResult>;
|
|
111
106
|
/**
|
|
112
107
|
* Authorize request for unsigned principals.
|
|
113
108
|
* makes authorization decision based on the [`RequestUnsigned`]
|
|
@@ -257,13 +252,9 @@ export class AuthorizeResult {
|
|
|
257
252
|
*/
|
|
258
253
|
json_string(): string;
|
|
259
254
|
/**
|
|
260
|
-
*
|
|
261
|
-
*/
|
|
262
|
-
workload?: AuthorizeResultResponse;
|
|
263
|
-
/**
|
|
264
|
-
* Result of authorization where principal is `Jans::User`
|
|
255
|
+
* Get authorization responses for all principals
|
|
265
256
|
*/
|
|
266
|
-
|
|
257
|
+
principals: Record<string, AuthorizeResultResponse>;
|
|
267
258
|
/**
|
|
268
259
|
* Get result for a specific principal
|
|
269
260
|
*/
|
|
@@ -453,17 +444,6 @@ cd policy-store && zip -r ../policy-store.cjar .
|
|
|
453
444
|
|
|
454
445
|
See [Policy Store Formats](../../../docs/cedarling/reference/cedarling-policy-store.md#policy-store-formats) for details on the directory structure and metadata.json format.
|
|
455
446
|
|
|
456
|
-
### ID Token Trust Mode
|
|
457
|
-
|
|
458
|
-
The `CEDARLING_ID_TOKEN_TRUST_MODE` property controls how ID tokens are validated:
|
|
459
|
-
|
|
460
|
-
- **`strict`** (default): Enforces strict validation rules
|
|
461
|
-
- ID token `aud` must match access token `client_id`
|
|
462
|
-
- If userinfo token is present, its `sub` must match the ID token `sub`
|
|
463
|
-
- **`never`**: Disables ID token validation (useful for testing)
|
|
464
|
-
- **`always`**: Always validates ID tokens when present
|
|
465
|
-
- **`ifpresent`**: Validates ID tokens only if they are provided
|
|
466
|
-
|
|
467
447
|
### Testing Configuration
|
|
468
448
|
|
|
469
449
|
For testing scenarios, you may want to disable JWT validation. You can configure this in your bootstrap configuration:
|
|
@@ -472,7 +452,6 @@ For testing scenarios, you may want to disable JWT validation. You can configure
|
|
|
472
452
|
const BOOTSTRAP_CONFIG = {
|
|
473
453
|
CEDARLING_JWT_SIG_VALIDATION: "disabled",
|
|
474
454
|
CEDARLING_JWT_STATUS_VALIDATION: "disabled",
|
|
475
|
-
CEDARLING_ID_TOKEN_TRUST_MODE: "never",
|
|
476
455
|
};
|
|
477
456
|
```
|
|
478
457
|
|
package/cedarling_wasm.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The `ReadableStreamType` enum.
|
|
5
|
+
*
|
|
6
|
+
* *This API requires the following crate features to be activated: `ReadableStreamType`*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
type ReadableStreamType = "bytes";
|
|
3
10
|
|
|
4
11
|
/**
|
|
5
12
|
* A WASM wrapper for the Rust `cedarling::AuthorizeResult` struct.
|
|
@@ -22,26 +29,10 @@ export class AuthorizeResult {
|
|
|
22
29
|
* this field is [`bool`] type to be compatible with [authzen Access Evaluation Decision](https://openid.github.io/authzen/#section-6.2.1).
|
|
23
30
|
*/
|
|
24
31
|
decision: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Result of authorization where principal is `Jans::User`
|
|
27
|
-
*/
|
|
28
|
-
get person(): AuthorizeResultResponse | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Result of authorization where principal is `Jans::User`
|
|
31
|
-
*/
|
|
32
|
-
set person(value: AuthorizeResultResponse | null | undefined);
|
|
33
32
|
/**
|
|
34
33
|
* Request ID of the authorization request
|
|
35
34
|
*/
|
|
36
35
|
request_id: string;
|
|
37
|
-
/**
|
|
38
|
-
* Result of authorization where principal is `Jans::Workload`
|
|
39
|
-
*/
|
|
40
|
-
get workload(): AuthorizeResultResponse | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Result of authorization where principal is `Jans::Workload`
|
|
43
|
-
*/
|
|
44
|
-
set workload(value: AuthorizeResultResponse | null | undefined);
|
|
45
36
|
}
|
|
46
37
|
|
|
47
38
|
/**
|
|
@@ -69,11 +60,6 @@ export class Cedarling {
|
|
|
69
60
|
private constructor();
|
|
70
61
|
free(): void;
|
|
71
62
|
[Symbol.dispose](): void;
|
|
72
|
-
/**
|
|
73
|
-
* Authorize request
|
|
74
|
-
* makes authorization decision based on the [`Request`]
|
|
75
|
-
*/
|
|
76
|
-
authorize(request: any): Promise<AuthorizeResult>;
|
|
77
63
|
/**
|
|
78
64
|
* Authorize multi-issuer request.
|
|
79
65
|
* Makes authorization decision based on multiple JWT tokens from different issuers
|
|
@@ -362,6 +348,34 @@ export class Diagnostics {
|
|
|
362
348
|
readonly reason: string[];
|
|
363
349
|
}
|
|
364
350
|
|
|
351
|
+
export class IntoUnderlyingByteSource {
|
|
352
|
+
private constructor();
|
|
353
|
+
free(): void;
|
|
354
|
+
[Symbol.dispose](): void;
|
|
355
|
+
cancel(): void;
|
|
356
|
+
pull(controller: ReadableByteStreamController): Promise<any>;
|
|
357
|
+
start(controller: ReadableByteStreamController): void;
|
|
358
|
+
readonly autoAllocateChunkSize: number;
|
|
359
|
+
readonly type: ReadableStreamType;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export class IntoUnderlyingSink {
|
|
363
|
+
private constructor();
|
|
364
|
+
free(): void;
|
|
365
|
+
[Symbol.dispose](): void;
|
|
366
|
+
abort(reason: any): Promise<any>;
|
|
367
|
+
close(): Promise<any>;
|
|
368
|
+
write(chunk: any): Promise<any>;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export class IntoUnderlyingSource {
|
|
372
|
+
private constructor();
|
|
373
|
+
free(): void;
|
|
374
|
+
[Symbol.dispose](): void;
|
|
375
|
+
cancel(): void;
|
|
376
|
+
pull(controller: ReadableStreamDefaultController): Promise<any>;
|
|
377
|
+
}
|
|
378
|
+
|
|
365
379
|
/**
|
|
366
380
|
* A WASM wrapper for the Rust `cedarling::MultiIssuerAuthorizeResult` struct.
|
|
367
381
|
* Represents the result of a multi-issuer authorization request.
|
|
@@ -434,136 +448,3 @@ export function init(config: any): Promise<Cedarling>;
|
|
|
434
448
|
* ```
|
|
435
449
|
*/
|
|
436
450
|
export function init_from_archive_bytes(config: any, archive_bytes: Uint8Array): Promise<Cedarling>;
|
|
437
|
-
|
|
438
|
-
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
439
|
-
|
|
440
|
-
export interface InitOutput {
|
|
441
|
-
readonly memory: WebAssembly.Memory;
|
|
442
|
-
readonly __wbg_cedarling_free: (a: number, b: number) => void;
|
|
443
|
-
readonly __wbg_multiissuerauthorizeresult_free: (a: number, b: number) => void;
|
|
444
|
-
readonly __wbg_get_multiissuerauthorizeresult_response: (a: number) => number;
|
|
445
|
-
readonly __wbg_set_multiissuerauthorizeresult_response: (a: number, b: number) => void;
|
|
446
|
-
readonly __wbg_get_multiissuerauthorizeresult_decision: (a: number) => number;
|
|
447
|
-
readonly __wbg_set_multiissuerauthorizeresult_decision: (a: number, b: number) => void;
|
|
448
|
-
readonly __wbg_get_multiissuerauthorizeresult_request_id: (a: number) => [number, number];
|
|
449
|
-
readonly __wbg_set_multiissuerauthorizeresult_request_id: (a: number, b: number, c: number) => void;
|
|
450
|
-
readonly multiissuerauthorizeresult_json_string: (a: number) => [number, number];
|
|
451
|
-
readonly init: (a: any) => any;
|
|
452
|
-
readonly init_from_archive_bytes: (a: any, b: any) => any;
|
|
453
|
-
readonly cedarling_new: (a: any) => any;
|
|
454
|
-
readonly cedarling_new_from_map: (a: any) => any;
|
|
455
|
-
readonly cedarling_authorize: (a: number, b: any) => any;
|
|
456
|
-
readonly cedarling_authorize_unsigned: (a: number, b: any) => any;
|
|
457
|
-
readonly cedarling_authorize_multi_issuer: (a: number, b: any) => any;
|
|
458
|
-
readonly cedarling_pop_logs: (a: number) => [number, number, number];
|
|
459
|
-
readonly cedarling_get_log_by_id: (a: number, b: number, c: number) => [number, number, number];
|
|
460
|
-
readonly cedarling_get_log_ids: (a: number) => any;
|
|
461
|
-
readonly cedarling_get_logs_by_tag: (a: number, b: number, c: number) => [number, number, number, number];
|
|
462
|
-
readonly cedarling_get_logs_by_request_id: (a: number, b: number, c: number) => [number, number, number, number];
|
|
463
|
-
readonly cedarling_get_logs_by_request_id_and_tag: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
464
|
-
readonly cedarling_shut_down: (a: number) => any;
|
|
465
|
-
readonly cedarling_push_data_ctx: (a: number, b: number, c: number, d: any, e: number, f: bigint) => [number, number];
|
|
466
|
-
readonly cedarling_get_data_ctx: (a: number, b: number, c: number) => [number, number, number];
|
|
467
|
-
readonly cedarling_get_data_entry_ctx: (a: number, b: number, c: number) => [number, number, number];
|
|
468
|
-
readonly cedarling_remove_data_ctx: (a: number, b: number, c: number) => [number, number, number];
|
|
469
|
-
readonly cedarling_clear_data_ctx: (a: number) => [number, number];
|
|
470
|
-
readonly cedarling_list_data_ctx: (a: number) => [number, number, number];
|
|
471
|
-
readonly cedarling_get_stats_ctx: (a: number) => [number, number, number];
|
|
472
|
-
readonly __wbg_authorizeresult_free: (a: number, b: number) => void;
|
|
473
|
-
readonly __wbg_get_authorizeresult_workload: (a: number) => number;
|
|
474
|
-
readonly __wbg_set_authorizeresult_workload: (a: number, b: number) => void;
|
|
475
|
-
readonly __wbg_get_authorizeresult_person: (a: number) => number;
|
|
476
|
-
readonly __wbg_set_authorizeresult_person: (a: number, b: number) => void;
|
|
477
|
-
readonly __wbg_get_authorizeresult_decision: (a: number) => number;
|
|
478
|
-
readonly __wbg_set_authorizeresult_decision: (a: number, b: number) => void;
|
|
479
|
-
readonly __wbg_get_authorizeresult_request_id: (a: number) => [number, number];
|
|
480
|
-
readonly __wbg_set_authorizeresult_request_id: (a: number, b: number, c: number) => void;
|
|
481
|
-
readonly authorizeresult_json_string: (a: number) => [number, number];
|
|
482
|
-
readonly authorizeresult_principal: (a: number, b: number, c: number) => number;
|
|
483
|
-
readonly __wbg_authorizeresultresponse_free: (a: number, b: number) => void;
|
|
484
|
-
readonly authorizeresultresponse_decision: (a: number) => number;
|
|
485
|
-
readonly authorizeresultresponse_diagnostics: (a: number) => number;
|
|
486
|
-
readonly __wbg_diagnostics_free: (a: number, b: number) => void;
|
|
487
|
-
readonly diagnostics_reason: (a: number) => [number, number];
|
|
488
|
-
readonly diagnostics_errors: (a: number) => [number, number];
|
|
489
|
-
readonly __wbg_policyevaluationerror_free: (a: number, b: number) => void;
|
|
490
|
-
readonly policyevaluationerror_id: (a: number) => [number, number];
|
|
491
|
-
readonly policyevaluationerror_error: (a: number) => [number, number];
|
|
492
|
-
readonly __wbg_dataentry_free: (a: number, b: number) => void;
|
|
493
|
-
readonly __wbg_get_dataentry_key: (a: number) => [number, number];
|
|
494
|
-
readonly __wbg_set_dataentry_key: (a: number, b: number, c: number) => void;
|
|
495
|
-
readonly __wbg_get_dataentry_data_type: (a: number) => [number, number];
|
|
496
|
-
readonly __wbg_set_dataentry_data_type: (a: number, b: number, c: number) => void;
|
|
497
|
-
readonly __wbg_get_dataentry_created_at: (a: number) => [number, number];
|
|
498
|
-
readonly __wbg_set_dataentry_created_at: (a: number, b: number, c: number) => void;
|
|
499
|
-
readonly __wbg_get_dataentry_expires_at: (a: number) => [number, number];
|
|
500
|
-
readonly __wbg_set_dataentry_expires_at: (a: number, b: number, c: number) => void;
|
|
501
|
-
readonly __wbg_get_dataentry_access_count: (a: number) => bigint;
|
|
502
|
-
readonly __wbg_set_dataentry_access_count: (a: number, b: bigint) => void;
|
|
503
|
-
readonly dataentry_value: (a: number) => [number, number, number];
|
|
504
|
-
readonly dataentry_json_string: (a: number) => [number, number];
|
|
505
|
-
readonly __wbg_datastorestats_free: (a: number, b: number) => void;
|
|
506
|
-
readonly __wbg_get_datastorestats_entry_count: (a: number) => number;
|
|
507
|
-
readonly __wbg_set_datastorestats_entry_count: (a: number, b: number) => void;
|
|
508
|
-
readonly __wbg_get_datastorestats_max_entries: (a: number) => number;
|
|
509
|
-
readonly __wbg_set_datastorestats_max_entries: (a: number, b: number) => void;
|
|
510
|
-
readonly __wbg_get_datastorestats_max_entry_size: (a: number) => number;
|
|
511
|
-
readonly __wbg_set_datastorestats_max_entry_size: (a: number, b: number) => void;
|
|
512
|
-
readonly __wbg_get_datastorestats_metrics_enabled: (a: number) => number;
|
|
513
|
-
readonly __wbg_set_datastorestats_metrics_enabled: (a: number, b: number) => void;
|
|
514
|
-
readonly __wbg_get_datastorestats_total_size_bytes: (a: number) => number;
|
|
515
|
-
readonly __wbg_set_datastorestats_total_size_bytes: (a: number, b: number) => void;
|
|
516
|
-
readonly __wbg_get_datastorestats_avg_entry_size_bytes: (a: number) => number;
|
|
517
|
-
readonly __wbg_set_datastorestats_avg_entry_size_bytes: (a: number, b: number) => void;
|
|
518
|
-
readonly __wbg_get_datastorestats_capacity_usage_percent: (a: number) => number;
|
|
519
|
-
readonly __wbg_set_datastorestats_capacity_usage_percent: (a: number, b: number) => void;
|
|
520
|
-
readonly __wbg_get_datastorestats_memory_alert_threshold: (a: number) => number;
|
|
521
|
-
readonly __wbg_set_datastorestats_memory_alert_threshold: (a: number, b: number) => void;
|
|
522
|
-
readonly __wbg_get_datastorestats_memory_alert_triggered: (a: number) => number;
|
|
523
|
-
readonly __wbg_set_datastorestats_memory_alert_triggered: (a: number, b: number) => void;
|
|
524
|
-
readonly datastorestats_json_string: (a: number) => [number, number];
|
|
525
|
-
readonly rust_zstd_wasm_shim_qsort: (a: number, b: number, c: number, d: number) => void;
|
|
526
|
-
readonly rust_zstd_wasm_shim_malloc: (a: number) => number;
|
|
527
|
-
readonly rust_zstd_wasm_shim_memcmp: (a: number, b: number, c: number) => number;
|
|
528
|
-
readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
|
|
529
|
-
readonly rust_zstd_wasm_shim_free: (a: number) => void;
|
|
530
|
-
readonly rust_zstd_wasm_shim_memcpy: (a: number, b: number, c: number) => number;
|
|
531
|
-
readonly rust_zstd_wasm_shim_memmove: (a: number, b: number, c: number) => number;
|
|
532
|
-
readonly rust_zstd_wasm_shim_memset: (a: number, b: number, c: number) => number;
|
|
533
|
-
readonly wasm_bindgen__closure__destroy__hc702ccaae4578483: (a: number, b: number) => void;
|
|
534
|
-
readonly wasm_bindgen__closure__destroy__hb1a48b0449d5c8e5: (a: number, b: number) => void;
|
|
535
|
-
readonly wasm_bindgen__convert__closures_____invoke__h6394c43edbf3348e: (a: number, b: number, c: any) => [number, number];
|
|
536
|
-
readonly wasm_bindgen__convert__closures_____invoke__h05182578eef316a4: (a: number, b: number, c: any, d: any) => void;
|
|
537
|
-
readonly wasm_bindgen__convert__closures_____invoke__he2e2c1c282e3a8df: (a: number, b: number) => void;
|
|
538
|
-
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
539
|
-
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
540
|
-
readonly __wbindgen_exn_store: (a: number) => void;
|
|
541
|
-
readonly __externref_table_alloc: () => number;
|
|
542
|
-
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
543
|
-
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
544
|
-
readonly __externref_table_dealloc: (a: number) => void;
|
|
545
|
-
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
546
|
-
readonly __wbindgen_start: () => void;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
550
|
-
|
|
551
|
-
/**
|
|
552
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
553
|
-
* a precompiled `WebAssembly.Module`.
|
|
554
|
-
*
|
|
555
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
556
|
-
*
|
|
557
|
-
* @returns {InitOutput}
|
|
558
|
-
*/
|
|
559
|
-
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
563
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
564
|
-
*
|
|
565
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
566
|
-
*
|
|
567
|
-
* @returns {Promise<InitOutput>}
|
|
568
|
-
*/
|
|
569
|
-
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
package/cedarling_wasm.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* A WASM wrapper for the Rust `cedarling::AuthorizeResult` struct.
|
|
5
5
|
* Represents the result of an authorization request.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
class AuthorizeResult {
|
|
8
8
|
static __wrap(ptr) {
|
|
9
9
|
ptr = ptr >>> 0;
|
|
10
10
|
const obj = Object.create(AuthorizeResult.prototype);
|
|
@@ -60,14 +60,6 @@ export class AuthorizeResult {
|
|
|
60
60
|
const ret = wasm.__wbg_get_authorizeresult_decision(this.__wbg_ptr);
|
|
61
61
|
return ret !== 0;
|
|
62
62
|
}
|
|
63
|
-
/**
|
|
64
|
-
* Result of authorization where principal is `Jans::User`
|
|
65
|
-
* @returns {AuthorizeResultResponse | undefined}
|
|
66
|
-
*/
|
|
67
|
-
get person() {
|
|
68
|
-
const ret = wasm.__wbg_get_authorizeresult_person(this.__wbg_ptr);
|
|
69
|
-
return ret === 0 ? undefined : AuthorizeResultResponse.__wrap(ret);
|
|
70
|
-
}
|
|
71
63
|
/**
|
|
72
64
|
* Request ID of the authorization request
|
|
73
65
|
* @returns {string}
|
|
@@ -84,14 +76,6 @@ export class AuthorizeResult {
|
|
|
84
76
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
85
77
|
}
|
|
86
78
|
}
|
|
87
|
-
/**
|
|
88
|
-
* Result of authorization where principal is `Jans::Workload`
|
|
89
|
-
* @returns {AuthorizeResultResponse | undefined}
|
|
90
|
-
*/
|
|
91
|
-
get workload() {
|
|
92
|
-
const ret = wasm.__wbg_get_authorizeresult_workload(this.__wbg_ptr);
|
|
93
|
-
return ret === 0 ? undefined : AuthorizeResultResponse.__wrap(ret);
|
|
94
|
-
}
|
|
95
79
|
/**
|
|
96
80
|
* Result of authorization
|
|
97
81
|
* true means `ALLOW`
|
|
@@ -103,18 +87,6 @@ export class AuthorizeResult {
|
|
|
103
87
|
set decision(arg0) {
|
|
104
88
|
wasm.__wbg_set_authorizeresult_decision(this.__wbg_ptr, arg0);
|
|
105
89
|
}
|
|
106
|
-
/**
|
|
107
|
-
* Result of authorization where principal is `Jans::User`
|
|
108
|
-
* @param {AuthorizeResultResponse | null} [arg0]
|
|
109
|
-
*/
|
|
110
|
-
set person(arg0) {
|
|
111
|
-
let ptr0 = 0;
|
|
112
|
-
if (!isLikeNone(arg0)) {
|
|
113
|
-
_assertClass(arg0, AuthorizeResultResponse);
|
|
114
|
-
ptr0 = arg0.__destroy_into_raw();
|
|
115
|
-
}
|
|
116
|
-
wasm.__wbg_set_authorizeresult_person(this.__wbg_ptr, ptr0);
|
|
117
|
-
}
|
|
118
90
|
/**
|
|
119
91
|
* Request ID of the authorization request
|
|
120
92
|
* @param {string} arg0
|
|
@@ -124,26 +96,15 @@ export class AuthorizeResult {
|
|
|
124
96
|
const len0 = WASM_VECTOR_LEN;
|
|
125
97
|
wasm.__wbg_set_authorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
|
|
126
98
|
}
|
|
127
|
-
/**
|
|
128
|
-
* Result of authorization where principal is `Jans::Workload`
|
|
129
|
-
* @param {AuthorizeResultResponse | null} [arg0]
|
|
130
|
-
*/
|
|
131
|
-
set workload(arg0) {
|
|
132
|
-
let ptr0 = 0;
|
|
133
|
-
if (!isLikeNone(arg0)) {
|
|
134
|
-
_assertClass(arg0, AuthorizeResultResponse);
|
|
135
|
-
ptr0 = arg0.__destroy_into_raw();
|
|
136
|
-
}
|
|
137
|
-
wasm.__wbg_set_authorizeresult_workload(this.__wbg_ptr, ptr0);
|
|
138
|
-
}
|
|
139
99
|
}
|
|
140
100
|
if (Symbol.dispose) AuthorizeResult.prototype[Symbol.dispose] = AuthorizeResult.prototype.free;
|
|
101
|
+
exports.AuthorizeResult = AuthorizeResult;
|
|
141
102
|
|
|
142
103
|
/**
|
|
143
104
|
* A WASM wrapper for the Rust `cedar_policy::Response` struct.
|
|
144
105
|
* Represents the result of an authorization request.
|
|
145
106
|
*/
|
|
146
|
-
|
|
107
|
+
class AuthorizeResultResponse {
|
|
147
108
|
static __wrap(ptr) {
|
|
148
109
|
ptr = ptr >>> 0;
|
|
149
110
|
const obj = Object.create(AuthorizeResultResponse.prototype);
|
|
@@ -179,11 +140,12 @@ export class AuthorizeResultResponse {
|
|
|
179
140
|
}
|
|
180
141
|
}
|
|
181
142
|
if (Symbol.dispose) AuthorizeResultResponse.prototype[Symbol.dispose] = AuthorizeResultResponse.prototype.free;
|
|
143
|
+
exports.AuthorizeResultResponse = AuthorizeResultResponse;
|
|
182
144
|
|
|
183
145
|
/**
|
|
184
146
|
* The instance of the Cedarling application.
|
|
185
147
|
*/
|
|
186
|
-
|
|
148
|
+
class Cedarling {
|
|
187
149
|
static __wrap(ptr) {
|
|
188
150
|
ptr = ptr >>> 0;
|
|
189
151
|
const obj = Object.create(Cedarling.prototype);
|
|
@@ -201,16 +163,6 @@ export class Cedarling {
|
|
|
201
163
|
const ptr = this.__destroy_into_raw();
|
|
202
164
|
wasm.__wbg_cedarling_free(ptr, 0);
|
|
203
165
|
}
|
|
204
|
-
/**
|
|
205
|
-
* Authorize request
|
|
206
|
-
* makes authorization decision based on the [`Request`]
|
|
207
|
-
* @param {any} request
|
|
208
|
-
* @returns {Promise<AuthorizeResult>}
|
|
209
|
-
*/
|
|
210
|
-
authorize(request) {
|
|
211
|
-
const ret = wasm.cedarling_authorize(this.__wbg_ptr, request);
|
|
212
|
-
return ret;
|
|
213
|
-
}
|
|
214
166
|
/**
|
|
215
167
|
* Authorize multi-issuer request.
|
|
216
168
|
* Makes authorization decision based on multiple JWT tokens from different issuers
|
|
@@ -526,12 +478,13 @@ export class Cedarling {
|
|
|
526
478
|
}
|
|
527
479
|
}
|
|
528
480
|
if (Symbol.dispose) Cedarling.prototype[Symbol.dispose] = Cedarling.prototype.free;
|
|
481
|
+
exports.Cedarling = Cedarling;
|
|
529
482
|
|
|
530
483
|
/**
|
|
531
484
|
* A WASM wrapper for the Rust `cedarling::DataEntry` struct.
|
|
532
485
|
* Represents a data entry in the DataStore with value and metadata.
|
|
533
486
|
*/
|
|
534
|
-
|
|
487
|
+
class DataEntry {
|
|
535
488
|
static __wrap(ptr) {
|
|
536
489
|
ptr = ptr >>> 0;
|
|
537
490
|
const obj = Object.create(DataEntry.prototype);
|
|
@@ -690,12 +643,13 @@ export class DataEntry {
|
|
|
690
643
|
}
|
|
691
644
|
}
|
|
692
645
|
if (Symbol.dispose) DataEntry.prototype[Symbol.dispose] = DataEntry.prototype.free;
|
|
646
|
+
exports.DataEntry = DataEntry;
|
|
693
647
|
|
|
694
648
|
/**
|
|
695
649
|
* A WASM wrapper for the Rust `cedarling::DataStoreStats` struct.
|
|
696
650
|
* Statistics about the DataStore.
|
|
697
651
|
*/
|
|
698
|
-
|
|
652
|
+
class DataStoreStats {
|
|
699
653
|
static __wrap(ptr) {
|
|
700
654
|
ptr = ptr >>> 0;
|
|
701
655
|
const obj = Object.create(DataStoreStats.prototype);
|
|
@@ -866,6 +820,7 @@ export class DataStoreStats {
|
|
|
866
820
|
}
|
|
867
821
|
}
|
|
868
822
|
if (Symbol.dispose) DataStoreStats.prototype[Symbol.dispose] = DataStoreStats.prototype.free;
|
|
823
|
+
exports.DataStoreStats = DataStoreStats;
|
|
869
824
|
|
|
870
825
|
/**
|
|
871
826
|
* Diagnostics
|
|
@@ -873,7 +828,7 @@ if (Symbol.dispose) DataStoreStats.prototype[Symbol.dispose] = DataStoreStats.pr
|
|
|
873
828
|
*
|
|
874
829
|
* Provides detailed information about how a policy decision was made, including policies that contributed to the decision and any errors encountered during evaluation.
|
|
875
830
|
*/
|
|
876
|
-
|
|
831
|
+
class Diagnostics {
|
|
877
832
|
static __wrap(ptr) {
|
|
878
833
|
ptr = ptr >>> 0;
|
|
879
834
|
const obj = Object.create(Diagnostics.prototype);
|
|
@@ -917,12 +872,127 @@ export class Diagnostics {
|
|
|
917
872
|
}
|
|
918
873
|
}
|
|
919
874
|
if (Symbol.dispose) Diagnostics.prototype[Symbol.dispose] = Diagnostics.prototype.free;
|
|
875
|
+
exports.Diagnostics = Diagnostics;
|
|
876
|
+
|
|
877
|
+
class IntoUnderlyingByteSource {
|
|
878
|
+
__destroy_into_raw() {
|
|
879
|
+
const ptr = this.__wbg_ptr;
|
|
880
|
+
this.__wbg_ptr = 0;
|
|
881
|
+
IntoUnderlyingByteSourceFinalization.unregister(this);
|
|
882
|
+
return ptr;
|
|
883
|
+
}
|
|
884
|
+
free() {
|
|
885
|
+
const ptr = this.__destroy_into_raw();
|
|
886
|
+
wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* @returns {number}
|
|
890
|
+
*/
|
|
891
|
+
get autoAllocateChunkSize() {
|
|
892
|
+
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
893
|
+
return ret >>> 0;
|
|
894
|
+
}
|
|
895
|
+
cancel() {
|
|
896
|
+
const ptr = this.__destroy_into_raw();
|
|
897
|
+
wasm.intounderlyingbytesource_cancel(ptr);
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* @param {ReadableByteStreamController} controller
|
|
901
|
+
* @returns {Promise<any>}
|
|
902
|
+
*/
|
|
903
|
+
pull(controller) {
|
|
904
|
+
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
|
|
905
|
+
return ret;
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* @param {ReadableByteStreamController} controller
|
|
909
|
+
*/
|
|
910
|
+
start(controller) {
|
|
911
|
+
wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* @returns {ReadableStreamType}
|
|
915
|
+
*/
|
|
916
|
+
get type() {
|
|
917
|
+
const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
|
|
918
|
+
return __wbindgen_enum_ReadableStreamType[ret];
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
|
|
922
|
+
exports.IntoUnderlyingByteSource = IntoUnderlyingByteSource;
|
|
923
|
+
|
|
924
|
+
class IntoUnderlyingSink {
|
|
925
|
+
__destroy_into_raw() {
|
|
926
|
+
const ptr = this.__wbg_ptr;
|
|
927
|
+
this.__wbg_ptr = 0;
|
|
928
|
+
IntoUnderlyingSinkFinalization.unregister(this);
|
|
929
|
+
return ptr;
|
|
930
|
+
}
|
|
931
|
+
free() {
|
|
932
|
+
const ptr = this.__destroy_into_raw();
|
|
933
|
+
wasm.__wbg_intounderlyingsink_free(ptr, 0);
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* @param {any} reason
|
|
937
|
+
* @returns {Promise<any>}
|
|
938
|
+
*/
|
|
939
|
+
abort(reason) {
|
|
940
|
+
const ptr = this.__destroy_into_raw();
|
|
941
|
+
const ret = wasm.intounderlyingsink_abort(ptr, reason);
|
|
942
|
+
return ret;
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* @returns {Promise<any>}
|
|
946
|
+
*/
|
|
947
|
+
close() {
|
|
948
|
+
const ptr = this.__destroy_into_raw();
|
|
949
|
+
const ret = wasm.intounderlyingsink_close(ptr);
|
|
950
|
+
return ret;
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* @param {any} chunk
|
|
954
|
+
* @returns {Promise<any>}
|
|
955
|
+
*/
|
|
956
|
+
write(chunk) {
|
|
957
|
+
const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
|
|
958
|
+
return ret;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
|
|
962
|
+
exports.IntoUnderlyingSink = IntoUnderlyingSink;
|
|
963
|
+
|
|
964
|
+
class IntoUnderlyingSource {
|
|
965
|
+
__destroy_into_raw() {
|
|
966
|
+
const ptr = this.__wbg_ptr;
|
|
967
|
+
this.__wbg_ptr = 0;
|
|
968
|
+
IntoUnderlyingSourceFinalization.unregister(this);
|
|
969
|
+
return ptr;
|
|
970
|
+
}
|
|
971
|
+
free() {
|
|
972
|
+
const ptr = this.__destroy_into_raw();
|
|
973
|
+
wasm.__wbg_intounderlyingsource_free(ptr, 0);
|
|
974
|
+
}
|
|
975
|
+
cancel() {
|
|
976
|
+
const ptr = this.__destroy_into_raw();
|
|
977
|
+
wasm.intounderlyingsource_cancel(ptr);
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* @param {ReadableStreamDefaultController} controller
|
|
981
|
+
* @returns {Promise<any>}
|
|
982
|
+
*/
|
|
983
|
+
pull(controller) {
|
|
984
|
+
const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, controller);
|
|
985
|
+
return ret;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
|
|
989
|
+
exports.IntoUnderlyingSource = IntoUnderlyingSource;
|
|
920
990
|
|
|
921
991
|
/**
|
|
922
992
|
* A WASM wrapper for the Rust `cedarling::MultiIssuerAuthorizeResult` struct.
|
|
923
993
|
* Represents the result of a multi-issuer authorization request.
|
|
924
994
|
*/
|
|
925
|
-
|
|
995
|
+
class MultiIssuerAuthorizeResult {
|
|
926
996
|
static __wrap(ptr) {
|
|
927
997
|
ptr = ptr >>> 0;
|
|
928
998
|
const obj = Object.create(MultiIssuerAuthorizeResult.prototype);
|
|
@@ -1019,6 +1089,7 @@ export class MultiIssuerAuthorizeResult {
|
|
|
1019
1089
|
}
|
|
1020
1090
|
}
|
|
1021
1091
|
if (Symbol.dispose) MultiIssuerAuthorizeResult.prototype[Symbol.dispose] = MultiIssuerAuthorizeResult.prototype.free;
|
|
1092
|
+
exports.MultiIssuerAuthorizeResult = MultiIssuerAuthorizeResult;
|
|
1022
1093
|
|
|
1023
1094
|
/**
|
|
1024
1095
|
* PolicyEvaluationError
|
|
@@ -1026,7 +1097,7 @@ if (Symbol.dispose) MultiIssuerAuthorizeResult.prototype[Symbol.dispose] = Multi
|
|
|
1026
1097
|
*
|
|
1027
1098
|
* Represents an error that occurred when evaluating a Cedar policy.
|
|
1028
1099
|
*/
|
|
1029
|
-
|
|
1100
|
+
class PolicyEvaluationError {
|
|
1030
1101
|
static __wrap(ptr) {
|
|
1031
1102
|
ptr = ptr >>> 0;
|
|
1032
1103
|
const obj = Object.create(PolicyEvaluationError.prototype);
|
|
@@ -1078,6 +1149,7 @@ export class PolicyEvaluationError {
|
|
|
1078
1149
|
}
|
|
1079
1150
|
}
|
|
1080
1151
|
if (Symbol.dispose) PolicyEvaluationError.prototype[Symbol.dispose] = PolicyEvaluationError.prototype.free;
|
|
1152
|
+
exports.PolicyEvaluationError = PolicyEvaluationError;
|
|
1081
1153
|
|
|
1082
1154
|
/**
|
|
1083
1155
|
* Create a new instance of the Cedarling application.
|
|
@@ -1085,10 +1157,11 @@ if (Symbol.dispose) PolicyEvaluationError.prototype[Symbol.dispose] = PolicyEval
|
|
|
1085
1157
|
* @param {any} config
|
|
1086
1158
|
* @returns {Promise<Cedarling>}
|
|
1087
1159
|
*/
|
|
1088
|
-
|
|
1160
|
+
function init(config) {
|
|
1089
1161
|
const ret = wasm.init(config);
|
|
1090
1162
|
return ret;
|
|
1091
1163
|
}
|
|
1164
|
+
exports.init = init;
|
|
1092
1165
|
|
|
1093
1166
|
/**
|
|
1094
1167
|
* Create a new instance of the Cedarling application from archive bytes.
|
|
@@ -1110,10 +1183,11 @@ export function init(config) {
|
|
|
1110
1183
|
* @param {Uint8Array} archive_bytes
|
|
1111
1184
|
* @returns {Promise<Cedarling>}
|
|
1112
1185
|
*/
|
|
1113
|
-
|
|
1186
|
+
function init_from_archive_bytes(config, archive_bytes) {
|
|
1114
1187
|
const ret = wasm.init_from_archive_bytes(config, archive_bytes);
|
|
1115
1188
|
return ret;
|
|
1116
1189
|
}
|
|
1190
|
+
exports.init_from_archive_bytes = init_from_archive_bytes;
|
|
1117
1191
|
|
|
1118
1192
|
function __wbg_get_imports() {
|
|
1119
1193
|
const import0 = {
|
|
@@ -1214,6 +1288,26 @@ function __wbg_get_imports() {
|
|
|
1214
1288
|
const ret = AuthorizeResult.__wrap(arg0);
|
|
1215
1289
|
return ret;
|
|
1216
1290
|
},
|
|
1291
|
+
__wbg_body_ac1dad652946e6da: function(arg0) {
|
|
1292
|
+
const ret = arg0.body;
|
|
1293
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1294
|
+
},
|
|
1295
|
+
__wbg_buffer_60b8043cd926067d: function(arg0) {
|
|
1296
|
+
const ret = arg0.buffer;
|
|
1297
|
+
return ret;
|
|
1298
|
+
},
|
|
1299
|
+
__wbg_byobRequest_6342e5f2b232c0f9: function(arg0) {
|
|
1300
|
+
const ret = arg0.byobRequest;
|
|
1301
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1302
|
+
},
|
|
1303
|
+
__wbg_byteLength_607b856aa6c5a508: function(arg0) {
|
|
1304
|
+
const ret = arg0.byteLength;
|
|
1305
|
+
return ret;
|
|
1306
|
+
},
|
|
1307
|
+
__wbg_byteOffset_b26b63681c83856c: function(arg0) {
|
|
1308
|
+
const ret = arg0.byteOffset;
|
|
1309
|
+
return ret;
|
|
1310
|
+
},
|
|
1217
1311
|
__wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1218
1312
|
const ret = arg0.call(arg1, arg2);
|
|
1219
1313
|
return ret;
|
|
@@ -1222,14 +1316,32 @@ function __wbg_get_imports() {
|
|
|
1222
1316
|
const ret = arg0.call(arg1);
|
|
1223
1317
|
return ret;
|
|
1224
1318
|
}, arguments); },
|
|
1319
|
+
__wbg_cancel_79b3bea07a1028e7: function(arg0) {
|
|
1320
|
+
const ret = arg0.cancel();
|
|
1321
|
+
return ret;
|
|
1322
|
+
},
|
|
1323
|
+
__wbg_catch_d7ed0375ab6532a5: function(arg0, arg1) {
|
|
1324
|
+
const ret = arg0.catch(arg1);
|
|
1325
|
+
return ret;
|
|
1326
|
+
},
|
|
1225
1327
|
__wbg_cedarling_new: function(arg0) {
|
|
1226
1328
|
const ret = Cedarling.__wrap(arg0);
|
|
1227
1329
|
return ret;
|
|
1228
1330
|
},
|
|
1331
|
+
__wbg_clearTimeout_1d1b13f4034f30ca: function(arg0) {
|
|
1332
|
+
const ret = clearTimeout(arg0);
|
|
1333
|
+
return ret;
|
|
1334
|
+
},
|
|
1229
1335
|
__wbg_clearTimeout_2256f1e7b94ef517: function(arg0) {
|
|
1230
1336
|
const ret = clearTimeout(arg0);
|
|
1231
1337
|
return ret;
|
|
1232
1338
|
},
|
|
1339
|
+
__wbg_close_690d36108c557337: function() { return handleError(function (arg0) {
|
|
1340
|
+
arg0.close();
|
|
1341
|
+
}, arguments); },
|
|
1342
|
+
__wbg_close_737b4b1fbc658540: function() { return handleError(function (arg0) {
|
|
1343
|
+
arg0.close();
|
|
1344
|
+
}, arguments); },
|
|
1233
1345
|
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
1234
1346
|
const ret = arg0.crypto;
|
|
1235
1347
|
return ret;
|
|
@@ -1245,6 +1357,9 @@ function __wbg_get_imports() {
|
|
|
1245
1357
|
const ret = arg0.done;
|
|
1246
1358
|
return ret;
|
|
1247
1359
|
},
|
|
1360
|
+
__wbg_enqueue_ec3552838b4b7fbf: function() { return handleError(function (arg0, arg1) {
|
|
1361
|
+
arg0.enqueue(arg1);
|
|
1362
|
+
}, arguments); },
|
|
1248
1363
|
__wbg_entries_5b8fe91cea59610e: function(arg0) {
|
|
1249
1364
|
const ret = arg0.entries();
|
|
1250
1365
|
return ret;
|
|
@@ -1260,6 +1375,10 @@ function __wbg_get_imports() {
|
|
|
1260
1375
|
__wbg_error_b282edc683808929: function(arg0) {
|
|
1261
1376
|
console.error(...arg0);
|
|
1262
1377
|
},
|
|
1378
|
+
__wbg_fetch_010aa16f24b763bc: function(arg0, arg1) {
|
|
1379
|
+
const ret = fetch(arg0, arg1);
|
|
1380
|
+
return ret;
|
|
1381
|
+
},
|
|
1263
1382
|
__wbg_fetch_43b2f110608a59ff: function(arg0) {
|
|
1264
1383
|
const ret = fetch(arg0);
|
|
1265
1384
|
return ret;
|
|
@@ -1268,6 +1387,10 @@ function __wbg_get_imports() {
|
|
|
1268
1387
|
const ret = arg0.fetch(arg1);
|
|
1269
1388
|
return ret;
|
|
1270
1389
|
},
|
|
1390
|
+
__wbg_fetch_d77cded604d729e9: function(arg0, arg1, arg2) {
|
|
1391
|
+
const ret = arg0.fetch(arg1, arg2);
|
|
1392
|
+
return ret;
|
|
1393
|
+
},
|
|
1271
1394
|
__wbg_fromEntries_8f078e02a548e8eb: function() { return handleError(function (arg0) {
|
|
1272
1395
|
const ret = Object.fromEntries(arg0);
|
|
1273
1396
|
return ret;
|
|
@@ -1278,6 +1401,10 @@ function __wbg_get_imports() {
|
|
|
1278
1401
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
1279
1402
|
arg0.getRandomValues(arg1);
|
|
1280
1403
|
}, arguments); },
|
|
1404
|
+
__wbg_getReader_9facd4f899beac89: function() { return handleError(function (arg0) {
|
|
1405
|
+
const ret = arg0.getReader();
|
|
1406
|
+
return ret;
|
|
1407
|
+
}, arguments); },
|
|
1281
1408
|
__wbg_getTime_1dad7b5386ddd2d9: function(arg0) {
|
|
1282
1409
|
const ret = arg0.getTime();
|
|
1283
1410
|
return ret;
|
|
@@ -1298,10 +1425,18 @@ function __wbg_get_imports() {
|
|
|
1298
1425
|
const ret = arg0[arg1 >>> 0];
|
|
1299
1426
|
return ret;
|
|
1300
1427
|
},
|
|
1428
|
+
__wbg_get_done_d0ab690f8df5501f: function(arg0) {
|
|
1429
|
+
const ret = arg0.done;
|
|
1430
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1431
|
+
},
|
|
1301
1432
|
__wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
|
|
1302
1433
|
const ret = arg0[arg1 >>> 0];
|
|
1303
1434
|
return ret;
|
|
1304
1435
|
},
|
|
1436
|
+
__wbg_get_value_548ae6adf5a174e4: function(arg0) {
|
|
1437
|
+
const ret = arg0.value;
|
|
1438
|
+
return ret;
|
|
1439
|
+
},
|
|
1305
1440
|
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
1306
1441
|
const ret = arg0[arg1];
|
|
1307
1442
|
return ret;
|
|
@@ -1430,6 +1565,10 @@ function __wbg_get_imports() {
|
|
|
1430
1565
|
const ret = new AbortController();
|
|
1431
1566
|
return ret;
|
|
1432
1567
|
}, arguments); },
|
|
1568
|
+
__wbg_new_d15cb560a6a0e5f0: function(arg0, arg1) {
|
|
1569
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1570
|
+
return ret;
|
|
1571
|
+
},
|
|
1433
1572
|
__wbg_new_fd94ca5c9639abd2: function(arg0) {
|
|
1434
1573
|
const ret = new Date(arg0);
|
|
1435
1574
|
return ret;
|
|
@@ -1445,7 +1584,7 @@ function __wbg_get_imports() {
|
|
|
1445
1584
|
const a = state0.a;
|
|
1446
1585
|
state0.a = 0;
|
|
1447
1586
|
try {
|
|
1448
|
-
return
|
|
1587
|
+
return wasm_bindgen__convert__closures_____invoke__h17a92308e79e69c0(a, state0.b, arg0, arg1);
|
|
1449
1588
|
} finally {
|
|
1450
1589
|
state0.a = a;
|
|
1451
1590
|
}
|
|
@@ -1456,6 +1595,10 @@ function __wbg_get_imports() {
|
|
|
1456
1595
|
state0.a = state0.b = 0;
|
|
1457
1596
|
}
|
|
1458
1597
|
},
|
|
1598
|
+
__wbg_new_with_byte_offset_and_length_b2ec5bf7b2f35743: function(arg0, arg1, arg2) {
|
|
1599
|
+
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1600
|
+
return ret;
|
|
1601
|
+
},
|
|
1459
1602
|
__wbg_new_with_length_825018a1616e9e55: function(arg0) {
|
|
1460
1603
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1461
1604
|
return ret;
|
|
@@ -1501,6 +1644,13 @@ function __wbg_get_imports() {
|
|
|
1501
1644
|
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
1502
1645
|
arg0.randomFillSync(arg1);
|
|
1503
1646
|
}, arguments); },
|
|
1647
|
+
__wbg_read_7f593a961a7f80ed: function(arg0) {
|
|
1648
|
+
const ret = arg0.read();
|
|
1649
|
+
return ret;
|
|
1650
|
+
},
|
|
1651
|
+
__wbg_releaseLock_ef7766a5da654ff8: function(arg0) {
|
|
1652
|
+
arg0.releaseLock();
|
|
1653
|
+
},
|
|
1504
1654
|
__wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
|
|
1505
1655
|
const ret = module.require;
|
|
1506
1656
|
return ret;
|
|
@@ -1509,6 +1659,13 @@ function __wbg_get_imports() {
|
|
|
1509
1659
|
const ret = Promise.resolve(arg0);
|
|
1510
1660
|
return ret;
|
|
1511
1661
|
},
|
|
1662
|
+
__wbg_respond_e286ee502e7cf7e4: function() { return handleError(function (arg0, arg1) {
|
|
1663
|
+
arg0.respond(arg1 >>> 0);
|
|
1664
|
+
}, arguments); },
|
|
1665
|
+
__wbg_setTimeout_a3127d9f29a851c3: function(arg0, arg1) {
|
|
1666
|
+
const ret = setTimeout(arg0, arg1);
|
|
1667
|
+
return ret;
|
|
1668
|
+
},
|
|
1512
1669
|
__wbg_setTimeout_b188b3bcc8977c7d: function(arg0, arg1) {
|
|
1513
1670
|
const ret = setTimeout(arg0, arg1);
|
|
1514
1671
|
return ret;
|
|
@@ -1523,6 +1680,9 @@ function __wbg_get_imports() {
|
|
|
1523
1680
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1524
1681
|
return ret;
|
|
1525
1682
|
}, arguments); },
|
|
1683
|
+
__wbg_set_8c0b3ffcf05d61c2: function(arg0, arg1, arg2) {
|
|
1684
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
1685
|
+
},
|
|
1526
1686
|
__wbg_set_bf7251625df30a02: function(arg0, arg1, arg2) {
|
|
1527
1687
|
const ret = arg0.set(arg1, arg2);
|
|
1528
1688
|
return ret;
|
|
@@ -1536,15 +1696,30 @@ function __wbg_get_imports() {
|
|
|
1536
1696
|
__wbg_set_credentials_ed63183445882c65: function(arg0, arg1) {
|
|
1537
1697
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1538
1698
|
},
|
|
1699
|
+
__wbg_set_e09648bea3f1af1e: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1700
|
+
arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1701
|
+
}, arguments); },
|
|
1539
1702
|
__wbg_set_headers_3c8fecc693b75327: function(arg0, arg1) {
|
|
1540
1703
|
arg0.headers = arg1;
|
|
1541
1704
|
},
|
|
1705
|
+
__wbg_set_integrity_6e605069e31cef0a: function(arg0, arg1, arg2) {
|
|
1706
|
+
arg0.integrity = getStringFromWasm0(arg1, arg2);
|
|
1707
|
+
},
|
|
1542
1708
|
__wbg_set_method_8c015e8bcafd7be1: function(arg0, arg1, arg2) {
|
|
1543
1709
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
1544
1710
|
},
|
|
1545
1711
|
__wbg_set_mode_5a87f2c809cf37c2: function(arg0, arg1) {
|
|
1546
1712
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
1547
1713
|
},
|
|
1714
|
+
__wbg_set_redirect_c7b340412376b11a: function(arg0, arg1) {
|
|
1715
|
+
arg0.redirect = __wbindgen_enum_RequestRedirect[arg1];
|
|
1716
|
+
},
|
|
1717
|
+
__wbg_set_referrer_4f2f273104bee6d0: function(arg0, arg1, arg2) {
|
|
1718
|
+
arg0.referrer = getStringFromWasm0(arg1, arg2);
|
|
1719
|
+
},
|
|
1720
|
+
__wbg_set_referrer_policy_3cea8b6e31a9e636: function(arg0, arg1) {
|
|
1721
|
+
arg0.referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
|
|
1722
|
+
},
|
|
1548
1723
|
__wbg_set_signal_0cebecb698f25d21: function(arg0, arg1) {
|
|
1549
1724
|
arg0.signal = arg1;
|
|
1550
1725
|
},
|
|
@@ -1588,6 +1763,10 @@ function __wbg_get_imports() {
|
|
|
1588
1763
|
const ret = arg0.then(arg1, arg2);
|
|
1589
1764
|
return ret;
|
|
1590
1765
|
},
|
|
1766
|
+
__wbg_toString_3272fa0dfd05dd87: function(arg0) {
|
|
1767
|
+
const ret = arg0.toString();
|
|
1768
|
+
return ret;
|
|
1769
|
+
},
|
|
1591
1770
|
__wbg_trace_e81c2d096c740f11: function(arg0) {
|
|
1592
1771
|
console.trace(...arg0);
|
|
1593
1772
|
},
|
|
@@ -1606,40 +1785,54 @@ function __wbg_get_imports() {
|
|
|
1606
1785
|
const ret = arg0.versions;
|
|
1607
1786
|
return ret;
|
|
1608
1787
|
},
|
|
1788
|
+
__wbg_view_f68a712e7315f8b2: function(arg0) {
|
|
1789
|
+
const ret = arg0.view;
|
|
1790
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1791
|
+
},
|
|
1609
1792
|
__wbg_warn_ff4a30433095bbe4: function(arg0) {
|
|
1610
1793
|
console.warn(...arg0);
|
|
1611
1794
|
},
|
|
1612
1795
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1613
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1614
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1796
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 595, function: Function { arguments: [], shim_idx: 596, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1797
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hcbf2ec2b115651da, wasm_bindgen__convert__closures_____invoke__h09da5be58b802521);
|
|
1615
1798
|
return ret;
|
|
1616
1799
|
},
|
|
1617
1800
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1618
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1619
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1801
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 640, function: Function { arguments: [Externref], shim_idx: 641, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1802
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hb94dbe4a47b9147c, wasm_bindgen__convert__closures_____invoke__hdb4e3955a815023f);
|
|
1803
|
+
return ret;
|
|
1804
|
+
},
|
|
1805
|
+
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1806
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 752, function: Function { arguments: [], shim_idx: 753, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1807
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hd11c5dfc6ff843b5, wasm_bindgen__convert__closures_____invoke__h5ac545e984d2dde4);
|
|
1620
1808
|
return ret;
|
|
1621
1809
|
},
|
|
1622
|
-
|
|
1810
|
+
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1811
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 794, function: Function { arguments: [Externref], shim_idx: 2224, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1812
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h14227e6b7ccdc7d9, wasm_bindgen__convert__closures_____invoke__hce0de7781e15b6ff);
|
|
1813
|
+
return ret;
|
|
1814
|
+
},
|
|
1815
|
+
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
1623
1816
|
// Cast intrinsic for `F64 -> Externref`.
|
|
1624
1817
|
const ret = arg0;
|
|
1625
1818
|
return ret;
|
|
1626
1819
|
},
|
|
1627
|
-
|
|
1820
|
+
__wbindgen_cast_0000000000000006: function(arg0) {
|
|
1628
1821
|
// Cast intrinsic for `I64 -> Externref`.
|
|
1629
1822
|
const ret = arg0;
|
|
1630
1823
|
return ret;
|
|
1631
1824
|
},
|
|
1632
|
-
|
|
1825
|
+
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
1633
1826
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1634
1827
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1635
1828
|
return ret;
|
|
1636
1829
|
},
|
|
1637
|
-
|
|
1830
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
1638
1831
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1639
1832
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1640
1833
|
return ret;
|
|
1641
1834
|
},
|
|
1642
|
-
|
|
1835
|
+
__wbindgen_cast_0000000000000009: function(arg0) {
|
|
1643
1836
|
// Cast intrinsic for `U64 -> Externref`.
|
|
1644
1837
|
const ret = BigInt.asUintN(64, arg0);
|
|
1645
1838
|
return ret;
|
|
@@ -1660,22 +1853,36 @@ function __wbg_get_imports() {
|
|
|
1660
1853
|
};
|
|
1661
1854
|
}
|
|
1662
1855
|
|
|
1663
|
-
function
|
|
1664
|
-
wasm.
|
|
1856
|
+
function wasm_bindgen__convert__closures_____invoke__h09da5be58b802521(arg0, arg1) {
|
|
1857
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h09da5be58b802521(arg0, arg1);
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
function wasm_bindgen__convert__closures_____invoke__h5ac545e984d2dde4(arg0, arg1) {
|
|
1861
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h5ac545e984d2dde4(arg0, arg1);
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
function wasm_bindgen__convert__closures_____invoke__hdb4e3955a815023f(arg0, arg1, arg2) {
|
|
1865
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hdb4e3955a815023f(arg0, arg1, arg2);
|
|
1665
1866
|
}
|
|
1666
1867
|
|
|
1667
|
-
function
|
|
1668
|
-
const ret = wasm.
|
|
1868
|
+
function wasm_bindgen__convert__closures_____invoke__hce0de7781e15b6ff(arg0, arg1, arg2) {
|
|
1869
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__hce0de7781e15b6ff(arg0, arg1, arg2);
|
|
1669
1870
|
if (ret[1]) {
|
|
1670
1871
|
throw takeFromExternrefTable0(ret[0]);
|
|
1671
1872
|
}
|
|
1672
1873
|
}
|
|
1673
1874
|
|
|
1674
|
-
function
|
|
1675
|
-
wasm.
|
|
1875
|
+
function wasm_bindgen__convert__closures_____invoke__h17a92308e79e69c0(arg0, arg1, arg2, arg3) {
|
|
1876
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h17a92308e79e69c0(arg0, arg1, arg2, arg3);
|
|
1676
1877
|
}
|
|
1677
1878
|
|
|
1678
1879
|
|
|
1880
|
+
const __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
1881
|
+
|
|
1882
|
+
|
|
1883
|
+
const __wbindgen_enum_ReferrerPolicy = ["", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin", "strict-origin-when-cross-origin"];
|
|
1884
|
+
|
|
1885
|
+
|
|
1679
1886
|
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
1680
1887
|
|
|
1681
1888
|
|
|
@@ -1683,6 +1890,9 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
|
1683
1890
|
|
|
1684
1891
|
|
|
1685
1892
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1893
|
+
|
|
1894
|
+
|
|
1895
|
+
const __wbindgen_enum_RequestRedirect = ["follow", "error", "manual"];
|
|
1686
1896
|
const AuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1687
1897
|
? { register: () => {}, unregister: () => {} }
|
|
1688
1898
|
: new FinalizationRegistry(ptr => wasm.__wbg_authorizeresult_free(ptr >>> 0, 1));
|
|
@@ -1701,6 +1911,15 @@ const DataStoreStatsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1701
1911
|
const DiagnosticsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1702
1912
|
? { register: () => {}, unregister: () => {} }
|
|
1703
1913
|
: new FinalizationRegistry(ptr => wasm.__wbg_diagnostics_free(ptr >>> 0, 1));
|
|
1914
|
+
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1915
|
+
? { register: () => {}, unregister: () => {} }
|
|
1916
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
|
|
1917
|
+
const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1918
|
+
? { register: () => {}, unregister: () => {} }
|
|
1919
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr >>> 0, 1));
|
|
1920
|
+
const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1921
|
+
? { register: () => {}, unregister: () => {} }
|
|
1922
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr >>> 0, 1));
|
|
1704
1923
|
const MultiIssuerAuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1705
1924
|
? { register: () => {}, unregister: () => {} }
|
|
1706
1925
|
: new FinalizationRegistry(ptr => wasm.__wbg_multiissuerauthorizeresult_free(ptr >>> 0, 1));
|
|
@@ -1912,15 +2131,7 @@ function takeFromExternrefTable0(idx) {
|
|
|
1912
2131
|
|
|
1913
2132
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1914
2133
|
cachedTextDecoder.decode();
|
|
1915
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1916
|
-
let numBytesDecoded = 0;
|
|
1917
2134
|
function decodeText(ptr, len) {
|
|
1918
|
-
numBytesDecoded += len;
|
|
1919
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1920
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1921
|
-
cachedTextDecoder.decode();
|
|
1922
|
-
numBytesDecoded = len;
|
|
1923
|
-
}
|
|
1924
2135
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1925
2136
|
}
|
|
1926
2137
|
|
|
@@ -1939,95 +2150,8 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
1939
2150
|
|
|
1940
2151
|
let WASM_VECTOR_LEN = 0;
|
|
1941
2152
|
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
cachedUint8ArrayMemory0 = null;
|
|
1948
|
-
wasm.__wbindgen_start();
|
|
1949
|
-
return wasm;
|
|
1950
|
-
}
|
|
1951
|
-
|
|
1952
|
-
async function __wbg_load(module, imports) {
|
|
1953
|
-
if (typeof Response === 'function' && module instanceof Response) {
|
|
1954
|
-
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
1955
|
-
try {
|
|
1956
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1957
|
-
} catch (e) {
|
|
1958
|
-
const validResponse = module.ok && expectedResponseType(module.type);
|
|
1959
|
-
|
|
1960
|
-
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
1961
|
-
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
1962
|
-
|
|
1963
|
-
} else { throw e; }
|
|
1964
|
-
}
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
const bytes = await module.arrayBuffer();
|
|
1968
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
1969
|
-
} else {
|
|
1970
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
1971
|
-
|
|
1972
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
1973
|
-
return { instance, module };
|
|
1974
|
-
} else {
|
|
1975
|
-
return instance;
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
|
|
1979
|
-
function expectedResponseType(type) {
|
|
1980
|
-
switch (type) {
|
|
1981
|
-
case 'basic': case 'cors': case 'default': return true;
|
|
1982
|
-
}
|
|
1983
|
-
return false;
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
function initSync(module) {
|
|
1988
|
-
if (wasm !== undefined) return wasm;
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
if (module !== undefined) {
|
|
1992
|
-
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
1993
|
-
({module} = module)
|
|
1994
|
-
} else {
|
|
1995
|
-
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
|
-
const imports = __wbg_get_imports();
|
|
2000
|
-
if (!(module instanceof WebAssembly.Module)) {
|
|
2001
|
-
module = new WebAssembly.Module(module);
|
|
2002
|
-
}
|
|
2003
|
-
const instance = new WebAssembly.Instance(module, imports);
|
|
2004
|
-
return __wbg_finalize_init(instance, module);
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
|
-
async function __wbg_init(module_or_path) {
|
|
2008
|
-
if (wasm !== undefined) return wasm;
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
if (module_or_path !== undefined) {
|
|
2012
|
-
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
2013
|
-
({module_or_path} = module_or_path)
|
|
2014
|
-
} else {
|
|
2015
|
-
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
|
|
2019
|
-
if (module_or_path === undefined) {
|
|
2020
|
-
module_or_path = new URL('cedarling_wasm_bg.wasm', import.meta.url);
|
|
2021
|
-
}
|
|
2022
|
-
const imports = __wbg_get_imports();
|
|
2023
|
-
|
|
2024
|
-
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
2025
|
-
module_or_path = fetch(module_or_path);
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2028
|
-
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
2029
|
-
|
|
2030
|
-
return __wbg_finalize_init(instance, module);
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2033
|
-
export { initSync, __wbg_init as default };
|
|
2153
|
+
const wasmPath = `${__dirname}/cedarling_wasm_bg.wasm`;
|
|
2154
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
2155
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
2156
|
+
let wasm = new WebAssembly.Instance(wasmModule, __wbg_get_imports()).exports;
|
|
2157
|
+
wasm.__wbindgen_start();
|
package/cedarling_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@janssenproject/cedarling_wasm",
|
|
3
|
-
"type": "module",
|
|
4
3
|
"description": "The Cedarling is a performant local authorization service that runs the Rust Cedar Engine",
|
|
5
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.339-nodejs",
|
|
6
5
|
"license": "Apache-2.0",
|
|
7
6
|
"repository": {
|
|
8
7
|
"type": "git",
|
|
@@ -14,8 +13,5 @@
|
|
|
14
13
|
"cedarling_wasm.d.ts"
|
|
15
14
|
],
|
|
16
15
|
"main": "cedarling_wasm.js",
|
|
17
|
-
"types": "cedarling_wasm.d.ts"
|
|
18
|
-
"sideEffects": [
|
|
19
|
-
"./snippets/*"
|
|
20
|
-
]
|
|
16
|
+
"types": "cedarling_wasm.d.ts"
|
|
21
17
|
}
|