@indigoai-us/hq-cloud 5.17.0 → 5.19.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/.github/workflows/ci.yml +19 -0
- package/.github/workflows/publish.yml +53 -0
- package/dist/cli/invite.js +4 -1
- package/dist/cli/invite.js.map +1 -1
- package/dist/cli/invite.test.js +3 -0
- package/dist/cli/invite.test.js.map +1 -1
- package/dist/cli/promote.js +3 -0
- package/dist/cli/promote.js.map +1 -1
- package/dist/cli/share.d.ts +7 -5
- package/dist/cli/share.d.ts.map +1 -1
- package/dist/cli/share.js +189 -18
- package/dist/cli/share.js.map +1 -1
- package/dist/cli/share.test.js +304 -3
- package/dist/cli/share.test.js.map +1 -1
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +98 -17
- package/dist/cli/sync.js.map +1 -1
- package/dist/cli/sync.test.js +314 -0
- package/dist/cli/sync.test.js.map +1 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +107 -18
- package/dist/context.js.map +1 -1
- package/dist/context.test.js +63 -14
- package/dist/context.test.js.map +1 -1
- package/dist/journal.d.ts +26 -0
- package/dist/journal.d.ts.map +1 -1
- package/dist/journal.js +31 -0
- package/dist/journal.js.map +1 -1
- package/dist/s3.d.ts +91 -0
- package/dist/s3.d.ts.map +1 -1
- package/dist/s3.js +245 -0
- package/dist/s3.js.map +1 -1
- package/dist/s3.test.js +347 -1
- package/dist/s3.test.js.map +1 -1
- package/dist/vault-client.d.ts +24 -0
- package/dist/vault-client.d.ts.map +1 -1
- package/dist/vault-client.js +29 -0
- package/dist/vault-client.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/invite.test.ts +3 -0
- package/src/cli/invite.ts +4 -1
- package/src/cli/promote.ts +3 -0
- package/src/cli/share.test.ts +377 -3
- package/src/cli/share.ts +241 -28
- package/src/cli/sync.test.ts +357 -0
- package/src/cli/sync.ts +133 -24
- package/src/context.test.ts +73 -14
- package/src/context.ts +116 -20
- package/src/journal.ts +33 -0
- package/src/s3.test.ts +415 -1
- package/src/s3.ts +271 -0
- package/src/vault-client.ts +37 -0
- package/tsconfig.json +12 -1
package/dist/journal.js
CHANGED
|
@@ -61,6 +61,37 @@ export function hashFile(filePath) {
|
|
|
61
61
|
const content = fs.readFileSync(filePath);
|
|
62
62
|
return crypto.createHash("sha256").update(content).digest("hex");
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Marker prepended to a symlink's target string before hashing for the
|
|
66
|
+
* journal. Mirrors the wire-side `SYMLINK_BODY_PREFIX` constant in
|
|
67
|
+
* `s3.ts` — same purpose, different namespace.
|
|
68
|
+
*
|
|
69
|
+
* Without this marker, a symlink to `real.md` and a regular file whose
|
|
70
|
+
* contents are exactly the bytes `real.md` produce identical journal
|
|
71
|
+
* hashes (both `sha256("real.md")`). When `skipUnchanged` is enabled,
|
|
72
|
+
* the planner would treat a regular-file → symlink replacement as
|
|
73
|
+
* "no change" and never upload the new symlink, leaving the remote
|
|
74
|
+
* representation stale forever — the pull side would then also see no
|
|
75
|
+
* drift via ETag and never repair.
|
|
76
|
+
*
|
|
77
|
+
* Hashing `sha256(prefix + target)` makes the two representations
|
|
78
|
+
* structurally inequal in journal-hash space, so skip-unchanged can
|
|
79
|
+
* never confuse them. The hash always varies with the target string,
|
|
80
|
+
* so target rewrites still re-fire uploads as expected.
|
|
81
|
+
*/
|
|
82
|
+
export const SYMLINK_HASH_PREFIX = "hq-symlink:";
|
|
83
|
+
/**
|
|
84
|
+
* Compute the journal hash for a symlink. Always use this helper
|
|
85
|
+
* (never inline `crypto.createHash` with the raw target) so the
|
|
86
|
+
* push side, the pull-planner, and the post-download stamp stay in
|
|
87
|
+
* lockstep on the prefixed-hash convention.
|
|
88
|
+
*/
|
|
89
|
+
export function hashSymlinkTarget(target) {
|
|
90
|
+
return crypto
|
|
91
|
+
.createHash("sha256")
|
|
92
|
+
.update(SYMLINK_HASH_PREFIX + target)
|
|
93
|
+
.digest("hex");
|
|
94
|
+
}
|
|
64
95
|
export function updateEntry(journal, relativePath, hash, size, direction, remoteEtag) {
|
|
65
96
|
const entry = {
|
|
66
97
|
hash,
|
package/dist/journal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journal.js","sourceRoot":"","sources":["../src/journal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAGjC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAC5C,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;AACpE,CAAC;AAED;;;;;GAKG;AACH,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;IACrD,IAAI,CAAC,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,kBAAkB,IAAI,oCAAoC,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,IAAI,CACd,WAAW,EAAE,EACb,GAAG,mBAAmB,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,mBAAmB,EA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AO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,QAAQ,CACtB,OAAoB,EACpB,YAAoB;IAEpB,OAAO,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,OAAoB,EACpB,YAAoB;IAEpB,OAAO,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC"}
|
package/dist/s3.d.ts
CHANGED
|
@@ -17,9 +17,100 @@ export interface UploadAuthor {
|
|
|
17
17
|
/** Email for human display. */
|
|
18
18
|
email: string;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* S3 user-metadata header that marks an object as a symlink record.
|
|
22
|
+
* The value is now an OPAQUE MARKER ('1') — the target lives in the
|
|
23
|
+
* object body. Earlier drafts of this feature stored the target in
|
|
24
|
+
* metadata (raw, then base64), but S3 user-metadata is HTTP-header-
|
|
25
|
+
* bound: total ≤ 2 KiB across all user-defined keys + values. A
|
|
26
|
+
* sufficiently long POSIX target (or one with author-metadata
|
|
27
|
+
* adding to the total) would exceed the limit and PutObject would
|
|
28
|
+
* reject the upload outright. Moving the target to the body — which
|
|
29
|
+
* has no such limit — makes target length bounded only by S3's 5 GB
|
|
30
|
+
* object size cap. The metadata header still serves as the read-
|
|
31
|
+
* time discriminator (cheaper than peeking at body bytes via HEAD).
|
|
32
|
+
*
|
|
33
|
+
* Backward compat: downloadFile prefers the body (sliced after
|
|
34
|
+
* SYMLINK_BODY_PREFIX) for the target string. If the body doesn't
|
|
35
|
+
* carry the prefix (a legacy upload from earlier in this PR's
|
|
36
|
+
* lifetime), it falls back to base64-decoding the metadata value —
|
|
37
|
+
* the round-trip-validating decoder returns raw or decoded as
|
|
38
|
+
* appropriate. Any prior in-flight upload still resolves correctly.
|
|
39
|
+
*/
|
|
40
|
+
export declare const SYMLINK_TARGET_META_KEY = "hq-symlink-target";
|
|
41
|
+
/**
|
|
42
|
+
* Constant value written to SYMLINK_TARGET_META_KEY. Any non-empty
|
|
43
|
+
* string would work as a discriminator — '1' is just compact and
|
|
44
|
+
* conventional for boolean flags in HTTP headers.
|
|
45
|
+
*/
|
|
46
|
+
export declare const SYMLINK_MARKER_META_VALUE = "1";
|
|
47
|
+
/**
|
|
48
|
+
* Encode a target for the S3 metadata header value. Retained as the
|
|
49
|
+
* legacy encoder so a downloader can still receive it and round-trip
|
|
50
|
+
* via decodeSymlinkMetadataValue, but new uploads use
|
|
51
|
+
* SYMLINK_MARKER_META_VALUE — the target lives in the body now.
|
|
52
|
+
*/
|
|
53
|
+
export declare function encodeSymlinkMetadataValue(target: string): string;
|
|
54
|
+
/**
|
|
55
|
+
* Decode a target from the S3 metadata header value. Used as a
|
|
56
|
+
* legacy fallback when the body doesn't carry SYMLINK_BODY_PREFIX
|
|
57
|
+
* (i.e. an in-flight upload from earlier in this PR before the
|
|
58
|
+
* marker-only metadata convention). Round-trip-validates: if the
|
|
59
|
+
* value isn't valid base64 of UTF-8, returns the raw string.
|
|
60
|
+
*/
|
|
61
|
+
export declare function decodeSymlinkMetadataValue(value: string): string;
|
|
62
|
+
/**
|
|
63
|
+
* Magic prefix prepended to symlink-record bodies on the wire. Two
|
|
64
|
+
* properties this gives us:
|
|
65
|
+
*
|
|
66
|
+
* 1. ETag distinguishability. S3 ETag = MD5(body). Without a prefix,
|
|
67
|
+
* a symlink whose target string equals some regular file's exact
|
|
68
|
+
* contents would produce the same ETag, and the LIST-based pull
|
|
69
|
+
* planner (which can't see per-object metadata) would classify a
|
|
70
|
+
* symlink ↔ regular-file transition as "no change" and never
|
|
71
|
+
* replace the local representation. The prefix makes those two
|
|
72
|
+
* shapes ETag-distinguishable for the realistic case (collision
|
|
73
|
+
* now requires a regular file whose contents *start* with this
|
|
74
|
+
* prefix, which is implausible for any non-malicious source).
|
|
75
|
+
*
|
|
76
|
+
* 2. Fallback discriminator. If user-metadata is ever lost (S3
|
|
77
|
+
* cross-region replication of object data only, manual S3 console
|
|
78
|
+
* copy that drops Metadata), the body prefix lets a downloader
|
|
79
|
+
* recover the symlink record without needing the metadata header.
|
|
80
|
+
* We don't currently rely on this fallback — the metadata header
|
|
81
|
+
* is still the primary discriminator on the read path — but the
|
|
82
|
+
* prefix keeps the option open and avoids painting us into a
|
|
83
|
+
* "metadata is the only signal" corner.
|
|
84
|
+
*
|
|
85
|
+
* Format: `hq-symlink:` + target string (UTF-8 bytes). No trailing
|
|
86
|
+
* newline. The colon separates the marker from the target so a future
|
|
87
|
+
* extension can encode additional fields if needed.
|
|
88
|
+
*/
|
|
89
|
+
export declare const SYMLINK_BODY_PREFIX = "hq-symlink:";
|
|
90
|
+
/**
|
|
91
|
+
* Encode/decode the symlink wire body. Kept as exported helpers so the
|
|
92
|
+
* format is centrally defined and tests can probe both sides without
|
|
93
|
+
* duplicating the prefix string.
|
|
94
|
+
*/
|
|
95
|
+
export declare function encodeSymlinkBody(target: string): Buffer;
|
|
20
96
|
export declare function uploadFile(ctx: EntityContext, localPath: string, key: string, author?: UploadAuthor): Promise<{
|
|
21
97
|
etag: string;
|
|
22
98
|
}>;
|
|
99
|
+
/**
|
|
100
|
+
* Upload a symlink as a zero-byte object whose user metadata carries the
|
|
101
|
+
* link's target string. Mirrors uploadFile's signature so callers can pick
|
|
102
|
+
* the right primitive once they've classified the entry as link vs file.
|
|
103
|
+
*
|
|
104
|
+
* The target string is stored verbatim — whatever fs.readlinkSync returned.
|
|
105
|
+
* Relative targets transfer cleanly across machines; absolute targets are
|
|
106
|
+
* preserved as-is and may be broken on a destination that doesn't share
|
|
107
|
+
* the source's $HOME layout. Cross-machine portability of absolute targets
|
|
108
|
+
* is out of scope for this primitive — the policy decision lives in the
|
|
109
|
+
* caller (currently: upload anyway, never silently rewrite).
|
|
110
|
+
*/
|
|
111
|
+
export declare function uploadSymlink(ctx: EntityContext, target: string, key: string, author?: UploadAuthor): Promise<{
|
|
112
|
+
etag: string;
|
|
113
|
+
}>;
|
|
23
114
|
export declare function downloadFile(ctx: EntityContext, key: string, localPath: string): Promise<void>;
|
|
24
115
|
export interface RemoteFile {
|
|
25
116
|
key: string;
|
package/dist/s3.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../src/s3.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAkBhD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AA6BD,wBAAsB,UAAU,CAC9B,GAAG,EAAE,aAAa,EAClB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAqC3B;AAED,wBAAsB,YAAY,CAChC,GAAG,EAAE,aAAa,EAClB,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../src/s3.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAkBhD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AA6BD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GA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AM,GACV,OAAO,CAAC;IAAE,YAAY,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,IAAI,CAAC,CAqBvG"}
|
package/dist/s3.js
CHANGED
|
@@ -46,6 +46,97 @@ function buildAuthorMetadata(author, createdAt) {
|
|
|
46
46
|
}
|
|
47
47
|
return meta;
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* S3 user-metadata header that marks an object as a symlink record.
|
|
51
|
+
* The value is now an OPAQUE MARKER ('1') — the target lives in the
|
|
52
|
+
* object body. Earlier drafts of this feature stored the target in
|
|
53
|
+
* metadata (raw, then base64), but S3 user-metadata is HTTP-header-
|
|
54
|
+
* bound: total ≤ 2 KiB across all user-defined keys + values. A
|
|
55
|
+
* sufficiently long POSIX target (or one with author-metadata
|
|
56
|
+
* adding to the total) would exceed the limit and PutObject would
|
|
57
|
+
* reject the upload outright. Moving the target to the body — which
|
|
58
|
+
* has no such limit — makes target length bounded only by S3's 5 GB
|
|
59
|
+
* object size cap. The metadata header still serves as the read-
|
|
60
|
+
* time discriminator (cheaper than peeking at body bytes via HEAD).
|
|
61
|
+
*
|
|
62
|
+
* Backward compat: downloadFile prefers the body (sliced after
|
|
63
|
+
* SYMLINK_BODY_PREFIX) for the target string. If the body doesn't
|
|
64
|
+
* carry the prefix (a legacy upload from earlier in this PR's
|
|
65
|
+
* lifetime), it falls back to base64-decoding the metadata value —
|
|
66
|
+
* the round-trip-validating decoder returns raw or decoded as
|
|
67
|
+
* appropriate. Any prior in-flight upload still resolves correctly.
|
|
68
|
+
*/
|
|
69
|
+
export const SYMLINK_TARGET_META_KEY = "hq-symlink-target";
|
|
70
|
+
/**
|
|
71
|
+
* Constant value written to SYMLINK_TARGET_META_KEY. Any non-empty
|
|
72
|
+
* string would work as a discriminator — '1' is just compact and
|
|
73
|
+
* conventional for boolean flags in HTTP headers.
|
|
74
|
+
*/
|
|
75
|
+
export const SYMLINK_MARKER_META_VALUE = "1";
|
|
76
|
+
/**
|
|
77
|
+
* Encode a target for the S3 metadata header value. Retained as the
|
|
78
|
+
* legacy encoder so a downloader can still receive it and round-trip
|
|
79
|
+
* via decodeSymlinkMetadataValue, but new uploads use
|
|
80
|
+
* SYMLINK_MARKER_META_VALUE — the target lives in the body now.
|
|
81
|
+
*/
|
|
82
|
+
export function encodeSymlinkMetadataValue(target) {
|
|
83
|
+
return Buffer.from(target, "utf-8").toString("base64");
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Decode a target from the S3 metadata header value. Used as a
|
|
87
|
+
* legacy fallback when the body doesn't carry SYMLINK_BODY_PREFIX
|
|
88
|
+
* (i.e. an in-flight upload from earlier in this PR before the
|
|
89
|
+
* marker-only metadata convention). Round-trip-validates: if the
|
|
90
|
+
* value isn't valid base64 of UTF-8, returns the raw string.
|
|
91
|
+
*/
|
|
92
|
+
export function decodeSymlinkMetadataValue(value) {
|
|
93
|
+
try {
|
|
94
|
+
const decoded = Buffer.from(value, "base64").toString("utf-8");
|
|
95
|
+
if (Buffer.from(decoded, "utf-8").toString("base64") === value) {
|
|
96
|
+
return decoded;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
// fall through
|
|
101
|
+
}
|
|
102
|
+
return value;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Magic prefix prepended to symlink-record bodies on the wire. Two
|
|
106
|
+
* properties this gives us:
|
|
107
|
+
*
|
|
108
|
+
* 1. ETag distinguishability. S3 ETag = MD5(body). Without a prefix,
|
|
109
|
+
* a symlink whose target string equals some regular file's exact
|
|
110
|
+
* contents would produce the same ETag, and the LIST-based pull
|
|
111
|
+
* planner (which can't see per-object metadata) would classify a
|
|
112
|
+
* symlink ↔ regular-file transition as "no change" and never
|
|
113
|
+
* replace the local representation. The prefix makes those two
|
|
114
|
+
* shapes ETag-distinguishable for the realistic case (collision
|
|
115
|
+
* now requires a regular file whose contents *start* with this
|
|
116
|
+
* prefix, which is implausible for any non-malicious source).
|
|
117
|
+
*
|
|
118
|
+
* 2. Fallback discriminator. If user-metadata is ever lost (S3
|
|
119
|
+
* cross-region replication of object data only, manual S3 console
|
|
120
|
+
* copy that drops Metadata), the body prefix lets a downloader
|
|
121
|
+
* recover the symlink record without needing the metadata header.
|
|
122
|
+
* We don't currently rely on this fallback — the metadata header
|
|
123
|
+
* is still the primary discriminator on the read path — but the
|
|
124
|
+
* prefix keeps the option open and avoids painting us into a
|
|
125
|
+
* "metadata is the only signal" corner.
|
|
126
|
+
*
|
|
127
|
+
* Format: `hq-symlink:` + target string (UTF-8 bytes). No trailing
|
|
128
|
+
* newline. The colon separates the marker from the target so a future
|
|
129
|
+
* extension can encode additional fields if needed.
|
|
130
|
+
*/
|
|
131
|
+
export const SYMLINK_BODY_PREFIX = "hq-symlink:";
|
|
132
|
+
/**
|
|
133
|
+
* Encode/decode the symlink wire body. Kept as exported helpers so the
|
|
134
|
+
* format is centrally defined and tests can probe both sides without
|
|
135
|
+
* duplicating the prefix string.
|
|
136
|
+
*/
|
|
137
|
+
export function encodeSymlinkBody(target) {
|
|
138
|
+
return Buffer.from(SYMLINK_BODY_PREFIX + target, "utf-8");
|
|
139
|
+
}
|
|
49
140
|
export async function uploadFile(ctx, localPath, key, author) {
|
|
50
141
|
const client = buildClient(ctx);
|
|
51
142
|
const body = fs.readFileSync(localPath);
|
|
@@ -77,6 +168,59 @@ export async function uploadFile(ctx, localPath, key, author) {
|
|
|
77
168
|
}));
|
|
78
169
|
return { etag: response.ETag || "" };
|
|
79
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Upload a symlink as a zero-byte object whose user metadata carries the
|
|
173
|
+
* link's target string. Mirrors uploadFile's signature so callers can pick
|
|
174
|
+
* the right primitive once they've classified the entry as link vs file.
|
|
175
|
+
*
|
|
176
|
+
* The target string is stored verbatim — whatever fs.readlinkSync returned.
|
|
177
|
+
* Relative targets transfer cleanly across machines; absolute targets are
|
|
178
|
+
* preserved as-is and may be broken on a destination that doesn't share
|
|
179
|
+
* the source's $HOME layout. Cross-machine portability of absolute targets
|
|
180
|
+
* is out of scope for this primitive — the policy decision lives in the
|
|
181
|
+
* caller (currently: upload anyway, never silently rewrite).
|
|
182
|
+
*/
|
|
183
|
+
export async function uploadSymlink(ctx, target, key, author) {
|
|
184
|
+
const client = buildClient(ctx);
|
|
185
|
+
// Same created-at preservation logic as uploadFile so the hq-console
|
|
186
|
+
// NEW-pill ageing window doesn't reset when a symlink is re-uploaded
|
|
187
|
+
// unchanged across syncs.
|
|
188
|
+
let createdAt = new Date().toISOString();
|
|
189
|
+
if (author) {
|
|
190
|
+
try {
|
|
191
|
+
const head = await client.send(new HeadObjectCommand({ Bucket: ctx.bucketName, Key: key }));
|
|
192
|
+
const existing = head.Metadata?.["created-at"];
|
|
193
|
+
if (typeof existing === "string" && existing.length > 0) {
|
|
194
|
+
createdAt = existing;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
// First upload of this key, or HEAD denied — keep `now`.
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
const Metadata = {
|
|
202
|
+
// Marker-only: a constant flag value, not the target. The body
|
|
203
|
+
// is the source of truth for the target (no 2 KiB cap, no
|
|
204
|
+
// header-encoding considerations). See SYMLINK_TARGET_META_KEY
|
|
205
|
+
// doc for the full reasoning.
|
|
206
|
+
[SYMLINK_TARGET_META_KEY]: SYMLINK_MARKER_META_VALUE,
|
|
207
|
+
...(author ? buildAuthorMetadata(author, createdAt) : {}),
|
|
208
|
+
};
|
|
209
|
+
const response = await client.send(new PutObjectCommand({
|
|
210
|
+
Bucket: ctx.bucketName,
|
|
211
|
+
Key: key,
|
|
212
|
+
// Body = SYMLINK_BODY_PREFIX + target (UTF-8). The prefix is what
|
|
213
|
+
// makes a symlink record's ETag distinguishable from a regular
|
|
214
|
+
// file whose contents happen to equal the target string — the
|
|
215
|
+
// LIST-based pull planner can't see per-object metadata, so ETag
|
|
216
|
+
// is its only drift signal across symlink ↔ regular-file
|
|
217
|
+
// transitions. See SYMLINK_BODY_PREFIX doc above.
|
|
218
|
+
Body: encodeSymlinkBody(target),
|
|
219
|
+
ContentType: "application/octet-stream",
|
|
220
|
+
Metadata,
|
|
221
|
+
}));
|
|
222
|
+
return { etag: response.ETag || "" };
|
|
223
|
+
}
|
|
80
224
|
export async function downloadFile(ctx, key, localPath) {
|
|
81
225
|
const client = buildClient(ctx);
|
|
82
226
|
const response = await client.send(new GetObjectCommand({
|
|
@@ -90,6 +234,84 @@ export async function downloadFile(ctx, key, localPath) {
|
|
|
90
234
|
if (!fs.existsSync(dir)) {
|
|
91
235
|
fs.mkdirSync(dir, { recursive: true });
|
|
92
236
|
}
|
|
237
|
+
// Symlink path: presence of SYMLINK_TARGET_META_KEY (any non-empty
|
|
238
|
+
// value) is the discriminator. The TARGET is now sourced from the
|
|
239
|
+
// body — the marker-only metadata convention removes the 2 KiB
|
|
240
|
+
// header limit so long POSIX targets don't fail PutObject.
|
|
241
|
+
//
|
|
242
|
+
// S3 lowercases user-metadata keys on read (and sometimes on
|
|
243
|
+
// write), so the lookup uses the lowercased form. We don't
|
|
244
|
+
// normalize Metadata keys ourselves — the AWS SDK already does it.
|
|
245
|
+
const symlinkMarker = response.Metadata?.[SYMLINK_TARGET_META_KEY];
|
|
246
|
+
const isSymlinkRecord = typeof symlinkMarker === "string" && symlinkMarker.length > 0;
|
|
247
|
+
if (isSymlinkRecord) {
|
|
248
|
+
// Consume the body to extract the target. Symlink record bodies
|
|
249
|
+
// are bounded by target length (typically <300 bytes for
|
|
250
|
+
// relative paths, hard-capped by S3's 5 GB object size); the
|
|
251
|
+
// read is cheap. Drain explicitly so the SDK's HTTP socket is
|
|
252
|
+
// released back to the connection pool — without this, a sync
|
|
253
|
+
// over a tree with many symlinks can stall or pool-exhaust.
|
|
254
|
+
const chunks = [];
|
|
255
|
+
const stream = response.Body;
|
|
256
|
+
for await (const chunk of stream) {
|
|
257
|
+
chunks.push(Buffer.from(chunk));
|
|
258
|
+
}
|
|
259
|
+
const bodyString = Buffer.concat(chunks).toString("utf-8");
|
|
260
|
+
let symlinkTarget;
|
|
261
|
+
if (bodyString.startsWith(SYMLINK_BODY_PREFIX)) {
|
|
262
|
+
symlinkTarget = bodyString.slice(SYMLINK_BODY_PREFIX.length);
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
// Backward-compat fallback: a legacy upload from earlier in
|
|
266
|
+
// this PR's lifetime stored the target in metadata (raw or
|
|
267
|
+
// base64) rather than the body. decodeSymlinkMetadataValue
|
|
268
|
+
// round-trip-validates so a raw value passes through and a
|
|
269
|
+
// base64 value decodes; either way we get the target.
|
|
270
|
+
symlinkTarget = decodeSymlinkMetadataValue(symlinkMarker);
|
|
271
|
+
}
|
|
272
|
+
if (symlinkTarget.length === 0) {
|
|
273
|
+
throw new Error(`Symlink record for ${key} had no target (body: ${bodyString.length} bytes, marker: ${symlinkMarker})`);
|
|
274
|
+
}
|
|
275
|
+
// Replace whatever's at localPath. unlink covers regular files; for
|
|
276
|
+
// a stale symlink this also frees the slot. ENOENT is fine — first
|
|
277
|
+
// download of this key has nothing to clear. Other errors propagate
|
|
278
|
+
// because they signal a real problem (permissions, parent missing).
|
|
279
|
+
try {
|
|
280
|
+
fs.unlinkSync(localPath);
|
|
281
|
+
}
|
|
282
|
+
catch (err) {
|
|
283
|
+
if (!err ||
|
|
284
|
+
typeof err !== "object" ||
|
|
285
|
+
!("code" in err) ||
|
|
286
|
+
err.code !== "ENOENT") {
|
|
287
|
+
throw err;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
fs.symlinkSync(symlinkTarget, localPath);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
// Symmetric to the symlink branch above: when a key was previously a
|
|
294
|
+
// symlink and is later replaced in S3 by a regular object, the local
|
|
295
|
+
// path still holds the stale symlink from the last sync. Without this
|
|
296
|
+
// unlink, fs.writeFileSync follows the link and overwrites its
|
|
297
|
+
// target file's contents — leaving the link in place and the new
|
|
298
|
+
// regular object never materializing at the intended path. lstat
|
|
299
|
+
// (not statSync) avoids following the link to test what's there.
|
|
300
|
+
try {
|
|
301
|
+
const existing = fs.lstatSync(localPath);
|
|
302
|
+
if (existing.isSymbolicLink()) {
|
|
303
|
+
fs.unlinkSync(localPath);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
catch (err) {
|
|
307
|
+
// ENOENT means nothing's there; let writeFileSync handle creation.
|
|
308
|
+
if (err &&
|
|
309
|
+
typeof err === "object" &&
|
|
310
|
+
"code" in err &&
|
|
311
|
+
err.code !== "ENOENT") {
|
|
312
|
+
throw err;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
93
315
|
const chunks = [];
|
|
94
316
|
const stream = response.Body;
|
|
95
317
|
for await (const chunk of stream) {
|
|
@@ -115,6 +337,29 @@ export async function listRemoteFiles(ctx, prefix) {
|
|
|
115
337
|
// objects to the planner.
|
|
116
338
|
if (!obj.Key)
|
|
117
339
|
continue;
|
|
340
|
+
// Drop S3 directory-marker objects: the canonical shape is `0-byte
|
|
341
|
+
// key ending in '/'` (S3 console "Create folder", `aws s3 sync` of
|
|
342
|
+
// empty dirs, sync tools that mirror empty trees). Two downstream
|
|
343
|
+
// sites blow up on them — pull planner (sync.ts: `hashFile` calls
|
|
344
|
+
// `readFileSync` on an existing local dir → EISDIR "read") and the
|
|
345
|
+
// download path (s3.ts: `writeFileSync` on a trailing-slash path
|
|
346
|
+
// → EISDIR "open" after the parent mkdir creates the leaf as a
|
|
347
|
+
// directory). Filtering here eliminates both.
|
|
348
|
+
//
|
|
349
|
+
// Narrow on Size===0 (not just trailing-slash) so a hypothetical
|
|
350
|
+
// non-empty object whose key happens to end in '/' is NOT silently
|
|
351
|
+
// hidden — it stays visible and downloadFile surfaces the same
|
|
352
|
+
// EISDIR "open" error pointing at the specific key, which is the
|
|
353
|
+
// signal an operator needs to reconcile the bucket. The vault
|
|
354
|
+
// service doesn't have a code path that produces such an object,
|
|
355
|
+
// but ListObjectsV2 returns whatever lives in the bucket; silent
|
|
356
|
+
// drop would be worse than loud failure for that case.
|
|
357
|
+
//
|
|
358
|
+
// Real 0-byte placeholders like `.gitkeep` never end in `/` and
|
|
359
|
+
// continue to flow through — the 5.13.0 `.gitkeep` regression
|
|
360
|
+
// remains fixed.
|
|
361
|
+
if (obj.Key.endsWith("/") && (obj.Size ?? 0) === 0)
|
|
362
|
+
continue;
|
|
118
363
|
files.push({
|
|
119
364
|
key: obj.Key,
|
|
120
365
|
size: obj.Size ?? 0,
|
package/dist/s3.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"s3.js","sourceRoot":"","sources":["../src/s3.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAG5B;;;;GAIG;AACH,SAAS,WAAW,CAAC,GAAkB;IACrC,OAAO,IAAI,QAAQ,CAAC;QAClB,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,WAAW,EAAE;YACX,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,WAAW;YACxC,eAAe,EAAE,GAAG,CAAC,WAAW,CAAC,eAAe;YAChD,YAAY,EAAE,GAAG,CAAC,WAAW,CAAC,YAAY;SAC3C;KACF,CAAC,CAAC;AACL,CAAC;AAcD;;;;;;;GAOG;AACH,SAAS,mBAAmB,CAC1B,MAAoB,EACpB,SAAiB;IAEjB,MAAM,IAAI,GAA2B,EAAE,CAAC;IACxC,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,IA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