Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions components/componentLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
});
}

export const TRUSTED_RESOURCE_PLUGINS = {

Check failure on line 93 in components/componentLoader.ts

View workflow job for this annotation

GitHub Actions / Build Harper (Node.js v22)

Exported variable 'TRUSTED_RESOURCE_PLUGINS' has or is using name 'AuthAuditLog' from external module "/home/runner/work/harper/harper/utility/logging/harper_logger" but cannot be named.

Check failure on line 93 in components/componentLoader.ts

View workflow job for this annotation

GitHub Actions / Build Harper (Node.js v24)

Exported variable 'TRUSTED_RESOURCE_PLUGINS' has or is using name 'AuthAuditLog' from external module "/home/runner/work/harper/harper/utility/logging/harper_logger" but cannot be named.

Check failure on line 93 in components/componentLoader.ts

View workflow job for this annotation

GitHub Actions / Build Harper (Node.js v20)

Exported variable 'TRUSTED_RESOURCE_PLUGINS' has or is using name 'AuthAuditLog' from external module "/home/runner/work/harper/harper/utility/logging/harper_logger" but cannot be named.

Check failure on line 93 in components/componentLoader.ts

View workflow job for this annotation

GitHub Actions / Unit Test (Node.js v20)

Exported variable 'TRUSTED_RESOURCE_PLUGINS' has or is using name 'AuthAuditLog' from external module "/home/runner/work/harper/harper/utility/logging/harper_logger" but cannot be named.

Check failure on line 93 in components/componentLoader.ts

View workflow job for this annotation

GitHub Actions / Unit Test (Node.js v24)

Exported variable 'TRUSTED_RESOURCE_PLUGINS' has or is using name 'AuthAuditLog' from external module "/home/runner/work/harper/harper/utility/logging/harper_logger" but cannot be named.

Check failure on line 93 in components/componentLoader.ts

View workflow job for this annotation

GitHub Actions / Unit Test (Node.js v22)

Exported variable 'TRUSTED_RESOURCE_PLUGINS' has or is using name 'AuthAuditLog' from external module "/home/runner/work/harper/harper/utility/logging/harper_logger" but cannot be named.
REST, // for backwards compatibility with older configs
rest: REST,
graphql: graphqlQueryHandler,
Expand All @@ -115,7 +115,17 @@
*/
};
if (isMainThread) {
TRUSTED_RESOURCE_PLUGINS.operationsApi = require('../server/operationsServer');

Check failure on line 118 in components/componentLoader.ts

View workflow job for this annotation

GitHub Actions / Build Harper (Node.js v22)

Property 'operationsApi' does not exist on type '{ REST: typeof import("/home/runner/work/harper/harper/server/REST"); rest: typeof import("/home/runner/work/harper/harper/server/REST"); graphql: typeof import("/home/runner/work/harper/harper/server/graphqlQuerying"); ... 12 more ...; dataLoader: typeof import("/home/runner/work/harper/harper/resources/dataLoader"...'.

Check failure on line 118 in components/componentLoader.ts

View workflow job for this annotation

GitHub Actions / Build Harper (Node.js v24)

Property 'operationsApi' does not exist on type '{ REST: typeof import("/home/runner/work/harper/harper/server/REST"); rest: typeof import("/home/runner/work/harper/harper/server/REST"); graphql: typeof import("/home/runner/work/harper/harper/server/graphqlQuerying"); ... 12 more ...; dataLoader: typeof import("/home/runner/work/harper/harper/resources/dataLoader"...'.

Check failure on line 118 in components/componentLoader.ts

View workflow job for this annotation

GitHub Actions / Build Harper (Node.js v20)

Property 'operationsApi' does not exist on type '{ REST: typeof import("/home/runner/work/harper/harper/server/REST"); rest: typeof import("/home/runner/work/harper/harper/server/REST"); graphql: typeof import("/home/runner/work/harper/harper/server/graphqlQuerying"); ... 12 more ...; dataLoader: typeof import("/home/runner/work/harper/harper/resources/dataLoader"...'.

Check failure on line 118 in components/componentLoader.ts

View workflow job for this annotation

GitHub Actions / Unit Test (Node.js v20)

Property 'operationsApi' does not exist on type '{ REST: typeof import("/home/runner/work/harper/harper/server/REST"); rest: typeof import("/home/runner/work/harper/harper/server/REST"); graphql: typeof import("/home/runner/work/harper/harper/server/graphqlQuerying"); ... 12 more ...; dataLoader: typeof import("/home/runner/work/harper/harper/resources/dataLoader"...'.

Check failure on line 118 in components/componentLoader.ts

View workflow job for this annotation

GitHub Actions / Unit Test (Node.js v24)

Property 'operationsApi' does not exist on type '{ REST: typeof import("/home/runner/work/harper/harper/server/REST"); rest: typeof import("/home/runner/work/harper/harper/server/REST"); graphql: typeof import("/home/runner/work/harper/harper/server/graphqlQuerying"); ... 12 more ...; dataLoader: typeof import("/home/runner/work/harper/harper/resources/dataLoader"...'.

Check failure on line 118 in components/componentLoader.ts

View workflow job for this annotation

GitHub Actions / Unit Test (Node.js v22)

Property 'operationsApi' does not exist on type '{ REST: typeof import("/home/runner/work/harper/harper/server/REST"); rest: typeof import("/home/runner/work/harper/harper/server/REST"); graphql: typeof import("/home/runner/work/harper/harper/server/graphqlQuerying"); ... 12 more ...; dataLoader: typeof import("/home/runner/work/harper/harper/resources/dataLoader"...'.
} else {
// The HTTP operations API itself only binds in the main thread, but worker threads still
// dispatch operations — most notably, the replication WebSocket handler in workers receives
// inter-node operations like `add_node_back` and calls `server.operation(...)`. That requires
// `server.operation` / `server.registerOperation` to be wired up here too, and the operation
// function map to be initialized, BEFORE component plugins (replication, etc.) load and call
// `server.registerOperation?.({...})` at their module top level. Requiring serverUtilities
// directly (rather than the full operationsServer) avoids binding the fastify HTTP layer in
// workers while still installing the dispatch machinery.
require('../server/serverHelpers/serverUtilities');
}

for (const { name, packageIdentifier } of getEnvBuiltInComponents()) {
Expand Down
Loading