@volter/twin-linkedin 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.
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
//
|
|
29
29
|
// DETERMINISM. Every served answer is a function of (request, stored state). Times are the write's
|
|
30
30
|
// `occurredAt`; a video's processing is a fold of its finalize instant and the request's (PROCESSING_MS), never a timer and never a read that writes.
|
|
31
|
-
import { applyTwinWrite, applyTwinWriteAtomic, blobDigest, ownFields, projectResources, resolveSubjectId, subjectAliases } from '@volter/world-core';
|
|
31
|
+
import { applyTwinWrite, applyTwinWriteAtomic, blobDigest, ownFields, projectResources, resolveSubjectId, subjectAliases, worldNow } from '@volter/world-core';
|
|
32
32
|
import { accessDenied, emptyAccessToken, invalidAccessToken, invalidUrnId, invalidUrnType, invalidValue, missingField, noContent, notFound, ok, problem, readOnlyRefusal, unmodeled, versionInactive, versionMissing, } from "./linkedin-errors.js";
|
|
33
33
|
import { aspectRatio, clearParts, isAssetId, listAssetIds, MAX_IMAGE_PIXELS, MAX_VIDEO_BYTES, MAX_VIDEO_MS, MIN_VIDEO_BYTES, MIN_VIDEO_MS, putLinkedinBlob, putPart, readAsset, readPart, assetAsOf, newUploadSecret, signUpload, withAsset, assetIsOwn, hasUploadSecret, sniffImage, sniffVideo, UPLOAD_URL_LIFETIME_MS, verifyUpload, VIDEO_PART_BYTES, writeAsset, } from "./linkedin-media.js";
|
|
34
34
|
const SERVICE = 'linkedin';
|
|
@@ -93,8 +93,8 @@ function resources(root) {
|
|
|
93
93
|
}
|
|
94
94
|
const ofType = (all, type) => all.filter((r) => r.type === type);
|
|
95
95
|
const fields = (r) => ownFields(r);
|
|
96
|
-
const nowMs = (req) => Date.parse(req.occurredAt ??
|
|
97
|
-
const at = (req) => req.occurredAt ??
|
|
96
|
+
const nowMs = (req) => Date.parse(req.occurredAt ?? worldNow());
|
|
97
|
+
const at = (req) => req.occurredAt ?? worldNow();
|
|
98
98
|
const ORG_URN = /^urn:li:organization:(\d{1,19})$/;
|
|
99
99
|
const PERSON_URN = /^urn:li:person:([A-Za-z0-9_-]{1,40})$/;
|
|
100
100
|
const POST_URN = /^urn:li:(share|ugcPost):(\d{1,19})$/;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/twin-linkedin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Local LinkedIn twin (organization posts with image, video or article; the Images and Videos upload protocols; admin roles) with a linkedin.com company-page 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
|
"linkedin-api-client": "^0.3.0",
|
|
49
49
|
"typescript": "^5.9.0"
|
package/src/linkedin-twin.ts
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
//
|
|
29
29
|
// DETERMINISM. Every served answer is a function of (request, stored state). Times are the write's
|
|
30
30
|
// `occurredAt`; a video's processing is a fold of its finalize instant and the request's (PROCESSING_MS), never a timer and never a read that writes.
|
|
31
|
-
import { applyTwinWrite, applyTwinWriteAtomic, blobDigest, ownFields, projectResources, resolveSubjectId, subjectAliases } from '@volter/world-core';
|
|
31
|
+
import { applyTwinWrite, applyTwinWriteAtomic, blobDigest, ownFields, projectResources, resolveSubjectId, subjectAliases, worldNow } from '@volter/world-core';
|
|
32
32
|
import {
|
|
33
33
|
accessDenied,
|
|
34
34
|
emptyAccessToken,
|
|
@@ -159,8 +159,8 @@ function resources(root?: string): Resource[] {
|
|
|
159
159
|
|
|
160
160
|
const ofType = (all: Resource[], type: string): Resource[] => all.filter((r) => r.type === type);
|
|
161
161
|
const fields = (r: Resource): Record<string, any> => ownFields(r as never) as Record<string, any>;
|
|
162
|
-
const nowMs = (req: LinkedinRequest): number => Date.parse(req.occurredAt ??
|
|
163
|
-
const at = (req: LinkedinRequest): string => req.occurredAt ??
|
|
162
|
+
const nowMs = (req: LinkedinRequest): number => Date.parse(req.occurredAt ?? worldNow());
|
|
163
|
+
const at = (req: LinkedinRequest): string => req.occurredAt ?? worldNow();
|
|
164
164
|
|
|
165
165
|
const ORG_URN = /^urn:li:organization:(\d{1,19})$/;
|
|
166
166
|
const PERSON_URN = /^urn:li:person:([A-Za-z0-9_-]{1,40})$/;
|