@endo/compartment-mapper 1.6.0 → 1.6.2

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.
Files changed (119) hide show
  1. package/LICENSE +1 -1
  2. package/SECURITY.md +2 -2
  3. package/package.json +13 -12
  4. package/src/archive-lite.d.ts +5 -5
  5. package/src/archive-lite.d.ts.map +1 -1
  6. package/src/archive.d.ts +5 -5
  7. package/src/archive.d.ts.map +1 -1
  8. package/src/archive.js +3 -1
  9. package/src/bundle-cjs.d.ts +12 -2
  10. package/src/bundle-cjs.d.ts.map +1 -1
  11. package/src/bundle-lite.d.ts +2 -2
  12. package/src/bundle-lite.d.ts.map +1 -1
  13. package/src/bundle-lite.js +0 -1
  14. package/src/bundle-mjs.d.ts +12 -2
  15. package/src/bundle-mjs.d.ts.map +1 -1
  16. package/src/bundle.d.ts +5 -5
  17. package/src/bundle.d.ts.map +1 -1
  18. package/src/bundle.js +1 -1
  19. package/src/capture-lite.d.ts +1 -1
  20. package/src/capture-lite.d.ts.map +1 -1
  21. package/src/capture-lite.js +3 -1
  22. package/src/compartment-map.d.ts +1 -2
  23. package/src/compartment-map.d.ts.map +1 -1
  24. package/src/compartment-map.js +0 -49
  25. package/src/digest.d.ts.map +1 -1
  26. package/src/digest.js +2 -5
  27. package/src/import-archive-lite.d.ts +2 -2
  28. package/src/import-archive-lite.d.ts.map +1 -1
  29. package/src/import-archive-lite.js +3 -1
  30. package/src/import-archive.d.ts +3 -3
  31. package/src/import-archive.d.ts.map +1 -1
  32. package/src/import-archive.js +3 -1
  33. package/src/import-hook.d.ts.map +1 -1
  34. package/src/import-hook.js +204 -99
  35. package/src/import-lite.d.ts +1 -1
  36. package/src/import-lite.d.ts.map +1 -1
  37. package/src/import-lite.js +3 -1
  38. package/src/import.d.ts.map +1 -1
  39. package/src/import.js +3 -1
  40. package/src/infer-exports.d.ts +5 -7
  41. package/src/infer-exports.d.ts.map +1 -1
  42. package/src/infer-exports.js +23 -8
  43. package/src/link.d.ts.map +1 -1
  44. package/src/link.js +4 -1
  45. package/src/map-parser.d.ts.map +1 -1
  46. package/src/map-parser.js +51 -5
  47. package/src/node-module-specifier.d.ts.map +1 -1
  48. package/src/node-module-specifier.js +3 -1
  49. package/src/node-modules.d.ts +2 -2
  50. package/src/node-modules.d.ts.map +1 -1
  51. package/src/node-modules.js +151 -32
  52. package/src/node-powers.d.ts +1 -1
  53. package/src/node-powers.d.ts.map +1 -1
  54. package/src/node-powers.js +3 -1
  55. package/src/parse-archive-cjs.d.ts +5 -1
  56. package/src/parse-archive-cjs.d.ts.map +1 -1
  57. package/src/parse-archive-cjs.js +3 -1
  58. package/src/parse-archive-mjs.d.ts +5 -1
  59. package/src/parse-archive-mjs.d.ts.map +1 -1
  60. package/src/parse-archive-mjs.js +3 -1
  61. package/src/parse-bytes.d.ts +5 -1
  62. package/src/parse-bytes.d.ts.map +1 -1
  63. package/src/parse-bytes.js +3 -1
  64. package/src/parse-cjs-shared-export-wrapper.d.ts.map +1 -1
  65. package/src/parse-cjs-shared-export-wrapper.js +23 -1
  66. package/src/parse-cjs.d.ts +5 -1
  67. package/src/parse-cjs.d.ts.map +1 -1
  68. package/src/parse-cjs.js +3 -1
  69. package/src/parse-json.d.ts +5 -2
  70. package/src/parse-json.d.ts.map +1 -1
  71. package/src/parse-mjs.d.ts +5 -1
  72. package/src/parse-mjs.d.ts.map +1 -1
  73. package/src/parse-pre-cjs.d.ts +5 -1
  74. package/src/parse-pre-cjs.d.ts.map +1 -1
  75. package/src/parse-pre-cjs.js +3 -1
  76. package/src/parse-pre-mjs.d.ts +5 -1
  77. package/src/parse-pre-mjs.d.ts.map +1 -1
  78. package/src/parse-pre-mjs.js +3 -1
  79. package/src/parse-text.d.ts +5 -1
  80. package/src/parse-text.d.ts.map +1 -1
  81. package/src/parse-text.js +3 -1
  82. package/src/policy-format.d.ts +2 -1
  83. package/src/policy-format.d.ts.map +1 -1
  84. package/src/policy-format.js +5 -2
  85. package/src/policy.d.ts +2 -2
  86. package/src/policy.d.ts.map +1 -1
  87. package/src/policy.js +10 -8
  88. package/src/powers.d.ts +1 -1
  89. package/src/powers.d.ts.map +1 -1
  90. package/src/powers.js +3 -1
  91. package/src/search.d.ts +2 -1
  92. package/src/search.d.ts.map +1 -1
  93. package/src/search.js +3 -1
  94. package/src/types/compartment-map-schema.d.ts +3 -1
  95. package/src/types/compartment-map-schema.d.ts.map +1 -1
  96. package/src/types/compartment-map-schema.ts +3 -1
  97. package/src/types/external.d.ts +15 -9
  98. package/src/types/external.d.ts.map +1 -1
  99. package/src/types/external.ts +15 -9
  100. package/src/types/internal.d.ts +33 -18
  101. package/src/types/internal.d.ts.map +1 -1
  102. package/src/types/internal.ts +40 -20
  103. package/src/types/node-powers.d.ts +3 -1
  104. package/src/types/node-powers.d.ts.map +1 -1
  105. package/src/types/node-powers.ts +3 -1
  106. package/src/types/policy-schema.d.ts +3 -1
  107. package/src/types/policy-schema.d.ts.map +1 -1
  108. package/src/types/policy-schema.ts +3 -1
  109. package/src/types/policy.d.ts +3 -1
  110. package/src/types/policy.d.ts.map +1 -1
  111. package/src/types/policy.ts +3 -1
  112. package/src/types/powers.d.ts +3 -1
  113. package/src/types/powers.d.ts.map +1 -1
  114. package/src/types/powers.ts +3 -1
  115. package/src/types/typescript.d.ts +3 -1
  116. package/src/types/typescript.d.ts.map +1 -1
  117. package/src/types/typescript.ts +3 -1
  118. package/src/url.d.ts.map +1 -1
  119. 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 [yyyy] [name of copyright owner]
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.0",
3
+ "version": "1.6.2",
4
4
  "description": "The compartment mapper assembles Node applications in a sandbox",
5
5
  "keywords": [
6
6
  "node",
@@ -50,7 +50,7 @@
50
50
  "scripts": {
51
51
  "build": "exit 0",
52
52
  "prepack": "tsc --build tsconfig.build.json",
53
- "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
53
+ "postpack": "git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\"",
54
54
  "cover": "c8 ava",
55
55
  "lint": "yarn lint:types && yarn lint:eslint",
56
56
  "lint-fix": "eslint --fix .",
@@ -60,23 +60,24 @@
60
60
  "test": "ava"
61
61
  },
62
62
  "dependencies": {
63
- "@endo/cjs-module-analyzer": "^1.0.9",
64
- "@endo/module-source": "^1.3.0",
65
- "@endo/trampoline": "^1.0.3",
66
- "@endo/zip": "^1.0.9",
67
- "ses": "^1.12.0"
63
+ "@endo/cjs-module-analyzer": "^1.0.11",
64
+ "@endo/module-source": "^1.3.2",
65
+ "@endo/path-compare": "^1.1.0",
66
+ "@endo/trampoline": "^1.0.5",
67
+ "@endo/zip": "^1.0.11",
68
+ "ses": "^1.13.1"
68
69
  },
69
70
  "devDependencies": {
70
71
  "ava": "^6.1.3",
71
72
  "babel-eslint": "^10.1.0",
72
73
  "c8": "^7.14.0",
73
- "eslint": "^8.57.0",
74
+ "eslint": "^8.57.1",
74
75
  "eslint-config-airbnb-base": "^15.0.0",
75
76
  "eslint-config-prettier": "^9.1.0",
76
77
  "eslint-plugin-eslint-comments": "^3.2.0",
77
- "eslint-plugin-import": "^2.29.1",
78
- "prettier": "^3.3.3",
79
- "typescript": "~5.6.3"
78
+ "eslint-plugin-import": "^2.31.0",
79
+ "prettier": "^3.5.3",
80
+ "typescript": "~5.8.3"
80
81
  },
81
82
  "files": [
82
83
  "./*.d.ts",
@@ -118,5 +119,5 @@
118
119
  "typeCoverage": {
119
120
  "atLeast": 86.14
120
121
  },
121
- "gitHead": "9b6784831d37db948cdd61f6da1f3489e8f97906"
122
+ "gitHead": "03b92fc383da5d8bb4ea993b90149a0db5799d0b"
122
123
  }
@@ -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 | undefined): Promise<{
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 | undefined): Promise<Uint8Array>;
7
- export function mapFromMap(powers: ReadFn | ReadPowers, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions | undefined): Promise<Uint8Array>;
8
- export function hashFromMap(powers: HashPowers, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions | undefined): Promise<string>;
9
- export function writeArchiveFromMap(write: WriteFn, readPowers: ReadFn | ReadPowers, archiveLocation: string, compartmentMap: CompartmentMapDescriptor, options?: ArchiveLiteOptions | undefined): Promise<void>;
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,6CAEtB,OAAO,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CAmBzD;AAQM,2CALI,MAAM,GAAG,UAAU,kBACnB,wBAAwB,6CAEtB,OAAO,CAAC,UAAU,CAAC,CAS/B;AAQM,mCALI,MAAM,GAAG,UAAU,kBACnB,wBAAwB,6CAEtB,OAAO,CAAC,UAAU,CAAC,CAS/B;AAQM,oCALI,UAAU,kBACV,wBAAwB,6CAEtB,OAAO,CAAC,MAAM,CAAC,CAU3B;AASM,2CANI,OAAO,cACP,MAAM,GAAG,UAAU,mBACnB,MAAM,kBACN,wBAAwB,2DAgBlC;8CApRS,YAAY;6BAAZ,YAAY;mCAAZ,YAAY;4BAAZ,YAAY;gCAAZ,YAAY;wCAAZ,YAAY;gCAAZ,YAAY;6BAAZ,YAAY"}
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 | undefined): Promise<{
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 | undefined): Promise<Uint8Array>;
6
- export function mapLocation(powers: ReadFn | ReadPowers, moduleLocation: string, options?: ArchiveOptions | undefined): Promise<Uint8Array>;
7
- export function hashLocation(powers: HashPowers, moduleLocation: string, options?: ArchiveOptions | undefined): Promise<string>;
8
- export function writeArchive(write: WriteFn, readPowers: ReadFn | ReadPowers, archiveLocation: string, moduleLocation: string, options?: ArchiveOptions | undefined): Promise<void>;
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';
@@ -1 +1 @@
1
- {"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["archive.js"],"names":[],"mappings":"AA2DO,2CALI,MAAM,GAAG,UAAU,kBACnB,MAAM,yCAEJ,OAAO,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CAiBzD;AAQM,oCALI,MAAM,GAAG,UAAU,kBACnB,MAAM,yCAEJ,OAAO,CAAC,UAAU,CAAC,CAwC/B;AAQM,oCALI,MAAM,GAAG,UAAU,kBACnB,MAAM,yCAEJ,OAAO,CAAC,UAAU,CAAC,CAyC/B;AAQM,qCALI,UAAU,kBACV,MAAM,yCAEJ,OAAO,CAAC,MAAM,CAAC,CAyC3B;AASM,oCANI,OAAO,cACP,MAAM,GAAG,UAAU,mBACnB,MAAM,kBACN,MAAM,uDAgDhB;4BApPS,YAAY;gCAAZ,YAAY;oCAAZ,YAAY;gCAAZ,YAAY;6BAAZ,YAAY"}
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
- * @module Provides mechanisms for creating archives (zip files with a
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
  /**
@@ -1,8 +1,18 @@
1
- declare const _default: BundlerSupport<CjsModuleSource>;
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
@@ -1 +1 @@
1
- {"version":3,"file":"bundle-cjs.d.ts","sourceRoot":"","sources":["bundle-cjs.js"],"names":[],"mappings":"wBAyEW,eAAe,eAAe,CAAC;;8BApE5B,mBAAmB,GAAG;IAAC,UAAU,EAAE,MAAM,CAAA;CAAC;oCAFtB,kBAAkB;yCADb,KAAK"}
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"}
@@ -1,5 +1,5 @@
1
- export function makeFunctorFromMap(readPowers: ReadFn | ReadPowers | MaybeReadPowers, compartmentMap: CompartmentMapDescriptor, options?: BundleOptions | undefined): Promise<string>;
2
- export function makeScriptFromMap(readPowers: ReadFn | ReadPowers | MaybeReadPowers, compartmentMap: CompartmentMapDescriptor, options?: BundleOptions | undefined): Promise<string>;
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.
@@ -1 +1 @@
1
- {"version":3,"file":"bundle-lite.d.ts","sourceRoot":"","sources":["bundle-lite.js"],"names":[],"mappings":"AA4TO,+CALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,wBAAwB,wCAEtB,OAAO,CAAC,MAAM,CAAC,CAgV3B;AAQM,8CALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,wBAAwB,wCAEtB,OAAO,CAAC,MAAM,CAAC,CAW3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA/mBa,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"}
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"}
@@ -271,7 +271,6 @@ const sortedModules = (
271
271
  return { modules, aliases };
272
272
  };
273
273
 
274
- /** @type {Record<string, BundlerSupport<unknown>>} */
275
274
  const bundlerSupportForLanguage = {
276
275
  'pre-mjs-json': mjsSupport,
277
276
  'pre-cjs-json': cjsSupport,
@@ -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: BundlerSupport<PrecompiledModuleSource>;
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
@@ -1 +1 @@
1
- {"version":3,"file":"bundle-mjs.d.ts","sourceRoot":"","sources":["bundle-mjs.js"],"names":[],"mappings":"AAwCA,ubAYE;wBAES,eAAe,uBAAuB,CAAC;;6CApDP,KAAK;oCACd,kBAAkB"}
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 | undefined): Promise<string>;
2
- export function makeScriptFromMap(readPowers: ReadFn | ReadPowers | MaybeReadPowers, compartmentMap: CompartmentMapDescriptor, options?: BundleOptions | undefined): Promise<string>;
3
- export function makeFunctor(readPowers: ReadFn | ReadPowers | MaybeReadPowers, moduleLocation: string, options?: BundleOptions | undefined): Promise<string>;
4
- export function makeScript(readPowers: ReadFn | ReadPowers | MaybeReadPowers, moduleLocation: string, options?: BundleOptions | undefined): Promise<string>;
5
- export function writeScript(write: WriteFn, read: ReadFn, bundleLocation: string, moduleLocation: string, options?: BundleOptions | undefined): Promise<void>;
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.
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["bundle.js"],"names":[],"mappings":"AAgUO,+CALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,wBAAwB,wCAEtB,OAAO,CAAC,MAAM,CAAC,CAiV3B;AAQM,8CALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,wBAAwB,wCAEtB,OAAO,CAAC,MAAM,CAAC,CAW3B;AAQM,wCALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,MAAM,wCAEJ,OAAO,CAAC,MAAM,CAAC,CAS3B;AAQM,uCALI,MAAM,GAAG,UAAU,GAAG,eAAe,kBACrC,MAAM,wCAEJ,OAAO,CAAC,MAAM,CAAC,CAS3B;AASM,mCANI,OAAO,QACP,MAAM,kBACN,MAAM,kBACN,MAAM,sDAahB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
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<unknown>>} */
278
+ /** @type {Record<string, BundlerSupport<any>>} */
279
279
  const bundlerSupportForLanguage = {
280
280
  'pre-mjs-json': mjsSupport,
281
281
  'pre-cjs-json': cjsSupport,
@@ -1,4 +1,4 @@
1
- export function captureFromMap(powers: ReadFn | ReadPowers, compartmentMap: CompartmentMapDescriptor, options?: CaptureLiteOptions | undefined): Promise<CaptureResult>;
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":"AAoFO,uCALI,MAAM,GAAG,UAAU,kBACnB,wBAAwB,6CAEtB,OAAO,CAAC,aAAa,CAAC,CAmElC;4BA9GS,YAAY;gCAAZ,YAAY;8CAAZ,YAAY;wCAAZ,YAAY;mCAAZ,YAAY"}
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"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @module
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 */
@@ -1,6 +1,5 @@
1
1
  /** @type {(a: string, b: string) => number} */
2
2
  export const stringCompare: (a: string, b: string) => number;
3
- export function pathCompare(a: Array<string> | undefined, b: Array<string> | undefined): number;
4
- export function assertCompartmentMap(allegedCompartmentMap: unknown, url?: string | undefined): asserts allegedCompartmentMap is CompartmentMapDescriptor;
3
+ export function assertCompartmentMap(allegedCompartmentMap: unknown, url?: string): asserts allegedCompartmentMap is CompartmentMapDescriptor;
5
4
  import type { CompartmentMapDescriptor } from './types.js';
6
5
  //# 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,6BAEL,QAAQ,qBAAqB,IAAI,wBAAwB,CA+BrE;8CArf2C,YAAY"}
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;AA8Z/D,4DALI,OAAO,QACP,MAAM,GACJ,QAAQ,qBAAqB,IAAI,wBAAwB,CA+BrE;8CApc2C,YAAY"}
@@ -14,55 +14,6 @@ const q = JSON.stringify;
14
14
  // eslint-disable-next-line no-nested-ternary
15
15
  export const stringCompare = (a, b) => (a === b ? 0 : a < b ? -1 : 1);
16
16
 
17
- /**
18
- * @param {number} length
19
- * @param {string} term
20
- */
21
- const cumulativeLength = (length, term) => {
22
- return length + term.length;
23
- };
24
-
25
- /**
26
- * @param {Array<string> | undefined} a
27
- * @param {Array<string> | undefined} b
28
- */
29
- export const pathCompare = (a, b) => {
30
- // Undefined is not preferred
31
- if (a === undefined && b === undefined) {
32
- return 0;
33
- }
34
- if (a === undefined) {
35
- return 1;
36
- }
37
- if (b === undefined) {
38
- return -1;
39
- }
40
- // Prefer the shortest dependency path.
41
- if (a.length !== b.length) {
42
- return a.length - b.length;
43
- }
44
- // Otherwise, favor the shortest cumulative length.
45
- const aSum = a.reduce(cumulativeLength, 0);
46
- const bSum = b.reduce(cumulativeLength, 0);
47
- if (aSum !== bSum) {
48
- return aSum - bSum;
49
- }
50
- // Otherwise, compare terms lexically.
51
- assert(a.length === b.length); // Reminder
52
- // This loop guarantees that if any pair of terms is different, including the
53
- // case where one is a prefix of the other, we will return a non-zero value.
54
- for (let i = 0; i < a.length; i += 1) {
55
- const comparison = stringCompare(a[i], b[i]);
56
- if (comparison !== 0) {
57
- return comparison;
58
- }
59
- }
60
- // If all pairs of terms are the same respective lengths, we are guaranteed
61
- // that they are exactly the same or one of them is lexically distinct and would
62
- // have already been caught.
63
- return 0;
64
- };
65
-
66
17
  /**
67
18
  * @template T
68
19
  * @param {Iterable<T>} iterable
@@ -1 +1 @@
1
- {"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["digest.js"],"names":[],"mappings":"AAwLO,qDAJI,wBAAwB,WACxB,OAAO,GACL,YAAY,CAoDxB;8CA3NS,YAAY;6BAAZ,YAAY;kCAAZ,YAAY"}
1
+ {"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["digest.js"],"names":[],"mappings":"AAqLO,qDAJI,wBAAwB,WACxB,OAAO,GACL,YAAY,CAoDxB;8CAxNS,YAAY;6BAAZ,YAAY;kCAAZ,YAAY"}
package/src/digest.js CHANGED
@@ -16,11 +16,8 @@
16
16
  * } from './types.js'
17
17
  */
18
18
 
19
- import {
20
- assertCompartmentMap,
21
- pathCompare,
22
- stringCompare,
23
- } from './compartment-map.js';
19
+ import { pathCompare } from '@endo/path-compare';
20
+ import { assertCompartmentMap, stringCompare } from './compartment-map.js';
24
21
 
25
22
  const { create, fromEntries, entries, keys } = Object;
26
23
 
@@ -1,5 +1,5 @@
1
- export function parseArchive(archiveBytes: Uint8Array, archiveLocation?: string | undefined, options?: ParseArchiveOptions | undefined): Promise<Application>;
2
- export function loadArchive(readPowers: ReadFn | ReadPowers, archiveLocation: string, options?: ParseArchiveOptions | undefined): Promise<Application>;
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":"AAoPO,2CALI,UAAU,oFAGR,OAAO,CAAC,WAAW,CAAC,CAiKhC;AAQM,wCALI,MAAM,GAAG,UAAU,mBACnB,MAAM,8CAEJ,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
+ {"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
- * @module Provides functions for evaluating the modules in an archive (a zip
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" */
@@ -1,5 +1,5 @@
1
- export function parseArchive(archiveBytes: Uint8Array, archiveLocation?: string | undefined, options?: Options | undefined): Promise<Application>;
2
- export function loadArchive(readPowers: import("@endo/zip").ReadFn | ReadPowers, archiveLocation: string, options?: import("./types.js").ParseArchiveOptions | undefined): Promise<Application>;
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":"AA6EO,2CALI,UAAU,wEAGR,OAAO,CAAC,WAAW,CAAC,CAW9B;AAQI,wCALI,OAAO,WAAW,EAAE,MAAM,GAAG,UAAU,mBACvC,MAAM,mEAEJ,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;oCAAZ,YAAY;wCAAZ,YAAY;4BAAZ,YAAY;0CAAZ,YAAY;+CAAZ,YAAY;kDAAZ,YAAY;uCAAZ,YAAY"}
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"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @module Provides functions for evaluating modules in an archive (a zip file
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
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"import-hook.d.ts","sourceRoot":"","sources":["import-hook.js"],"names":[],"mappings":"AAklBA;;;;;;;GAOG;AACH,mDALW,aAAa,gBACb,MAAM,2IACN,6BAA6B,GAC3B,kBAAkB,CAyJ9B;AApjBM,oGALJ;IAAqC,OAAO;IACN,oBAAoB;IACnC,oBAAoB,EAAnC,MAAM;CACd,GAAU,oBAAoB,GAAC,SAAS,CA8B1C;AAiMM,gDALI,MAAM,GAAC,UAAU,gBACjB,MAAM,iLACN,0BAA0B,GACxB,eAAe,CAwL3B;mCA5iBS,YAAY;mDAAZ,YAAY;wCAAZ,YAAY;0CAAZ,YAAY;4BAAZ,YAAY;gCAAZ,YAAY;gDAAZ,YAAY;qCAAZ,YAAY"}
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"}