@ankhorage/projects 0.9.1 → 0.9.3
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
|
-
         
|
|
7
7
|
|
|
8
8
|
Provides standalone project identity, persistence, and repository-oriented project actions.
|
|
9
9
|
|
|
@@ -79,7 +79,7 @@ function createScaffoldMaterializationFiles(files, packageSource) {
|
|
|
79
79
|
function createRuntimeSources(manifest, runtimePlan) {
|
|
80
80
|
const runtime = ownerApis.resolveExpoRuntimeGeneratedAppSources(manifest, runtimePlan, {
|
|
81
81
|
manifestModuleSpecifier: '../ankh.manifest',
|
|
82
|
-
screenModuleSpecifier: '
|
|
82
|
+
screenModuleSpecifier: '@/generated/runtimeManifestScreens',
|
|
83
83
|
});
|
|
84
84
|
assertNoErrors(runtime.diagnostics, 'Expo Runtime');
|
|
85
85
|
return runtime;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { createFastifyApiServer } from '@ankhorage/api-fastify';
|
|
1
|
+
import { createFastifyApiServer, registerFastifyCorsAsync } from '@ankhorage/api-fastify';
|
|
2
2
|
import { createSocialManagerLocalProviderFixtures } from './createSocialManagerLocalProviderFixtures.js';
|
|
3
3
|
import { createTrustedSocialManagerFileSystemPersistenceAsync } from './createTrustedSocialManagerFileSystemPersistenceAsync.js';
|
|
4
4
|
import { createTrustedSocialManagerLocalHostAsync } from './createTrustedSocialManagerLocalHostAsync.js';
|
|
5
|
+
const EXPO_WEB_DEVELOPMENT_ORIGIN = 'http://localhost:8081';
|
|
5
6
|
/*** Find the manifest-declared internal API that binds one or more Social Manager capabilities. */
|
|
6
7
|
export function findTrustedSocialManagerApiDefinition(manifest) {
|
|
7
8
|
return Object.values(manifest.infra.apis ?? {}).find((api) => api.origin === 'internal' &&
|
|
@@ -30,7 +31,12 @@ export async function createTrustedSocialManagerLocalServerAsync(input) {
|
|
|
30
31
|
throw new Error('Social Manager host did not expose its Flow worker lifecycle.');
|
|
31
32
|
const server = createFastifyApiServer();
|
|
32
33
|
try {
|
|
33
|
-
await
|
|
34
|
+
await registerFastifyCorsAsync(server, {
|
|
35
|
+
origin: EXPO_WEB_DEVELOPMENT_ORIGIN,
|
|
36
|
+
methods: ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT'],
|
|
37
|
+
allowedHeaders: ['authorization', 'content-type'],
|
|
38
|
+
});
|
|
39
|
+
await host.registerFastifyAsync(server);
|
|
34
40
|
}
|
|
35
41
|
catch (error) {
|
|
36
42
|
await worker.stop();
|