@ankhorage/projects 0.3.0 → 0.5.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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # @ankhorage/projects
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v0.3.0](././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.5.0](././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
  Standalone project identity and repository actions.
9
9
 
@@ -16,3 +16,4 @@ Standalone project identity and repository actions.
16
16
  - [Module relationships](././paradox/diagrams/module-relationships.mmd)
17
17
  - [Export graph](././paradox/diagrams/export-graph.mmd)
18
18
  - [createProjectRepositoryFileSystemAsync sequence](././paradox/diagrams/sequences/create-project-repository-file-system-async.mmd)
19
+ - [createTrustedZefixHost sequence](././paradox/diagrams/sequences/create-trusted-zefix-host.mmd)
@@ -89,4 +89,24 @@ export declare const CAPABILITIES: readonly [{
89
89
  };
90
90
  readonly label: "Delete project";
91
91
  readonly description: "Delete one persisted project by identity.";
92
+ }, {
93
+ readonly id: "projects.zefix.search";
94
+ readonly owner: "@ankhorage/projects";
95
+ readonly access: readonly ["read"];
96
+ readonly binding: {
97
+ readonly kind: "action";
98
+ readonly bindableAs: readonly ["target"];
99
+ };
100
+ readonly label: "Search Zefix companies";
101
+ readonly description: "Search curated Zefix company data through a trusted project host.";
102
+ }, {
103
+ readonly id: "projects.zefix.get-by-uid";
104
+ readonly owner: "@ankhorage/projects";
105
+ readonly access: readonly ["read"];
106
+ readonly binding: {
107
+ readonly kind: "action";
108
+ readonly bindableAs: readonly ["target"];
109
+ };
110
+ readonly label: "Read a Zefix company by UID";
111
+ readonly description: "Read curated Zefix company data through a trusted project host.";
92
112
  }];
@@ -72,4 +72,20 @@ export const CAPABILITIES = [
72
72
  label: 'Delete project',
73
73
  description: 'Delete one persisted project by identity.',
74
74
  },
75
+ {
76
+ id: 'projects.zefix.search',
77
+ owner: '@ankhorage/projects',
78
+ access: ['read'],
79
+ binding: { kind: 'action', bindableAs: ['target'] },
80
+ label: 'Search Zefix companies',
81
+ description: 'Search curated Zefix company data through a trusted project host.',
82
+ },
83
+ {
84
+ id: 'projects.zefix.get-by-uid',
85
+ owner: '@ankhorage/projects',
86
+ access: ['read'],
87
+ binding: { kind: 'action', bindableAs: ['target'] },
88
+ label: 'Read a Zefix company by UID',
89
+ description: 'Read curated Zefix company data through a trusted project host.',
90
+ },
75
91
  ];
@@ -0,0 +1,32 @@
1
+ import type { AppCategory } from '@ankhorage/contracts';
2
+ import type { NavigatorGenerationBindings, NavigatorRuntimePlatform } from '@ankhorage/contracts/navigator';
3
+ import type { Project, ProjectManifestRevision } from '../../../types/projects.js';
4
+ /*** Inputs fixed by the host before materializing one immutable Projects revision. */
5
+ export interface CreateExpoProjectMaterializerInput {
6
+ readonly targetDirectory: string;
7
+ readonly template: Readonly<{
8
+ category: AppCategory;
9
+ slug: string;
10
+ }>;
11
+ readonly navigator: Readonly<{
12
+ readonly bindings: NavigatorGenerationBindings;
13
+ readonly platform: NavigatorRuntimePlatform;
14
+ readonly expoRouterVersion: string;
15
+ }>;
16
+ }
17
+ /*** The public result of materializing one runnable, self-contained Expo project directory. */
18
+ export interface ExpoProjectMaterializationResult {
19
+ readonly projectId: string;
20
+ readonly revisionId: string;
21
+ readonly targetDirectory: string;
22
+ readonly files: readonly string[];
23
+ }
24
+ /*** A concrete Projects materializer composed solely from released owner APIs. */
25
+ export interface ExpoProjectMaterializer {
26
+ materializeAsync(input: Readonly<{
27
+ project: Project;
28
+ revision: ProjectManifestRevision;
29
+ }>): Promise<ExpoProjectMaterializationResult>;
30
+ }
31
+ /*** Create the public, caller-targeted Expo materializer for stored immutable project revisions. */
32
+ export declare function createExpoProjectMaterializer(input: CreateExpoProjectMaterializerInput): ExpoProjectMaterializer;
@@ -0,0 +1,149 @@
1
+ import { lstat, mkdir, mkdtemp, readdir, readFile, realpath, rm, writeFile, } from 'node:fs/promises';
2
+ import { basename, dirname, relative, resolve } from 'node:path';
3
+ import { resolveExpoRuntimeGeneratedAppScaffold } from '@ankhorage/expo-runtime/generated-app';
4
+ import { resolveExpoRuntimePlan } from '@ankhorage/expo-runtime/planning';
5
+ import { createNavigatorPlan, generateNavigator } from '@ankhorage/navigator';
6
+ import { materializeTemplateRevision } from '@ankhorage/templates';
7
+ /*** Create the public, caller-targeted Expo materializer for stored immutable project revisions. */
8
+ export function createExpoProjectMaterializer(input) {
9
+ return {
10
+ materializeAsync: async ({ project, revision }) => materializeExpoProjectAsync(input, project, revision),
11
+ };
12
+ }
13
+ /*** Coordinate owner plans and Template output into one prevalidated caller-owned Expo target. */
14
+ async function materializeExpoProjectAsync(input, project, revision) {
15
+ assertReleasedOwnerApis();
16
+ const targetDirectory = await assertEmptyTargetDirectoryAsync(input.targetDirectory);
17
+ const generatedFiles = createGeneratedFiles(revision.manifest, input.navigator);
18
+ const stagingDirectory = await mkdtemp(`${dirname(targetDirectory)}/.ankhorage-projects-`);
19
+ try {
20
+ const template = await ownerApis.materializeTemplateRevision({
21
+ cwd: stagingDirectory,
22
+ projectSlug: revision.manifest.metadata.slug,
23
+ template: input.template,
24
+ manifest: revision.manifest,
25
+ });
26
+ const templateFiles = await readTemplateFilesAsync(template.projectPath, template.createdFiles);
27
+ assertNoPathCollisions(templateFiles.map(({ relativePath }) => relativePath), generatedFiles.map(({ relativePath }) => relativePath));
28
+ await writeFilesAsync(targetDirectory, [...templateFiles, ...generatedFiles]);
29
+ return createMaterializationResult(project, revision, targetDirectory, templateFiles, generatedFiles);
30
+ }
31
+ finally {
32
+ await rm(stagingDirectory, { recursive: true, force: true });
33
+ }
34
+ }
35
+ /*** Produce every Runtime- and Navigator-owned file before Template or target filesystem writes. */
36
+ function createGeneratedFiles(manifest, navigatorInput) {
37
+ const runtimePlan = ownerApis.resolveExpoRuntimePlan(manifest);
38
+ assertNoErrors(runtimePlan.diagnostics, 'Expo Runtime');
39
+ const navigatorPlan = ownerApis.createNavigatorPlan(manifest.navigator, {
40
+ platform: navigatorInput.platform,
41
+ expoRouterVersion: navigatorInput.expoRouterVersion,
42
+ });
43
+ const navigator = ownerApis.generateNavigator(navigatorPlan, navigatorInput.bindings);
44
+ assertNoErrors(navigator.diagnostics, 'Navigator');
45
+ const runtime = ownerApis.resolveExpoRuntimeGeneratedAppScaffold(manifest, runtimePlan);
46
+ const files = [
47
+ ...runtime.files.map((file) => ({
48
+ relativePath: file.relativePath,
49
+ source: file.source,
50
+ })),
51
+ ...navigator.files.map((file) => ({
52
+ relativePath: file.path,
53
+ source: file.contents,
54
+ })),
55
+ ];
56
+ assertUniqueRelativePaths(files.map(({ relativePath }) => relativePath));
57
+ return files;
58
+ }
59
+ /*** Return the stable public materialization identity and complete sorted generated-file inventory. */
60
+ function createMaterializationResult(project, revision, targetDirectory, templateFiles, generatedFiles) {
61
+ return {
62
+ projectId: project.id,
63
+ revisionId: revision.id,
64
+ targetDirectory,
65
+ files: [...templateFiles, ...generatedFiles]
66
+ .map(({ relativePath }) => relativePath)
67
+ .sort((left, right) => left.localeCompare(right)),
68
+ };
69
+ }
70
+ /*** Narrow the released owner API boundary so optional peer implementations cannot leak into Projects. */
71
+ const ownerApis = {
72
+ materializeTemplateRevision: materializeTemplateRevision,
73
+ createNavigatorPlan: createNavigatorPlan,
74
+ generateNavigator: generateNavigator,
75
+ resolveExpoRuntimePlan: resolveExpoRuntimePlan,
76
+ resolveExpoRuntimeGeneratedAppScaffold: resolveExpoRuntimeGeneratedAppScaffold,
77
+ };
78
+ /*** Reject unavailable owner emitters rather than reproducing their source in Projects. */
79
+ function assertReleasedOwnerApis() {
80
+ if (typeof ownerApis.materializeTemplateRevision !== 'function' ||
81
+ typeof ownerApis.createNavigatorPlan !== 'function' ||
82
+ typeof ownerApis.generateNavigator !== 'function' ||
83
+ typeof ownerApis.resolveExpoRuntimePlan !== 'function' ||
84
+ typeof ownerApis.resolveExpoRuntimeGeneratedAppScaffold !== 'function') {
85
+ throw new Error('Required released owner materialization API is unavailable.');
86
+ }
87
+ }
88
+ /*** Resolve one existing, empty, non-symlink target directory before writing any output. */
89
+ async function assertEmptyTargetDirectoryAsync(target) {
90
+ const resolvedTarget = resolve(target);
91
+ const stats = await lstat(resolvedTarget);
92
+ if (!stats.isDirectory() || stats.isSymbolicLink()) {
93
+ throw new Error(`Materialization target must be a regular directory: ${resolvedTarget}`);
94
+ }
95
+ if ((await readdir(resolvedTarget)).length > 0) {
96
+ throw new Error(`Materialization target must be empty: ${resolvedTarget}`);
97
+ }
98
+ return realpath(resolvedTarget);
99
+ }
100
+ /*** Reject owner diagnostics that make a generated application invalid before filesystem side effects. */
101
+ function assertNoErrors(diagnostics, owner) {
102
+ const errors = diagnostics.filter(({ severity }) => severity === 'error');
103
+ if (errors.length > 0) {
104
+ throw new Error(`${owner} cannot materialize this revision: ${errors.map(({ message }) => message).join(' ')}`);
105
+ }
106
+ }
107
+ /*** Read exactly the files reported by Templates while keeping every path inside its staging project. */
108
+ async function readTemplateFilesAsync(projectPath, files) {
109
+ return Promise.all(files.map(async (relativePath) => ({
110
+ relativePath: assertSafeRelativePath(projectPath, relativePath),
111
+ source: await readFile(resolve(projectPath, relativePath)),
112
+ })));
113
+ }
114
+ /*** Write all materialized files with exclusive creation so no existing caller file is overwritten. */
115
+ async function writeFilesAsync(targetDirectory, files) {
116
+ for (const file of files) {
117
+ const relativePath = assertSafeRelativePath(targetDirectory, file.relativePath);
118
+ const targetPath = resolve(targetDirectory, relativePath);
119
+ await mkdir(dirname(targetPath), { recursive: true });
120
+ await writeFile(targetPath, file.source, { flag: 'wx' });
121
+ }
122
+ }
123
+ /*** Ensure an owner-reported project-relative path never crosses its designated directory. */
124
+ function assertSafeRelativePath(directory, candidate) {
125
+ const resolvedPath = resolve(directory, candidate);
126
+ const pathRelative = relative(directory, resolvedPath);
127
+ if (candidate.length === 0 ||
128
+ pathRelative.length === 0 ||
129
+ pathRelative === '..' ||
130
+ pathRelative.startsWith('../') ||
131
+ basename(resolvedPath) === '..') {
132
+ throw new Error(`Materialized file path escapes its target directory: ${candidate}`);
133
+ }
134
+ return pathRelative;
135
+ }
136
+ /*** Reject duplicate paths emitted by one owner before any write can begin. */
137
+ function assertUniqueRelativePaths(paths) {
138
+ if (new Set(paths).size !== paths.length) {
139
+ throw new Error('An owner emitted duplicate generated file paths.');
140
+ }
141
+ }
142
+ /*** Reject a collision across owner outputs instead of silently selecting one producer. */
143
+ function assertNoPathCollisions(templatePaths, generatedPaths) {
144
+ const templatePathSet = new Set(templatePaths);
145
+ const collision = generatedPaths.find((path) => templatePathSet.has(path));
146
+ if (collision !== undefined) {
147
+ throw new Error(`Owner outputs collide at generated file path: ${collision}`);
148
+ }
149
+ }
@@ -3,7 +3,7 @@ export interface ProjectMaterializer {
3
3
  materializeAsync(input: Readonly<{
4
4
  project: Project;
5
5
  revision: ProjectManifestRevision;
6
- }>): Promise<void>;
6
+ }>): Promise<unknown>;
7
7
  }
8
8
  export interface ProjectRepository {
9
9
  listAsync(): Promise<readonly Project[]>;
@@ -0,0 +1,30 @@
1
+ import { type ApiRequest, type ComposeAuthorizedApiRuntimeOptions } from '@ankhorage/api';
2
+ import { type FastifyInstance, type RegisterFastifyApiOptions } from '@ankhorage/api-fastify';
3
+ import type { InternalRestApiDefinition } from '@ankhorage/contracts/data';
4
+ import { type EndpointTestFetch } from '@ankhorage/data-sources';
5
+ import type { SecretStoreAdapter } from '@ankhorage/secrets/port';
6
+ type TrustedZefixOperation = 'company.search' | 'company.get-by-uid';
7
+ export type CreateTrustedZefixHostInput = Readonly<{
8
+ appId: string;
9
+ projectId: string;
10
+ environment: string;
11
+ definition: InternalRestApiDefinition;
12
+ operations: Readonly<Record<string, TrustedZefixOperation>>;
13
+ authenticateCallerAsync: (request: ApiRequest) => Promise<unknown>;
14
+ authorizeCallerAsync: (input: Readonly<{
15
+ caller: unknown;
16
+ appId: string;
17
+ projectId: string;
18
+ environment: string;
19
+ operationId: string;
20
+ }>) => Promise<boolean>;
21
+ secretStore: SecretStoreAdapter;
22
+ fetch?: EndpointTestFetch;
23
+ }>;
24
+ export type TrustedZefixHost = Readonly<{
25
+ composition: ComposeAuthorizedApiRuntimeOptions;
26
+ registerFastifyAsync: (server: FastifyInstance, options?: RegisterFastifyApiOptions) => Promise<unknown>;
27
+ }>;
28
+ /*** Compose declared Zefix operations into an authenticated, project-scoped trusted host. */
29
+ export declare function createTrustedZefixHost(input: CreateTrustedZefixHostInput): TrustedZefixHost;
30
+ export {};
@@ -0,0 +1,156 @@
1
+ import {} from '@ankhorage/api';
2
+ import { registerAuthorizedFastifyApiAsync, } from '@ankhorage/api-fastify';
3
+ import { createZefixPublicRestApi, mapZefixCompanyResult, } from '@ankhorage/data-sources';
4
+ import { createRuntimeApiCapabilityExecutor } from '@ankhorage/runtime/api-capabilities';
5
+ import { isRecord } from '@ankhorage/utility/object';
6
+ import { CAPABILITIES } from '../../../capabilities/index.js';
7
+ /*** Compose declared Zefix operations into an authenticated, project-scoped trusted host. */
8
+ export function createTrustedZefixHost(input) {
9
+ assertHostIdentity(input);
10
+ const executor = createRuntimeApiCapabilityExecutor({
11
+ apis: { zefix: createZefixPublicRestApi() },
12
+ credentialResolver: createZefixCredentialResolver(input),
13
+ ...(input.fetch === undefined ? {} : { fetch: input.fetch }),
14
+ });
15
+ const composition = {
16
+ definition: input.definition,
17
+ context: { appId: input.appId, projectId: input.projectId },
18
+ authorizeAsync: async ({ binding, request }) => authorizeRequestAsync(input, binding.operationId, request),
19
+ resolveHandler: ({ binding, declaration, context }) => {
20
+ const operation = input.operations[binding.operationId];
21
+ const capability = resolveCapability(operation);
22
+ const { method } = binding.operation;
23
+ if (!operation ||
24
+ declaration.capability !== capability?.id ||
25
+ binding.operation.intent !== 'read' ||
26
+ method === undefined ||
27
+ !isCanonicalOperationMethod(operation, method))
28
+ return undefined;
29
+ return {
30
+ capability,
31
+ approval: {
32
+ operationId: binding.operationId,
33
+ intent: binding.operation.intent,
34
+ method,
35
+ capabilityId: capability.id,
36
+ owner: capability.owner,
37
+ scope: context,
38
+ },
39
+ handler: async (request) => executeZefixOperationAsync(executor, operation, request),
40
+ };
41
+ },
42
+ };
43
+ return {
44
+ composition,
45
+ registerFastifyAsync: (server, options) => registerAuthorizedFastifyApiAsync(server, composition, options),
46
+ };
47
+ }
48
+ /*** Bind each exposed host declaration to the one canonical Zefix HTTP method. */
49
+ function isCanonicalOperationMethod(operation, method) {
50
+ return ((operation === 'company.search' && method === 'POST') ||
51
+ (operation === 'company.get-by-uid' && method === 'GET'));
52
+ }
53
+ /*** Deny before the operation handler can resolve a Vault secret or contact Zefix. */
54
+ async function authorizeRequestAsync(input, operationId, request) {
55
+ try {
56
+ const caller = await input.authenticateCallerAsync(request);
57
+ return caller === undefined
58
+ ? false
59
+ : input.authorizeCallerAsync({
60
+ caller,
61
+ appId: input.appId,
62
+ projectId: input.projectId,
63
+ environment: input.environment,
64
+ operationId,
65
+ });
66
+ }
67
+ catch {
68
+ return false;
69
+ }
70
+ }
71
+ /*** Resolve Basic credentials only for the canonical Zefix reference and immutable server scope. */
72
+ function createZefixCredentialResolver(input) {
73
+ return async (credential) => {
74
+ if (credential.id !== 'zefix-credentials' || credential.kind !== 'basic')
75
+ return undefined;
76
+ const result = await input.secretStore.resolve({
77
+ scope: { projectId: input.projectId, environment: input.environment },
78
+ ref: 'zefix-credentials',
79
+ });
80
+ const username = result.ok ? result.data.username : undefined;
81
+ const password = result.ok ? result.data.password : undefined;
82
+ return typeof username === 'string' && typeof password === 'string'
83
+ ? { headers: { authorization: `Basic ${btoa(`${username}:${password}`)}` } }
84
+ : undefined;
85
+ };
86
+ }
87
+ /*** Execute only an approved Zefix operation and return the curated company projection. */
88
+ async function executeZefixOperationAsync(executor, operation, request) {
89
+ const input = operation === 'company.search' ? request.body : { id: request.params.id };
90
+ const values = isHostBindingRecord(input) ? input : undefined;
91
+ const result = await executor({
92
+ capability: `api.zefix.${operation}`,
93
+ ...(values === undefined ? {} : { input: values }),
94
+ });
95
+ if (!result.ok)
96
+ return zefixUnavailableResponse();
97
+ const companies = curateZefixResult(result.data);
98
+ return companies === undefined ? zefixUnavailableResponse() : { body: companies };
99
+ }
100
+ /*** Strip provider wire payloads before any Zefix result crosses the trusted host boundary. */
101
+ function curateZefixResult(value) {
102
+ if (!Array.isArray(value))
103
+ return undefined;
104
+ const mapped = value.map((candidate) => {
105
+ const company = asZefixCompany(candidate);
106
+ return company ? mapZefixCompanyResult(company) : undefined;
107
+ });
108
+ return mapped.every((result) => result !== undefined)
109
+ ? mapped.map((result) => result.company)
110
+ : undefined;
111
+ }
112
+ /*** Return the one credential-safe failure representation for Vault or provider failures. */
113
+ function zefixUnavailableResponse() {
114
+ return { status: 502, body: { error: { code: 'zefix_unavailable' } } };
115
+ }
116
+ /*** Narrow unknown endpoint data to the optional-field Zefix short-company DTO. */
117
+ function asZefixCompany(value) {
118
+ return isRecord(value) &&
119
+ optionalString(value.name) &&
120
+ optionalString(value.uid) &&
121
+ optionalString(value.chid) &&
122
+ optionalString(value.legalSeat)
123
+ ? value
124
+ : undefined;
125
+ }
126
+ /*** Accept missing or string wire fields while rejecting non-serializable provider data. */
127
+ function optionalString(value) {
128
+ return value === undefined || typeof value === 'string';
129
+ }
130
+ /*** Admit only serializable operation input before passing it to Runtime's binding executor. */
131
+ function isHostBindingRecord(value) {
132
+ return isRecord(value) && Object.values(value).every(isHostBindingValue);
133
+ }
134
+ /*** Recursively reject host objects and functions from untrusted request input. */
135
+ function isHostBindingValue(value) {
136
+ return (value === null ||
137
+ typeof value === 'string' ||
138
+ typeof value === 'number' ||
139
+ typeof value === 'boolean' ||
140
+ (Array.isArray(value) && value.every(isHostBindingValue)) ||
141
+ (isRecord(value) && Object.values(value).every(isHostBindingValue)));
142
+ }
143
+ /*** Resolve the one Projects-owned capability permitted for each declared Zefix operation. */
144
+ function resolveCapability(operation) {
145
+ const id = operation === 'company.search'
146
+ ? 'projects.zefix.search'
147
+ : operation === 'company.get-by-uid'
148
+ ? 'projects.zefix.get-by-uid'
149
+ : undefined;
150
+ return CAPABILITIES.find((candidate) => candidate.id === id);
151
+ }
152
+ /*** Reject incomplete immutable host configuration before Fastify routes are registered. */
153
+ function assertHostIdentity(input) {
154
+ if (!input.appId.trim() || !input.projectId.trim() || !input.environment.trim())
155
+ throw new Error('Trusted Zefix host requires immutable app, project, and environment identities.');
156
+ }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export { createProjectRepositoryFileSystemAsync } from './features/projects/adapters/createProjectRepositoryFileSystemAsync.js';
2
2
  export { projects } from './features/projects/application/projects.js';
3
+ export { createExpoProjectMaterializer, type CreateExpoProjectMaterializerInput, type ExpoProjectMaterializationResult, type ExpoProjectMaterializer, } from './features/projects/composition/createExpoProjectMaterializer.js';
3
4
  export { createProjectsApiHandlerResolver } from './features/projects/composition/createProjectsApiHandlerResolver.js';
4
5
  export type { ProjectMaterializer, ProjectRepository, } from './features/projects/ports/ProjectRepository.js';
6
+ export { createTrustedZefixHost, type CreateTrustedZefixHostInput, type TrustedZefixHost, } from './features/trusted-zefix-host/composition/createTrustedZefixHost.js';
5
7
  export type { CreateProjectInput, MaterializeProjectRevisionInput, Project, ProjectManifest, ProjectManifestDraft, ProjectManifestRevision, ReloadProjectManifestInput, SaveProjectManifestInput, UpdateProjectInput, } from './types/projects.js';
package/dist/index.js CHANGED
@@ -1,3 +1,5 @@
1
1
  export { createProjectRepositoryFileSystemAsync } from './features/projects/adapters/createProjectRepositoryFileSystemAsync.js';
2
2
  export { projects } from './features/projects/application/projects.js';
3
+ export { createExpoProjectMaterializer, } from './features/projects/composition/createExpoProjectMaterializer.js';
3
4
  export { createProjectsApiHandlerResolver } from './features/projects/composition/createProjectsApiHandlerResolver.js';
5
+ export { createTrustedZefixHost, } from './features/trusted-zefix-host/composition/createTrustedZefixHost.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/projects",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Standalone project identity and repository actions.",
5
5
  "keywords": [
6
6
  "ankhorage",
@@ -62,7 +62,15 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "@ankhorage/api": "^0.5.1",
65
+ "@ankhorage/api-fastify": "^0.4.0",
65
66
  "@ankhorage/contracts": "^26.11.1",
67
+ "@ankhorage/data-sources": "^2.4.0",
68
+ "@ankhorage/expo-runtime": "^7.4.3",
69
+ "@ankhorage/navigator": "^3.5.22",
70
+ "@ankhorage/permissions": "^0.2.64",
71
+ "@ankhorage/runtime": "^5.6.4",
72
+ "@ankhorage/secrets": "^0.3.2",
73
+ "@ankhorage/templates": "^12.6.30",
66
74
  "@ankhorage/utility": "^1.10.0"
67
75
  },
68
76
  "ankh": {
@@ -202,6 +210,36 @@
202
210
  },
203
211
  "label": "Delete project",
204
212
  "description": "Delete one persisted project by identity."
213
+ },
214
+ {
215
+ "id": "projects.zefix.search",
216
+ "owner": "@ankhorage/projects",
217
+ "access": [
218
+ "read"
219
+ ],
220
+ "binding": {
221
+ "kind": "action",
222
+ "bindableAs": [
223
+ "target"
224
+ ]
225
+ },
226
+ "label": "Search Zefix companies",
227
+ "description": "Search curated Zefix company data through a trusted project host."
228
+ },
229
+ {
230
+ "id": "projects.zefix.get-by-uid",
231
+ "owner": "@ankhorage/projects",
232
+ "access": [
233
+ "read"
234
+ ],
235
+ "binding": {
236
+ "kind": "action",
237
+ "bindableAs": [
238
+ "target"
239
+ ]
240
+ },
241
+ "label": "Read a Zefix company by UID",
242
+ "description": "Read curated Zefix company data through a trusted project host."
205
243
  }
206
244
  ]
207
245
  }