@volter/twin-instagram 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
// that writes. The one exception is a container's id, drawn from entropy (as LinkedIn's asset ids): a
|
|
38
38
|
// container is staging a branch inherits from its ancestors' annex, where an ordinal or a digest could
|
|
39
39
|
// collide between a parent and a child; the determinism replay captures it and never compares it.
|
|
40
|
-
import { applyTwinWrite, applyTwinWriteAtomic, blobDigest, ownFields, projectResources, resolveSubjectId, subjectAliases } from '@volter/world-core';
|
|
40
|
+
import { applyTwinWrite, applyTwinWriteAtomic, blobDigest, ownFields, projectResources, resolveSubjectId, subjectAliases, worldNow } from '@volter/world-core';
|
|
41
41
|
import { graphError, invalidParam, invalidToken, missingParam, noToken, ok, permissionDenied, readOnlyRefusal, ruploadFailure, ruploadOk, unknownPath, unmodeled, unsupported, } from "./instagram-errors.js";
|
|
42
42
|
import { clearChunks, CONTAINER_LIFETIME_MS, containerStatus, isNumericId, listContainers, MAX_REEL_BYTES, putChunk, putInstagramBlob, readChunks, readContainer, reelSpecViolation, sniffImage, sniffVideo, withContainer, writeContainer, } from "./instagram-media.js";
|
|
43
43
|
const SERVICE = 'instagram';
|
|
@@ -155,8 +155,8 @@ function resources(root) {
|
|
|
155
155
|
}
|
|
156
156
|
const ofType = (all, type) => all.filter((r) => r.type === type);
|
|
157
157
|
const fields = (r) => ownFields(r);
|
|
158
|
-
const nowMs = (req) => Date.parse(req.occurredAt ??
|
|
159
|
-
const at = (req) => req.occurredAt ??
|
|
158
|
+
const nowMs = (req) => Date.parse(req.occurredAt ?? worldNow());
|
|
159
|
+
const at = (req) => req.occurredAt ?? worldNow();
|
|
160
160
|
/** Meta's timestamp format: `2019-09-26T22:36:43+0000`. */
|
|
161
161
|
export function igTimestamp(iso) {
|
|
162
162
|
return `${new Date(iso).toISOString().slice(0, 19)}+0000`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/twin-instagram",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Local Instagram twin (a professional account's Reels: resumable containers, the rupload upload, status_code, media_publish) with an instagram.com profile mirror, built on @volter/world-core.",
|
|
5
5
|
"author": "Volter (https://github.com/volter-ai)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"postpack": "node ../../../scripts/publish/prepare-publish.mjs postpack"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@volter/world-core": "2.0.
|
|
39
|
+
"@volter/world-core": "2.0.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/bun": "^1.2.20",
|
|
43
43
|
"@types/node": "^24.0.0",
|
|
44
44
|
"@types/react": "^19.2.17",
|
|
45
45
|
"@types/react-dom": "^19.2.3",
|
|
46
|
-
"@volter/world-core": "2.0.
|
|
46
|
+
"@volter/world-core": "2.0.1",
|
|
47
47
|
"@volter/world-tooling": "0.1.0",
|
|
48
48
|
"typescript": "^5.9.0"
|
|
49
49
|
},
|
package/src/instagram-twin.ts
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
// that writes. The one exception is a container's id, drawn from entropy (as LinkedIn's asset ids): a
|
|
38
38
|
// container is staging a branch inherits from its ancestors' annex, where an ordinal or a digest could
|
|
39
39
|
// collide between a parent and a child; the determinism replay captures it and never compares it.
|
|
40
|
-
import { applyTwinWrite, applyTwinWriteAtomic, blobDigest, ownFields, projectResources, resolveSubjectId, subjectAliases } from '@volter/world-core';
|
|
40
|
+
import { applyTwinWrite, applyTwinWriteAtomic, blobDigest, ownFields, projectResources, resolveSubjectId, subjectAliases, worldNow } from '@volter/world-core';
|
|
41
41
|
import {
|
|
42
42
|
graphError,
|
|
43
43
|
invalidParam,
|
|
@@ -211,8 +211,8 @@ function resources(root?: string): Resource[] {
|
|
|
211
211
|
}
|
|
212
212
|
const ofType = (all: Resource[], type: string): Resource[] => all.filter((r) => r.type === type);
|
|
213
213
|
const fields = (r: Resource): Record<string, any> => ownFields(r as never) as Record<string, any>;
|
|
214
|
-
const nowMs = (req: InstagramRequest): number => Date.parse(req.occurredAt ??
|
|
215
|
-
const at = (req: InstagramRequest): string => req.occurredAt ??
|
|
214
|
+
const nowMs = (req: InstagramRequest): number => Date.parse(req.occurredAt ?? worldNow());
|
|
215
|
+
const at = (req: InstagramRequest): string => req.occurredAt ?? worldNow();
|
|
216
216
|
|
|
217
217
|
/** Meta's timestamp format: `2019-09-26T22:36:43+0000`. */
|
|
218
218
|
export function igTimestamp(iso: string): string {
|