@markii/bundle 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @markii/bundle
2
2
 
3
- Bundle (`.mkbundle`) storage and policy handling for [Mark](https://github.com/sadigaxund/markii): manifest parsing/validation, a bundle-relative path-jail, the zip storage form (via `fflate`), a Node-only directory storage form (`./fs` subpath), and a capability-restricted script view. No React, no markdown parsing.
3
+ Bundle (`.mkz`) storage and policy handling for [Markii](https://github.com/sadigaxund/markii): manifest parsing/validation, a bundle-relative path-jail, the zip storage form (via `fflate`), a Node-only directory storage form (`./fs` subpath), and a capability-restricted script view. No React, no markdown parsing.
4
+
5
+ The legacy `.mkbundle` extension is still recognized for one more release; new bundles are always written as `.mkz`.
4
6
 
5
7
  See the [repository](https://github.com/sadigaxund/markii) for the format spec and the reference library as a whole.
package/dist/fs.js CHANGED
@@ -116,7 +116,7 @@ async function resolveInsideRoot(rootAbs, relPath) {
116
116
  * Writes `data` to an already symlink-checked `target` that is known to
117
117
  * exist, refusing to write through a hard link (ESCAPE 3: `st_nlink > 1`
118
118
  * means some other path — possibly outside the bundle entirely, e.g.
119
- * `ln b.mkbundle/../victim.txt b.mkbundle/cache/hard` — refers to the exact same
119
+ * `ln b.mkz/../victim.txt b.mkz/cache/hard` — refers to the exact same
120
120
  * inode, so writing here would also silently modify that other path).
121
121
  *
122
122
  * Opens the file first *without* truncating (`'r+'`), `fstat`s the open
@@ -22,8 +22,9 @@ export interface ScriptView {
22
22
  * trust (their own note, a dev/test harness) — but it must always be an
23
23
  * explicit, named opt-in at the call site, never `createScriptView`'s
24
24
  * default. See the DEFECT-10 note on `createScriptView` for why: an
25
- * untrusted `.mkbundle` opened from elsewhere must never be able to grant
26
- * itself capabilities merely by declaring them in its own manifest.
25
+ * untrusted `.mkz` bundle (or its legacy `.mkbundle` counterpart) opened
26
+ * from elsewhere must never be able to grant itself capabilities merely by
27
+ * declaring them in its own manifest.
27
28
  */
28
29
  export declare function grantAllDeclaredPermissions(manifest: BundleManifest): BundlePermissions;
29
30
  /**
@@ -31,7 +32,7 @@ export declare function grantAllDeclaredPermissions(manifest: BundleManifest): B
31
32
  *
32
33
  * DEFECT 10 / spec §10: "Capabilities are declared in the manifest, granted
33
34
  * by the user" — declaring is not granting. `manifest.permissions` is
34
- * whatever the (possibly untrusted) `.mkbundle` *asks for*; `grantedPermissions`
35
+ * whatever the (possibly untrusted) `.mkz` bundle *asks for*; `grantedPermissions`
35
36
  * is whatever the user has actually *approved* for this note (e.g. via a
36
37
  * permission-prompt UI, remembered per note and re-prompted if scripts
37
38
  * change — see §10). The capability this view actually exposes is the
@@ -7,8 +7,9 @@ import { isWriteAllowed } from './paths.js';
7
7
  * trust (their own note, a dev/test harness) — but it must always be an
8
8
  * explicit, named opt-in at the call site, never `createScriptView`'s
9
9
  * default. See the DEFECT-10 note on `createScriptView` for why: an
10
- * untrusted `.mkbundle` opened from elsewhere must never be able to grant
11
- * itself capabilities merely by declaring them in its own manifest.
10
+ * untrusted `.mkz` bundle (or its legacy `.mkbundle` counterpart) opened
11
+ * from elsewhere must never be able to grant itself capabilities merely by
12
+ * declaring them in its own manifest.
12
13
  */
13
14
  export function grantAllDeclaredPermissions(manifest) {
14
15
  return manifest.permissions ?? {};
@@ -18,7 +19,7 @@ export function grantAllDeclaredPermissions(manifest) {
18
19
  *
19
20
  * DEFECT 10 / spec §10: "Capabilities are declared in the manifest, granted
20
21
  * by the user" — declaring is not granting. `manifest.permissions` is
21
- * whatever the (possibly untrusted) `.mkbundle` *asks for*; `grantedPermissions`
22
+ * whatever the (possibly untrusted) `.mkz` bundle *asks for*; `grantedPermissions`
22
23
  * is whatever the user has actually *approved* for this note (e.g. via a
23
24
  * permission-prompt UI, remembered per note and re-prompted if scripts
24
25
  * change — see §10). The capability this view actually exposes is the
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@markii/bundle",
3
- "version": "0.3.0",
4
- "description": "Bundle (.mkbundle) storage and policy layer for Mark: manifest handling, the bundle-relative path-jail, zip (fflate) and Node directory storage forms, and a capability-restricted script view. No React, no parsing.",
3
+ "version": "0.4.0",
4
+ "description": "Bundle (.mkz, formerly .mkbundle) storage and policy layer for Markii: manifest handling, the bundle-relative path-jail, zip (fflate) and Node directory storage forms, and a capability-restricted script view. No React, no parsing.",
5
5
  "keywords": [
6
6
  "markdown",
7
7
  "mark",