@endo/compartment-mapper 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/SECURITY.md +2 -2
- package/package.json +11 -11
- package/src/archive-lite.d.ts +5 -5
- package/src/archive-lite.d.ts.map +1 -1
- package/src/archive.d.ts +5 -5
- package/src/archive.d.ts.map +1 -1
- package/src/archive.js +3 -1
- package/src/bundle-cjs.d.ts +12 -2
- package/src/bundle-cjs.d.ts.map +1 -1
- package/src/bundle-lite.d.ts +2 -2
- package/src/bundle-lite.d.ts.map +1 -1
- package/src/bundle-lite.js +0 -1
- package/src/bundle-mjs.d.ts +12 -2
- package/src/bundle-mjs.d.ts.map +1 -1
- package/src/bundle.d.ts +5 -5
- package/src/bundle.d.ts.map +1 -1
- package/src/bundle.js +1 -1
- package/src/capture-lite.d.ts +1 -1
- package/src/capture-lite.d.ts.map +1 -1
- package/src/capture-lite.js +3 -1
- package/src/compartment-map.d.ts +1 -1
- package/src/compartment-map.d.ts.map +1 -1
- package/src/import-archive-lite.d.ts +2 -2
- package/src/import-archive-lite.d.ts.map +1 -1
- package/src/import-archive-lite.js +3 -1
- package/src/import-archive.d.ts +3 -3
- package/src/import-archive.d.ts.map +1 -1
- package/src/import-archive.js +3 -1
- package/src/import-hook.d.ts.map +1 -1
- package/src/import-hook.js +204 -99
- package/src/import-lite.d.ts +1 -1
- package/src/import-lite.d.ts.map +1 -1
- package/src/import-lite.js +3 -1
- package/src/import.d.ts.map +1 -1
- package/src/import.js +3 -1
- package/src/infer-exports.d.ts +5 -7
- package/src/infer-exports.d.ts.map +1 -1
- package/src/infer-exports.js +23 -8
- package/src/link.d.ts.map +1 -1
- package/src/link.js +4 -1
- package/src/map-parser.d.ts.map +1 -1
- package/src/map-parser.js +51 -5
- package/src/node-module-specifier.d.ts.map +1 -1
- package/src/node-module-specifier.js +3 -1
- package/src/node-modules.d.ts +2 -2
- package/src/node-modules.d.ts.map +1 -1
- package/src/node-modules.js +150 -31
- package/src/node-powers.d.ts +1 -1
- package/src/node-powers.d.ts.map +1 -1
- package/src/node-powers.js +3 -1
- package/src/parse-archive-cjs.d.ts +5 -1
- package/src/parse-archive-cjs.d.ts.map +1 -1
- package/src/parse-archive-cjs.js +3 -1
- package/src/parse-archive-mjs.d.ts +5 -1
- package/src/parse-archive-mjs.d.ts.map +1 -1
- package/src/parse-archive-mjs.js +3 -1
- package/src/parse-bytes.d.ts +5 -1
- package/src/parse-bytes.d.ts.map +1 -1
- package/src/parse-bytes.js +3 -1
- package/src/parse-cjs-shared-export-wrapper.d.ts.map +1 -1
- package/src/parse-cjs-shared-export-wrapper.js +3 -1
- package/src/parse-cjs.d.ts +5 -1
- package/src/parse-cjs.d.ts.map +1 -1
- package/src/parse-cjs.js +3 -1
- package/src/parse-json.d.ts +5 -2
- package/src/parse-json.d.ts.map +1 -1
- package/src/parse-mjs.d.ts +5 -1
- package/src/parse-mjs.d.ts.map +1 -1
- package/src/parse-pre-cjs.d.ts +5 -1
- package/src/parse-pre-cjs.d.ts.map +1 -1
- package/src/parse-pre-cjs.js +3 -1
- package/src/parse-pre-mjs.d.ts +5 -1
- package/src/parse-pre-mjs.d.ts.map +1 -1
- package/src/parse-pre-mjs.js +3 -1
- package/src/parse-text.d.ts +5 -1
- package/src/parse-text.d.ts.map +1 -1
- package/src/parse-text.js +3 -1
- package/src/policy-format.d.ts +2 -1
- package/src/policy-format.d.ts.map +1 -1
- package/src/policy-format.js +5 -2
- package/src/policy.d.ts +2 -2
- package/src/policy.d.ts.map +1 -1
- package/src/policy.js +10 -8
- package/src/powers.d.ts +1 -1
- package/src/powers.d.ts.map +1 -1
- package/src/powers.js +3 -1
- package/src/search.d.ts +2 -1
- package/src/search.d.ts.map +1 -1
- package/src/search.js +3 -1
- package/src/types/compartment-map-schema.d.ts +3 -1
- package/src/types/compartment-map-schema.d.ts.map +1 -1
- package/src/types/compartment-map-schema.ts +3 -1
- package/src/types/external.d.ts +15 -9
- package/src/types/external.d.ts.map +1 -1
- package/src/types/external.ts +15 -9
- package/src/types/internal.d.ts +33 -18
- package/src/types/internal.d.ts.map +1 -1
- package/src/types/internal.ts +40 -20
- package/src/types/node-powers.d.ts +3 -1
- package/src/types/node-powers.d.ts.map +1 -1
- package/src/types/node-powers.ts +3 -1
- package/src/types/policy-schema.d.ts +3 -1
- package/src/types/policy-schema.d.ts.map +1 -1
- package/src/types/policy-schema.ts +3 -1
- package/src/types/policy.d.ts +3 -1
- package/src/types/policy.d.ts.map +1 -1
- package/src/types/policy.ts +3 -1
- package/src/types/powers.d.ts +3 -1
- package/src/types/powers.d.ts.map +1 -1
- package/src/types/powers.ts +3 -1
- package/src/types/typescript.d.ts +3 -1
- package/src/types/typescript.d.ts.map +1 -1
- package/src/types/typescript.ts +3 -1
- package/src/url.d.ts.map +1 -1
- package/src/url.js +3 -1
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright 2020 Endo Contributors
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/SECURITY.md
CHANGED
|
@@ -8,9 +8,9 @@ be made for the most recent branch only.
|
|
|
8
8
|
|
|
9
9
|
## Coordinated Vulnerability Disclosure of Security Bugs
|
|
10
10
|
|
|
11
|
-
SES stands for fearless cooperation, and strong security requires strong collaboration with security researchers. If you believe that you have found a security sensitive bug that should not be disclosed until a fix has been made available, we encourage you to report it. To report a bug in HardenedJS, you have several options that include:
|
|
11
|
+
SES stands for fearless cooperation, and strong security requires strong collaboration with security researchers. If you believe that you have found a security sensitive bug that should not be disclosed until a fix has been made available, we encourage you to report it. To report a bug in HardenedJS, you have several options that include:
|
|
12
12
|
|
|
13
|
-
* Reporting the issue to the [Agoric HackerOne vulnerability rewards program](https://hackerone.com/agoric).
|
|
13
|
+
* Reporting the issue to the [Agoric HackerOne vulnerability rewards program](https://hackerone.com/agoric).
|
|
14
14
|
|
|
15
15
|
* Sending an email to security at (@) agoric.com., encrypted or unencrypted. To encrypt, please use @Warner’s personal GPG key [A476E2E6 11880C98 5B3C3A39 0386E81B 11CAA07A](http://www.lothar.com/warner-gpg.html) .
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@endo/compartment-mapper",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "The compartment mapper assembles Node applications in a sandbox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node",
|
|
@@ -60,23 +60,23 @@
|
|
|
60
60
|
"test": "ava"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@endo/cjs-module-analyzer": "^1.0.
|
|
64
|
-
"@endo/module-source": "^1.3.
|
|
65
|
-
"@endo/trampoline": "^1.0.
|
|
66
|
-
"@endo/zip": "^1.0.
|
|
67
|
-
"ses": "^1.
|
|
63
|
+
"@endo/cjs-module-analyzer": "^1.0.10",
|
|
64
|
+
"@endo/module-source": "^1.3.1",
|
|
65
|
+
"@endo/trampoline": "^1.0.4",
|
|
66
|
+
"@endo/zip": "^1.0.10",
|
|
67
|
+
"ses": "^1.13.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"ava": "^6.1.3",
|
|
71
71
|
"babel-eslint": "^10.1.0",
|
|
72
72
|
"c8": "^7.14.0",
|
|
73
|
-
"eslint": "^8.57.
|
|
73
|
+
"eslint": "^8.57.1",
|
|
74
74
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
75
75
|
"eslint-config-prettier": "^9.1.0",
|
|
76
76
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
77
|
-
"eslint-plugin-import": "^2.
|
|
78
|
-
"prettier": "^3.
|
|
79
|
-
"typescript": "~5.
|
|
77
|
+
"eslint-plugin-import": "^2.31.0",
|
|
78
|
+
"prettier": "^3.5.3",
|
|
79
|
+
"typescript": "~5.8.3"
|
|
80
80
|
},
|
|
81
81
|
"files": [
|
|
82
82
|
"./*.d.ts",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"typeCoverage": {
|
|
119
119
|
"atLeast": 86.14
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "571b7803cf10df7cb4fa9d70e4d53a0b53767fa8"
|
|
122
122
|
}
|
package/src/archive-lite.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export function makeArchiveCompartmentMap(compartmentMap: CompartmentMapDescriptor, sources: Sources): ArchiveResult;
|
|
2
|
-
export function makeAndHashArchiveFromMap(powers: ReadFn | ReadPowers, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions
|
|
2
|
+
export function makeAndHashArchiveFromMap(powers: ReadFn | ReadPowers, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions): Promise<{
|
|
3
3
|
bytes: Uint8Array;
|
|
4
4
|
sha512?: string;
|
|
5
5
|
}>;
|
|
6
|
-
export function makeArchiveFromMap(powers: ReadFn | ReadPowers, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions
|
|
7
|
-
export function mapFromMap(powers: ReadFn | ReadPowers, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions
|
|
8
|
-
export function hashFromMap(powers: HashPowers, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions
|
|
9
|
-
export function writeArchiveFromMap(write: WriteFn, readPowers: ReadFn | ReadPowers, archiveLocation: string, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions
|
|
6
|
+
export function makeArchiveFromMap(powers: ReadFn | ReadPowers, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions): Promise<Uint8Array>;
|
|
7
|
+
export function mapFromMap(powers: ReadFn | ReadPowers, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions): Promise<Uint8Array>;
|
|
8
|
+
export function hashFromMap(powers: HashPowers, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions): Promise<string>;
|
|
9
|
+
export function writeArchiveFromMap(write: WriteFn, readPowers: ReadFn | ReadPowers, archiveLocation: string, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions): Promise<void>;
|
|
10
10
|
import type { CompartmentMapDescriptor } from './types.js';
|
|
11
11
|
import type { Sources } from './types.js';
|
|
12
12
|
import type { ArchiveResult } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-lite.d.ts","sourceRoot":"","sources":["archive-lite.js"],"names":[],"mappings":"AAmHO,0DAJI,wBAAwB,WACxB,OAAO,GACL,aAAa,CAiBzB;AAyGM,kDALI,MAAM,GAAG,UAAU,kBACnB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"archive-lite.d.ts","sourceRoot":"","sources":["archive-lite.js"],"names":[],"mappings":"AAmHO,0DAJI,wBAAwB,WACxB,OAAO,GACL,aAAa,CAiBzB;AAyGM,kDALI,MAAM,GAAG,UAAU,kBACnB,wBAAwB,YACxB,kBAAkB,GAChB,OAAO,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CAmBzD;AAQM,2CALI,MAAM,GAAG,UAAU,kBACnB,wBAAwB,YACxB,kBAAkB,GAChB,OAAO,CAAC,UAAU,CAAC,CAS/B;AAQM,mCALI,MAAM,GAAG,UAAU,kBACnB,wBAAwB,YACxB,kBAAkB,GAChB,OAAO,CAAC,UAAU,CAAC,CAS/B;AAQM,oCALI,UAAU,kBACV,wBAAwB,YACxB,kBAAkB,GAChB,OAAO,CAAC,MAAM,CAAC,CAU3B;AASM,2CANI,OAAO,cACP,MAAM,GAAG,UAAU,mBACnB,MAAM,kBACN,wBAAwB,YACxB,kBAAkB,iBAe5B;8CApRS,YAAY;6BAAZ,YAAY;mCAAZ,YAAY;4BAAZ,YAAY;gCAAZ,YAAY;wCAAZ,YAAY;gCAAZ,YAAY;6BAAZ,YAAY"}
|
package/src/archive.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export function makeAndHashArchive(powers: ReadFn | ReadPowers, moduleLocation: string, options?: ArchiveOptions
|
|
1
|
+
export function makeAndHashArchive(powers: ReadFn | ReadPowers, moduleLocation: string, options?: ArchiveOptions): Promise<{
|
|
2
2
|
bytes: Uint8Array;
|
|
3
3
|
sha512?: string;
|
|
4
4
|
}>;
|
|
5
|
-
export function makeArchive(powers: ReadFn | ReadPowers, moduleLocation: string, options?: ArchiveOptions
|
|
6
|
-
export function mapLocation(powers: ReadFn | ReadPowers, moduleLocation: string, options?: ArchiveOptions
|
|
7
|
-
export function hashLocation(powers: HashPowers, moduleLocation: string, options?: ArchiveOptions
|
|
8
|
-
export function writeArchive(write: WriteFn, readPowers: ReadFn | ReadPowers, archiveLocation: string, moduleLocation: string, options?: ArchiveOptions
|
|
5
|
+
export function makeArchive(powers: ReadFn | ReadPowers, moduleLocation: string, options?: ArchiveOptions): Promise<Uint8Array>;
|
|
6
|
+
export function mapLocation(powers: ReadFn | ReadPowers, moduleLocation: string, options?: ArchiveOptions): Promise<Uint8Array>;
|
|
7
|
+
export function hashLocation(powers: HashPowers, moduleLocation: string, options?: ArchiveOptions): Promise<string>;
|
|
8
|
+
export function writeArchive(write: WriteFn, readPowers: ReadFn | ReadPowers, archiveLocation: string, moduleLocation: string, options?: ArchiveOptions): Promise<void>;
|
|
9
9
|
import type { ReadFn } from './types.js';
|
|
10
10
|
import type { ReadPowers } from './types.js';
|
|
11
11
|
import type { ArchiveOptions } from './types.js';
|
package/src/archive.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["archive.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["archive.js"],"names":[],"mappings":"AA6DO,2CALI,MAAM,GAAG,UAAU,kBACnB,MAAM,YACN,cAAc,GACZ,OAAO,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CAiBzD;AAQM,oCALI,MAAM,GAAG,UAAU,kBACnB,MAAM,YACN,cAAc,GACZ,OAAO,CAAC,UAAU,CAAC,CAwC/B;AAQM,oCALI,MAAM,GAAG,UAAU,kBACnB,MAAM,YACN,cAAc,GACZ,OAAO,CAAC,UAAU,CAAC,CAyC/B;AAQM,qCALI,UAAU,kBACV,MAAM,YACN,cAAc,GACZ,OAAO,CAAC,MAAM,CAAC,CAyC3B;AASM,oCANI,OAAO,cACP,MAAM,GAAG,UAAU,mBACnB,MAAM,kBACN,MAAM,YACN,cAAc,iBA+CxB;4BApPS,YAAY;gCAAZ,YAAY;oCAAZ,YAAY;gCAAZ,YAAY;6BAAZ,YAAY"}
|
package/src/archive.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Provides mechanisms for creating archives (zip files with a
|
|
3
3
|
* `compartmeent-map.json` and a file for every static dependency of an entry
|
|
4
4
|
* module).
|
|
5
5
|
*
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
* See `archive-lite.js` for a variation that does not depend on Babel
|
|
14
14
|
* for cases like XS native Compartments where pre-compilation is not
|
|
15
15
|
* necessary or where the dependency on Babel can be dererred to runtime.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
16
18
|
*/
|
|
17
19
|
|
|
18
20
|
/**
|
package/src/bundle-cjs.d.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: {
|
|
2
|
+
runtime: string;
|
|
3
|
+
getBundlerKit({ index, indexedImports, moduleSpecifier, sourceDirname, record: { cjsFunctor, exports: exportsList }, }: import("./bundle-lite.js").BundleModule<CjsModuleSource>, { useEvaluate }: {
|
|
4
|
+
useEvaluate?: boolean | undefined;
|
|
5
|
+
sourceUrlPrefix?: string | undefined;
|
|
6
|
+
}): {
|
|
7
|
+
getFunctor: () => string;
|
|
8
|
+
getCells: () => string;
|
|
9
|
+
getReexportsWiring: () => string;
|
|
10
|
+
getFunctorCall: () => string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
2
13
|
export default _default;
|
|
3
14
|
export type CjsModuleSource = VirtualModuleSource & {
|
|
4
15
|
cjsFunctor: string;
|
|
5
16
|
};
|
|
6
|
-
import type { BundlerSupport } from './bundle-lite.js';
|
|
7
17
|
import type { VirtualModuleSource } from 'ses';
|
|
8
18
|
//# sourceMappingURL=bundle-cjs.d.ts.map
|
package/src/bundle-cjs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-cjs.d.ts","sourceRoot":"","sources":["bundle-cjs.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bundle-cjs.d.ts","sourceRoot":"","sources":["bundle-cjs.js"],"names":[],"mappings":";;;;;;;;;;;;;8BAKc,mBAAmB,GAAG;IAAC,UAAU,EAAE,MAAM,CAAA;CAAC;yCAHjB,KAAK"}
|
package/src/bundle-lite.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function makeFunctorFromMap(readPowers: ReadFn | ReadPowers | MaybeReadPowers, compartmentMap: CompartmentMapDescriptor, options?: BundleOptions
|
|
2
|
-
export function makeScriptFromMap(readPowers: ReadFn | ReadPowers | MaybeReadPowers, compartmentMap: CompartmentMapDescriptor, options?: BundleOptions
|
|
1
|
+
export function makeFunctorFromMap(readPowers: ReadFn | ReadPowers | MaybeReadPowers, compartmentMap: CompartmentMapDescriptor, options?: BundleOptions): Promise<string>;
|
|
2
|
+
export function makeScriptFromMap(readPowers: ReadFn | ReadPowers | MaybeReadPowers, compartmentMap: CompartmentMapDescriptor, options?: BundleOptions): Promise<string>;
|
|
3
3
|
/**
|
|
4
4
|
* The bundler kit defines a language-specific behavior for injecting a module
|
|
5
5
|
* into a bundle.
|
package/src/bundle-lite.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-lite.d.ts","sourceRoot":"","sources":["bundle-lite.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bundle-lite.d.ts","sourceRoot":"","sources":["bundle-lite.js"],"names":[],"mappings":"AA2TO,+CALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,wBAAwB,YACxB,aAAa,GACX,OAAO,CAAC,MAAM,CAAC,CAgV3B;AAQM,8CALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,wBAAwB,YACxB,aAAa,GACX,OAAO,CAAC,MAAM,CAAC,CAW3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA9mBa,MAAM,MAAM;;;;;;cAOZ,MAAM,MAAM;;;;;;oBAGZ,MAAM,MAAM;;;;;wBAGZ,MAAM,MAAM;;yBAKH,oBAAoB,SAA9B,OAAS;SAER,MAAM;UACN,MAAM;qBACN,MAAM;qBACN,MAAM;mBACN,MAAM;YACN,MAAM;YACN,gBAAgB,GAAG,oBAAoB;qBACvC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;oBACtB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;WACtB,UAAU;WACV,MAAM;gBACN,UAAU;;;UAKV,MAAM;WACN,MAAM;gBACN,UAAU;oBACV,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;qBACtB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;;0BAIb,oBAAoB,SAA9B,OAAS,aAEX,YAAY,CAAC,oBAAoB,CAAC,UAE1C;IAAyB,WAAW;IACZ,eAAe;CACvC,KAAU,UAAU;2BAIA,oBAAoB,SAA9B,OAAS;aAER,MAAM;mBACN,aAAa,CAAC,oBAAoB,CAAC;;4BArFvC,YAAY;gCAAZ,YAAY;qCAAZ,YAAY;8CAAZ,YAAY;mCAAZ,YAAY;sCAVZ,KAAK"}
|
package/src/bundle-lite.js
CHANGED
package/src/bundle-mjs.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
export const runtime: "function observeImports(map, importName, importIndex) {\n for (const [name, observers] of map.get(importName)) {\n const cell = cells[importIndex][name];\n if (cell === undefined) {\n throw new ReferenceError(`Cannot import name ${name} (has ${Object.getOwnPropertyNames(cells[importIndex]).join(', ')})`);\n }\n for (const observer of observers) {\n cell.observe(observer);\n }\n }\n}\n";
|
|
2
|
-
declare const _default:
|
|
2
|
+
declare const _default: {
|
|
3
|
+
runtime: string;
|
|
4
|
+
getBundlerKit({ index, indexedImports, moduleSpecifier, sourceDirname, record: { __syncModuleProgram__, __fixedExportMap__, __liveExportMap__, __reexportMap__, reexports, }, }: import("./bundle-lite.js").BundleModule<PrecompiledModuleSource>, { useEvaluate }: {
|
|
5
|
+
useEvaluate?: boolean | undefined;
|
|
6
|
+
sourceUrlPrefix?: string | undefined;
|
|
7
|
+
}): {
|
|
8
|
+
getFunctor: () => string;
|
|
9
|
+
getCells: () => string;
|
|
10
|
+
getReexportsWiring: () => string;
|
|
11
|
+
getFunctorCall: () => string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
3
14
|
export default _default;
|
|
4
15
|
import type { PrecompiledModuleSource } from 'ses';
|
|
5
|
-
import type { BundlerSupport } from './bundle-lite.js';
|
|
6
16
|
//# sourceMappingURL=bundle-mjs.d.ts.map
|
package/src/bundle-mjs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-mjs.d.ts","sourceRoot":"","sources":["bundle-mjs.js"],"names":[],"mappings":"AAwCA,ubAYE
|
|
1
|
+
{"version":3,"file":"bundle-mjs.d.ts","sourceRoot":"","sources":["bundle-mjs.js"],"names":[],"mappings":"AAwCA,ubAYE;;;;;;;;;;;;;;6CAlDyC,KAAK"}
|
package/src/bundle.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export function makeFunctorFromMap(readPowers: ReadFn | ReadPowers | MaybeReadPowers, compartmentMap: CompartmentMapDescriptor, options?: BundleOptions
|
|
2
|
-
export function makeScriptFromMap(readPowers: ReadFn | ReadPowers | MaybeReadPowers, compartmentMap: CompartmentMapDescriptor, options?: BundleOptions
|
|
3
|
-
export function makeFunctor(readPowers: ReadFn | ReadPowers | MaybeReadPowers, moduleLocation: string, options?: BundleOptions
|
|
4
|
-
export function makeScript(readPowers: ReadFn | ReadPowers | MaybeReadPowers, moduleLocation: string, options?: BundleOptions
|
|
5
|
-
export function writeScript(write: WriteFn, read: ReadFn, bundleLocation: string, moduleLocation: string, options?: BundleOptions
|
|
1
|
+
export function makeFunctorFromMap(readPowers: ReadFn | ReadPowers | MaybeReadPowers, compartmentMap: CompartmentMapDescriptor, options?: BundleOptions): Promise<string>;
|
|
2
|
+
export function makeScriptFromMap(readPowers: ReadFn | ReadPowers | MaybeReadPowers, compartmentMap: CompartmentMapDescriptor, options?: BundleOptions): Promise<string>;
|
|
3
|
+
export function makeFunctor(readPowers: ReadFn | ReadPowers | MaybeReadPowers, moduleLocation: string, options?: BundleOptions): Promise<string>;
|
|
4
|
+
export function makeScript(readPowers: ReadFn | ReadPowers | MaybeReadPowers, moduleLocation: string, options?: BundleOptions): Promise<string>;
|
|
5
|
+
export function writeScript(write: WriteFn, read: ReadFn, bundleLocation: string, moduleLocation: string, options?: BundleOptions): Promise<void>;
|
|
6
6
|
/**
|
|
7
7
|
* The bundler kit defines a language-specific behavior for injecting a module
|
|
8
8
|
* into a bundle.
|
package/src/bundle.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["bundle.js"],"names":[],"mappings":"AAgUO,+CALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["bundle.js"],"names":[],"mappings":"AAgUO,+CALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,wBAAwB,YACxB,aAAa,GACX,OAAO,CAAC,MAAM,CAAC,CAiV3B;AAQM,8CALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,wBAAwB,YACxB,aAAa,GACX,OAAO,CAAC,MAAM,CAAC,CAW3B;AAQM,wCALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,MAAM,YACN,aAAa,GACX,OAAO,CAAC,MAAM,CAAC,CAS3B;AAQM,uCALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,MAAM,YACN,aAAa,GACX,OAAO,CAAC,MAAM,CAAC,CAS3B;AASM,mCANI,OAAO,QACP,MAAM,kBACN,MAAM,kBACN,MAAM,YACN,aAAa,iBAYvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBApqBa,MAAM,MAAM;;;;;;cAOZ,MAAM,MAAM;;;;;;oBAGZ,MAAM,MAAM;;;;;wBAGZ,MAAM,MAAM;;yBAKH,oBAAoB,SAA9B,OAAS;SAER,MAAM;UACN,MAAM;qBACN,MAAM;qBACN,MAAM;mBACN,MAAM;YACN,MAAM;YACN,gBAAgB,GAAG,oBAAoB;qBACvC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;oBACtB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;WACtB,UAAU;WACV,MAAM;gBACN,UAAU;;;UAKV,MAAM;WACN,MAAM;gBACN,UAAU;oBACV,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;qBACtB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;;0BAIb,oBAAoB,SAA9B,OAAS,aAEX,YAAY,CAAC,oBAAoB,CAAC,UAE1C;IAAyB,WAAW;IACZ,eAAe;CACvC,KAAU,UAAU;2BAIA,oBAAoB,SAA9B,OAAS;aAER,MAAM;mBACN,aAAa,CAAC,oBAAoB,CAAC;;4BArFvC,YAAY;gCAAZ,YAAY;qCAAZ,YAAY;8CAAZ,YAAY;mCAAZ,YAAY;6BAAZ,YAAY;sCAXZ,KAAK"}
|
package/src/bundle.js
CHANGED
|
@@ -275,7 +275,7 @@ const sortedModules = (
|
|
|
275
275
|
return { modules, aliases };
|
|
276
276
|
};
|
|
277
277
|
|
|
278
|
-
/** @type {Record<string, BundlerSupport<
|
|
278
|
+
/** @type {Record<string, BundlerSupport<any>>} */
|
|
279
279
|
const bundlerSupportForLanguage = {
|
|
280
280
|
'pre-mjs-json': mjsSupport,
|
|
281
281
|
'pre-cjs-json': cjsSupport,
|
package/src/capture-lite.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function captureFromMap(powers: ReadFn | ReadPowers, compartmentMap: CompartmentMapDescriptor, options?: CaptureLiteOptions
|
|
1
|
+
export function captureFromMap(powers: ReadFn | ReadPowers, compartmentMap: CompartmentMapDescriptor, options?: CaptureLiteOptions): Promise<CaptureResult>;
|
|
2
2
|
import type { ReadFn } from './types.js';
|
|
3
3
|
import type { ReadPowers } from './types.js';
|
|
4
4
|
import type { CompartmentMapDescriptor } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture-lite.d.ts","sourceRoot":"","sources":["capture-lite.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"capture-lite.d.ts","sourceRoot":"","sources":["capture-lite.js"],"names":[],"mappings":"AAsFO,uCALI,MAAM,GAAG,UAAU,kBACnB,wBAAwB,YACxB,kBAAkB,GAChB,OAAO,CAAC,aAAa,CAAC,CAmElC;4BA9GS,YAAY;gCAAZ,YAAY;8CAAZ,YAAY;wCAAZ,YAAY;mCAAZ,YAAY"}
|
package/src/capture-lite.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
*
|
|
3
3
|
* This module provides {@link captureFromMap}, which only "captures" the
|
|
4
4
|
* compartment map descriptors and sources from a partially completed
|
|
5
5
|
* compartment map--_without_ creating an archive. The resulting compartment map
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
* contain original sources, so to import the archive with
|
|
26
26
|
* `src/import-archive-lite.js`, you will need to provide the archive parsers
|
|
27
27
|
* and entrain a runtime dependency on Babel.
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
28
30
|
*/
|
|
29
31
|
|
|
30
32
|
/* eslint no-shadow: 0 */
|
package/src/compartment-map.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @type {(a: string, b: string) => number} */
|
|
2
2
|
export const stringCompare: (a: string, b: string) => number;
|
|
3
3
|
export function pathCompare(a: Array<string> | undefined, b: Array<string> | undefined): number;
|
|
4
|
-
export function assertCompartmentMap(allegedCompartmentMap: unknown, url?: string
|
|
4
|
+
export function assertCompartmentMap(allegedCompartmentMap: unknown, url?: string): asserts allegedCompartmentMap is CompartmentMapDescriptor;
|
|
5
5
|
import type { CompartmentMapDescriptor } from './types.js';
|
|
6
6
|
//# sourceMappingURL=compartment-map.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compartment-map.d.ts","sourceRoot":"","sources":["compartment-map.js"],"names":[],"mappings":"AAYA,+CAA+C;AAE/C,4BAFW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,CAE2B;AAc/D,+BAHI,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,KACzB,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,UAqCnC;AA8ZM,4DALI,OAAO,
|
|
1
|
+
{"version":3,"file":"compartment-map.d.ts","sourceRoot":"","sources":["compartment-map.js"],"names":[],"mappings":"AAYA,+CAA+C;AAE/C,4BAFW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,CAE2B;AAc/D,+BAHI,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,KACzB,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,UAqCnC;AA8ZM,4DALI,OAAO,QACP,MAAM,GACJ,QAAQ,qBAAqB,IAAI,wBAAwB,CA+BrE;8CArf2C,YAAY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function parseArchive(archiveBytes: Uint8Array, archiveLocation?: string
|
|
2
|
-
export function loadArchive(readPowers: ReadFn | ReadPowers, archiveLocation: string, options?:
|
|
1
|
+
export function parseArchive(archiveBytes: Uint8Array, archiveLocation?: string, options?: ParseArchiveOptions): Promise<Application>;
|
|
2
|
+
export function loadArchive(readPowers: ReadFn | ReadPowers, archiveLocation: string, options?: LoadArchiveOptions): Promise<Application>;
|
|
3
3
|
export function importArchive(readPowers: ReadFn | ReadPowers, archiveLocation: string, options: LoadArchiveOptions): Promise<SomeObject>;
|
|
4
4
|
import type { ParseArchiveOptions } from './types.js';
|
|
5
5
|
import type { Application } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-archive-lite.d.ts","sourceRoot":"","sources":["import-archive-lite.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"import-archive-lite.d.ts","sourceRoot":"","sources":["import-archive-lite.js"],"names":[],"mappings":"AAsPO,2CALI,UAAU,oBACV,MAAM,YACN,mBAAmB,GACjB,OAAO,CAAC,WAAW,CAAC,CAiKhC;AAQM,wCALI,MAAM,GAAG,UAAU,mBACnB,MAAM,YACN,kBAAkB,GAChB,OAAO,CAAC,WAAW,CAAC,CAwBhC;AAQM,0CALI,MAAM,GAAG,UAAU,mBACnB,MAAM,WACN,kBAAkB,GAChB,OAAO,CAAC,UAAU,CAAC,CAK/B;yCAxZS,YAAY;iCAAZ,YAAY;4BAAZ,YAAY;gCAAZ,YAAY;wCAAZ,YAAY;gCAAZ,YAAY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Provides functions for evaluating the modules in an archive (a zip
|
|
3
3
|
* file with a `compartment-map.json` and a file for each module it contains.)
|
|
4
4
|
*
|
|
5
5
|
* These functions do not have a bias for any particular mapping, so you will
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* You will need to provide the `defaultParserForLanguage` from
|
|
11
11
|
* `@endo/compartment-mapper/import-parsers.js` or
|
|
12
12
|
* `@endo/compartment-mapper/archive-parsers.js`.
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
13
15
|
*/
|
|
14
16
|
|
|
15
17
|
/* eslint no-shadow: "off" */
|
package/src/import-archive.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function parseArchive(archiveBytes: Uint8Array, archiveLocation?: string
|
|
2
|
-
export function loadArchive(readPowers: import("@endo/zip").ReadFn | ReadPowers, archiveLocation: string, options?:
|
|
1
|
+
export function parseArchive(archiveBytes: Uint8Array, archiveLocation?: string, options?: Options): Promise<Application>;
|
|
2
|
+
export function loadArchive(readPowers: import("@endo/zip").ReadFn | ReadPowers, archiveLocation: string, options?: LoadArchiveOptions): Promise<Application>;
|
|
3
3
|
export function importArchive(readPowers: import("@endo/zip").ReadFn | ReadPowers, archiveLocation: string, options: ExecuteOptions & LoadArchiveOptions): Promise<object>;
|
|
4
4
|
export type CompartmentConstructor = typeof Compartment;
|
|
5
5
|
export type Options = {
|
|
@@ -14,8 +14,8 @@ export type Options = {
|
|
|
14
14
|
};
|
|
15
15
|
import type { Application } from './types.js';
|
|
16
16
|
import type { ReadPowers } from './types.js';
|
|
17
|
-
import type { ExecuteOptions } from './types.js';
|
|
18
17
|
import type { LoadArchiveOptions } from './types.js';
|
|
18
|
+
import type { ExecuteOptions } from './types.js';
|
|
19
19
|
import type { HashFn } from './types.js';
|
|
20
20
|
import type { ExitModuleImportHook } from './types.js';
|
|
21
21
|
import type { ComputeSourceLocationHook } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-archive.d.ts","sourceRoot":"","sources":["import-archive.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"import-archive.d.ts","sourceRoot":"","sources":["import-archive.js"],"names":[],"mappings":"AA+EO,2CALI,UAAU,oBACV,MAAM,YACN,OAAO,GACL,OAAO,CAAC,WAAW,CAAC,CAW9B;AAQI,wCALI,OAAO,WAAW,EAAE,MAAM,GAAG,UAAU,mBACvC,MAAM,YACN,kBAAkB,GAChB,OAAO,CAAC,WAAW,CAAC,CAO9B;AAQI,0CALI,OAAO,WAAW,EAAE,MAAM,GAAG,UAAU,mBACvC,MAAM,WACN,cAAc,GAAG,kBAAkB,GACjC,OAAO,CAAC,MAAM,CAAC,CAOzB;qCArEW,OAAO,WAAW;;;;;;;;;;;iCAhBtB,YAAY;gCAAZ,YAAY;wCAAZ,YAAY;oCAAZ,YAAY;4BAAZ,YAAY;0CAAZ,YAAY;+CAAZ,YAAY;kDAAZ,YAAY;uCAAZ,YAAY"}
|
package/src/import-archive.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Provides functions for evaluating modules in an archive (a zip file
|
|
3
3
|
* with a `compartment-map.json` and a file for a module and each of its
|
|
4
4
|
* transitive dependencies.)
|
|
5
5
|
*
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
* See `import-archive-lite.js` for functions that are not coupled to these
|
|
13
13
|
* parsers or the `node_modules` conventions without necessarily entraining a
|
|
14
14
|
* dependency on Babel.
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
15
17
|
*/
|
|
16
18
|
|
|
17
19
|
/**
|
package/src/import-hook.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-hook.d.ts","sourceRoot":"","sources":["import-hook.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"import-hook.d.ts","sourceRoot":"","sources":["import-hook.js"],"names":[],"mappings":"AAkoBA;;;;;;;GAOG;AACH,mDALW,aAAa,gBACb,MAAM,2IACN,6BAA6B,GAC3B,kBAAkB,CAkN9B;AAnoBM,oGALJ;IAAqC,OAAO;IACN,oBAAoB;IACnC,oBAAoB,EAAnC,MAAM;CACd,GAAU,oBAAoB,GAAC,SAAS,CA8B1C;AAiPM,gDALI,MAAM,GAAC,UAAU,gBACjB,MAAM,iLACN,0BAA0B,GACxB,eAAe,CA8J3B;mCAzlBS,YAAY;mDAAZ,YAAY;wCAAZ,YAAY;0CAAZ,YAAY;4BAAZ,YAAY;gCAAZ,YAAY;gDAAZ,YAAY;qCAAZ,YAAY"}
|