@amalgm/live 0.2.81-main.41789770770 → 0.2.81-main.41794545655
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/dist/apply/showing.d.ts +6 -6
- package/dist/apply/showing.js +6 -6
- package/dist/drive/contracts.d.ts +5 -0
- package/dist/drive/contracts.d.ts.map +1 -1
- package/dist/drive/contracts.js.map +1 -1
- package/dist/drive/drive.d.ts +12 -1
- package/dist/drive/drive.d.ts.map +1 -1
- package/dist/drive/drive.js +14 -1
- package/dist/drive/drive.js.map +1 -1
- package/dist/drive/listing.d.ts +3 -1
- package/dist/drive/listing.d.ts.map +1 -1
- package/dist/drive/listing.js +17 -6
- package/dist/drive/listing.js.map +1 -1
- package/dist/drive/where.d.ts +9 -0
- package/dist/drive/where.d.ts.map +1 -1
- package/dist/drive/where.js +26 -0
- package/dist/drive/where.js.map +1 -1
- package/dist/files/commands.d.ts +16 -7
- package/dist/files/commands.d.ts.map +1 -1
- package/dist/files/commands.js +8 -3
- package/dist/files/commands.js.map +1 -1
- package/dist/files/computer-address.d.ts +11 -0
- package/dist/files/computer-address.d.ts.map +1 -0
- package/dist/files/computer-address.js +45 -0
- package/dist/files/computer-address.js.map +1 -0
- package/dist/files/index.d.ts +1 -0
- package/dist/files/index.d.ts.map +1 -1
- package/dist/files/index.js +1 -0
- package/dist/files/index.js.map +1 -1
- package/dist/registration/home-layout.d.ts +9 -4
- package/dist/registration/home-layout.d.ts.map +1 -1
- package/dist/registration/home-layout.js +10 -5
- package/dist/registration/home-layout.js.map +1 -1
- package/dist-cjs/apply/showing.js +6 -6
- package/dist-cjs/drive/contracts.js.map +1 -1
- package/dist-cjs/drive/drive.js +13 -0
- package/dist-cjs/drive/drive.js.map +1 -1
- package/dist-cjs/drive/listing.js +17 -6
- package/dist-cjs/drive/listing.js.map +1 -1
- package/dist-cjs/drive/where.js +27 -0
- package/dist-cjs/drive/where.js.map +1 -1
- package/dist-cjs/files/commands.js +8 -3
- package/dist-cjs/files/commands.js.map +1 -1
- package/dist-cjs/files/computer-address.js +49 -0
- package/dist-cjs/files/computer-address.js.map +1 -0
- package/dist-cjs/files/index.js +4 -1
- package/dist-cjs/files/index.js.map +1 -1
- package/dist-cjs/registration/home-layout.js +11 -5
- package/dist-cjs/registration/home-layout.js.map +1 -1
- package/package.json +4 -4
package/dist/apply/showing.d.ts
CHANGED
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
*
|
|
38
38
|
* A root places some of its entries whatever their unit. A home places
|
|
39
39
|
* what login places (registration/home-layout.ts placedAtHome): the
|
|
40
|
-
* runtime's own entries whole, and the projects
|
|
41
|
-
* result at or beneath one of the runtime's own entries
|
|
42
|
-
* folder that arrives enters without
|
|
43
|
-
* listed. Any other root, such as a workspace a
|
|
44
|
-
* places only its sharing policy at its top,
|
|
45
|
-
* there. `placedInRoot` asks this of each member of an Enter too.
|
|
40
|
+
* runtime's own entries whole, and the projects and computers folders bare.
|
|
41
|
+
* So in a home a result at or beneath one of the runtime's own entries
|
|
42
|
+
* enters, a projects or computers folder that arrives enters without what it
|
|
43
|
+
* holds, and anything else is listed. Any other root, such as a workspace a
|
|
44
|
+
* home's reference leads to, places only its sharing policy at its top,
|
|
45
|
+
* which Detect reads from disk there. `placedInRoot` asks this of each member of an Enter too.
|
|
46
46
|
*
|
|
47
47
|
* A construct is its own root and its own authority, and has no ground.
|
|
48
48
|
* Holding its line is this computer's selection of it, so every active
|
package/dist/apply/showing.js
CHANGED
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
*
|
|
38
38
|
* A root places some of its entries whatever their unit. A home places
|
|
39
39
|
* what login places (registration/home-layout.ts placedAtHome): the
|
|
40
|
-
* runtime's own entries whole, and the projects
|
|
41
|
-
* result at or beneath one of the runtime's own entries
|
|
42
|
-
* folder that arrives enters without
|
|
43
|
-
* listed. Any other root, such as a workspace a
|
|
44
|
-
* places only its sharing policy at its top,
|
|
45
|
-
* there. `placedInRoot` asks this of each member of an Enter too.
|
|
40
|
+
* runtime's own entries whole, and the projects and computers folders bare.
|
|
41
|
+
* So in a home a result at or beneath one of the runtime's own entries
|
|
42
|
+
* enters, a projects or computers folder that arrives enters without what it
|
|
43
|
+
* holds, and anything else is listed. Any other root, such as a workspace a
|
|
44
|
+
* home's reference leads to, places only its sharing policy at its top,
|
|
45
|
+
* which Detect reads from disk there. `placedInRoot` asks this of each member of an Enter too.
|
|
46
46
|
*
|
|
47
47
|
* A construct is its own root and its own authority, and has no ground.
|
|
48
48
|
* Holding its line is this computer's selection of it, so every active
|
|
@@ -63,6 +63,11 @@ export interface Root {
|
|
|
63
63
|
export interface RootsPort {
|
|
64
64
|
/** The root the drive stands over: the person's home, their core root. */
|
|
65
65
|
readonly home: Root;
|
|
66
|
+
/** This computer's own folder in the home's computers folder
|
|
67
|
+
* (`files/<computer>`), or null before it has one. Its ground already
|
|
68
|
+
* stands where it lives on this computer, so the drive never shows it a
|
|
69
|
+
* second time. */
|
|
70
|
+
readonly computer: string | null;
|
|
66
71
|
/** The root a reference leads to, or null when this person's accepted
|
|
67
72
|
* graph holds no such root. Asked on every walk that reaches the
|
|
68
73
|
* reference, so a host answers repeat asks from what it already holds. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/drive/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEvF;;2DAE2D;AAC3D,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,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IACpC,oCAAoC;IACpC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB;sEACkE;IAClE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAE,MAAkB;IAQ/F;sDACkD;IAClD,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,UAAU;CAQpD;AAMD;;wEAEwE;AACxE,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEnD,wEAAwE;AACxE,MAAM,WAAW,KAAK;IACpB,GAAG,IAAI,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;CAClC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/drive/contracts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/drive/contracts.ts"],"names":[],"mappings":"AAyHA;iEACiE;AACjE,MAAM,OAAO,UAAW,SAAQ,KAAK;IAC1B,IAAI,CAAuB;IACpC,oCAAoC;IAC3B,IAAI,CAAO;IACpB;sEACkE;IACzD,MAAM,CAAS;IAExB,YAAY,IAA0B,EAAE,OAAe,EAAE,IAAU,EAAE,SAAiB,IAAI,CAAC,IAAI;QAC7F,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;sDACkD;IAClD,MAAM,CAAC,IAAI,CAAC,KAAc,EAAE,IAAU;QACpC,IAAI,KAAK,YAAY,UAAU;YAAE,OAAO,KAAK,CAAC;QAC9C,MAAM,OAAO,GAAG,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAkC,CAAC,CAAC,CAAC,IAAI,CAAC;QACxG,MAAM,KAAK,GAAG,OAAO,KAAK,IAAI,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,IAAI,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACtG,MAAM,OAAO,GAAG,OAAO,KAAK,IAAI,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC1G,MAAM,MAAM,GAAG,KAAK,IAAI,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QACjH,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,IAA4B,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACvG,CAAC;CACF;AAED,MAAM,aAAa,GAAwB,IAAI,GAAG,CAChD,CAAC,aAAa,EAAE,SAAS,EAAE,OAAO,CAAkC,CACrE,CAAC"}
|
package/dist/drive/drive.d.ts
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
* writes, renames, removes, changes or follows an address touches it first,
|
|
9
9
|
* and a creation touches the address it creates at, so its ancestors stand.
|
|
10
10
|
* After a touch the shelf speaks, and the host does what it would do on any
|
|
11
|
-
* folder, on the shelf of the root the judgment names.
|
|
11
|
+
* folder, on the shelf of the root the judgment names. An operation that
|
|
12
|
+
* creates, renames, removes or changes an address asks `change` instead,
|
|
13
|
+
* which refuses an address that names no ground (`addressOnly`).
|
|
12
14
|
*/
|
|
13
15
|
import type { DrivePorts } from './contracts.js';
|
|
14
16
|
import { type Listing } from './listing.js';
|
|
@@ -30,6 +32,15 @@ export declare class Drive {
|
|
|
30
32
|
* places nothing. Rejects with a `DriveError` when a unit could not be
|
|
31
33
|
* placed; the shelf is then as it was. */
|
|
32
34
|
touch(path: readonly string[]): Promise<Touched>;
|
|
35
|
+
/** A touch for an operation that changes the address itself: a creation,
|
|
36
|
+
* rename, removal, truncation or change of its mode, owner or times. Null,
|
|
37
|
+
* placing nothing, when the address names no ground: the computers folder,
|
|
38
|
+
* the folders of an added folder's path, its reference, and the top of the
|
|
39
|
+
* root it leads into say where a folder lives on its computer, and only
|
|
40
|
+
* that computer moves it. Beneath this computer's own folder there is
|
|
41
|
+
* nothing to change: the drive never shows it. */
|
|
42
|
+
change(path: readonly string[]): Promise<Touched | null>;
|
|
43
|
+
private settle;
|
|
33
44
|
/** Placements in flight now; the activity hook hears the same count. */
|
|
34
45
|
placing(): number;
|
|
35
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../src/drive/drive.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../src/drive/drive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAc,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAsB,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAE5D,MAAM,WAAW,OAAO;IACtB,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC;CACrC;AAED,qBAAa,KAAK;IAGJ,OAAO,CAAC,QAAQ,CAAC,KAAK;IAFlC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;gBAEX,KAAK,EAAE,UAAU;IAI9C,KAAK,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC;IAI9C,IAAI,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAI/C;;;8CAG0C;IACpC,KAAK,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAItD;;;;;;sDAMkD;IAC5C,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;YAKhD,MAAM;IAMpB,wEAAwE;IACxE,OAAO,IAAI,MAAM;CAGlB"}
|
package/dist/drive/drive.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { listing } from './listing.js';
|
|
2
2
|
import { Placements } from './placements.js';
|
|
3
|
-
import { where } from './where.js';
|
|
3
|
+
import { addressOnly, where } from './where.js';
|
|
4
4
|
export class Drive {
|
|
5
5
|
ports;
|
|
6
6
|
placements;
|
|
@@ -19,7 +19,20 @@ export class Drive {
|
|
|
19
19
|
* places nothing. Rejects with a `DriveError` when a unit could not be
|
|
20
20
|
* placed; the shelf is then as it was. */
|
|
21
21
|
async touch(path) {
|
|
22
|
+
return this.settle(path, await this.where(path));
|
|
23
|
+
}
|
|
24
|
+
/** A touch for an operation that changes the address itself: a creation,
|
|
25
|
+
* rename, removal, truncation or change of its mode, owner or times. Null,
|
|
26
|
+
* placing nothing, when the address names no ground: the computers folder,
|
|
27
|
+
* the folders of an added folder's path, its reference, and the top of the
|
|
28
|
+
* root it leads into say where a folder lives on its computer, and only
|
|
29
|
+
* that computer moves it. Beneath this computer's own folder there is
|
|
30
|
+
* nothing to change: the drive never shows it. */
|
|
31
|
+
async change(path) {
|
|
22
32
|
const before = await this.where(path);
|
|
33
|
+
return addressOnly(this.ports.roots, path, before) ? null : this.settle(path, before);
|
|
34
|
+
}
|
|
35
|
+
async settle(path, before) {
|
|
23
36
|
const placing = 'placing' in before ? before.placing : [];
|
|
24
37
|
const placed = placing.length === 0 ? [] : await this.placements.place(placing);
|
|
25
38
|
return { where: placed.length === 0 ? before : await this.where(path), placed };
|
package/dist/drive/drive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive.js","sourceRoot":"","sources":["../../src/drive/drive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drive.js","sourceRoot":"","sources":["../../src/drive/drive.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAgB,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,UAAU,EAAgB,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,KAAK,EAAc,MAAM,YAAY,CAAC;AAQ5D,MAAM,OAAO,KAAK;IAGa;IAFZ,UAAU,CAAa;IAExC,YAA6B,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;QAC5C,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,IAAuB;QAC3B,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,IAAI,CAAC,IAAuB;QAC1B,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IAED;;;8CAG0C;IAC1C,KAAK,CAAC,KAAK,CAAC,IAAuB;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,CAAC;IAED;;;;;;sDAMkD;IAClD,KAAK,CAAC,MAAM,CAAC,IAAuB;QAClC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACtC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxF,CAAC;IAEO,KAAK,CAAC,MAAM,CAAC,IAAuB,EAAE,MAAa;QACzD,MAAM,OAAO,GAAG,SAAS,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1D,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChF,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAClF,CAAC;IAED,wEAAwE;IACxE,OAAO;QACL,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IACjC,CAAC;CACF"}
|
package/dist/drive/listing.d.ts
CHANGED
|
@@ -5,13 +5,15 @@ export type Listing =
|
|
|
5
5
|
* `complete` when nothing stands on the shelf, so these are the whole
|
|
6
6
|
* listing; otherwise the host lists that shelf's directory and shows these
|
|
7
7
|
* beside it. `doors` are names the map cannot describe, an unplaced
|
|
8
|
-
* repository's `.git`: listed by name, and a look at one places it.
|
|
8
|
+
* repository's `.git`: listed by name, and a look at one places it.
|
|
9
|
+
* `hidden` are shelf names the host leaves out of its listing. */
|
|
9
10
|
{
|
|
10
11
|
readonly kind: 'entries';
|
|
11
12
|
readonly root: string;
|
|
12
13
|
readonly address: readonly string[];
|
|
13
14
|
readonly entries: readonly Entry[];
|
|
14
15
|
readonly doors: readonly string[];
|
|
16
|
+
readonly hidden: readonly string[];
|
|
15
17
|
readonly complete: boolean;
|
|
16
18
|
}
|
|
17
19
|
/** Inside an unplaced repository's door: place `placing`, then list the shelf. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listing.d.ts","sourceRoot":"","sources":["../../src/drive/listing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listing.d.ts","sourceRoot":"","sources":["../../src/drive/listing.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAa,SAAS,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAuC,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAE7E,MAAM,MAAM,OAAO;AACjB;;;;;kEAKkE;AAChE;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;CAAE;AACjO,kFAAkF;GAChF;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,IAAI,EAAE,CAAA;CAAE,GACnE;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEhC,wBAAsB,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CA0BzF"}
|
package/dist/drive/listing.js
CHANGED
|
@@ -6,28 +6,33 @@
|
|
|
6
6
|
* person's graph holds is listed as a directory, since the walk shows that
|
|
7
7
|
* root inline where the reference stands. An unplaced repository lists its
|
|
8
8
|
* files from the map and its `.git` as a door, so finding a repository needs
|
|
9
|
-
* no bytes; only listing inside the door places it first.
|
|
9
|
+
* no bytes; only listing inside the door places it first. The computers
|
|
10
|
+
* folder never lists this computer's own folder: the walk finds it nowhere.
|
|
10
11
|
*/
|
|
11
12
|
import { REPOSITORY_METADATA } from '../detection/classify.js';
|
|
12
13
|
import { CONTAINERS } from '../entities/types.js';
|
|
14
|
+
import { FILES_FOLDER } from '../registration/home-layout.js';
|
|
13
15
|
import { active, derivedNames, entryOf, walk } from './where.js';
|
|
14
16
|
export async function listing(roots, path) {
|
|
15
17
|
const { where: at, root } = await walk(roots, path);
|
|
16
18
|
switch (at.kind) {
|
|
17
19
|
case 'shelf': {
|
|
20
|
+
const hidden = hiddenAt(roots, at.root, at.address);
|
|
18
21
|
if (at.entity === null || !CONTAINERS.has(at.entity.type))
|
|
19
|
-
return { kind: 'entries', root: at.root, address: at.address, entries: [], doors: [], complete: false };
|
|
22
|
+
return { kind: 'entries', root: at.root, address: at.address, entries: [], doors: [], hidden, complete: false };
|
|
20
23
|
const shelf = new Set(root.shelf.names(at.address) ?? []);
|
|
21
24
|
const unplaced = derivedNames(active(root.map.children(at.entity.uuid)))
|
|
22
|
-
.filter(([child, name]) => !root.map.placed(child.uuid) && !shelf.has(name));
|
|
23
|
-
return { kind: 'entries', root: at.root, address: at.address, entries: await entries(roots, unplaced), doors: [], complete: false };
|
|
25
|
+
.filter(([child, name]) => !root.map.placed(child.uuid) && !shelf.has(name) && !hidden.includes(name));
|
|
26
|
+
return { kind: 'entries', root: at.root, address: at.address, entries: await entries(roots, unplaced), doors: [], hidden, complete: false };
|
|
24
27
|
}
|
|
25
28
|
case 'listed': {
|
|
26
29
|
if (at.entry.kind !== 'directory')
|
|
27
30
|
return { kind: 'notdir' };
|
|
28
|
-
const
|
|
31
|
+
const hidden = hiddenAt(roots, at.root, at.address);
|
|
32
|
+
const children = derivedNames(active(root.map.children(at.entry.uuid)))
|
|
33
|
+
.filter(([, name]) => !hidden.includes(name));
|
|
29
34
|
const doors = at.entry.type === 'repo.git' ? [REPOSITORY_METADATA] : [];
|
|
30
|
-
return { kind: 'entries', root: at.root, address: at.address, entries: await entries(roots, children), doors, complete: true };
|
|
35
|
+
return { kind: 'entries', root: at.root, address: at.address, entries: await entries(roots, children), doors, hidden, complete: true };
|
|
31
36
|
}
|
|
32
37
|
case 'door':
|
|
33
38
|
return { kind: 'place-first', placing: at.placing };
|
|
@@ -37,6 +42,12 @@ export async function listing(roots, path) {
|
|
|
37
42
|
return at;
|
|
38
43
|
}
|
|
39
44
|
}
|
|
45
|
+
/** The names a listing leaves out at an address: this computer's own folder,
|
|
46
|
+
* in the home's computers folder. */
|
|
47
|
+
function hiddenAt(roots, root, address) {
|
|
48
|
+
const computers = root === roots.home.uuid && address.length === 1 && address[0] === FILES_FOLDER;
|
|
49
|
+
return computers && roots.computer !== null ? [roots.computer] : [];
|
|
50
|
+
}
|
|
40
51
|
/** Each child's entry at its name; a reference leading into a root this
|
|
41
52
|
* person holds is a directory. */
|
|
42
53
|
async function entries(roots, children) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listing.js","sourceRoot":"","sources":["../../src/drive/listing.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"listing.js","sourceRoot":"","sources":["../../src/drive/listing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH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B,CAAC"}
|
package/dist/drive/where.d.ts
CHANGED
|
@@ -67,6 +67,15 @@ export interface Walked {
|
|
|
67
67
|
}
|
|
68
68
|
export declare function where(roots: RootsPort, path: readonly string[]): Promise<Where>;
|
|
69
69
|
export declare function walk(roots: RootsPort, path: readonly string[]): Promise<Walked>;
|
|
70
|
+
/** Whether a path's judgment names an address, not ground: the computers
|
|
71
|
+
* folder and everything the home holds beneath it (each computer's folder,
|
|
72
|
+
* the folders of an added folder's path, its reference), and the top of a
|
|
73
|
+
* root a reference leads into. They say where a folder lives on its
|
|
74
|
+
* computer; only that computer moves it, so no computer creates, renames or
|
|
75
|
+
* removes them through its drive. Inside an entered root everything is
|
|
76
|
+
* ground, except beneath this computer's own folder, whose ground the drive
|
|
77
|
+
* never shows. */
|
|
78
|
+
export declare function addressOnly(roots: RootsPort, path: readonly string[], at: Where): boolean;
|
|
70
79
|
/** The active child standing at a name: a sole owner keeps its bare name
|
|
71
80
|
* whatever its siblings do, so one holder answers at once. A name nobody
|
|
72
81
|
* holds that no shared slot can derive is nobody's. Only a shared slot, held
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"where.d.ts","sourceRoot":"","sources":["../../src/drive/where.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"where.d.ts","sourceRoot":"","sources":["../../src/drive/where.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEhF,wEAAwE;AACxE,MAAM,WAAW,KAAK;IACpB,wFAAwF;IACxF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACjC,QAAQ,CAAC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AAG,SAAS,EAAE,CAElE"}
|
package/dist/drive/where.js
CHANGED
|
@@ -33,14 +33,20 @@
|
|
|
33
33
|
* stands, so each root's shelf is read once past its last standing
|
|
34
34
|
* ancestor; entering another root reads that root's shelf anew. A walk's
|
|
35
35
|
* judgment is as fresh as that one read, as any walk of a tree is.
|
|
36
|
+
* - This computer's own folder in the computers folder is nowhere. What it
|
|
37
|
+
* holds already stands where it lives on this computer, so the drive never
|
|
38
|
+
* shows it a second time.
|
|
36
39
|
*/
|
|
37
40
|
import { isRepositoryMetadataEntry } from '../detection/classify.js';
|
|
38
41
|
import { collisionBases, materializedSlotNames } from '../entities/rules.js';
|
|
39
42
|
import { CONTAINERS } from '../entities/types.js';
|
|
43
|
+
import { FILES_FOLDER } from '../registration/home-layout.js';
|
|
40
44
|
export async function where(roots, path) {
|
|
41
45
|
return (await walk(roots, path)).where;
|
|
42
46
|
}
|
|
43
47
|
export async function walk(roots, path) {
|
|
48
|
+
if (ownComputer(roots, path))
|
|
49
|
+
return { root: roots.home, where: { kind: 'nowhere' } };
|
|
44
50
|
const placing = [];
|
|
45
51
|
let covered = false;
|
|
46
52
|
let root = roots.home;
|
|
@@ -117,6 +123,26 @@ export async function walk(roots, path) {
|
|
|
117
123
|
function unitOf(root, entity, address) {
|
|
118
124
|
return { root: root.uuid, uuid: entity.uuid, type: entity.type, address };
|
|
119
125
|
}
|
|
126
|
+
/** Whether a path is this computer's own folder in the computers folder, or
|
|
127
|
+
* beneath it. */
|
|
128
|
+
function ownComputer(roots, path) {
|
|
129
|
+
return roots.computer !== null && path.length >= 2 && path[0] === FILES_FOLDER && path[1] === roots.computer;
|
|
130
|
+
}
|
|
131
|
+
/** Whether a path's judgment names an address, not ground: the computers
|
|
132
|
+
* folder and everything the home holds beneath it (each computer's folder,
|
|
133
|
+
* the folders of an added folder's path, its reference), and the top of a
|
|
134
|
+
* root a reference leads into. They say where a folder lives on its
|
|
135
|
+
* computer; only that computer moves it, so no computer creates, renames or
|
|
136
|
+
* removes them through its drive. Inside an entered root everything is
|
|
137
|
+
* ground, except beneath this computer's own folder, whose ground the drive
|
|
138
|
+
* never shows. */
|
|
139
|
+
export function addressOnly(roots, path, at) {
|
|
140
|
+
if (ownComputer(roots, path))
|
|
141
|
+
return true;
|
|
142
|
+
if (!('root' in at))
|
|
143
|
+
return false;
|
|
144
|
+
return at.root === roots.home.uuid ? at.address[0] === FILES_FOLDER : at.address.length === 0;
|
|
145
|
+
}
|
|
120
146
|
/** The active child standing at a name: a sole owner keeps its bare name
|
|
121
147
|
* whatever its siblings do, so one holder answers at once. A name nobody
|
|
122
148
|
* holds that no shared slot can derive is nobody's. Only a shared slot, held
|
package/dist/drive/where.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"where.js","sourceRoot":"","sources":["../../src/drive/where.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"where.js","sourceRoot":"","sources":["../../src/drive/where.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AA+C9D,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,KAAgB,EAAE,IAAuB;IACnE,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AACzC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,KAAgB,EAAE,IAAuB;IAClE,IAAI,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,IA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B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5F,OAAO;QACL,IAAI;QACJ,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,IAAI;QACJ,IAAI,EAAE,MAAM,CAAC,QAAQ;QACrB,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC;AAED;;uBAEuB;AACvB,MAAM,UAAU,MAAM,CAAC,IAAuB;IAC5C,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,WAAW,CAAC;IAC7C,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,aAAa;QAAE,OAAO,MAAM,CAAC;IAClE,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,WAAW;QAAE,OAAO,MAAM,CAAC;IAC3D,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,2BAA2B,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,QAA8B;IACnD,OAAO,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC;AAC/D,CAAC"}
|
package/dist/files/commands.d.ts
CHANGED
|
@@ -10,13 +10,18 @@ export interface FilesRegisterPorts {
|
|
|
10
10
|
/** Resolve and prove an external directory without enrolling its contents. */
|
|
11
11
|
inspectExternalWorkspace(path: string): Promise<ExternalWorkspaceInspection>;
|
|
12
12
|
readonly randomUuid: () => string;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
|
|
13
|
+
/** This computer's folder in the computers folder (`computerFolder`),
|
|
14
|
+
* chosen once and kept. */
|
|
15
|
+
computerFolder(): Promise<string>;
|
|
16
|
+
/** The sole effect of register: render the reference at `address` and the
|
|
17
|
+
* local binding, after placing `starterPolicy` as the root's `.amalgmignore`
|
|
18
|
+
* when given and nothing stands at that name, so its first observation
|
|
19
|
+
* already reads it. */
|
|
16
20
|
declareWorkspaceReference(input: {
|
|
17
21
|
readonly workspaceId: string;
|
|
18
|
-
readonly workspaceName: string;
|
|
19
22
|
readonly absolutePath: string;
|
|
23
|
+
/** Where the reference stands in the home (`computerAddress`). */
|
|
24
|
+
readonly address: readonly string[];
|
|
20
25
|
readonly starterPolicy: string | null;
|
|
21
26
|
}): Promise<{
|
|
22
27
|
readonly created: boolean;
|
|
@@ -50,9 +55,12 @@ export interface FilesAddPorts {
|
|
|
50
55
|
* revealed root's Watch coverage, opened on the install's own verified graph
|
|
51
56
|
* as its one baseline only when nothing crossed a blind interval. Return
|
|
52
57
|
* with the intent still durable; healthy Watch coverage is the completion
|
|
53
|
-
* gate that clears it. Each accepted reference is
|
|
54
|
-
* machine
|
|
55
|
-
* already owned by Apply or Detect, is never overwritten by Add
|
|
58
|
+
* gate that clears it. Each accepted reference is current on this
|
|
59
|
+
* machine, named as still syncing (newer local work, or a transition
|
|
60
|
+
* already owned by Apply or Detect, is never overwritten by Add), or named
|
|
61
|
+
* as listed: its home is served by this computer's drive and the folders
|
|
62
|
+
* on its way are only listed, so the drive places it when something opens
|
|
63
|
+
* it. */
|
|
56
64
|
materializeWorkspace(input: {
|
|
57
65
|
readonly workspace: CloudEntityRecord;
|
|
58
66
|
readonly reference: CloudEntityRecord;
|
|
@@ -73,6 +81,7 @@ export interface FilesAddPorts {
|
|
|
73
81
|
readonly reference: CloudEntityRecord;
|
|
74
82
|
readonly references: readonly CloudEntityRecord[];
|
|
75
83
|
readonly syncingReferences: readonly string[];
|
|
84
|
+
readonly listedReferences: readonly string[];
|
|
76
85
|
readonly alreadyMaterialized: boolean;
|
|
77
86
|
}>;
|
|
78
87
|
/** Prove the one Watch owner the install opened. A recovered visible
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/files/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,iBAAiB,E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IACtC,QAAQ,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAChD,CAsBA;AAED,gFAAgF;AAChF,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,iBAAiB,EAAE,MAAM,EACzB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,cAAc,CAAC,CAuDzB"}
|
package/dist/files/commands.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CONTAINERS, UUID_PATTERN, containedRecords, installedSubtree, materializableRecords, sameRecords, snapshotFromRecords, } from '../entities/index.js';
|
|
2
2
|
import { DEFAULT_AMALGM_IGNORE } from '../detection/enrollment.js';
|
|
3
|
+
import { computerAddress } from './computer-address.js';
|
|
3
4
|
function uuid(value, label) {
|
|
4
5
|
const normalized = typeof value === 'string' ? value.trim().toLowerCase() : '';
|
|
5
6
|
if (!UUID_PATTERN.test(normalized))
|
|
@@ -29,8 +30,8 @@ export async function registerFilesWorkspace(path, ports) {
|
|
|
29
30
|
// what the user does with the file after that is theirs.
|
|
30
31
|
const declared = await ports.declareWorkspaceReference({
|
|
31
32
|
workspaceId,
|
|
32
|
-
workspaceName,
|
|
33
33
|
absolutePath,
|
|
34
|
+
address: computerAddress(await ports.computerFolder(), absolutePath),
|
|
34
35
|
starterPolicy: inspected.workspaceId === null ? DEFAULT_AMALGM_IGNORE : null,
|
|
35
36
|
});
|
|
36
37
|
return {
|
|
@@ -93,6 +94,8 @@ export async function addFilesWorkspace(workspaceId, destinationParent, ports) {
|
|
|
93
94
|
});
|
|
94
95
|
const installedRecords = snapshotFromRecords(installed.records || []).records;
|
|
95
96
|
const syncing = new Set(installed.syncingReferences);
|
|
97
|
+
const listed = new Set(installed.listedReferences);
|
|
98
|
+
const accepted = new Set(references.map(({ uuid }) => uuid));
|
|
96
99
|
// An install must persist exactly the head it selected. A completed Add's
|
|
97
100
|
// rows are already on their rails, Apply owning accepted transitions and
|
|
98
101
|
// Detect local ones, so its difference from the head is syncing work.
|
|
@@ -102,8 +105,10 @@ export async function addFilesWorkspace(workspaceId, destinationParent, ports) {
|
|
|
102
105
|
|| (!current && installed.alreadyMaterialized !== true)
|
|
103
106
|
|| !sameRecords([installed.reference], [selected.reference])
|
|
104
107
|
|| syncing.size !== installed.syncingReferences.length
|
|
105
|
-
||
|
|
106
|
-
||
|
|
108
|
+
|| listed.size !== installed.listedReferences.length
|
|
109
|
+
|| [...syncing].some((id) => !accepted.has(id))
|
|
110
|
+
|| [...listed].some((id) => !accepted.has(id) || syncing.has(id))
|
|
111
|
+
|| !sameRecords(installed.references, references.filter(({ uuid }) => !syncing.has(uuid) && !listed.has(uuid)))) {
|
|
107
112
|
throw new Error('workspace materialization did not persist exactly the selected graph');
|
|
108
113
|
}
|
|
109
114
|
const coverage = await ports.coverWorkspace({ workspaceId: normalizedId });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/files/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,GAGpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/files/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,GAGpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA2CxD,SAAS,IAAI,CAAC,KAAc,EAAE,KAAa;IACzC,MAAM,UAAU,GAA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AS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK,CAAC,QAAQ;QACzB,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,SAAS,CAAC,mBAAmB,KAAK,IAAI;QAC3D,OAAO,EAAE,CAAC,OAAO;QACjB,iBAAiB,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,EAAE;QACtC,YAAY,EAAE,QAAQ,CAAC,KAAK;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** The folder a computer stands at in the computers folder: its name made
|
|
2
|
+
* safe for every disk, with `-2`, `-3`, … when another computer already holds
|
|
3
|
+
* that name in any letter case. A host chooses it once, from the names the
|
|
4
|
+
* accepted graph holds there, and keeps it. */
|
|
5
|
+
export declare function computerFolder(name: string, taken: Iterable<string>): string;
|
|
6
|
+
/** The address in the home of a folder at an absolute path on a computer:
|
|
7
|
+
* the computers folder, the computer's folder, then each segment of the path.
|
|
8
|
+
* A POSIX path splits on `/`; a Windows drive path keeps its letter as the
|
|
9
|
+
* first segment. A path naming no folder below a disk's top is refused. */
|
|
10
|
+
export declare function computerAddress(computer: string, absolutePath: string): string[];
|
|
11
|
+
//# sourceMappingURL=computer-address.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computer-address.d.ts","sourceRoot":"","sources":["../../src/files/computer-address.ts"],"names":[],"mappings":"AAeA;;;+CAG+C;AAC/C,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAE5E;AAED;;;2EAG2E;AAC3E,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAOhF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where ground outside the Amalgm folder lives in the home: the computers
|
|
3
|
+
* folder holds one folder per computer, and in it each added folder stands at
|
|
4
|
+
* the absolute path it has on that computer. Every computer shows it at the
|
|
5
|
+
* same address, `files/<computer>/<path>`, so a folder from one computer is
|
|
6
|
+
* found where its own computer keeps it. Only the folders on that path that
|
|
7
|
+
* Amalgm holds exist; the rest of the computer's disk is no part of the home.
|
|
8
|
+
*/
|
|
9
|
+
import { entityFolderName } from '@amalgm/core/identity';
|
|
10
|
+
import { isName } from '../entities/rules.js';
|
|
11
|
+
import { FILES_FOLDER } from '../registration/home-layout.js';
|
|
12
|
+
/** A Windows drive path: its letter, then the rest. */
|
|
13
|
+
const WINDOWS_DRIVE = /^([A-Za-z]):[\\/](.*)$/;
|
|
14
|
+
/** The folder a computer stands at in the computers folder: its name made
|
|
15
|
+
* safe for every disk, with `-2`, `-3`, … when another computer already holds
|
|
16
|
+
* that name in any letter case. A host chooses it once, from the names the
|
|
17
|
+
* accepted graph holds there, and keeps it. */
|
|
18
|
+
export function computerFolder(name, taken) {
|
|
19
|
+
return entityFolderName(name, taken);
|
|
20
|
+
}
|
|
21
|
+
/** The address in the home of a folder at an absolute path on a computer:
|
|
22
|
+
* the computers folder, the computer's folder, then each segment of the path.
|
|
23
|
+
* A POSIX path splits on `/`; a Windows drive path keeps its letter as the
|
|
24
|
+
* first segment. A path naming no folder below a disk's top is refused. */
|
|
25
|
+
export function computerAddress(computer, absolutePath) {
|
|
26
|
+
const segments = pathSegments(absolutePath);
|
|
27
|
+
if (segments.length === 0)
|
|
28
|
+
throw new Error(`an added folder must stand below its disk's top, not at ${JSON.stringify(absolutePath)}`);
|
|
29
|
+
for (const name of [computer, ...segments]) {
|
|
30
|
+
if (!isName(name))
|
|
31
|
+
throw new Error(`invalid entity name ${JSON.stringify(name)}: a name is one non-empty path segment`);
|
|
32
|
+
}
|
|
33
|
+
return [FILES_FOLDER, computer, ...segments];
|
|
34
|
+
}
|
|
35
|
+
function pathSegments(absolutePath) {
|
|
36
|
+
const windows = WINDOWS_DRIVE.exec(absolutePath);
|
|
37
|
+
if (windows !== null) {
|
|
38
|
+
const rest = windows[2].split(/[\\/]/).filter(segment => segment !== '');
|
|
39
|
+
return rest.length === 0 ? [] : [windows[1].toUpperCase(), ...rest];
|
|
40
|
+
}
|
|
41
|
+
if (!absolutePath.startsWith('/'))
|
|
42
|
+
throw new Error(`${JSON.stringify(absolutePath)} is not an absolute path`);
|
|
43
|
+
return absolutePath.split('/').filter(segment => segment !== '');
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=computer-address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computer-address.js","sourceRoot":"","sources":["../../src/files/computer-address.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,uDAAuD;AACvD,MAAM,aAAa,GAAG,wBAAwB,CAAC;AAE/C;;;+CAG+C;AAC/C,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,KAAuB;IAClE,OAAO,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACvC,CAAC;AAED;;;2EAG2E;AAC3E,MAAM,UAAU,eAAe,CAAC,QAAgB,EAAE,YAAoB;IACpE,MAAM,QAAQ,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;IAC5C,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,2DAA2D,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IACtI,KAAK,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,GAAG,QAAQ,CAAC,EAAE,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;IAC1H,CAAC;IACD,OAAO,CAAC,YAAY,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,YAAY,CAAC,YAAoB;IACxC,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACjD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,GAAI,OAAO,CAAC,CAAC,CAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC;QACrF,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,OAAO,CAAC,CAAC,CAAY,CAAC,WAAW,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;IAClF,CAAC;IACD,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,0BAA0B,CAAC,CAAC;IAC9G,OAAO,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC;AACnE,CAAC"}
|
package/dist/files/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Files product operations. Hosts own effects; Live owns decisions. */
|
|
2
2
|
export * from './commands.js';
|
|
3
|
+
export { computerAddress, computerFolder } from './computer-address.js';
|
|
3
4
|
export { createFilesApi } from './api.js';
|
|
4
5
|
export { FilesBrowser } from './browser.js';
|
|
5
6
|
export type { AmalgmFileRead, FilesBrowserOptions, LocalFileRead } from './browser.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/files/index.ts"],"names":[],"m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mB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtG,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/files/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Files product operations. Hosts own effects; Live owns decisions. */
|
|
2
2
|
export * from './commands.js';
|
|
3
|
+
export { computerAddress, computerFolder } from './computer-address.js';
|
|
3
4
|
export { createFilesApi } from './api.js';
|
|
4
5
|
export { FilesBrowser } from './browser.js';
|
|
5
6
|
export { FilesRequestError, amalgmUserRoot } from './browse-types.js';
|
package/dist/files/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/files/index.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAWtE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/files/index.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAWtE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
* drive places, rather than lists. One rule for login and for Apply, so the
|
|
4
4
|
* two never disagree about what stands on the shelf.
|
|
5
5
|
*/
|
|
6
|
+
/** The home folder that holds ground outside the Amalgm folder: one folder
|
|
7
|
+
* per computer, and in it each added folder at the absolute path it has on
|
|
8
|
+
* that computer (files/computer-address.ts). */
|
|
9
|
+
export declare const FILES_FOLDER = "files";
|
|
6
10
|
/** Whether a drive computer places an entry of its home rather than listing
|
|
7
11
|
* it. `top` names the entry at the top of the home that the entry is, or
|
|
8
12
|
* stands beneath; `beneath` says which. The runtime's own entries are placed
|
|
9
|
-
* whole, like a folder kept on the computer. The projects folder
|
|
10
|
-
* bare, so the runtime can stand in
|
|
11
|
-
* Anything else a person made at the top of the
|
|
12
|
-
* by this rule, and Apply places by it what
|
|
13
|
+
* whole, like a folder kept on the computer. The projects folder and the
|
|
14
|
+
* computers folder are placed bare, so the runtime can stand in them, and
|
|
15
|
+
* what each holds is listed. Anything else a person made at the top of the
|
|
16
|
+
* home is listed. Login places by this rule, and Apply places by it what
|
|
17
|
+
* arrives later. */
|
|
13
18
|
export declare function placedAtHome(top: string, beneath: boolean): boolean;
|
|
14
19
|
//# sourceMappingURL=home-layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-layout.d.ts","sourceRoot":"","sources":["../../src/registration/home-layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH
|
|
1
|
+
{"version":3,"file":"home-layout.d.ts","sourceRoot":"","sources":["../../src/registration/home-layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH;;gDAEgD;AAChD,eAAO,MAAM,YAAY,UAAU,CAAC;AAEpC;;;;;;;oBAOoB;AACpB,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAEnE"}
|
|
@@ -15,14 +15,19 @@ const RUNTIME_ENTRIES = new Set([
|
|
|
15
15
|
].map(named));
|
|
16
16
|
/** The home folder that holds people's projects (Core's layout). */
|
|
17
17
|
const PROJECTS_FOLDER = named(HOME.workspaces);
|
|
18
|
+
/** The home folder that holds ground outside the Amalgm folder: one folder
|
|
19
|
+
* per computer, and in it each added folder at the absolute path it has on
|
|
20
|
+
* that computer (files/computer-address.ts). */
|
|
21
|
+
export const FILES_FOLDER = 'files';
|
|
18
22
|
/** Whether a drive computer places an entry of its home rather than listing
|
|
19
23
|
* it. `top` names the entry at the top of the home that the entry is, or
|
|
20
24
|
* stands beneath; `beneath` says which. The runtime's own entries are placed
|
|
21
|
-
* whole, like a folder kept on the computer. The projects folder
|
|
22
|
-
* bare, so the runtime can stand in
|
|
23
|
-
* Anything else a person made at the top of the
|
|
24
|
-
* by this rule, and Apply places by it what
|
|
25
|
+
* whole, like a folder kept on the computer. The projects folder and the
|
|
26
|
+
* computers folder are placed bare, so the runtime can stand in them, and
|
|
27
|
+
* what each holds is listed. Anything else a person made at the top of the
|
|
28
|
+
* home is listed. Login places by this rule, and Apply places by it what
|
|
29
|
+
* arrives later. */
|
|
25
30
|
export function placedAtHome(top, beneath) {
|
|
26
|
-
return RUNTIME_ENTRIES.has(top) || (!beneath && top === PROJECTS_FOLDER);
|
|
31
|
+
return RUNTIME_ENTRIES.has(top) || (!beneath && (top === PROJECTS_FOLDER || top === FILES_FOLDER));
|
|
27
32
|
}
|
|
28
33
|
//# sourceMappingURL=home-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-layout.js","sourceRoot":"","sources":["../../src/registration/home-layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,O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,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC;AAEpC;;;;;;;oBAOoB;AACpB,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,OAAgB;IACxD,OAAO,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,KAAK,eAAe,IAAI,GAAG,KAAK,YAAY,CAAC,CAAC,CAAC;AACrG,CAAC"}
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
*
|
|
39
39
|
* A root places some of its entries whatever their unit. A home places
|
|
40
40
|
* what login places (registration/home-layout.ts placedAtHome): the
|
|
41
|
-
* runtime's own entries whole, and the projects
|
|
42
|
-
* result at or beneath one of the runtime's own entries
|
|
43
|
-
* folder that arrives enters without
|
|
44
|
-
* listed. Any other root, such as a workspace a
|
|
45
|
-
* places only its sharing policy at its top,
|
|
46
|
-
* there. `placedInRoot` asks this of each member of an Enter too.
|
|
41
|
+
* runtime's own entries whole, and the projects and computers folders bare.
|
|
42
|
+
* So in a home a result at or beneath one of the runtime's own entries
|
|
43
|
+
* enters, a projects or computers folder that arrives enters without what it
|
|
44
|
+
* holds, and anything else is listed. Any other root, such as a workspace a
|
|
45
|
+
* home's reference leads to, places only its sharing policy at its top,
|
|
46
|
+
* which Detect reads from disk there. `placedInRoot` asks this of each member of an Enter too.
|
|
47
47
|
*
|
|
48
48
|
* A construct is its own root and its own authority, and has no ground.
|
|
49
49
|
* Holding its line is this computer's selection of it, so every active
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/drive/contracts.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/drive/contracts.ts"],"names":[],"mappings":";;;AAyHA;iEACiE;AACjE,MAAa,UAAW,SAAQ,KAAK;IAC1B,IAAI,CAAuB;IACpC,oCAAoC;IAC3B,IAAI,CAAO;IACpB;sEACkE;IACzD,MA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MAAM,aAAa,GAAwB,IAAI,GAAG,CAChD,CAAC,aAAa,EAAE,SAAS,EAAE,OAAO,CAAkC,CACrE,CAAC"}
|
package/dist-cjs/drive/drive.js
CHANGED
|
@@ -22,7 +22,20 @@ class Drive {
|
|
|
22
22
|
* places nothing. Rejects with a `DriveError` when a unit could not be
|
|
23
23
|
* placed; the shelf is then as it was. */
|
|
24
24
|
async touch(path) {
|
|
25
|
+
return this.settle(path, await this.where(path));
|
|
26
|
+
}
|
|
27
|
+
/** A touch for an operation that changes the address itself: a creation,
|
|
28
|
+
* rename, removal, truncation or change of its mode, owner or times. Null,
|
|
29
|
+
* placing nothing, when the address names no ground: the computers folder,
|
|
30
|
+
* the folders of an added folder's path, its reference, and the top of the
|
|
31
|
+
* root it leads into say where a folder lives on its computer, and only
|
|
32
|
+
* that computer moves it. Beneath this computer's own folder there is
|
|
33
|
+
* nothing to change: the drive never shows it. */
|
|
34
|
+
async change(path) {
|
|
25
35
|
const before = await this.where(path);
|
|
36
|
+
return (0, where_js_1.addressOnly)(this.ports.roots, path, before) ? null : this.settle(path, before);
|
|
37
|
+
}
|
|
38
|
+
async settle(path, before) {
|
|
26
39
|
const placing = 'placing' in before ? before.placing : [];
|
|
27
40
|
const placed = placing.length === 0 ? [] : await this.placements.place(placing);
|
|
28
41
|
return { where: placed.length === 0 ? before : await this.where(path), placed };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive.js","sourceRoot":"","sources":["../../src/drive/drive.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"drive.js","sourceRoot":"","sources":["../../src/drive/drive.ts"],"names":[],"mappings":";;;AAeA,6CAAqD;AACrD,mDAA2D;AAC3D,yCAA4D;AAQ5D,MAAa,KAAK;IAGa;IAFZ,UAAU,CAAa;IAExC,YAA6B,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;QAC5C,IAAI,CAAC,UAAU,GAAG,IAAI,0BAAU,CAAC,KAAK,CAAC,CAAC;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,CAAC;IAClF,CAAC;IAED,wEAAwE;IACxE,OAAO;QACL,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IACjC,CAAC;CACF;AA7CD,sBA6CC"}
|
|
@@ -9,28 +9,33 @@ exports.listing = listing;
|
|
|
9
9
|
* person's graph holds is listed as a directory, since the walk shows that
|
|
10
10
|
* root inline where the reference stands. An unplaced repository lists its
|
|
11
11
|
* files from the map and its `.git` as a door, so finding a repository needs
|
|
12
|
-
* no bytes; only listing inside the door places it first.
|
|
12
|
+
* no bytes; only listing inside the door places it first. The computers
|
|
13
|
+
* folder never lists this computer's own folder: the walk finds it nowhere.
|
|
13
14
|
*/
|
|
14
15
|
const classify_js_1 = require("../detection/classify.js");
|
|
15
16
|
const types_js_1 = require("../entities/types.js");
|
|
17
|
+
const home_layout_js_1 = require("../registration/home-layout.js");
|
|
16
18
|
const where_js_1 = require("./where.js");
|
|
17
19
|
async function listing(roots, path) {
|
|
18
20
|
const { where: at, root } = await (0, where_js_1.walk)(roots, path);
|
|
19
21
|
switch (at.kind) {
|
|
20
22
|
case 'shelf': {
|
|
23
|
+
const hidden = hiddenAt(roots, at.root, at.address);
|
|
21
24
|
if (at.entity === null || !types_js_1.CONTAINERS.has(at.entity.type))
|
|
22
|
-
return { kind: 'entries', root: at.root, address: at.address, entries: [], doors: [], complete: false };
|
|
25
|
+
return { kind: 'entries', root: at.root, address: at.address, entries: [], doors: [], hidden, complete: false };
|
|
23
26
|
const shelf = new Set(root.shelf.names(at.address) ?? []);
|
|
24
27
|
const unplaced = (0, where_js_1.derivedNames)((0, where_js_1.active)(root.map.children(at.entity.uuid)))
|
|
25
|
-
.filter(([child, name]) => !root.map.placed(child.uuid) && !shelf.has(name));
|
|
26
|
-
return { kind: 'entries', root: at.root, address: at.address, entries: await entries(roots, unplaced), doors: [], complete: false };
|
|
28
|
+
.filter(([child, name]) => !root.map.placed(child.uuid) && !shelf.has(name) && !hidden.includes(name));
|
|
29
|
+
return { kind: 'entries', root: at.root, address: at.address, entries: await entries(roots, unplaced), doors: [], hidden, complete: false };
|
|
27
30
|
}
|
|
28
31
|
case 'listed': {
|
|
29
32
|
if (at.entry.kind !== 'directory')
|
|
30
33
|
return { kind: 'notdir' };
|
|
31
|
-
const
|
|
34
|
+
const hidden = hiddenAt(roots, at.root, at.address);
|
|
35
|
+
const children = (0, where_js_1.derivedNames)((0, where_js_1.active)(root.map.children(at.entry.uuid)))
|
|
36
|
+
.filter(([, name]) => !hidden.includes(name));
|
|
32
37
|
const doors = at.entry.type === 'repo.git' ? [classify_js_1.REPOSITORY_METADATA] : [];
|
|
33
|
-
return { kind: 'entries', root: at.root, address: at.address, entries: await entries(roots, children), doors, complete: true };
|
|
38
|
+
return { kind: 'entries', root: at.root, address: at.address, entries: await entries(roots, children), doors, hidden, complete: true };
|
|
34
39
|
}
|
|
35
40
|
case 'door':
|
|
36
41
|
return { kind: 'place-first', placing: at.placing };
|
|
@@ -40,6 +45,12 @@ async function listing(roots, path) {
|
|
|
40
45
|
return at;
|
|
41
46
|
}
|
|
42
47
|
}
|
|
48
|
+
/** The names a listing leaves out at an address: this computer's own folder,
|
|
49
|
+
* in the home's computers folder. */
|
|
50
|
+
function hiddenAt(roots, root, address) {
|
|
51
|
+
const computers = root === roots.home.uuid && address.length === 1 && address[0] === home_layout_js_1.FILES_FOLDER;
|
|
52
|
+
return computers && roots.computer !== null ? [roots.computer] : [];
|
|
53
|
+
}
|
|
43
54
|
/** Each child's entry at its name; a reference leading into a root this
|
|
44
55
|
* person holds is a directory. */
|
|
45
56
|
async function entries(roots, children) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listing.js","sourceRoot":"","sources":["../../src/drive/listing.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"listing.js","sourceRoot":"","sources":["../../src/drive/listing.ts"],"names":[],"mappings":";;AA8BA,0BA0BC;AAxDD;;;;;;;;;;GAUG;AACH,0DAA+D;AAC/D,mDAAkD;AAClD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,CAAC;QACtD,KAAK,QAAQ;YACX,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC7B;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED;qCACqC;AACrC,SAAS,QAAQ,CAAC,KAAgB,EAAE,IAAY,EAAE,OAA0B;IAC1E,MAAM,SAAS,GAAG,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,KAAK,6BAAY,CAAC;IAClG,OAAO,SAAS,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACtE,CAAC;AAED;kCACkC;AAClC,KAAK,UAAU,OAAO,CAAC,KAAgB,EAAE,QAAwC;IAC/E,MAAM,MAAM,GAAY,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,QAAQ,EAAE,CAAC;QACrC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,KAAK,WAAW,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;QAC9G,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAA,kBAAO,EAAC,KAAK,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,IAAA,kBAAO,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist-cjs/drive/where.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.where = where;
|
|
4
4
|
exports.walk = walk;
|
|
5
|
+
exports.addressOnly = addressOnly;
|
|
5
6
|
exports.childAt = childAt;
|
|
6
7
|
exports.derivedNames = derivedNames;
|
|
7
8
|
exports.entryOf = entryOf;
|
|
@@ -42,14 +43,20 @@ exports.active = active;
|
|
|
42
43
|
* stands, so each root's shelf is read once past its last standing
|
|
43
44
|
* ancestor; entering another root reads that root's shelf anew. A walk's
|
|
44
45
|
* judgment is as fresh as that one read, as any walk of a tree is.
|
|
46
|
+
* - This computer's own folder in the computers folder is nowhere. What it
|
|
47
|
+
* holds already stands where it lives on this computer, so the drive never
|
|
48
|
+
* shows it a second time.
|
|
45
49
|
*/
|
|
46
50
|
const classify_js_1 = require("../detection/classify.js");
|
|
47
51
|
const rules_js_1 = require("../entities/rules.js");
|
|
48
52
|
const types_js_1 = require("../entities/types.js");
|
|
53
|
+
const home_layout_js_1 = require("../registration/home-layout.js");
|
|
49
54
|
async function where(roots, path) {
|
|
50
55
|
return (await walk(roots, path)).where;
|
|
51
56
|
}
|
|
52
57
|
async function walk(roots, path) {
|
|
58
|
+
if (ownComputer(roots, path))
|
|
59
|
+
return { root: roots.home, where: { kind: 'nowhere' } };
|
|
53
60
|
const placing = [];
|
|
54
61
|
let covered = false;
|
|
55
62
|
let root = roots.home;
|
|
@@ -126,6 +133,26 @@ async function walk(roots, path) {
|
|
|
126
133
|
function unitOf(root, entity, address) {
|
|
127
134
|
return { root: root.uuid, uuid: entity.uuid, type: entity.type, address };
|
|
128
135
|
}
|
|
136
|
+
/** Whether a path is this computer's own folder in the computers folder, or
|
|
137
|
+
* beneath it. */
|
|
138
|
+
function ownComputer(roots, path) {
|
|
139
|
+
return roots.computer !== null && path.length >= 2 && path[0] === home_layout_js_1.FILES_FOLDER && path[1] === roots.computer;
|
|
140
|
+
}
|
|
141
|
+
/** Whether a path's judgment names an address, not ground: the computers
|
|
142
|
+
* folder and everything the home holds beneath it (each computer's folder,
|
|
143
|
+
* the folders of an added folder's path, its reference), and the top of a
|
|
144
|
+
* root a reference leads into. They say where a folder lives on its
|
|
145
|
+
* computer; only that computer moves it, so no computer creates, renames or
|
|
146
|
+
* removes them through its drive. Inside an entered root everything is
|
|
147
|
+
* ground, except beneath this computer's own folder, whose ground the drive
|
|
148
|
+
* never shows. */
|
|
149
|
+
function addressOnly(roots, path, at) {
|
|
150
|
+
if (ownComputer(roots, path))
|
|
151
|
+
return true;
|
|
152
|
+
if (!('root' in at))
|
|
153
|
+
return false;
|
|
154
|
+
return at.root === roots.home.uuid ? at.address[0] === home_layout_js_1.FILES_FOLDER : at.address.length === 0;
|
|
155
|
+
}
|
|
129
156
|
/** The active child standing at a name: a sole owner keeps its bare name
|
|
130
157
|
* whatever its siblings do, so one holder answers at once. A name nobody
|
|
131
158
|
* holds that no shared slot can derive is nobody's. Only a shared slot, held
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"where.js","sourceRoot":"","sources":["../../src/drive/where.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"where.js","sourceRoot":"","sources":["../../src/drive/where.ts"],"names":[],"mappings":";;AA0FA,sBAEC;AAED,oBA6DC;AAoBD,kCAIC;AAMD,0BAQC;AAGD,oCAGC;AAKD,0BAUC;AAKD,wBAKC;AAED,wBAEC;AApOD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,0DAAqE;AACrE,mDAA6E;AAC7E,mDAAkD;AAElD,mEAA8D;AA+CvD,KAAK,UAAU,KAAK,CAAC,KAAgB,EAAE,IAAuB;IACnE,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AACzC,CAAC;AAEM,KAAK,UAAU,IAAI,CAAC,KAAgB,EAAE,IAAuB;IAClE,IAAI,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IACtF,MAAM,OAA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OAAO;QACL,IAAI;QACJ,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,IAAI;QACJ,IAAI,EAAE,MAAM,CAAC,QAAQ;QACrB,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC;AAED;;uBAEuB;AACvB,SAAgB,MAAM,CAAC,IAAuB;IAC5C,IAAI,qBAAU,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,WAAW,CAAC;IAC7C,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,aAAa;QAAE,OAAO,MAAM,CAAC;IAClE,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,WAAW;QAAE,OAAO,MAAM,CAAC;IAC3D,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,2BAA2B,CAAC,CAAC;AACxD,CAAC;AAED,SAAgB,MAAM,CAAC,QAA8B;IACnD,OAAO,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -5,6 +5,7 @@ exports.workspaceGraph = workspaceGraph;
|
|
|
5
5
|
exports.addFilesWorkspace = addFilesWorkspace;
|
|
6
6
|
const index_js_1 = require("../entities/index.js");
|
|
7
7
|
const enrollment_js_1 = require("../detection/enrollment.js");
|
|
8
|
+
const computer_address_js_1 = require("./computer-address.js");
|
|
8
9
|
function uuid(value, label) {
|
|
9
10
|
const normalized = typeof value === 'string' ? value.trim().toLowerCase() : '';
|
|
10
11
|
if (!index_js_1.UUID_PATTERN.test(normalized))
|
|
@@ -34,8 +35,8 @@ async function registerFilesWorkspace(path, ports) {
|
|
|
34
35
|
// what the user does with the file after that is theirs.
|
|
35
36
|
const declared = await ports.declareWorkspaceReference({
|
|
36
37
|
workspaceId,
|
|
37
|
-
workspaceName,
|
|
38
38
|
absolutePath,
|
|
39
|
+
address: (0, computer_address_js_1.computerAddress)(await ports.computerFolder(), absolutePath),
|
|
39
40
|
starterPolicy: inspected.workspaceId === null ? enrollment_js_1.DEFAULT_AMALGM_IGNORE : null,
|
|
40
41
|
});
|
|
41
42
|
return {
|
|
@@ -98,6 +99,8 @@ async function addFilesWorkspace(workspaceId, destinationParent, ports) {
|
|
|
98
99
|
});
|
|
99
100
|
const installedRecords = (0, index_js_1.snapshotFromRecords)(installed.records || []).records;
|
|
100
101
|
const syncing = new Set(installed.syncingReferences);
|
|
102
|
+
const listed = new Set(installed.listedReferences);
|
|
103
|
+
const accepted = new Set(references.map(({ uuid }) => uuid));
|
|
101
104
|
// An install must persist exactly the head it selected. A completed Add's
|
|
102
105
|
// rows are already on their rails, Apply owning accepted transitions and
|
|
103
106
|
// Detect local ones, so its difference from the head is syncing work.
|
|
@@ -107,8 +110,10 @@ async function addFilesWorkspace(workspaceId, destinationParent, ports) {
|
|
|
107
110
|
|| (!current && installed.alreadyMaterialized !== true)
|
|
108
111
|
|| !(0, index_js_1.sameRecords)([installed.reference], [selected.reference])
|
|
109
112
|
|| syncing.size !== installed.syncingReferences.length
|
|
110
|
-
||
|
|
111
|
-
||
|
|
113
|
+
|| listed.size !== installed.listedReferences.length
|
|
114
|
+
|| [...syncing].some((id) => !accepted.has(id))
|
|
115
|
+
|| [...listed].some((id) => !accepted.has(id) || syncing.has(id))
|
|
116
|
+
|| !(0, index_js_1.sameRecords)(installed.references, references.filter(({ uuid }) => !syncing.has(uuid) && !listed.has(uuid)))) {
|
|
112
117
|
throw new Error('workspace materialization did not persist exactly the selected graph');
|
|
113
118
|
}
|
|
114
119
|
const coverage = await ports.coverWorkspace({ workspaceId: normalizedId });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/files/commands.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/files/commands.ts"],"names":[],"m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;IAC9D,CAAC;IACD,OAAO;QACL,WAAW,EAAE,YAAY;QACzB,aAAa,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI;QACtC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,6BAA6B,CAAC;QAC7D,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK,CAAC,QAAQ;QACzB,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,SAAS,CAAC,mBAAmB,KAAK,IAAI;QAC3D,OAAO,EAAE,CAAC,OAAO;QACjB,iBAAiB,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,EAAE;QACtC,YAAY,EAAE,QAAQ,CAAC,KAAK;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.computerFolder = computerFolder;
|
|
4
|
+
exports.computerAddress = computerAddress;
|
|
5
|
+
/**
|
|
6
|
+
* Where ground outside the Amalgm folder lives in the home: the computers
|
|
7
|
+
* folder holds one folder per computer, and in it each added folder stands at
|
|
8
|
+
* the absolute path it has on that computer. Every computer shows it at the
|
|
9
|
+
* same address, `files/<computer>/<path>`, so a folder from one computer is
|
|
10
|
+
* found where its own computer keeps it. Only the folders on that path that
|
|
11
|
+
* Amalgm holds exist; the rest of the computer's disk is no part of the home.
|
|
12
|
+
*/
|
|
13
|
+
const identity_1 = require("@amalgm/core/identity");
|
|
14
|
+
const rules_js_1 = require("../entities/rules.js");
|
|
15
|
+
const home_layout_js_1 = require("../registration/home-layout.js");
|
|
16
|
+
/** A Windows drive path: its letter, then the rest. */
|
|
17
|
+
const WINDOWS_DRIVE = /^([A-Za-z]):[\\/](.*)$/;
|
|
18
|
+
/** The folder a computer stands at in the computers folder: its name made
|
|
19
|
+
* safe for every disk, with `-2`, `-3`, … when another computer already holds
|
|
20
|
+
* that name in any letter case. A host chooses it once, from the names the
|
|
21
|
+
* accepted graph holds there, and keeps it. */
|
|
22
|
+
function computerFolder(name, taken) {
|
|
23
|
+
return (0, identity_1.entityFolderName)(name, taken);
|
|
24
|
+
}
|
|
25
|
+
/** The address in the home of a folder at an absolute path on a computer:
|
|
26
|
+
* the computers folder, the computer's folder, then each segment of the path.
|
|
27
|
+
* A POSIX path splits on `/`; a Windows drive path keeps its letter as the
|
|
28
|
+
* first segment. A path naming no folder below a disk's top is refused. */
|
|
29
|
+
function computerAddress(computer, absolutePath) {
|
|
30
|
+
const segments = pathSegments(absolutePath);
|
|
31
|
+
if (segments.length === 0)
|
|
32
|
+
throw new Error(`an added folder must stand below its disk's top, not at ${JSON.stringify(absolutePath)}`);
|
|
33
|
+
for (const name of [computer, ...segments]) {
|
|
34
|
+
if (!(0, rules_js_1.isName)(name))
|
|
35
|
+
throw new Error(`invalid entity name ${JSON.stringify(name)}: a name is one non-empty path segment`);
|
|
36
|
+
}
|
|
37
|
+
return [home_layout_js_1.FILES_FOLDER, computer, ...segments];
|
|
38
|
+
}
|
|
39
|
+
function pathSegments(absolutePath) {
|
|
40
|
+
const windows = WINDOWS_DRIVE.exec(absolutePath);
|
|
41
|
+
if (windows !== null) {
|
|
42
|
+
const rest = windows[2].split(/[\\/]/).filter(segment => segment !== '');
|
|
43
|
+
return rest.length === 0 ? [] : [windows[1].toUpperCase(), ...rest];
|
|
44
|
+
}
|
|
45
|
+
if (!absolutePath.startsWith('/'))
|
|
46
|
+
throw new Error(`${JSON.stringify(absolutePath)} is not an absolute path`);
|
|
47
|
+
return absolutePath.split('/').filter(segment => segment !== '');
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=computer-address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computer-address.js","sourceRoot":"","sources":["../../src/files/computer-address.ts"],"names":[],"mappings":";;AAmBA,wCAEC;AAMD,0CAOC;AAlCD;;;;;;;GAOG;AACH,oDAAyD;AACzD,mDAA8C;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AC;IAClF,CAAC;IACD,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,0BAA0B,CAAC,CAAC;IAC9G,OAAO,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC;AACnE,CAAC"}
|
package/dist-cjs/files/index.js
CHANGED
|
@@ -14,9 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.LocalFiles = exports.CloudFilesView = exports.CloudFiles = exports.amalgmUserRoot = exports.FilesRequestError = exports.FilesBrowser = exports.createFilesApi = void 0;
|
|
17
|
+
exports.LocalFiles = exports.CloudFilesView = exports.CloudFiles = exports.amalgmUserRoot = exports.FilesRequestError = exports.FilesBrowser = exports.createFilesApi = exports.computerFolder = exports.computerAddress = void 0;
|
|
18
18
|
/** Files product operations. Hosts own effects; Live owns decisions. */
|
|
19
19
|
__exportStar(require("./commands.js"), exports);
|
|
20
|
+
var computer_address_js_1 = require("./computer-address.js");
|
|
21
|
+
Object.defineProperty(exports, "computerAddress", { enumerable: true, get: function () { return computer_address_js_1.computerAddress; } });
|
|
22
|
+
Object.defineProperty(exports, "computerFolder", { enumerable: true, get: function () { return computer_address_js_1.computerFolder; } });
|
|
20
23
|
var api_js_1 = require("./api.js");
|
|
21
24
|
Object.defineProperty(exports, "createFilesApi", { enumerable: true, get: function () { return api_js_1.createFilesApi; } });
|
|
22
25
|
var browser_js_1 = require("./browser.js");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/files/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wEAAwE;AACxE,gDAA8B;AAC9B,mCAA0C;AAAjC,wGAAA,cAAc,OAAA;AACvB,2CAA4C;AAAnC,0GAAA,YAAY,OAAA;AAErB,qDAAsE;AAA7D,oHAAA,iBAAiB,OAAA;AAAE,iHAAA,cAAc,OAAA;AAW1C,mDAA8D;AAArD,4GAAA,UAAU,OAAA;AAAE,gHAAA,cAAc,OAAA;AAEnC,mDAA8C;AAArC,4GAAA,UAAU,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/files/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wEAAwE;AACxE,gDAA8B;AAC9B,6DAAwE;AAA/D,sHAAA,eAAe,OAAA;AAAE,qHAAA,cAAc,OAAA;AACxC,mCAA0C;AAAjC,wGAAA,cAAc,OAAA;AACvB,2CAA4C;AAAnC,0GAAA,YAAY,OAAA;AAErB,qDAAsE;AAA7D,oHAAA,iBAAiB,OAAA;AAAE,iHAAA,cAAc,OAAA;AAW1C,mDAA8D;AAArD,4GAAA,UAAU,OAAA;AAAE,gHAAA,cAAc,OAAA;AAEnC,mDAA8C;AAArC,4GAAA,UAAU,OAAA"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* two never disagree about what stands on the shelf.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.FILES_FOLDER = void 0;
|
|
8
9
|
exports.placedAtHome = placedAtHome;
|
|
9
10
|
const identity_1 = require("@amalgm/core/identity");
|
|
10
11
|
const HOME = (0, identity_1.userLayout)('');
|
|
@@ -18,14 +19,19 @@ const RUNTIME_ENTRIES = new Set([
|
|
|
18
19
|
].map(named));
|
|
19
20
|
/** The home folder that holds people's projects (Core's layout). */
|
|
20
21
|
const PROJECTS_FOLDER = named(HOME.workspaces);
|
|
22
|
+
/** The home folder that holds ground outside the Amalgm folder: one folder
|
|
23
|
+
* per computer, and in it each added folder at the absolute path it has on
|
|
24
|
+
* that computer (files/computer-address.ts). */
|
|
25
|
+
exports.FILES_FOLDER = 'files';
|
|
21
26
|
/** Whether a drive computer places an entry of its home rather than listing
|
|
22
27
|
* it. `top` names the entry at the top of the home that the entry is, or
|
|
23
28
|
* stands beneath; `beneath` says which. The runtime's own entries are placed
|
|
24
|
-
* whole, like a folder kept on the computer. The projects folder
|
|
25
|
-
* bare, so the runtime can stand in
|
|
26
|
-
* Anything else a person made at the top of the
|
|
27
|
-
* by this rule, and Apply places by it what
|
|
29
|
+
* whole, like a folder kept on the computer. The projects folder and the
|
|
30
|
+
* computers folder are placed bare, so the runtime can stand in them, and
|
|
31
|
+
* what each holds is listed. Anything else a person made at the top of the
|
|
32
|
+
* home is listed. Login places by this rule, and Apply places by it what
|
|
33
|
+
* arrives later. */
|
|
28
34
|
function placedAtHome(top, beneath) {
|
|
29
|
-
return RUNTIME_ENTRIES.has(top) || (!beneath && top === PROJECTS_FOLDER);
|
|
35
|
+
return RUNTIME_ENTRIES.has(top) || (!beneath && (top === PROJECTS_FOLDER || top === exports.FILES_FOLDER));
|
|
30
36
|
}
|
|
31
37
|
//# sourceMappingURL=home-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-layout.js","sourceRoot":"","sources":["../../src/registration/home-layout.ts"],"names":[],"mappings":";AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"home-layout.js","sourceRoot":"","sources":["../../src/registration/home-layout.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA+BH,oCAEC;AA/BD,oDAAmD;AAEnD,MAAM,IAAI,GAAG,IAAA,qBAAU,EAAC,EAAE,CAAC,CAAC;AAC5B,MAAM,KAAK,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAG,CAAC;AAE/D;;;sDAGsD;AACtD,MAAM,eAAe,GAAwB,IAAI,GAAG,CAAC;IACnD,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU;CACxF,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AAEd,oEAAoE;AACpE,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAE/C;;gDAEgD;AACnC,QAAA,YAAY,GAAG,OAAO,CAAC;AAEpC;;;;;;;oBAOoB;AACpB,SAAgB,YAAY,CAAC,GAAW,EAAE,OAAgB;IACxD,OAAO,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,KAAK,eAAe,IAAI,GAAG,KAAK,oBAAY,CAAC,CAAC,CAAC;AACrG,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amalgm/live",
|
|
3
|
-
"version": "0.2.81-main.
|
|
3
|
+
"version": "0.2.81-main.41794545655",
|
|
4
4
|
"description": "Portable realtime SDK for Amalgm — wire contracts, mutation discipline, and delivery state machines behind host-injected adapters.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist-cjs/index.js",
|
|
@@ -112,11 +112,11 @@
|
|
|
112
112
|
"dependencies": {
|
|
113
113
|
"@amalgm/core": "0.5.1-main.41264319540"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "04762248891dc86807be9087ec61cfd99b413bc9",
|
|
116
116
|
"amalgmSource": {
|
|
117
117
|
"repository": "amalgm-inc/amalgm-live",
|
|
118
118
|
"branch": "main",
|
|
119
|
-
"commit": "
|
|
120
|
-
"occurrence": "
|
|
119
|
+
"commit": "04762248891dc86807be9087ec61cfd99b413bc9",
|
|
120
|
+
"occurrence": "41794545655"
|
|
121
121
|
}
|
|
122
122
|
}
|