@ankhorage/projects 0.9.5 → 0.10.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.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # Ankhorage Projects
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v0.9.5](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: configured](././paradox/badges/tests.svg) ![paradox: canonical](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v0.10.1](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: configured](././paradox/badges/tests.svg) ![paradox: canonical](././paradox/badges/docs.svg)
7
7
 
8
8
  Provides standalone project identity, persistence, and repository-oriented project actions.
9
9
 
@@ -179,6 +179,16 @@ export declare const CAPABILITIES: readonly [{
179
179
  };
180
180
  readonly label: "Read social media";
181
181
  readonly description: "Read one immutable social media metadata record.";
182
+ }, {
183
+ readonly id: "projects.social.media.content";
184
+ readonly owner: "@ankhorage/projects";
185
+ readonly access: readonly ["read"];
186
+ readonly binding: {
187
+ readonly kind: "storage";
188
+ readonly bindableAs: readonly ["target"];
189
+ };
190
+ readonly label: "Read social media content";
191
+ readonly description: "Read immutable social media bytes for the authenticated caller.";
182
192
  }, {
183
193
  readonly id: "projects.social.media.remove";
184
194
  readonly owner: "@ankhorage/projects";
@@ -29,6 +29,16 @@ export declare const SOCIAL_MANAGER_MEDIA_ANALYTICS_CAPABILITIES: readonly [{
29
29
  };
30
30
  readonly label: "Read social media";
31
31
  readonly description: "Read one immutable social media metadata record.";
32
+ }, {
33
+ readonly id: "projects.social.media.content";
34
+ readonly owner: "@ankhorage/projects";
35
+ readonly access: readonly ["read"];
36
+ readonly binding: {
37
+ readonly kind: "storage";
38
+ readonly bindableAs: readonly ["target"];
39
+ };
40
+ readonly label: "Read social media content";
41
+ readonly description: "Read immutable social media bytes for the authenticated caller.";
32
42
  }, {
33
43
  readonly id: "projects.social.media.remove";
34
44
  readonly owner: "@ankhorage/projects";
@@ -24,6 +24,14 @@ export const SOCIAL_MANAGER_MEDIA_ANALYTICS_CAPABILITIES = [
24
24
  label: 'Read social media',
25
25
  description: 'Read one immutable social media metadata record.',
26
26
  },
27
+ {
28
+ id: 'projects.social.media.content',
29
+ owner: '@ankhorage/projects',
30
+ access: ['read'],
31
+ binding: { kind: 'storage', bindableAs: ['target'] },
32
+ label: 'Read social media content',
33
+ description: 'Read immutable social media bytes for the authenticated caller.',
34
+ },
27
35
  {
28
36
  id: 'projects.social.media.remove',
29
37
  owner: '@ankhorage/projects',
@@ -1,11 +1,12 @@
1
- import { lstat, mkdir, mkdtemp, readdir, readFile, realpath, rm, writeFile, } from 'node:fs/promises';
2
- import { basename, dirname, relative, resolve } from 'node:path';
1
+ import { mkdtemp, readFile, rm } from 'node:fs/promises';
2
+ import { dirname, resolve } from 'node:path';
3
3
  import { resolveExpoRuntimeGeneratedAppScaffold, resolveExpoRuntimeGeneratedAppSources, } from '@ankhorage/expo-runtime/generated-app';
4
4
  import { resolveExpoRuntimePlan } from '@ankhorage/expo-runtime/planning';
5
5
  import { materializeTemplateRevision } from '@ankhorage/templates';
6
6
  import { applyWorkerMaterialization } from '../../worker-materialization/composition/composeWorkerMaterialization.js';
7
7
  import { composeGeneratedRuntimeMaterialization } from './composeGeneratedRuntimeMaterialization.js';
8
8
  import { createManifestSource } from './createManifestSource.js';
9
+ import { createMaterializationFileSystem, } from './createMaterializationFileSystem.js';
9
10
  import { createNavigatorMaterializationFiles, } from './createNavigatorMaterializationFiles.js';
10
11
  import { createSocialManagerServerFiles } from './createSocialManagerServerFiles.js';
11
12
  /*** Create the public, caller-targeted Expo materializer for stored immutable project revisions. */
@@ -17,7 +18,7 @@ export function createExpoProjectMaterializer(input) {
17
18
  /*** Coordinate owner plans and Template output into one prevalidated caller-owned Expo target. */
18
19
  async function materializeExpoProjectAsync(input, project, revision) {
19
20
  assertReleasedOwnerApis();
20
- const targetDirectory = await assertEmptyTargetDirectoryAsync(input.targetDirectory);
21
+ const targetDirectory = await materializationFileSystem.assertEmptyTargetDirectoryAsync(input.targetDirectory);
21
22
  const generatedFiles = createGeneratedFiles(revision.manifest, project.id, input.navigator, input.targetEnvironment);
22
23
  const stagingDirectory = await mkdtemp(`${dirname(targetDirectory)}/.ankhorage-projects-`);
23
24
  try {
@@ -29,7 +30,10 @@ async function materializeExpoProjectAsync(input, project, revision) {
29
30
  });
30
31
  const templateFiles = await readTemplateFilesAsync(template.projectPath, template.createdFiles);
31
32
  assertNoPathCollisions(templateFiles.map(({ relativePath }) => relativePath), generatedFiles.map(({ relativePath }) => relativePath));
32
- await writeFilesAsync(targetDirectory, [...templateFiles, ...generatedFiles]);
33
+ await materializationFileSystem.writeFilesAsync(targetDirectory, [
34
+ ...templateFiles,
35
+ ...generatedFiles,
36
+ ]);
33
37
  return createMaterializationResult(project, revision, targetDirectory, templateFiles, generatedFiles);
34
38
  }
35
39
  finally {
@@ -102,6 +106,7 @@ const ownerApis = {
102
106
  resolveExpoRuntimeGeneratedAppSources: resolveExpoRuntimeGeneratedAppSources,
103
107
  resolveExpoRuntimeGeneratedAppScaffold: resolveExpoRuntimeGeneratedAppScaffold,
104
108
  };
109
+ const materializationFileSystem = createMaterializationFileSystem();
105
110
  /*** Reject unavailable owner emitters rather than reproducing their source in Projects. */
106
111
  function assertReleasedOwnerApis() {
107
112
  if (typeof ownerApis.materializeTemplateRevision !== 'function' ||
@@ -111,18 +116,6 @@ function assertReleasedOwnerApis() {
111
116
  throw new Error('Required released owner materialization API is unavailable.');
112
117
  }
113
118
  }
114
- /*** Resolve one existing, empty, non-symlink target directory before writing any output. */
115
- async function assertEmptyTargetDirectoryAsync(target) {
116
- const resolvedTarget = resolve(target);
117
- const stats = await lstat(resolvedTarget);
118
- if (!stats.isDirectory() || stats.isSymbolicLink()) {
119
- throw new Error(`Materialization target must be a regular directory: ${resolvedTarget}`);
120
- }
121
- if ((await readdir(resolvedTarget)).length > 0) {
122
- throw new Error(`Materialization target must be empty: ${resolvedTarget}`);
123
- }
124
- return realpath(resolvedTarget);
125
- }
126
119
  /*** Reject owner diagnostics that make a generated application invalid before filesystem side effects. */
127
120
  function assertNoErrors(diagnostics, owner) {
128
121
  const errors = diagnostics.filter(({ severity }) => severity === 'error');
@@ -133,32 +126,10 @@ function assertNoErrors(diagnostics, owner) {
133
126
  /*** Read exactly the files reported by Templates while keeping every path inside its staging project. */
134
127
  async function readTemplateFilesAsync(projectPath, files) {
135
128
  return Promise.all(files.map(async (relativePath) => ({
136
- relativePath: assertSafeRelativePath(projectPath, relativePath),
129
+ relativePath: materializationFileSystem.assertSafeRelativePath(projectPath, relativePath),
137
130
  source: await readFile(resolve(projectPath, relativePath)),
138
131
  })));
139
132
  }
140
- /*** Write all materialized files with exclusive creation so no existing caller file is overwritten. */
141
- async function writeFilesAsync(targetDirectory, files) {
142
- for (const file of files) {
143
- const relativePath = assertSafeRelativePath(targetDirectory, file.relativePath);
144
- const targetPath = resolve(targetDirectory, relativePath);
145
- await mkdir(dirname(targetPath), { recursive: true });
146
- await writeFile(targetPath, file.source, { flag: 'wx' });
147
- }
148
- }
149
- /*** Ensure an owner-reported project-relative path never crosses its designated directory. */
150
- function assertSafeRelativePath(directory, candidate) {
151
- const resolvedPath = resolve(directory, candidate);
152
- const pathRelative = relative(directory, resolvedPath);
153
- if (candidate.length === 0 ||
154
- pathRelative.length === 0 ||
155
- pathRelative === '..' ||
156
- pathRelative.startsWith('../') ||
157
- basename(resolvedPath) === '..') {
158
- throw new Error(`Materialized file path escapes its target directory: ${candidate}`);
159
- }
160
- return pathRelative;
161
- }
162
133
  /*** Reject duplicate paths emitted by one owner before any write can begin. */
163
134
  function assertUniqueRelativePaths(paths) {
164
135
  if (new Set(paths).size !== paths.length) {
@@ -0,0 +1,13 @@
1
+ /*** File content emitted by an owner before Projects writes it into a caller-owned directory. */
2
+ export type MaterializationFile = Readonly<{
3
+ relativePath: string;
4
+ source: string | Uint8Array;
5
+ }>;
6
+ /*** Filesystem boundary shared by Projects materializers that write into caller-owned empty directories. */
7
+ export interface MaterializationFileSystem {
8
+ assertSafeRelativePath(directory: string, candidate: string): string;
9
+ assertEmptyTargetDirectoryAsync(target: string): Promise<string>;
10
+ writeFilesAsync(targetDirectory: string, files: readonly MaterializationFile[]): Promise<void>;
11
+ }
12
+ /*** Create the guarded filesystem boundary used by Projects materialization compositions. */
13
+ export declare function createMaterializationFileSystem(): MaterializationFileSystem;
@@ -0,0 +1,40 @@
1
+ import { lstat, mkdir, readdir, realpath, writeFile } from 'node:fs/promises';
2
+ import { basename, dirname, relative, resolve } from 'node:path';
3
+ /*** Create the guarded filesystem boundary used by Projects materialization compositions. */
4
+ export function createMaterializationFileSystem() {
5
+ return { assertSafeRelativePath, assertEmptyTargetDirectoryAsync, writeFilesAsync };
6
+ }
7
+ /*** Resolve one existing, empty, non-symlink target directory before writing any output. */
8
+ async function assertEmptyTargetDirectoryAsync(target) {
9
+ const resolvedTarget = resolve(target);
10
+ const stats = await lstat(resolvedTarget);
11
+ if (!stats.isDirectory() || stats.isSymbolicLink()) {
12
+ throw new Error(`Materialization target must be a regular directory: ${resolvedTarget}`);
13
+ }
14
+ if ((await readdir(resolvedTarget)).length > 0) {
15
+ throw new Error(`Materialization target must be empty: ${resolvedTarget}`);
16
+ }
17
+ return realpath(resolvedTarget);
18
+ }
19
+ /*** Write all materialized files with exclusive creation so no existing caller file is overwritten. */
20
+ async function writeFilesAsync(targetDirectory, files) {
21
+ for (const file of files) {
22
+ const relativePath = assertSafeRelativePath(targetDirectory, file.relativePath);
23
+ const targetPath = resolve(targetDirectory, relativePath);
24
+ await mkdir(dirname(targetPath), { recursive: true });
25
+ await writeFile(targetPath, file.source, { flag: 'wx' });
26
+ }
27
+ }
28
+ /*** Ensure an owner-reported project-relative path never crosses its designated directory. */
29
+ function assertSafeRelativePath(directory, candidate) {
30
+ const resolvedPath = resolve(directory, candidate);
31
+ const pathRelative = relative(directory, resolvedPath);
32
+ if (candidate.length === 0 ||
33
+ pathRelative.length === 0 ||
34
+ pathRelative === '..' ||
35
+ pathRelative.startsWith('../') ||
36
+ basename(resolvedPath) === '..') {
37
+ throw new Error(`Materialized file path escapes its target directory: ${candidate}`);
38
+ }
39
+ return pathRelative;
40
+ }
@@ -0,0 +1,18 @@
1
+ /*** Inputs for materializing the released minimal universal Expo application scaffold. */
2
+ export interface MaterializePlainExpoAppInput {
3
+ readonly targetDirectory: string;
4
+ readonly project: PlainExpoAppIdentity;
5
+ }
6
+ /*** The caller-owned target and exact owner-generated file inventory for a plain Expo application. */
7
+ export interface PlainExpoAppMaterializationResult {
8
+ readonly targetDirectory: string;
9
+ readonly files: readonly string[];
10
+ }
11
+ /*** Materialize the released Runtime-owned plain Expo scaffold into an empty caller-owned directory. */
12
+ export declare function materializePlainExpoAppAsync(input: MaterializePlainExpoAppInput): Promise<PlainExpoAppMaterializationResult>;
13
+ type PlainExpoAppIdentity = Readonly<{
14
+ name: string;
15
+ slug: string;
16
+ version: string;
17
+ }>;
18
+ export {};
@@ -0,0 +1,21 @@
1
+ import { resolveExpoRuntimePlainExpoAppScaffold } from '@ankhorage/expo-runtime/generated-app';
2
+ import { createMaterializationFileSystem, } from './createMaterializationFileSystem.js';
3
+ /*** Materialize the released Runtime-owned plain Expo scaffold into an empty caller-owned directory. */
4
+ export async function materializePlainExpoAppAsync(input) {
5
+ const targetDirectory = await materializationFileSystem.assertEmptyTargetDirectoryAsync(input.targetDirectory);
6
+ const scaffold = ownerApi.resolveExpoRuntimePlainExpoAppScaffold(input.project);
7
+ const { files } = scaffold;
8
+ assertUniqueRelativePaths(files.map(({ relativePath }) => relativePath));
9
+ await materializationFileSystem.writeFilesAsync(targetDirectory, files);
10
+ return { targetDirectory, files: files.map(({ relativePath }) => relativePath) };
11
+ }
12
+ const materializationFileSystem = createMaterializationFileSystem();
13
+ const ownerApi = {
14
+ resolveExpoRuntimePlainExpoAppScaffold: resolveExpoRuntimePlainExpoAppScaffold,
15
+ };
16
+ /*** Reject duplicate paths emitted by one owner before any write can begin. */
17
+ function assertUniqueRelativePaths(paths) {
18
+ if (new Set(paths).size !== paths.length) {
19
+ throw new Error('An owner emitted duplicate generated file paths.');
20
+ }
21
+ }
@@ -96,12 +96,14 @@ async function removeAsync(root, key, mediaId, isReferencedAsync) {
96
96
  function readUpload(upload) {
97
97
  const kind = mediaKind(upload.contentType);
98
98
  if (!kind ||
99
+ (upload.name !== undefined && !isMediaName(upload.name)) ||
99
100
  !(upload.bytes instanceof Uint8Array) ||
100
101
  upload.bytes.byteLength === 0 ||
101
102
  upload.bytes.byteLength > maximumByteLength) {
102
103
  throw new Error('Invalid Social Manager media upload.');
103
104
  }
104
105
  return {
106
+ ...(upload.name === undefined ? {} : { name: upload.name }),
105
107
  kind,
106
108
  contentType: upload.contentType,
107
109
  byteLength: upload.bytes.byteLength,
@@ -116,6 +118,10 @@ function mediaKind(contentType) {
116
118
  ? 'video'
117
119
  : undefined;
118
120
  }
121
+ /*** Accept a bounded display name without allowing control characters into durable metadata. */
122
+ function isMediaName(value) {
123
+ return value.trim().length > 0 && value.length <= 255 && !/[\r\n]/u.test(value);
124
+ }
119
125
  /*** Derive a stable opaque reference from the trusted scope and immutable content bytes. */
120
126
  function createMediaId(key, bytes) {
121
127
  return `media-${key}-${createHash('sha256').update(bytes).digest('hex')}`;
@@ -200,7 +206,19 @@ function findMedia(document, mediaId) {
200
206
  /*** Project durable metadata without disclosing scope ownership details. */
201
207
  function toMedia(media) {
202
208
  const { mediaId, kind, contentType, byteLength, createdAt } = media;
203
- return { mediaId, kind, contentType, byteLength, createdAt };
209
+ return {
210
+ mediaId,
211
+ name: media.name ?? defaultMediaName(kind, contentType),
212
+ kind,
213
+ contentType,
214
+ byteLength,
215
+ createdAt,
216
+ };
217
+ }
218
+ /*** Derive a stable display name for immutable records created before callers supplied one. */
219
+ function defaultMediaName(kind, contentType) {
220
+ const subtype = contentType.split('/').at(1)?.toUpperCase() ?? 'MEDIA';
221
+ return `${kind === 'image' ? 'Image' : 'Video'} upload (${subtype})`;
204
222
  }
205
223
  /*** Validate the persisted envelope and every immutable media record before returning it. */
206
224
  function isDocument(value, key) {
@@ -230,7 +248,8 @@ function isMediaMetadata(value) {
230
248
  Number.isSafeInteger(value.byteLength) &&
231
249
  value.byteLength > 0 &&
232
250
  value.byteLength <= maximumByteLength &&
233
- typeof value.createdAt === 'string');
251
+ typeof value.createdAt === 'string' &&
252
+ (value.name === undefined || (typeof value.name === 'string' && isMediaName(value.name))));
234
253
  }
235
254
  /*** Keep object filenames confined to opaque hashes generated by this adapter. */
236
255
  function isMediaId(value) {
@@ -6,6 +6,7 @@ export function createSocialManagerMediaOperations(input, callerOf) {
6
6
  'projects.social.media.upload': createOperation((request) => uploadMediaAsync(input, callerOf(request), request.body)),
7
7
  'projects.social.media.list': readOperation((request) => listMediaAsync(input, callerOf(request))),
8
8
  'projects.social.media.read': readOperation((request) => readMediaAsync(input, callerOf(request), request.params.mediaId)),
9
+ 'projects.social.media.content': readOperation((request) => readMediaContentAsync(input, callerOf(request), request.params.mediaId)),
9
10
  'projects.social.media.remove': deleteOperation((request) => removeMediaAsync(input, callerOf(request), request.params.mediaId)),
10
11
  };
11
12
  }
@@ -30,6 +31,20 @@ async function readMediaAsync(input, caller, mediaId) {
30
31
  const media = caller && mediaId ? await input.store.readAsync(caller, mediaId) : undefined;
31
32
  return media ? { body: media } : missingResponse();
32
33
  }
34
+ /*** Deliver immutable media bytes only after the host has authenticated the caller scope. */
35
+ async function readMediaContentAsync(input, caller, mediaId) {
36
+ const item = caller && mediaId ? await input.store.loadAsync(caller, mediaId) : undefined;
37
+ return item
38
+ ? {
39
+ body: item.bytes,
40
+ headers: {
41
+ 'cache-control': 'private, no-store',
42
+ 'content-type': item.media.contentType,
43
+ 'x-content-type-options': 'nosniff',
44
+ },
45
+ }
46
+ : missingResponse();
47
+ }
33
48
  /*** Remove media only when no immutable draft or retained publication reference requires it. */
34
49
  async function removeMediaAsync(input, caller, mediaId) {
35
50
  if (!caller || !mediaId)
@@ -43,12 +58,25 @@ async function removeMediaAsync(input, caller, mediaId) {
43
58
  }
44
59
  /*** Decode only canonical nonempty base64 JSON input before durable media validation. */
45
60
  function readUpload(value) {
46
- if (!isRecord(value) || typeof value.contentType !== 'string' || typeof value.base64 !== 'string')
61
+ if (!isRecord(value) ||
62
+ typeof value.contentType !== 'string' ||
63
+ typeof value.base64 !== 'string' ||
64
+ (value.name !== undefined && (typeof value.name !== 'string' || !isMediaName(value.name))))
47
65
  return undefined;
48
66
  if (!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(value.base64))
49
67
  return undefined;
50
68
  const bytes = new Uint8Array(Buffer.from(value.base64, 'base64'));
51
- return bytes.byteLength > 0 ? { contentType: value.contentType, bytes } : undefined;
69
+ return bytes.byteLength > 0
70
+ ? {
71
+ contentType: value.contentType,
72
+ bytes,
73
+ ...(typeof value.name === 'string' ? { name: value.name } : {}),
74
+ }
75
+ : undefined;
76
+ }
77
+ /*** Accept a bounded display name without allowing control characters into durable metadata. */
78
+ function isMediaName(value) {
79
+ return value.trim().length > 0 && value.length <= 255 && !/[\r\n]/u.test(value);
52
80
  }
53
81
  /*** Declare a canonical immutable-media read operation. */
54
82
  function readOperation(handler) {
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export { createProjectRepositoryFileSystemAsync } from './features/projects/adap
2
2
  export { projects } from './features/projects/application/projects.js';
3
3
  export { createExpoProjectMaterializer, type CreateExpoProjectMaterializerInput, type ExpoProjectMaterializationResult, type ExpoProjectMaterializer, } from './features/projects/composition/createExpoProjectMaterializer.js';
4
4
  export { createProjectsApiHandlerResolver } from './features/projects/composition/createProjectsApiHandlerResolver.js';
5
+ export { materializePlainExpoAppAsync, type MaterializePlainExpoAppInput, type PlainExpoAppMaterializationResult, } from './features/projects/composition/materializePlainExpoAppAsync.js';
5
6
  export type { ProjectMaterializer, ProjectRepository, } from './features/projects/ports/ProjectRepository.js';
6
7
  export { type ConnectionFileSystemStore, createConnectionFileSystemStoreAsync, } from './features/trusted-social-manager-host/adapters/createConnectionFileSystemStoreAsync.js';
7
8
  export { createSocialManagerDraftStoreAsync } from './features/trusted-social-manager-host/adapters/createSocialManagerDraftStoreAsync.js';
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ export { createProjectRepositoryFileSystemAsync } from './features/projects/adap
2
2
  export { projects } from './features/projects/application/projects.js';
3
3
  export { createExpoProjectMaterializer, } from './features/projects/composition/createExpoProjectMaterializer.js';
4
4
  export { createProjectsApiHandlerResolver } from './features/projects/composition/createProjectsApiHandlerResolver.js';
5
+ export { materializePlainExpoAppAsync, } from './features/projects/composition/materializePlainExpoAppAsync.js';
5
6
  export { createConnectionFileSystemStoreAsync, } from './features/trusted-social-manager-host/adapters/createConnectionFileSystemStoreAsync.js';
6
7
  export { createSocialManagerDraftStoreAsync } from './features/trusted-social-manager-host/adapters/createSocialManagerDraftStoreAsync.js';
7
8
  export { createSocialManagerFlowSecurityAsync, } from './features/trusted-social-manager-host/adapters/createSocialManagerFlowSecurityAsync.js';
@@ -49,6 +49,7 @@ export interface SocialManagerCaller extends SocialManagerScope {
49
49
  /*** Immutable metadata for host-owned media selected by a Social Manager draft. */
50
50
  export interface SocialManagerMedia {
51
51
  readonly mediaId: string;
52
+ readonly name: string;
52
53
  readonly kind: 'image' | 'video';
53
54
  readonly contentType: string;
54
55
  readonly byteLength: number;
@@ -56,6 +57,7 @@ export interface SocialManagerMedia {
56
57
  }
57
58
  /*** Raw upload content accepted only at the trusted Social Manager host boundary. */
58
59
  export interface SocialManagerMediaUpload {
60
+ readonly name?: string;
59
61
  readonly contentType: string;
60
62
  readonly bytes: Uint8Array;
61
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/projects",
3
- "version": "0.9.5",
3
+ "version": "0.10.1",
4
4
  "description": "Standalone project identity and repository actions.",
5
5
  "keywords": [
6
6
  "ankhorage",
@@ -70,14 +70,14 @@
70
70
  "@ankhorage/connection": "^0.3.0",
71
71
  "@ankhorage/contracts": "^28.0.0",
72
72
  "@ankhorage/data-sources": "^2.4.0",
73
- "@ankhorage/expo-runtime": "^7.10.4",
73
+ "@ankhorage/expo-runtime": "^7.11.0",
74
74
  "@ankhorage/flow": "^0.12.0",
75
75
  "@ankhorage/navigator": "^3.9.0",
76
76
  "@ankhorage/permissions": "^0.2.64",
77
77
  "@ankhorage/runtime": "^5.8.1",
78
78
  "@ankhorage/secrets": "^0.3.2",
79
79
  "@ankhorage/social": "^0.7.0",
80
- "@ankhorage/templates": "^12.9.4",
80
+ "@ankhorage/templates": "12.9.8",
81
81
  "@ankhorage/utility": "^1.11.0"
82
82
  },
83
83
  "ankh": {
@@ -353,6 +353,21 @@
353
353
  "label": "Read social media",
354
354
  "description": "Read one immutable social media metadata record."
355
355
  },
356
+ {
357
+ "id": "projects.social.media.content",
358
+ "owner": "@ankhorage/projects",
359
+ "access": [
360
+ "read"
361
+ ],
362
+ "binding": {
363
+ "kind": "storage",
364
+ "bindableAs": [
365
+ "target"
366
+ ]
367
+ },
368
+ "label": "Read social media content",
369
+ "description": "Read immutable social media bytes for the authenticated caller."
370
+ },
356
371
  {
357
372
  "id": "projects.social.media.remove",
358
373
  "owner": "@ankhorage/projects",