@undefineds.co/xpod 0.3.70 → 0.3.71-rc.13
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/config/cloud.json +3 -0
- package/config/local.json +3 -0
- package/config/resolver.json +7 -0
- package/config/xpod.base.json +20 -0
- package/dist/agents/ClaudeExecutor.js +1 -1
- package/dist/agents/ClaudeExecutor.js.map +1 -1
- package/dist/agents/types.d.ts +5 -5
- package/dist/agents/types.js.map +1 -1
- package/dist/api/ai-gateway/AiGatewayService.d.ts +5 -16
- package/dist/api/ai-gateway/AiGatewayService.js +13 -35
- package/dist/api/ai-gateway/AiGatewayService.js.map +1 -1
- package/dist/api/ai-gateway/auth/AiConnectionInvocationKeyIssuer.d.ts +3 -2
- package/dist/api/ai-gateway/auth/AiConnectionInvocationKeyIssuer.js +37 -12
- package/dist/api/ai-gateway/auth/AiConnectionInvocationKeyIssuer.js.map +1 -1
- package/dist/api/ai-gateway/auth/GatewayPrincipal.d.ts +2 -16
- package/dist/api/ai-gateway/auth/GatewayPrincipal.js +3 -33
- package/dist/api/ai-gateway/auth/GatewayPrincipal.js.map +1 -1
- package/dist/api/ai-gateway/auth/InvocationTokenAuthenticator.d.ts +23 -0
- package/dist/api/ai-gateway/auth/InvocationTokenAuthenticator.js +81 -0
- package/dist/api/ai-gateway/auth/InvocationTokenAuthenticator.js.map +1 -0
- package/dist/api/ai-gateway/auth/InvocationTokenCodec.d.ts +7 -4
- package/dist/api/ai-gateway/auth/InvocationTokenCodec.js.map +1 -1
- package/dist/api/ai-gateway/connect/index.d.ts +7 -26
- package/dist/api/ai-gateway/connect/index.js +40 -67
- package/dist/api/ai-gateway/connect/index.js.map +1 -1
- package/dist/api/ai-gateway/credentials/PlaintextCredentialPayload.d.ts +17 -0
- package/dist/api/ai-gateway/credentials/PlaintextCredentialPayload.js +65 -0
- package/dist/api/ai-gateway/credentials/PlaintextCredentialPayload.js.map +1 -0
- package/dist/api/ai-gateway/pod/HostedPodDataAccess.d.ts +24 -0
- package/dist/api/ai-gateway/pod/HostedPodDataAccess.js +149 -0
- package/dist/api/ai-gateway/pod/HostedPodDataAccess.js.map +1 -0
- package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.d.ts +13 -5
- package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.js +16 -19
- package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.js.map +1 -1
- package/dist/api/ai-gateway/service-access/AiConnectionServiceAccess.d.ts +1 -1
- package/dist/api/ai-gateway/service-access/AiConnectionServiceAccess.js +0 -2
- package/dist/api/ai-gateway/service-access/AiConnectionServiceAccess.js.map +1 -1
- package/dist/api/auth/AuthContext.d.ts +1 -12
- package/dist/api/auth/AuthContext.js +0 -11
- package/dist/api/auth/AuthContext.js.map +1 -1
- package/dist/api/auth/ClientCredentialsAuthenticator.js +4 -11
- package/dist/api/auth/ClientCredentialsAuthenticator.js.map +1 -1
- package/dist/api/chatkit/default-agent.d.ts +2 -2
- package/dist/api/chatkit/default-agent.js +4 -4
- package/dist/api/chatkit/default-agent.js.map +1 -1
- package/dist/api/chatkit/runtime/AcpAgentRuntime.js +1 -1
- package/dist/api/chatkit/runtime/AcpAgentRuntime.js.map +1 -1
- package/dist/api/container/common.js +28 -69
- package/dist/api/container/common.js.map +1 -1
- package/dist/api/container/index.js +5 -6
- package/dist/api/container/index.js.map +1 -1
- package/dist/api/container/routes.js +2 -5
- package/dist/api/container/routes.js.map +1 -1
- package/dist/api/container/types.d.ts +8 -10
- package/dist/api/container/types.js.map +1 -1
- package/dist/api/handlers/AiClientConfigurationHandler.js +3 -3
- package/dist/api/handlers/AiClientConfigurationHandler.js.map +1 -1
- package/dist/api/handlers/AiGatewayHandler.js +2 -2
- package/dist/api/handlers/AiGatewayHandler.js.map +1 -1
- package/dist/api/handlers/AiGatewayManagementHandler.d.ts +2 -10
- package/dist/api/handlers/AiGatewayManagementHandler.js +4 -154
- package/dist/api/handlers/AiGatewayManagementHandler.js.map +1 -1
- package/dist/api/handlers/NetworkSettingsHandler.js +0 -3
- package/dist/api/handlers/NetworkSettingsHandler.js.map +1 -1
- package/dist/api/handlers/PodSettingsHandler.d.ts +5 -2
- package/dist/api/handlers/PodSettingsHandler.js +3 -3
- package/dist/api/handlers/PodSettingsHandler.js.map +1 -1
- package/dist/api/runs/AgentRuntimeTypes.d.ts +3 -3
- package/dist/api/runs/AgentRuntimeTypes.js +10 -10
- package/dist/api/runs/AgentRuntimeTypes.js.map +1 -1
- package/dist/api/runs/InngestRunExecutionBackend.d.ts +15 -9
- package/dist/api/runs/InngestRunExecutionBackend.js +25 -10
- package/dist/api/runs/InngestRunExecutionBackend.js.map +1 -1
- package/dist/api/runs/PiAgentRuntimeDriver.js +2 -2
- package/dist/api/runs/PiAgentRuntimeDriver.js.map +1 -1
- package/dist/api/runs/RunStateCenter.js +1 -1
- package/dist/api/runs/RunStateCenter.js.map +1 -1
- package/dist/api/service/AiClientConfigurationService.d.ts +2 -2
- package/dist/api/service/AiClientConfigurationService.js +11 -11
- package/dist/api/service/AiClientConfigurationService.js.map +1 -1
- package/dist/api/tasks/InngestTaskScheduler.d.ts +16 -10
- package/dist/api/tasks/InngestTaskScheduler.js +24 -12
- package/dist/api/tasks/InngestTaskScheduler.js.map +1 -1
- package/dist/cli/commands/start.js +7 -7
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/components/components.jsonld +1 -0
- package/dist/components/context.jsonld +36 -0
- package/dist/http/InternalPodDataHttpHandler.d.ts +32 -0
- package/dist/http/InternalPodDataHttpHandler.js +258 -0
- package/dist/http/InternalPodDataHttpHandler.js.map +1 -0
- package/dist/http/InternalPodDataHttpHandler.jsonld +201 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/main.js +13 -13
- package/dist/main.js.map +1 -1
- package/dist/runtime/GatewayAdminProxyAuth.d.ts +15 -1
- package/dist/runtime/GatewayAdminProxyAuth.js +57 -2
- package/dist/runtime/GatewayAdminProxyAuth.js.map +1 -1
- package/dist/runtime/bootstrap.js +3 -0
- package/dist/runtime/bootstrap.js.map +1 -1
- package/dist/runtime/css-process.d.ts +1 -1
- package/dist/runtime/css-process.js +4 -1
- package/dist/runtime/css-process.js.map +1 -1
- package/dist/runtime/runner/node/CommunitySolidServerCssRunner.d.ts +2 -0
- package/dist/runtime/runner/node/CommunitySolidServerCssRunner.js +50 -0
- package/dist/runtime/runner/node/CommunitySolidServerCssRunner.js.map +1 -1
- package/node_modules/@undefineds.co/ai-connection/dist/AiClientConfigurationSection.d.ts +5 -5
- package/node_modules/@undefineds.co/ai-connection/dist/AiClientConfigurationSection.js +7 -7
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionMain.js +1 -1
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionPanel.d.ts +3 -1
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionPanel.js +74 -60
- package/node_modules/@undefineds.co/ai-connection/dist/ai-connection-client.d.ts +0 -21
- package/node_modules/@undefineds.co/ai-connection/dist/ai-connection-client.js +0 -41
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/base-adapter.d.ts +1 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/base-adapter.js +7 -2
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/codex.js +3 -3
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/index.cjs +15 -9
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/json-env-adapter.js +4 -4
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/pi.js +3 -3
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/types.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connection/dist/controller.d.ts +2 -1
- package/node_modules/@undefineds.co/ai-connection/dist/controller.js +1 -0
- package/node_modules/@undefineds.co/ai-connection/dist/service-access.js +0 -1
- package/node_modules/@undefineds.co/extension-sdk/dist/web.d.ts +22 -1
- package/package.json +3 -3
- package/static/app/assets/main.js +7 -7
- package/static/dashboard/assets/NetworkPage-CXjiUMR1.js +2 -0
- package/static/dashboard/assets/{PaneListHeader-57nvMwH6.js → PaneListHeader-BSipfl0W.js} +1 -1
- package/static/dashboard/assets/PodPage-Bd3Xhmp-.js +2 -0
- package/static/dashboard/assets/ServicesPage-CI3jWZGe.js +1 -0
- package/static/dashboard/assets/{card-B9Zjf_2p.js → card-z5BV5hTo.js} +1 -1
- package/static/dashboard/assets/{dashboard-8C6o666W.js → dashboard-CSrqAv2L.js} +2 -2
- package/static/dashboard/assets/{database-DPh9wDY9.js → database-Ct5ZPe6L.js} +1 -1
- package/static/dashboard/assets/{external-link-VbMQvVMz.js → external-link-B7wD1hkm.js} +1 -1
- package/static/dashboard/assets/index-tOBaUnM1.js +44 -0
- package/static/dashboard/assets/{refresh-cw-BxVxNxNr.js → refresh-cw-CFDZPaE8.js} +1 -1
- package/static/dashboard/assets/{services-status-context-DKmJ7ISr.js → services-status-context-DN1Icg4A.js} +1 -1
- package/static/dashboard/dashboard.html +1 -1
- package/static/settings/assets/ModelsPage-03NPWzoX.js +1 -0
- package/static/settings/assets/{PaneListHeader-Bgaze006.js → PaneListHeader-DMD8OJef.js} +1 -1
- package/static/settings/assets/PodPage-DT4EMYhL.js +2 -0
- package/static/settings/assets/ServicesPage-CJ0ub6IH.js +1 -0
- package/static/settings/assets/SettingsPage-BkR7ZK18.js +41 -0
- package/static/settings/assets/{card-B_bXSIn-.js → card-Cjsia0_V.js} +1 -1
- package/static/settings/assets/{services-status-context-DiX-AbrP.js → services-status-context-CkuKmH5h.js} +1 -1
- package/static/settings/assets/{settings-B30oMfZq.js → settings-Cyyv6-SD.js} +2 -2
- package/static/settings/assets/{workspace-layout-Dv1Yn9Ci.js → workspace-layout-B47luv6r.js} +1 -1
- package/static/settings/settings.html +1 -1
- package/dist/api/ai-gateway/auth/ClientCredentialsInternalPodAccessTokenProvider.d.ts +0 -25
- package/dist/api/ai-gateway/auth/ClientCredentialsInternalPodAccessTokenProvider.js +0 -91
- package/dist/api/ai-gateway/auth/ClientCredentialsInternalPodAccessTokenProvider.js.map +0 -1
- package/dist/api/ai-gateway/auth/GatewayApiKey.d.ts +0 -28
- package/dist/api/ai-gateway/auth/GatewayApiKey.js +0 -162
- package/dist/api/ai-gateway/auth/GatewayApiKey.js.map +0 -1
- package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.d.ts +0 -56
- package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.js +0 -143
- package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.js.map +0 -1
- package/dist/api/ai-gateway/auth/GatewayKeyLocatorCodec.d.ts +0 -26
- package/dist/api/ai-gateway/auth/GatewayKeyLocatorCodec.js +0 -97
- package/dist/api/ai-gateway/auth/GatewayKeyLocatorCodec.js.map +0 -1
- package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.d.ts +0 -54
- package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js +0 -152
- package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js.map +0 -1
- package/static/dashboard/assets/NetworkPage-Brt79fuQ.js +0 -2
- package/static/dashboard/assets/PodPage-CM6do1vB.js +0 -2
- package/static/dashboard/assets/ServicesPage-BUNxGJRz.js +0 -1
- package/static/dashboard/assets/index-RfiFckzb.js +0 -51
- package/static/settings/assets/ModelsPage-D_IH7AH3.js +0 -1
- package/static/settings/assets/PodPage-Cy1VNObw.js +0 -2
- package/static/settings/assets/ServicesPage-BsFaxVWC.js +0 -1
- package/static/settings/assets/SettingsPage-UafNWE_p.js +0 -48
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export type { PostgresRdfVectorIndexOptions } from './storage/rdf/PostgresRdfVec
|
|
|
20
20
|
export * from './document';
|
|
21
21
|
export * from './security';
|
|
22
22
|
import { SubgraphSparqlHttpHandler } from './http/SubgraphSparqlHttpHandler';
|
|
23
|
+
import { InternalPodDataHttpHandler } from './http/InternalPodDataHttpHandler';
|
|
23
24
|
import { QuotaAdminHttpHandler } from './http/quota/QuotaAdminHttpHandler';
|
|
24
25
|
import { SparqlUpdateResourceStore } from './storage/SparqlUpdateResourceStore';
|
|
25
26
|
import { ClusterIngressRouter } from './http/ClusterIngressRouter';
|
|
@@ -116,4 +117,4 @@ export type { EntitlementProvider, AccountEntitlement } from './quota/Entitlemen
|
|
|
116
117
|
export type { TunnelProvider, TunnelConfig, TunnelSetupOptions, TunnelStatus, } from './tunnel/TunnelProvider';
|
|
117
118
|
export type { SubdomainRegistration, ConnectivityResult, SubdomainServiceOptions, } from './subdomain/SubdomainService';
|
|
118
119
|
export { AppStaticAssetHandler } from './http/AppStaticAssetHandler';
|
|
119
|
-
export { RepresentationPartialConvertingStore, MinioDataAccessor, QuadstoreSparqlDataAccessor, QuintStoreSparqlDataAccessor, SolidRdfDataAccessor, MixDataAccessor, ConfigurableLoggerFactory, SparqlUpdateResourceStore, SubgraphQueryEngine, QuadstoreSparqlEngine, QuintstoreSparqlEngine, SubgraphSparqlHttpHandler, QuotaAdminHttpHandler, ClusterIngressRouter, ClusterWebSocketConfigurator, EdgeNodeDirectDebugHttpHandler, EdgeNodeProxyHttpHandler, RouterHttpHandler, RouterHttpRoute, TracingHandler, EdgeNodeCertificateHttpHandler, TerminalHttpHandler, DeviceNotificationHub, DeviceNotificationResourceListener, DeviceNotificationWebSocketServer, DeviceNotificationTicketHandler, registerDeviceNotificationRuntime, ReservedSuffixIdentifierGenerator, DrizzleIndexedStorage, ValidatingIdentityProviderHttpHandler, PostgresKeyValueStorage, RedisKeyValueStorage, SqliteKeyValueStorage, BaseKeyValueStorage, DrizzleQuotaService, NoopQuotaService, HttpEntitlementProvider, NoopEntitlementProvider, PerAccountQuotaStrategy, TencentDnsProvider, EdgeNodeDnsCoordinator, Dns01CertificateProvisioner, SimpleEdgeNodeTunnelManager, NoopEdgeNodeTunnelManager, FrpTunnelManager, EdgeNodeHealthProbeService, EdgeNodeAgent, EdgeNodeAgentInitializer, EdgeNodeCertificateService, AcmeCertificateManager, EdgeNodeModeDetector, ClusterIdentifierStrategy, UsageTrackingStore, CenterNodeRegistrationService, PodRoutingHttpHandler, ReactAppViewHandler, QuintStore, SqliteQuintStore, PgQuintStore, RdfTermDictionary, RdfQuadIndex, Rdf3xIndex, RdfTextIndex, RdfVectorIndex, PostgresRdfTextIndex, PostgresRdfVectorIndex, RdfSparqlAdapter, ShadowRdfQuintStore, SolidRdfEngine, PostgresRdfEngine, SolidRdfSparqlEngine, VectorStore, SqliteVectorStore, PostgresVectorStore, VectorHttpHandler, ProviderRegistry, ProviderRegistryImpl, EmbeddingService, EmbeddingServiceImpl, CredentialReader, CredentialReaderImpl, CloudflareTunnelProvider, LocalTunnelProvider, NgrokTunnelProvider, SubdomainService, MultiDomainIdentifierStrategy, SubdomainPodIdentifierStrategy, DisabledOidcHandler, DisabledIdentityProviderHandler, AutoDetectOidcHandler, AutoDetectIdentityProviderHandler, LoopbackClientIdAdapterFactory, ScopedPickWebIdHandler, UrlAwareRedisLocker, ProvisionPodCreator, ProvisionCodeCodec, LocalPodProvisioningService, SqliteSolidFsSyncJournal, };
|
|
120
|
+
export { RepresentationPartialConvertingStore, MinioDataAccessor, QuadstoreSparqlDataAccessor, QuintStoreSparqlDataAccessor, SolidRdfDataAccessor, MixDataAccessor, ConfigurableLoggerFactory, SparqlUpdateResourceStore, SubgraphQueryEngine, QuadstoreSparqlEngine, QuintstoreSparqlEngine, SubgraphSparqlHttpHandler, InternalPodDataHttpHandler, QuotaAdminHttpHandler, ClusterIngressRouter, ClusterWebSocketConfigurator, EdgeNodeDirectDebugHttpHandler, EdgeNodeProxyHttpHandler, RouterHttpHandler, RouterHttpRoute, TracingHandler, EdgeNodeCertificateHttpHandler, TerminalHttpHandler, DeviceNotificationHub, DeviceNotificationResourceListener, DeviceNotificationWebSocketServer, DeviceNotificationTicketHandler, registerDeviceNotificationRuntime, ReservedSuffixIdentifierGenerator, DrizzleIndexedStorage, ValidatingIdentityProviderHttpHandler, PostgresKeyValueStorage, RedisKeyValueStorage, SqliteKeyValueStorage, BaseKeyValueStorage, DrizzleQuotaService, NoopQuotaService, HttpEntitlementProvider, NoopEntitlementProvider, PerAccountQuotaStrategy, TencentDnsProvider, EdgeNodeDnsCoordinator, Dns01CertificateProvisioner, SimpleEdgeNodeTunnelManager, NoopEdgeNodeTunnelManager, FrpTunnelManager, EdgeNodeHealthProbeService, EdgeNodeAgent, EdgeNodeAgentInitializer, EdgeNodeCertificateService, AcmeCertificateManager, EdgeNodeModeDetector, ClusterIdentifierStrategy, UsageTrackingStore, CenterNodeRegistrationService, PodRoutingHttpHandler, ReactAppViewHandler, QuintStore, SqliteQuintStore, PgQuintStore, RdfTermDictionary, RdfQuadIndex, Rdf3xIndex, RdfTextIndex, RdfVectorIndex, PostgresRdfTextIndex, PostgresRdfVectorIndex, RdfSparqlAdapter, ShadowRdfQuintStore, SolidRdfEngine, PostgresRdfEngine, SolidRdfSparqlEngine, VectorStore, SqliteVectorStore, PostgresVectorStore, VectorHttpHandler, ProviderRegistry, ProviderRegistryImpl, EmbeddingService, EmbeddingServiceImpl, CredentialReader, CredentialReaderImpl, CloudflareTunnelProvider, LocalTunnelProvider, NgrokTunnelProvider, SubdomainService, MultiDomainIdentifierStrategy, SubdomainPodIdentifierStrategy, DisabledOidcHandler, DisabledIdentityProviderHandler, AutoDetectOidcHandler, AutoDetectIdentityProviderHandler, LoopbackClientIdAdapterFactory, ScopedPickWebIdHandler, UrlAwareRedisLocker, ProvisionPodCreator, ProvisionCodeCodec, LocalPodProvisioningService, SqliteSolidFsSyncJournal, };
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.SqliteSolidFsSyncJournal = exports.LocalPodProvisioningService = exports.ProvisionCodeCodec = exports.ProvisionPodCreator = exports.UrlAwareRedisLocker = exports.ScopedPickWebIdHandler = exports.LoopbackClientIdAdapterFactory = exports.AutoDetectIdentityProviderHandler = exports.AutoDetectOidcHandler = exports.DisabledIdentityProviderHandler = exports.DisabledOidcHandler = exports.SubdomainPodIdentifierStrategy = exports.MultiDomainIdentifierStrategy = exports.SubdomainService = exports.NgrokTunnelProvider = exports.LocalTunnelProvider = exports.CloudflareTunnelProvider = exports.CredentialReaderImpl = exports.CredentialReader = exports.EmbeddingServiceImpl = exports.EmbeddingService = exports.ProviderRegistryImpl = exports.ProviderRegistry = exports.VectorHttpHandler = exports.PostgresVectorStore = exports.SqliteVectorStore = exports.VectorStore = exports.SolidRdfSparqlEngine = exports.PostgresRdfEngine = exports.SolidRdfEngine = exports.ShadowRdfQuintStore = exports.RdfSparqlAdapter = exports.PostgresRdfVectorIndex = exports.PostgresRdfTextIndex = exports.RdfVectorIndex = exports.RdfTextIndex = exports.Rdf3xIndex = exports.RdfQuadIndex = exports.RdfTermDictionary = exports.PgQuintStore = exports.SqliteQuintStore = exports.QuintStore = exports.ReactAppViewHandler = exports.PodRoutingHttpHandler = exports.CenterNodeRegistrationService = exports.UsageTrackingStore = exports.ClusterIdentifierStrategy = exports.EdgeNodeModeDetector = exports.AcmeCertificateManager = void 0;
|
|
17
|
+
exports.EdgeNodeAgentInitializer = exports.EdgeNodeAgent = exports.EdgeNodeHealthProbeService = exports.FrpTunnelManager = exports.NoopEdgeNodeTunnelManager = exports.SimpleEdgeNodeTunnelManager = exports.Dns01CertificateProvisioner = exports.EdgeNodeDnsCoordinator = exports.TencentDnsProvider = exports.PerAccountQuotaStrategy = exports.NoopEntitlementProvider = exports.HttpEntitlementProvider = exports.NoopQuotaService = exports.DrizzleQuotaService = exports.BaseKeyValueStorage = exports.SqliteKeyValueStorage = exports.RedisKeyValueStorage = exports.PostgresKeyValueStorage = exports.ValidatingIdentityProviderHttpHandler = exports.DrizzleIndexedStorage = exports.ReservedSuffixIdentifierGenerator = exports.registerDeviceNotificationRuntime = exports.DeviceNotificationTicketHandler = exports.DeviceNotificationWebSocketServer = exports.DeviceNotificationResourceListener = exports.DeviceNotificationHub = exports.TerminalHttpHandler = exports.EdgeNodeCertificateHttpHandler = exports.TracingHandler = exports.RouterHttpRoute = exports.RouterHttpHandler = exports.EdgeNodeProxyHttpHandler = exports.EdgeNodeDirectDebugHttpHandler = exports.ClusterWebSocketConfigurator = exports.ClusterIngressRouter = exports.QuotaAdminHttpHandler = exports.InternalPodDataHttpHandler = exports.SubgraphSparqlHttpHandler = exports.QuintstoreSparqlEngine = exports.QuadstoreSparqlEngine = exports.SubgraphQueryEngine = exports.SparqlUpdateResourceStore = exports.ConfigurableLoggerFactory = exports.MixDataAccessor = exports.SolidRdfDataAccessor = exports.QuintStoreSparqlDataAccessor = exports.QuadstoreSparqlDataAccessor = exports.MinioDataAccessor = exports.RepresentationPartialConvertingStore = exports.AppStaticAssetHandler = void 0;
|
|
18
|
+
exports.SqliteSolidFsSyncJournal = exports.LocalPodProvisioningService = exports.ProvisionCodeCodec = exports.ProvisionPodCreator = exports.UrlAwareRedisLocker = exports.ScopedPickWebIdHandler = exports.LoopbackClientIdAdapterFactory = exports.AutoDetectIdentityProviderHandler = exports.AutoDetectOidcHandler = exports.DisabledIdentityProviderHandler = exports.DisabledOidcHandler = exports.SubdomainPodIdentifierStrategy = exports.MultiDomainIdentifierStrategy = exports.SubdomainService = exports.NgrokTunnelProvider = exports.LocalTunnelProvider = exports.CloudflareTunnelProvider = exports.CredentialReaderImpl = exports.CredentialReader = exports.EmbeddingServiceImpl = exports.EmbeddingService = exports.ProviderRegistryImpl = exports.ProviderRegistry = exports.VectorHttpHandler = exports.PostgresVectorStore = exports.SqliteVectorStore = exports.VectorStore = exports.SolidRdfSparqlEngine = exports.PostgresRdfEngine = exports.SolidRdfEngine = exports.ShadowRdfQuintStore = exports.RdfSparqlAdapter = exports.PostgresRdfVectorIndex = exports.PostgresRdfTextIndex = exports.RdfVectorIndex = exports.RdfTextIndex = exports.Rdf3xIndex = exports.RdfQuadIndex = exports.RdfTermDictionary = exports.PgQuintStore = exports.SqliteQuintStore = exports.QuintStore = exports.ReactAppViewHandler = exports.PodRoutingHttpHandler = exports.CenterNodeRegistrationService = exports.UsageTrackingStore = exports.ClusterIdentifierStrategy = exports.EdgeNodeModeDetector = exports.AcmeCertificateManager = exports.EdgeNodeCertificateService = void 0;
|
|
19
19
|
require("./runtime/configure-drizzle-solid");
|
|
20
20
|
const RepresentationPartialConvertingStore_1 = require("./storage/RepresentationPartialConvertingStore");
|
|
21
21
|
Object.defineProperty(exports, "RepresentationPartialConvertingStore", { enumerable: true, get: function () { return RepresentationPartialConvertingStore_1.RepresentationPartialConvertingStore; } });
|
|
@@ -40,6 +40,8 @@ __exportStar(require("./document"), exports);
|
|
|
40
40
|
__exportStar(require("./security"), exports);
|
|
41
41
|
const SubgraphSparqlHttpHandler_1 = require("./http/SubgraphSparqlHttpHandler");
|
|
42
42
|
Object.defineProperty(exports, "SubgraphSparqlHttpHandler", { enumerable: true, get: function () { return SubgraphSparqlHttpHandler_1.SubgraphSparqlHttpHandler; } });
|
|
43
|
+
const InternalPodDataHttpHandler_1 = require("./http/InternalPodDataHttpHandler");
|
|
44
|
+
Object.defineProperty(exports, "InternalPodDataHttpHandler", { enumerable: true, get: function () { return InternalPodDataHttpHandler_1.InternalPodDataHttpHandler; } });
|
|
43
45
|
const QuotaAdminHttpHandler_1 = require("./http/quota/QuotaAdminHttpHandler");
|
|
44
46
|
Object.defineProperty(exports, "QuotaAdminHttpHandler", { enumerable: true, get: function () { return QuotaAdminHttpHandler_1.QuotaAdminHttpHandler; } });
|
|
45
47
|
const SparqlUpdateResourceStore_1 = require("./storage/SparqlUpdateResourceStore");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;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AAA,qBAAqB,OAAA","sourcesContent":["import './runtime/configure-drizzle-solid';\nimport { RepresentationPartialConvertingStore } from './storage/RepresentationPartialConvertingStore';\nimport { MinioDataAccessor } from './storage/accessors/MinioDataAccessor';\nimport { QuadstoreSparqlDataAccessor } from './storage/accessors/QuadstoreSparqlDataAccessor';\nimport { QuintStoreSparqlDataAccessor } from './storage/accessors/QuintStoreSparqlDataAccessor';\nimport { SolidRdfDataAccessor } from './storage/accessors/SolidRdfDataAccessor';\nimport { MixDataAccessor } from './storage/accessors/MixDataAccessor';\nimport { ConfigurableLoggerFactory } from './logging/ConfigurableLoggerFactory';\nimport { SubgraphQueryEngine } from './storage/sparql/SubgraphQueryEngine';\nimport { QuadstoreSparqlEngine, QuintstoreSparqlEngine } from './storage/sparql/CompatibilitySparqlEngine';\nexport type { SparqlEngine } from './storage/sparql/SubgraphQueryEngine';\nexport type {\n RdfEngineLike,\n RdfEngineStorageStats,\n RdfDerivedIndexRefreshResult,\n RdfIndexStats,\n RdfIndexSpaceObject,\n RdfIndexMetrics,\n RdfIndexPutOptions,\n RdfPatternQuery,\n RdfQuadIndexOptions,\n RdfQuadIndexScanResult,\n RdfTextIndexLike,\n RdfTextIndexOptions,\n RdfTextIndexSyncLike,\n RdfVectorIndexLike,\n RdfVectorIndexOptions,\n RdfVectorIndexSyncLike,\n RdfShadowBackfillOptions,\n RdfShadowBackfillResult,\n RdfShadowDiff,\n RdfShadowScanResult,\n RdfSourceInput,\n} from './storage/rdf/types';\nexport type { RdfSparqlCompileResult } from './storage/rdf/RdfSparqlAdapter';\nexport type { RdfAccessScope } from './storage/rdf/RdfAccessScope';\nexport type { ShadowRdfQuintStoreOptions } from './storage/rdf/ShadowRdfQuintStore';\nexport type {\n SolidRdfSparqlEngineOptions,\n SolidRdfSparqlFallback,\n} from './storage/rdf/SolidRdfSparqlEngine';\nexport type { PostgresRdfEngineOptions } from './storage/rdf/PostgresRdfEngine';\nexport type { PostgresRdfTextIndexOptions } from './storage/rdf/PostgresRdfTextIndex';\nexport type { PostgresRdfVectorIndexOptions } from './storage/rdf/PostgresRdfVectorIndex';\nexport * from './document';\nexport * from './security';\nimport { SubgraphSparqlHttpHandler } from './http/SubgraphSparqlHttpHandler';\nimport { QuotaAdminHttpHandler } from './http/quota/QuotaAdminHttpHandler';\nimport { SparqlUpdateResourceStore } from './storage/SparqlUpdateResourceStore';\nimport { ClusterIngressRouter } from './http/ClusterIngressRouter';\nimport { ClusterWebSocketConfigurator } from './http/ClusterWebSocketConfigurator';\nimport { EdgeNodeDirectDebugHttpHandler } from './http/EdgeNodeDirectDebugHttpHandler';\nimport { EdgeNodeProxyHttpHandler } from './http/EdgeNodeProxyHttpHandler';\nimport { RouterHttpHandler } from './http/RouterHttpHandler';\nimport { RouterHttpRoute } from './http/RouterHttpRoute';\nimport { TracingHandler } from './http/TracingHandler';\nimport { TerminalHttpHandler } from './http/terminal/TerminalHttpHandler';\nimport { DeviceNotificationHub } from './notifications/DeviceNotificationHub';\nimport { DeviceNotificationResourceListener } from './notifications/DeviceNotificationResourceListener';\nimport { DeviceNotificationWebSocketServer } from './http/DeviceNotificationWebSocketServer';\nimport { DeviceNotificationTicketHandler } from './api/handlers/DeviceNotificationTicketHandler';\nimport { registerDeviceNotificationRuntime } from './api/handlers/DeviceNotificationRuntime';\nimport { EdgeNodeCertificateHttpHandler } from './http/admin/EdgeNodeCertificateHttpHandler';\nimport { ReservedSuffixIdentifierGenerator } from './pods/ReservedSuffixIdentifierGenerator';\nimport { DrizzleIndexedStorage } from './identity/drizzle/DrizzleIndexedStorage';\nimport { ValidatingIdentityProviderHttpHandler } from './identity/ValidatingIdentityProviderHttpHandler';\nimport { PostgresKeyValueStorage } from './storage/keyvalue/PostgresKeyValueStorage';\nimport { RedisKeyValueStorage } from './storage/keyvalue/RedisKeyValueStorage';\nimport { SqliteKeyValueStorage } from './storage/keyvalue/SqliteKeyValueStorage';\nimport { BaseKeyValueStorage } from './storage/keyvalue/BaseKeyValueStorage';\nimport { DrizzleQuotaService } from './quota/DrizzleQuotaService';\nimport { NoopQuotaService } from './quota/NoopQuotaService';\nimport { HttpEntitlementProvider, NoopEntitlementProvider } from './quota/EntitlementProvider';\nimport { PerAccountQuotaStrategy } from './storage/quota/PerAccountQuotaStrategy';\nimport { TencentDnsProvider } from './dns/tencent/TencentDnsProvider';\nimport { EdgeNodeDnsCoordinator } from './edge/EdgeNodeDnsCoordinator';\nimport { Dns01CertificateProvisioner } from './edge/Dns01CertificateProvisioner';\nimport { SimpleEdgeNodeTunnelManager, NoopEdgeNodeTunnelManager } from './edge/EdgeNodeTunnelManager';\nimport { FrpTunnelManager } from './edge/FrpTunnelManager';\nimport { AcmeCertificateManager } from './edge/acme/AcmeCertificateManager';\nimport { EdgeNodeHealthProbeService } from './edge/EdgeNodeHealthProbeService';\nimport { EdgeNodeAgent } from './edge/EdgeNodeAgent';\nimport { EdgeNodeAgentInitializer } from './edge/EdgeNodeAgentInitializer';\nimport { EdgeNodeCertificateService } from './service/EdgeNodeCertificateService';\nimport { createBandwidthThrottleTransform } from './util/stream/BandwidthThrottleTransform';\nimport { UsageTrackingStore } from './storage/quota/UsageTrackingStore';\nimport { EdgeNodeModeDetector } from './edge/EdgeNodeModeDetector';\nimport { ClusterIdentifierStrategy } from './util/identifiers/ClusterIdentifierStrategy';\nimport { CenterNodeRegistrationService } from './identity/CenterNodeRegistrationService';\nimport { PodRoutingHttpHandler } from './http/PodRoutingHttpHandler';\nimport { ReactAppViewHandler } from './identity/ReactAppViewHandler';\nimport { SqliteQuintStore } from './storage/quint/SqliteQuintStore';\nimport { PgQuintStore } from './storage/quint/PgQuintStore';\nimport { QuintStore } from './storage/quint/types';\nimport { RdfQuadIndex } from './storage/rdf/RdfQuadIndex';\nimport { Rdf3xIndex } from './storage/rdf/Rdf3xIndex';\nimport { RdfTextIndex } from './storage/rdf/RdfTextIndex';\nimport { RdfVectorIndex } from './storage/rdf/RdfVectorIndex';\nimport { PostgresRdfTextIndex } from './storage/rdf/PostgresRdfTextIndex';\nimport { PostgresRdfVectorIndex } from './storage/rdf/PostgresRdfVectorIndex';\nimport { RdfSparqlAdapter } from './storage/rdf/RdfSparqlAdapter';\nimport { RdfTermDictionary } from './storage/rdf/RdfTermDictionary';\nimport { ShadowRdfQuintStore } from './storage/rdf/ShadowRdfQuintStore';\nimport { SolidRdfEngine } from './storage/rdf/SolidRdfEngine';\nimport { PostgresRdfEngine } from './storage/rdf/PostgresRdfEngine';\nimport { SolidRdfSparqlEngine } from './storage/rdf/SolidRdfSparqlEngine';\nimport type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';\n// Vector components\nimport { SqliteVectorStore, PostgresVectorStore } from './storage/vector/index';\nimport { VectorHttpHandler } from './http/vector/VectorHttpHandler';\nimport { ProviderRegistry } from './ai/service/ProviderRegistry';\nimport { ProviderRegistryImpl } from './ai/service/ProviderRegistryImpl';\nimport { EmbeddingService } from './ai/service/EmbeddingService';\nimport { EmbeddingServiceImpl } from './ai/service/EmbeddingServiceImpl';\nimport { CredentialReader } from './ai/service/CredentialReader';\nimport { CredentialReaderImpl } from './ai/service/CredentialReaderImpl';\nimport { VectorStore } from './storage/vector/VectorStore';\n// Tunnel and Subdomain components\nimport { CloudflareTunnelProvider } from './tunnel/CloudflareTunnelProvider';\nimport { LocalTunnelProvider } from './tunnel/LocalTunnelProvider';\nimport { NgrokTunnelProvider } from './tunnel/NgrokTunnelProvider';\nimport { SubdomainService } from './subdomain/SubdomainService';\nimport { UrlAwareRedisLocker } from './storage/locking/UrlAwareRedisLocker';\n// IdP/SP separation components\nimport { MultiDomainIdentifierStrategy } from './util/identifiers/MultiDomainIdentifierStrategy';\nimport { SubdomainPodIdentifierStrategy } from './util/identifiers/SubdomainPodIdentifierStrategy';\nimport { DisabledOidcHandler } from './identity/oidc/DisabledOidcHandler';\nimport { DisabledIdentityProviderHandler } from './identity/oidc/DisabledIdentityProviderHandler';\nimport { AutoDetectOidcHandler } from './identity/oidc/AutoDetectOidcHandler';\nimport { AutoDetectIdentityProviderHandler } from './identity/oidc/AutoDetectIdentityProviderHandler';\nimport { LoopbackClientIdAdapterFactory } from './identity/oidc/LoopbackClientIdAdapterFactory';\nimport { ScopedPickWebIdHandler } from './identity/oidc/ScopedPickWebIdHandler';\n// Provision components\nimport { ProvisionPodCreator } from './provision/ProvisionPodCreator';\nimport { ProvisionCodeCodec } from './provision/ProvisionCodeCodec';\nimport { LocalPodProvisioningService } from './provision/LocalPodProvisioningService';\nimport { SqliteSolidFsSyncJournal } from './solidfs/SolidFsSyncJournal';\n\nexport * from './api/reconciler';\nexport * from './edge/reachability';\nexport * from './notifications';\n\nexport type {\n DnsProvider,\n ListDnsRecordsInput,\n ListableDnsProvider,\n DeleteDnsRecordInput,\n DnsRecordSummary,\n UpsertDnsRecordInput,\n} from './dns/DnsProvider';\nexport type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';\nexport type { EdgeNodeAgentOptions, EdgeNodeP2PAcceptEvent } from './edge/EdgeNodeAgent';\nexport type { EdgeNodeTunnelManager } from './edge/interfaces/EdgeNodeTunnelManager';\nexport type { QuotaService, AccountQuota } from './quota/QuotaService';\nexport type { EntitlementProvider, AccountEntitlement } from './quota/EntitlementProvider';\n// Tunnel and Subdomain types\nexport type {\n TunnelProvider,\n TunnelConfig,\n TunnelSetupOptions,\n TunnelStatus,\n} from './tunnel/TunnelProvider';\nexport type {\n SubdomainRegistration,\n ConnectivityResult,\n SubdomainServiceOptions,\n} from './subdomain/SubdomainService';\n// Export the new AppStaticAssetHandler\nexport { AppStaticAssetHandler } from './http/AppStaticAssetHandler';\n\nexport {\n RepresentationPartialConvertingStore,\n MinioDataAccessor,\n QuadstoreSparqlDataAccessor,\n QuintStoreSparqlDataAccessor,\n SolidRdfDataAccessor,\n MixDataAccessor,\n ConfigurableLoggerFactory,\n SparqlUpdateResourceStore,\n SubgraphQueryEngine,\n QuadstoreSparqlEngine,\n QuintstoreSparqlEngine,\n SubgraphSparqlHttpHandler,\n QuotaAdminHttpHandler,\n ClusterIngressRouter,\n ClusterWebSocketConfigurator,\n EdgeNodeDirectDebugHttpHandler,\n EdgeNodeProxyHttpHandler,\n RouterHttpHandler,\n RouterHttpRoute,\n TracingHandler,\n EdgeNodeCertificateHttpHandler,\n TerminalHttpHandler,\n DeviceNotificationHub,\n DeviceNotificationResourceListener,\n DeviceNotificationWebSocketServer,\n DeviceNotificationTicketHandler,\n registerDeviceNotificationRuntime,\n ReservedSuffixIdentifierGenerator,\n DrizzleIndexedStorage,\n ValidatingIdentityProviderHttpHandler,\n PostgresKeyValueStorage,\n RedisKeyValueStorage,\n SqliteKeyValueStorage,\n BaseKeyValueStorage,\n DrizzleQuotaService,\n NoopQuotaService,\n HttpEntitlementProvider,\n NoopEntitlementProvider,\n PerAccountQuotaStrategy,\n TencentDnsProvider,\n EdgeNodeDnsCoordinator,\n Dns01CertificateProvisioner,\n SimpleEdgeNodeTunnelManager,\n NoopEdgeNodeTunnelManager,\n FrpTunnelManager,\n EdgeNodeHealthProbeService,\n EdgeNodeAgent,\n EdgeNodeAgentInitializer,\n EdgeNodeCertificateService,\n AcmeCertificateManager,\n EdgeNodeModeDetector,\n ClusterIdentifierStrategy,\n UsageTrackingStore,\n CenterNodeRegistrationService,\n PodRoutingHttpHandler,\n ReactAppViewHandler,\n // Quint exports\n QuintStore,\n SqliteQuintStore,\n PgQuintStore,\n // RDF engine exports\n RdfTermDictionary,\n RdfQuadIndex,\n Rdf3xIndex,\n RdfTextIndex,\n RdfVectorIndex,\n PostgresRdfTextIndex,\n PostgresRdfVectorIndex,\n RdfSparqlAdapter,\n ShadowRdfQuintStore,\n SolidRdfEngine,\n PostgresRdfEngine,\n SolidRdfSparqlEngine,\n // Vector exports\n VectorStore,\n SqliteVectorStore,\n PostgresVectorStore,\n VectorHttpHandler,\n // Embedding exports\n ProviderRegistry,\n ProviderRegistryImpl,\n EmbeddingService,\n EmbeddingServiceImpl,\n CredentialReader,\n CredentialReaderImpl,\n // Tunnel and Subdomain exports\n CloudflareTunnelProvider,\n LocalTunnelProvider,\n NgrokTunnelProvider,\n SubdomainService,\n // IdP/SP separation exports\n MultiDomainIdentifierStrategy,\n SubdomainPodIdentifierStrategy,\n DisabledOidcHandler,\n DisabledIdentityProviderHandler,\n AutoDetectOidcHandler,\n AutoDetectIdentityProviderHandler,\n LoopbackClientIdAdapterFactory,\n ScopedPickWebIdHandler,\n UrlAwareRedisLocker,\n // Provision exports\n ProvisionPodCreator,\n ProvisionCodeCodec,\n LocalPodProvisioningService,\n // SolidFS recovery exports\n SqliteSolidFsSyncJournal,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAA2C;AAC3C,yGAAsG;AA2KpG,qHA3KO,2EAAoC,OA2KP;AA1KtC,6EAA0E;AA2KxE,kGA3KO,qCAAiB,OA2KP;AA1KnB,iGAA8F;AA2K5F,4GA3KO,yDAA2B,OA2KP;AA1K7B,mGAAgG;AA2K9F,6GA3KO,2DAA4B,OA2KP;AA1K9B,mFAAgF;AA2K9E,qGA3KO,2CAAoB,OA2KP;AA1KtB,yEAAsE;AA2KpE,gGA3KO,iCAAe,OA2KP;AA1KjB,mFAAgF;AA2K9E,0GA3KO,qDAAyB,OA2KP;AA1K3B,8EAA2E;AA4KzE,oGA5KO,yCAAmB,OA4KP;AA3KrB,0FAA2G;AA4KzG,sGA5KO,iDAAqB,OA4KP;AACrB,uGA7K8B,kDAAsB,OA6K9B;AA1IxB,6CAA2B;AAC3B,6CAA2B;AAC3B,gFAA6E;AAyI3E,0GAzIO,qDAAyB,OAyIP;AAxI3B,kFAA+E;AAyI7E,2GAzIO,uDAA0B,OAyIP;AAxI5B,8EAA2E;AAyIzE,sGAzIO,6CAAqB,OAyIP;AAxIvB,mFAAgF;AAkI9E,0GAlIO,qDAAyB,OAkIP;AAjI3B,sEAAmE;AAwIjE,qGAxIO,2CAAoB,OAwIP;A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A2IP;AA1IjC,iFAA8E;AA2I5E,sGA3IO,6CAAqB,OA2IP;AA1IvB,yGAAsG;AA2IpG,kHA3IO,qEAAiC,OA2IP;AA1InC,mGAAgG;AA2I9F,+GA3IO,+DAA8B,OA2IP;AA1IhC,mFAAgF;AA2I9E,uGA3IO,+CAAsB,OA2IP;AA1IxB,uBAAuB;AACvB,yEAAsE;AA4IpE,oGA5IO,yCAAmB,OA4IP;AA3IrB,uEAAoE;AA4IlE,mGA5IO,uCAAkB,OA4IP;AA3IpB,yFAAsF;AA4IpF,4GA5IO,yDAA2B,OA4IP;AA3I7B,qEAAwE;AA6ItE,yGA7IO,6CAAwB,OA6IP;AA3I1B,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AA2BhC,uCAAuC;AACvC,sEAAqE;AAA5D,8HAAA,qBAAqB,OAAA","sourcesContent":["import './runtime/configure-drizzle-solid';\nimport { RepresentationPartialConvertingStore } from './storage/RepresentationPartialConvertingStore';\nimport { MinioDataAccessor } from './storage/accessors/MinioDataAccessor';\nimport { QuadstoreSparqlDataAccessor } from './storage/accessors/QuadstoreSparqlDataAccessor';\nimport { QuintStoreSparqlDataAccessor } from './storage/accessors/QuintStoreSparqlDataAccessor';\nimport { SolidRdfDataAccessor } from './storage/accessors/SolidRdfDataAccessor';\nimport { MixDataAccessor } from './storage/accessors/MixDataAccessor';\nimport { ConfigurableLoggerFactory } from './logging/ConfigurableLoggerFactory';\nimport { SubgraphQueryEngine } from './storage/sparql/SubgraphQueryEngine';\nimport { QuadstoreSparqlEngine, QuintstoreSparqlEngine } from './storage/sparql/CompatibilitySparqlEngine';\nexport type { SparqlEngine } from './storage/sparql/SubgraphQueryEngine';\nexport type {\n RdfEngineLike,\n RdfEngineStorageStats,\n RdfDerivedIndexRefreshResult,\n RdfIndexStats,\n RdfIndexSpaceObject,\n RdfIndexMetrics,\n RdfIndexPutOptions,\n RdfPatternQuery,\n RdfQuadIndexOptions,\n RdfQuadIndexScanResult,\n RdfTextIndexLike,\n RdfTextIndexOptions,\n RdfTextIndexSyncLike,\n RdfVectorIndexLike,\n RdfVectorIndexOptions,\n RdfVectorIndexSyncLike,\n RdfShadowBackfillOptions,\n RdfShadowBackfillResult,\n RdfShadowDiff,\n RdfShadowScanResult,\n RdfSourceInput,\n} from './storage/rdf/types';\nexport type { RdfSparqlCompileResult } from './storage/rdf/RdfSparqlAdapter';\nexport type { RdfAccessScope } from './storage/rdf/RdfAccessScope';\nexport type { ShadowRdfQuintStoreOptions } from './storage/rdf/ShadowRdfQuintStore';\nexport type {\n SolidRdfSparqlEngineOptions,\n SolidRdfSparqlFallback,\n} from './storage/rdf/SolidRdfSparqlEngine';\nexport type { PostgresRdfEngineOptions } from './storage/rdf/PostgresRdfEngine';\nexport type { PostgresRdfTextIndexOptions } from './storage/rdf/PostgresRdfTextIndex';\nexport type { PostgresRdfVectorIndexOptions } from './storage/rdf/PostgresRdfVectorIndex';\nexport * from './document';\nexport * from './security';\nimport { SubgraphSparqlHttpHandler } from './http/SubgraphSparqlHttpHandler';\nimport { InternalPodDataHttpHandler } from './http/InternalPodDataHttpHandler';\nimport { QuotaAdminHttpHandler } from './http/quota/QuotaAdminHttpHandler';\nimport { SparqlUpdateResourceStore } from './storage/SparqlUpdateResourceStore';\nimport { ClusterIngressRouter } from './http/ClusterIngressRouter';\nimport { ClusterWebSocketConfigurator } from './http/ClusterWebSocketConfigurator';\nimport { EdgeNodeDirectDebugHttpHandler } from './http/EdgeNodeDirectDebugHttpHandler';\nimport { EdgeNodeProxyHttpHandler } from './http/EdgeNodeProxyHttpHandler';\nimport { RouterHttpHandler } from './http/RouterHttpHandler';\nimport { RouterHttpRoute } from './http/RouterHttpRoute';\nimport { TracingHandler } from './http/TracingHandler';\nimport { TerminalHttpHandler } from './http/terminal/TerminalHttpHandler';\nimport { DeviceNotificationHub } from './notifications/DeviceNotificationHub';\nimport { DeviceNotificationResourceListener } from './notifications/DeviceNotificationResourceListener';\nimport { DeviceNotificationWebSocketServer } from './http/DeviceNotificationWebSocketServer';\nimport { DeviceNotificationTicketHandler } from './api/handlers/DeviceNotificationTicketHandler';\nimport { registerDeviceNotificationRuntime } from './api/handlers/DeviceNotificationRuntime';\nimport { EdgeNodeCertificateHttpHandler } from './http/admin/EdgeNodeCertificateHttpHandler';\nimport { ReservedSuffixIdentifierGenerator } from './pods/ReservedSuffixIdentifierGenerator';\nimport { DrizzleIndexedStorage } from './identity/drizzle/DrizzleIndexedStorage';\nimport { ValidatingIdentityProviderHttpHandler } from './identity/ValidatingIdentityProviderHttpHandler';\nimport { PostgresKeyValueStorage } from './storage/keyvalue/PostgresKeyValueStorage';\nimport { RedisKeyValueStorage } from './storage/keyvalue/RedisKeyValueStorage';\nimport { SqliteKeyValueStorage } from './storage/keyvalue/SqliteKeyValueStorage';\nimport { BaseKeyValueStorage } from './storage/keyvalue/BaseKeyValueStorage';\nimport { DrizzleQuotaService } from './quota/DrizzleQuotaService';\nimport { NoopQuotaService } from './quota/NoopQuotaService';\nimport { HttpEntitlementProvider, NoopEntitlementProvider } from './quota/EntitlementProvider';\nimport { PerAccountQuotaStrategy } from './storage/quota/PerAccountQuotaStrategy';\nimport { TencentDnsProvider } from './dns/tencent/TencentDnsProvider';\nimport { EdgeNodeDnsCoordinator } from './edge/EdgeNodeDnsCoordinator';\nimport { Dns01CertificateProvisioner } from './edge/Dns01CertificateProvisioner';\nimport { SimpleEdgeNodeTunnelManager, NoopEdgeNodeTunnelManager } from './edge/EdgeNodeTunnelManager';\nimport { FrpTunnelManager } from './edge/FrpTunnelManager';\nimport { AcmeCertificateManager } from './edge/acme/AcmeCertificateManager';\nimport { EdgeNodeHealthProbeService } from './edge/EdgeNodeHealthProbeService';\nimport { EdgeNodeAgent } from './edge/EdgeNodeAgent';\nimport { EdgeNodeAgentInitializer } from './edge/EdgeNodeAgentInitializer';\nimport { EdgeNodeCertificateService } from './service/EdgeNodeCertificateService';\nimport { createBandwidthThrottleTransform } from './util/stream/BandwidthThrottleTransform';\nimport { UsageTrackingStore } from './storage/quota/UsageTrackingStore';\nimport { EdgeNodeModeDetector } from './edge/EdgeNodeModeDetector';\nimport { ClusterIdentifierStrategy } from './util/identifiers/ClusterIdentifierStrategy';\nimport { CenterNodeRegistrationService } from './identity/CenterNodeRegistrationService';\nimport { PodRoutingHttpHandler } from './http/PodRoutingHttpHandler';\nimport { ReactAppViewHandler } from './identity/ReactAppViewHandler';\nimport { SqliteQuintStore } from './storage/quint/SqliteQuintStore';\nimport { PgQuintStore } from './storage/quint/PgQuintStore';\nimport { QuintStore } from './storage/quint/types';\nimport { RdfQuadIndex } from './storage/rdf/RdfQuadIndex';\nimport { Rdf3xIndex } from './storage/rdf/Rdf3xIndex';\nimport { RdfTextIndex } from './storage/rdf/RdfTextIndex';\nimport { RdfVectorIndex } from './storage/rdf/RdfVectorIndex';\nimport { PostgresRdfTextIndex } from './storage/rdf/PostgresRdfTextIndex';\nimport { PostgresRdfVectorIndex } from './storage/rdf/PostgresRdfVectorIndex';\nimport { RdfSparqlAdapter } from './storage/rdf/RdfSparqlAdapter';\nimport { RdfTermDictionary } from './storage/rdf/RdfTermDictionary';\nimport { ShadowRdfQuintStore } from './storage/rdf/ShadowRdfQuintStore';\nimport { SolidRdfEngine } from './storage/rdf/SolidRdfEngine';\nimport { PostgresRdfEngine } from './storage/rdf/PostgresRdfEngine';\nimport { SolidRdfSparqlEngine } from './storage/rdf/SolidRdfSparqlEngine';\nimport type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';\n// Vector components\nimport { SqliteVectorStore, PostgresVectorStore } from './storage/vector/index';\nimport { VectorHttpHandler } from './http/vector/VectorHttpHandler';\nimport { ProviderRegistry } from './ai/service/ProviderRegistry';\nimport { ProviderRegistryImpl } from './ai/service/ProviderRegistryImpl';\nimport { EmbeddingService } from './ai/service/EmbeddingService';\nimport { EmbeddingServiceImpl } from './ai/service/EmbeddingServiceImpl';\nimport { CredentialReader } from './ai/service/CredentialReader';\nimport { CredentialReaderImpl } from './ai/service/CredentialReaderImpl';\nimport { VectorStore } from './storage/vector/VectorStore';\n// Tunnel and Subdomain components\nimport { CloudflareTunnelProvider } from './tunnel/CloudflareTunnelProvider';\nimport { LocalTunnelProvider } from './tunnel/LocalTunnelProvider';\nimport { NgrokTunnelProvider } from './tunnel/NgrokTunnelProvider';\nimport { SubdomainService } from './subdomain/SubdomainService';\nimport { UrlAwareRedisLocker } from './storage/locking/UrlAwareRedisLocker';\n// IdP/SP separation components\nimport { MultiDomainIdentifierStrategy } from './util/identifiers/MultiDomainIdentifierStrategy';\nimport { SubdomainPodIdentifierStrategy } from './util/identifiers/SubdomainPodIdentifierStrategy';\nimport { DisabledOidcHandler } from './identity/oidc/DisabledOidcHandler';\nimport { DisabledIdentityProviderHandler } from './identity/oidc/DisabledIdentityProviderHandler';\nimport { AutoDetectOidcHandler } from './identity/oidc/AutoDetectOidcHandler';\nimport { AutoDetectIdentityProviderHandler } from './identity/oidc/AutoDetectIdentityProviderHandler';\nimport { LoopbackClientIdAdapterFactory } from './identity/oidc/LoopbackClientIdAdapterFactory';\nimport { ScopedPickWebIdHandler } from './identity/oidc/ScopedPickWebIdHandler';\n// Provision components\nimport { ProvisionPodCreator } from './provision/ProvisionPodCreator';\nimport { ProvisionCodeCodec } from './provision/ProvisionCodeCodec';\nimport { LocalPodProvisioningService } from './provision/LocalPodProvisioningService';\nimport { SqliteSolidFsSyncJournal } from './solidfs/SolidFsSyncJournal';\n\nexport * from './api/reconciler';\nexport * from './edge/reachability';\nexport * from './notifications';\n\nexport type {\n DnsProvider,\n ListDnsRecordsInput,\n ListableDnsProvider,\n DeleteDnsRecordInput,\n DnsRecordSummary,\n UpsertDnsRecordInput,\n} from './dns/DnsProvider';\nexport type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';\nexport type { EdgeNodeAgentOptions, EdgeNodeP2PAcceptEvent } from './edge/EdgeNodeAgent';\nexport type { EdgeNodeTunnelManager } from './edge/interfaces/EdgeNodeTunnelManager';\nexport type { QuotaService, AccountQuota } from './quota/QuotaService';\nexport type { EntitlementProvider, AccountEntitlement } from './quota/EntitlementProvider';\n// Tunnel and Subdomain types\nexport type {\n TunnelProvider,\n TunnelConfig,\n TunnelSetupOptions,\n TunnelStatus,\n} from './tunnel/TunnelProvider';\nexport type {\n SubdomainRegistration,\n ConnectivityResult,\n SubdomainServiceOptions,\n} from './subdomain/SubdomainService';\n// Export the new AppStaticAssetHandler\nexport { AppStaticAssetHandler } from './http/AppStaticAssetHandler';\n\nexport {\n RepresentationPartialConvertingStore,\n MinioDataAccessor,\n QuadstoreSparqlDataAccessor,\n QuintStoreSparqlDataAccessor,\n SolidRdfDataAccessor,\n MixDataAccessor,\n ConfigurableLoggerFactory,\n SparqlUpdateResourceStore,\n SubgraphQueryEngine,\n QuadstoreSparqlEngine,\n QuintstoreSparqlEngine,\n SubgraphSparqlHttpHandler,\n InternalPodDataHttpHandler,\n QuotaAdminHttpHandler,\n ClusterIngressRouter,\n ClusterWebSocketConfigurator,\n EdgeNodeDirectDebugHttpHandler,\n EdgeNodeProxyHttpHandler,\n RouterHttpHandler,\n RouterHttpRoute,\n TracingHandler,\n EdgeNodeCertificateHttpHandler,\n TerminalHttpHandler,\n DeviceNotificationHub,\n DeviceNotificationResourceListener,\n DeviceNotificationWebSocketServer,\n DeviceNotificationTicketHandler,\n registerDeviceNotificationRuntime,\n ReservedSuffixIdentifierGenerator,\n DrizzleIndexedStorage,\n ValidatingIdentityProviderHttpHandler,\n PostgresKeyValueStorage,\n RedisKeyValueStorage,\n SqliteKeyValueStorage,\n BaseKeyValueStorage,\n DrizzleQuotaService,\n NoopQuotaService,\n HttpEntitlementProvider,\n NoopEntitlementProvider,\n PerAccountQuotaStrategy,\n TencentDnsProvider,\n EdgeNodeDnsCoordinator,\n Dns01CertificateProvisioner,\n SimpleEdgeNodeTunnelManager,\n NoopEdgeNodeTunnelManager,\n FrpTunnelManager,\n EdgeNodeHealthProbeService,\n EdgeNodeAgent,\n EdgeNodeAgentInitializer,\n EdgeNodeCertificateService,\n AcmeCertificateManager,\n EdgeNodeModeDetector,\n ClusterIdentifierStrategy,\n UsageTrackingStore,\n CenterNodeRegistrationService,\n PodRoutingHttpHandler,\n ReactAppViewHandler,\n // Quint exports\n QuintStore,\n SqliteQuintStore,\n PgQuintStore,\n // RDF engine exports\n RdfTermDictionary,\n RdfQuadIndex,\n Rdf3xIndex,\n RdfTextIndex,\n RdfVectorIndex,\n PostgresRdfTextIndex,\n PostgresRdfVectorIndex,\n RdfSparqlAdapter,\n ShadowRdfQuintStore,\n SolidRdfEngine,\n PostgresRdfEngine,\n SolidRdfSparqlEngine,\n // Vector exports\n VectorStore,\n SqliteVectorStore,\n PostgresVectorStore,\n VectorHttpHandler,\n // Embedding exports\n ProviderRegistry,\n ProviderRegistryImpl,\n EmbeddingService,\n EmbeddingServiceImpl,\n CredentialReader,\n CredentialReaderImpl,\n // Tunnel and Subdomain exports\n CloudflareTunnelProvider,\n LocalTunnelProvider,\n NgrokTunnelProvider,\n SubdomainService,\n // IdP/SP separation exports\n MultiDomainIdentifierStrategy,\n SubdomainPodIdentifierStrategy,\n DisabledOidcHandler,\n DisabledIdentityProviderHandler,\n AutoDetectOidcHandler,\n AutoDetectIdentityProviderHandler,\n LoopbackClientIdAdapterFactory,\n ScopedPickWebIdHandler,\n UrlAwareRedisLocker,\n // Provision exports\n ProvisionPodCreator,\n ProvisionCodeCodec,\n LocalPodProvisioningService,\n // SolidFS recovery exports\n SqliteSolidFsSyncJournal,\n};\n"]}
|
package/dist/main.js
CHANGED
|
@@ -237,6 +237,18 @@ async function startRuntime(options) {
|
|
|
237
237
|
authMode,
|
|
238
238
|
externalOidcIssuer,
|
|
239
239
|
});
|
|
240
|
+
// API server: resolve the entry point dynamically
|
|
241
|
+
// In dev (ts-node): use ts-node to run the .ts file
|
|
242
|
+
// In production: use the compiled .js file
|
|
243
|
+
const isDevMode = __filename.endsWith('.ts');
|
|
244
|
+
const apiArgs = isDevMode
|
|
245
|
+
? [
|
|
246
|
+
'-r',
|
|
247
|
+
require.resolve('ts-node/register/transpile-only'),
|
|
248
|
+
path_1.default.join(__dirname, 'api', 'main.ts'),
|
|
249
|
+
]
|
|
250
|
+
: [path_1.default.join(__dirname, 'api', 'main.js')];
|
|
251
|
+
const gatewayAdminProxyAuthSecret = (0, runtime_1.createGatewayAdminProxyAuthSecret)();
|
|
240
252
|
supervisor.register({
|
|
241
253
|
name: 'css',
|
|
242
254
|
command: childJsRuntime,
|
|
@@ -249,20 +261,8 @@ async function startRuntime(options) {
|
|
|
249
261
|
externalOidcIssuer,
|
|
250
262
|
}),
|
|
251
263
|
cwd: cssRuntimeConfig.cwd,
|
|
252
|
-
env: (0, css_process_1.buildCssChildEnv)(baseUrl, cssPort, externalOidcIssuer, authMode),
|
|
264
|
+
env: (0, css_process_1.buildCssChildEnv)(baseUrl, cssPort, externalOidcIssuer, authMode, process.env, gatewayAdminProxyAuthSecret),
|
|
253
265
|
});
|
|
254
|
-
// API server: resolve the entry point dynamically
|
|
255
|
-
// In dev (ts-node): use ts-node to run the .ts file
|
|
256
|
-
// In production: use the compiled .js file
|
|
257
|
-
const isDevMode = __filename.endsWith('.ts');
|
|
258
|
-
const apiArgs = isDevMode
|
|
259
|
-
? [
|
|
260
|
-
'-r',
|
|
261
|
-
require.resolve('ts-node/register/transpile-only'),
|
|
262
|
-
path_1.default.join(__dirname, 'api', 'main.ts'),
|
|
263
|
-
]
|
|
264
|
-
: [path_1.default.join(__dirname, 'api', 'main.js')];
|
|
265
|
-
const gatewayAdminProxyAuthSecret = (0, runtime_1.createGatewayAdminProxyAuthSecret)();
|
|
266
266
|
supervisor.register({
|
|
267
267
|
name: 'api',
|
|
268
268
|
command: childJsRuntime,
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;AACA,6CAA2C;AAC3C,mCAAoC;AACpC,iDAAsC;AACtC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,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;SAClG,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,EAClF,KAAK,EAAC,IAAI,EAAE,EAAE;QACZ,MAAM,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,OAAiB,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1E,CAAC,CACF;SACA,aAAa,CAAC,CAAC,CAAC;SAChB,MAAM,EAAE;SACR,IAAI,EAAE;SACN,UAAU,EAAE,CAAC;AAClB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport './runtime/configure-drizzle-solid';\nimport { createHash } from 'crypto';\nimport { spawn } from 'child_process';\nimport fs from 'fs';\nimport path from 'path';\nimport { setGlobalLoggerFactory, getLoggerFor } from 'global-logger-factory';\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport { createGatewayAdminProxyAuthSecret, GatewayProxy, getFreePort, PACKAGE_ROOT } from './runtime';\nimport {\n buildApiChildEnv,\n buildCssArgs,\n buildCssChildEnv,\n createCssChildRuntimeConfig,\n} from './runtime/css-process';\nimport { resolveExternalOidcIssuer } from './runtime/oidc-issuer';\nimport { resolveAuthModeFromEnv } from './authorization/AuthMode';\nimport { ConfigurableLoggerFactory } from './logging/ConfigurableLoggerFactory';\nimport { Supervisor } from './supervisor';\n\ninterface RuntimeRecord {\n schemaVersion: '1.0';\n pid: number;\n mode: 'local' | 'cloud';\n port: number;\n baseUrl: string;\n publicUrl?: string;\n envPath?: string;\n configPath: string;\n startTime: string;\n}\n\ninterface HealthReport {\n schemaVersion: '1.0';\n healthy: boolean;\n checks: {\n gateway: 'pass' | 'fail';\n css: 'pass' | 'fail';\n api: 'pass' | 'fail';\n };\n timestamp: string;\n}\n\ninterface RunOptions {\n mode?: 'local' | 'cloud';\n config?: string;\n env?: string;\n port?: number;\n host?: string;\n}\n\nconst EXIT_OK = 0;\nconst EXIT_NOT_RUNNING = 10;\nconst EXIT_CONFIG_ERROR = 20;\nconst EXIT_INTERNAL_ERROR = 50;\n\nlet logger = getLoggerFor('Main');\nconst childJsRuntime = typeof (globalThis as { Bun?: unknown }).Bun !== 'undefined'\n ? (process.env.XPOD_NODE_BINARY ?? 'node')\n : process.execPath;\n\nfunction initLogger(): void {\n const loggerFactory = new ConfigurableLoggerFactory(process.env.CSS_LOGGING_LEVEL || 'info', {\n fileName: path.join(process.cwd(), 'logs/xpod-%DATE%.log'),\n showLocation: true,\n });\n setGlobalLoggerFactory(loggerFactory);\n logger = getLoggerFor('Main');\n}\n\nfunction loadEnvFile(envPath: string): void {\n if (!fs.existsSync(envPath)) {\n throw new Error(`Env file not found: ${envPath}`);\n }\n\n const content = fs.readFileSync(envPath, 'utf-8');\n for (const line of content.split('\\n')) {\n const trimmed = line.trim();\n if (!trimmed || trimmed.startsWith('#')) continue;\n\n const eqIndex = trimmed.indexOf('=');\n if (eqIndex === -1) continue;\n\n const key = trimmed.slice(0, eqIndex).trim();\n let value = trimmed.slice(eqIndex + 1).trim();\n if ((value.startsWith('\"') && value.endsWith('\"')) ||\n (value.startsWith(\"'\") && value.endsWith(\"'\"))) {\n value = value.slice(1, -1);\n }\n\n // Only set if not already defined — CLI / parent env takes precedence.\n if (process.env[key] === undefined) {\n process.env[key] = value;\n }\n }\n}\n\nfunction ensureTrailingSlash(url: string): string {\n return url.endsWith('/') ? url : `${url}/`;\n}\n\nfunction resolveInstanceKey(envPath?: string): string {\n if (!envPath) {\n return 'default';\n }\n const abs = path.resolve(envPath);\n return createHash('sha256').update(abs).digest('hex').slice(0, 12);\n}\n\nfunction getRuntimeFilePath(envPath?: string): string {\n const dir = path.join(process.cwd(), '.xpod/runtime');\n return path.join(dir, `${resolveInstanceKey(envPath)}.json`);\n}\n\nfunction saveRuntimeRecord(record: RuntimeRecord): void {\n const filePath = getRuntimeFilePath(record.envPath);\n fs.mkdirSync(path.dirname(filePath), { recursive: true });\n fs.writeFileSync(filePath, JSON.stringify(record, null, 2), 'utf-8');\n}\n\nfunction loadRuntimeRecord(envPath?: string): RuntimeRecord | undefined {\n const filePath = getRuntimeFilePath(envPath);\n if (!fs.existsSync(filePath)) {\n return undefined;\n }\n\n try {\n return JSON.parse(fs.readFileSync(filePath, 'utf-8')) as RuntimeRecord;\n } catch {\n return undefined;\n }\n}\n\nfunction deleteRuntimeRecord(envPath?: string): void {\n const filePath = getRuntimeFilePath(envPath);\n if (fs.existsSync(filePath)) {\n fs.unlinkSync(filePath);\n }\n}\n\nfunction isProcessRunning(pid?: number): boolean {\n if (!pid || pid <= 0) {\n return false;\n }\n\n try {\n process.kill(pid, 0);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction getVersion(): string {\n try {\n const pkg = JSON.parse(fs.readFileSync(path.join(PACKAGE_ROOT, 'package.json'), 'utf-8')) as { version?: string };\n return pkg.version ?? 'unknown';\n } catch {\n return 'unknown';\n }\n}\n\nasync function checkGateway(baseUrl: string): Promise<boolean> {\n try {\n // Gateway internal endpoints are exposed under /service/* (legacy /_gateway/* has been removed).\n const res = await fetch(new URL('/service/status', ensureTrailingSlash(baseUrl)), {\n signal: AbortSignal.timeout(3000),\n });\n return res.ok;\n } catch {\n return false;\n }\n}\nasync function checkCss(baseUrl: string): Promise<boolean> {\n try {\n // Prefer supervisor status rather than probing CSS routes which can fail on identifier-space/host mismatch.\n const res = await fetch(new URL('/service/status', ensureTrailingSlash(baseUrl)), {\n signal: AbortSignal.timeout(3000),\n });\n if (!res.ok) {\n return false;\n }\n const items = (await res.json()) as Array<{ name?: string; status?: string }>;\n const css = items.find((it) => it?.name === 'css');\n return css?.status === 'running';\n } catch {\n return false;\n }\n}\nasync function checkApi(baseUrl: string): Promise<boolean> {\n try {\n const res = await fetch(new URL('/service/status', ensureTrailingSlash(baseUrl)), {\n signal: AbortSignal.timeout(3000),\n });\n if (!res.ok) {\n return false;\n }\n const items = (await res.json()) as Array<{ name?: string; status?: string }>;\n const api = items.find((it) => it?.name === 'api');\n return api?.status === 'running';\n } catch {\n return false;\n }\n}\nasync function buildHealth(baseUrl: string): Promise<HealthReport> {\n const gateway = await checkGateway(baseUrl);\n const css = await checkCss(baseUrl);\n const api = await checkApi(baseUrl);\n\n return {\n schemaVersion: '1.0',\n healthy: gateway && css && api,\n checks: {\n gateway: gateway ? 'pass' : 'fail',\n css: css ? 'pass' : 'fail',\n api: api ? 'pass' : 'fail',\n },\n timestamp: new Date().toISOString(),\n };\n}\n\nfunction outputJson(payload: unknown): void {\n process.stdout.write(`${JSON.stringify(payload)}\\n`);\n}\n\nfunction exitForCliError(error: unknown): never {\n const message = error instanceof Error ? error.message : String(error);\n console.error(`Failed to start: ${message}`);\n if (message.includes('Env file not found:') || message.includes('Config file not found:')) {\n process.exit(EXIT_CONFIG_ERROR);\n }\n process.exit(EXIT_INTERNAL_ERROR);\n}\n\nasync function startRuntime(options: RunOptions): Promise<void> {\n initLogger();\n const resolvedEnvPath = options.env ? path.resolve(options.env) : undefined;\n if (resolvedEnvPath) {\n process.env.XPOD_ENV_PATH = resolvedEnvPath;\n loadEnvFile(resolvedEnvPath);\n }\n\n const requestedPort = options.port !== undefined ? Number(options.port) : Number.NaN;\n const mainPort = Number.isFinite(requestedPort)\n ? requestedPort\n : parseInt(process.env.XPOD_PORT ?? process.env.PORT ?? '3000', 10);\n const host = options.host ?? '127.0.0.1';\n\n let configPath = path.join(PACKAGE_ROOT, 'config/local.json');\n if (options.config) {\n configPath = options.config;\n } else if (options.mode) {\n configPath = path.join(PACKAGE_ROOT, `config/${options.mode}.json`);\n }\n\n if (!fs.existsSync(configPath)) {\n throw new Error(`Config file not found: ${configPath}`);\n }\n\n const mode: 'local' | 'cloud' = options.mode ?? (configPath.includes('cloud') ? 'cloud' : 'local');\n\n const baseUrl = ensureTrailingSlash(process.env.CSS_BASE_URL || `http://${host}:${mainPort}`);\n const cssPort = await getFreePort(mainPort + 1, host);\n const apiPort = await getFreePort(cssPort + 1, host);\n const runtimeRoot = path.join(process.cwd(), '.xpod/runtime/legacy-css');\n const rdfIndexPath = process.env.CSS_RDF_INDEX_PATH || path.join(runtimeRoot, 'rdf-index.sqlite');\n\n // Make sure GatewayProxy has access to the effective baseUrl for host rewrites.\n process.env.CSS_BASE_URL = baseUrl;\n process.env.CSS_RDF_INDEX_PATH = rdfIndexPath;\n\n logger.info('Orchestration Plan:');\n logger.info(` - Main Entry: ${baseUrl} (${host}:${mainPort})`);\n logger.info(` - CSS (internal): http://localhost:${cssPort}`);\n logger.info(` - API (internal): http://localhost:${apiPort}`);\n\n const supervisor = new Supervisor();\n const cssBinary = require.resolve('@solid/community-server/bin/server.js');\n const cssModuleRoot = PACKAGE_ROOT;\n const externalOidcIssuer = resolveExternalOidcIssuer(process.env);\n const authMode = resolveAuthModeFromEnv(process.env);\n if (externalOidcIssuer) {\n logger.info(` - SP mode external IdP: ${externalOidcIssuer}`);\n }\n logger.info(` - Authorization mode: ${authMode}`);\n\n const cssRuntimeConfig = createCssChildRuntimeConfig({\n configPath,\n runtimeRoot,\n authMode,\n externalOidcIssuer,\n });\n\n supervisor.register({\n name: 'css',\n command: childJsRuntime,\n args: buildCssArgs({\n cssBinary,\n configPath: cssRuntimeConfig.configPath,\n cssModuleRoot,\n cssPort,\n baseUrl,\n externalOidcIssuer,\n }),\n cwd: cssRuntimeConfig.cwd,\n env: buildCssChildEnv(baseUrl, cssPort, externalOidcIssuer, authMode),\n });\n\n // API server: resolve the entry point dynamically\n // In dev (ts-node): use ts-node to run the .ts file\n // In production: use the compiled .js file\n const isDevMode = __filename.endsWith('.ts');\n const apiArgs = isDevMode\n ? [\n '-r',\n require.resolve('ts-node/register/transpile-only'),\n path.join(__dirname, 'api', 'main.ts'),\n ]\n : [path.join(__dirname, 'api', 'main.js')];\n\n const gatewayAdminProxyAuthSecret = createGatewayAdminProxyAuthSecret();\n\n supervisor.register({\n name: 'api',\n command: childJsRuntime,\n args: apiArgs,\n env: buildApiChildEnv({\n apiPort,\n mainPort,\n cssPort,\n baseUrl,\n rdfIndexPath,\n authMode,\n externalOidcIssuer,\n gatewayAdminProxyAuthSecret,\n }),\n });\n\n // Bind host: use CLI --host value; if not explicitly set, derive from the public Base URL.\n // In local dev/sandboxed environments, binding 0.0.0.0 can fail with EPERM.\n const bindHost = options.host || (() => {\n try {\n const hostname = new URL(baseUrl).hostname;\n if (hostname === 'localhost') return '127.0.0.1';\n if (hostname === '::1') return '::1';\n if (hostname.startsWith('127.')) return hostname;\n } catch {\n // ignore\n }\n return '0.0.0.0';\n })();\n\n const proxy = new GatewayProxy(mainPort, supervisor, bindHost, {\n exitOnStop: true,\n baseUrl,\n internalAdminAuthSecret: gatewayAdminProxyAuthSecret,\n });\n proxy.setTargets({\n css: `http://localhost:${cssPort}`,\n api: `http://localhost:${apiPort}`,\n });\n\n await supervisor.startAll();\n await proxy.start();\n\n let restarting = false;\n const restart = async(): Promise<void> => {\n if (restarting) {\n return;\n }\n restarting = true;\n\n logger.info('Received SIGUSR1, restarting...');\n\n // Remove runtime record first so status does not point at a process going down.\n deleteRuntimeRecord(resolvedEnvPath);\n\n try {\n await proxy.stop();\n } catch (err) {\n logger.warn(`Failed to stop gateway server: ${String(err)}`);\n }\n\n await supervisor.stopAll();\n\n // Reload env from file (dashboard writes into the env file).\n if (resolvedEnvPath) {\n loadEnvFile(resolvedEnvPath);\n process.env.XPOD_ENV_PATH = resolvedEnvPath;\n }\n\n const child = spawn(process.execPath, process.argv.slice(1), {\n stdio: 'inherit',\n env: process.env,\n });\n child.unref();\n process.exit(EXIT_OK);\n };\n\n process.on('SIGUSR1', () => {\n void restart();\n });\n\n saveRuntimeRecord({\n schemaVersion: '1.0',\n pid: process.pid,\n mode,\n port: mainPort,\n baseUrl,\n publicUrl: process.env.CSS_PUBLIC_URL,\n envPath: resolvedEnvPath,\n configPath,\n startTime: new Date().toISOString(),\n });\n\n const shutdown = async(signal: string): Promise<void> => {\n logger.info(`Received ${signal}, shutting down...`);\n deleteRuntimeRecord(resolvedEnvPath);\n await proxy.stop();\n await supervisor.stopAll();\n process.exit(EXIT_OK);\n };\n\n process.on('SIGTERM', () => shutdown('SIGTERM'));\n process.on('SIGINT', () => shutdown('SIGINT'));\n}\n\nasync function commandStatus(envPath?: string, asJson = false): Promise<void> {\n const resolvedEnvPath = envPath ? path.resolve(envPath) : undefined;\n const runtime = loadRuntimeRecord(resolvedEnvPath);\n if (!runtime) {\n const payload = {\n schemaVersion: '1.0',\n running: false,\n ready: false,\n baseUrl: '',\n port: 0,\n mode: 'local',\n version: getVersion(),\n };\n if (asJson) {\n outputJson(payload);\n } else {\n console.log('xpod is not running');\n }\n process.exit(EXIT_NOT_RUNNING);\n }\n\n const running = isProcessRunning(runtime.pid);\n const health = running ? await buildHealth(runtime.baseUrl) : undefined;\n\n const payload = {\n schemaVersion: '1.0',\n running,\n ready: Boolean(health?.healthy),\n baseUrl: runtime.baseUrl,\n publicUrl: runtime.publicUrl,\n port: runtime.port,\n mode: runtime.mode,\n pid: running ? runtime.pid : undefined,\n version: getVersion(),\n };\n\n if (asJson) {\n outputJson(payload);\n } else {\n console.log(payload);\n }\n\n process.exit(running ? EXIT_OK : EXIT_NOT_RUNNING);\n}\n\nasync function commandHealth(envPath?: string, asJson = false): Promise<void> {\n const resolvedEnvPath = envPath ? path.resolve(envPath) : undefined;\n const runtime = loadRuntimeRecord(resolvedEnvPath);\n if (!runtime || !isProcessRunning(runtime.pid)) {\n const payload: HealthReport = {\n schemaVersion: '1.0',\n healthy: false,\n checks: {\n gateway: 'fail',\n css: 'fail',\n api: 'fail',\n },\n timestamp: new Date().toISOString(),\n };\n\n if (asJson) {\n outputJson(payload);\n } else {\n console.log(payload);\n }\n process.exit(EXIT_NOT_RUNNING);\n }\n\n const payload = await buildHealth(runtime.baseUrl);\n if (asJson) {\n outputJson(payload);\n } else {\n console.log(payload);\n }\n process.exit(payload.healthy ? EXIT_OK : EXIT_INTERNAL_ERROR);\n}\n\nasync function commandStop(envPath?: string, timeoutMs = 10000, asJson = false): Promise<void> {\n const resolvedEnvPath = envPath ? path.resolve(envPath) : undefined;\n const runtime = loadRuntimeRecord(resolvedEnvPath);\n\n if (!runtime || !isProcessRunning(runtime.pid)) {\n deleteRuntimeRecord(resolvedEnvPath);\n const payload = { stopped: true, running: false };\n if (asJson) {\n outputJson(payload);\n } else {\n console.log('xpod is already stopped');\n }\n process.exit(EXIT_OK);\n }\n\n process.kill(runtime.pid, 'SIGTERM');\n const start = Date.now();\n while (Date.now() - start < timeoutMs) {\n if (!isProcessRunning(runtime.pid)) {\n deleteRuntimeRecord(resolvedEnvPath);\n const payload = { stopped: true, pid: runtime.pid };\n if (asJson) {\n outputJson(payload);\n } else {\n console.log(`xpod stopped (pid=${runtime.pid})`);\n }\n process.exit(EXIT_OK);\n }\n await new Promise((resolve) => setTimeout(resolve, 200));\n }\n\n const payload = {\n stopped: false,\n pid: runtime.pid,\n message: `timeout waiting for process to stop (${timeoutMs}ms)`,\n };\n if (asJson) {\n outputJson(payload);\n } else {\n console.error(payload.message);\n }\n process.exit(EXIT_INTERNAL_ERROR);\n}\n\nasync function main(): Promise<void> {\n const rawArgs = hideBin(process.argv);\n const commandMode = [ 'run', 'status', 'health', 'stop' ].includes(rawArgs[0] ?? '');\n\n if (!commandMode) {\n // Backward-compatible legacy invocation: xpod --mode local --port 3000\n const argv = await yargs(rawArgs)\n .option('mode', { alias: 'm', type: 'string', choices: [ 'local', 'cloud' ], description: 'Run mode' })\n .option('config', { alias: 'c', type: 'string', description: 'Path to config file (overrides --mode)' })\n .option('env', { alias: 'e', type: 'string', description: 'Path to .env file' })\n .option('port', { alias: 'p', type: 'number', description: 'Gateway port', default: 3000 })\n .option('host', { type: 'string', description: 'Gateway bind host' })\n .help()\n .parse();\n\n try {\n await startRuntime({\n mode: argv.mode as 'local' | 'cloud' | undefined,\n config: argv.config,\n env: argv.env,\n port: argv.port,\n host: argv.host,\n });\n } catch (error: unknown) {\n exitForCliError(error);\n }\n return;\n }\n\n await yargs(rawArgs)\n .scriptName('xpod')\n .command(\n 'run',\n 'Run xpod runtime',\n (y) => y\n .option('env', { alias: 'e', type: 'string', description: 'Path to .env file' })\n .option('mode', { alias: 'm', type: 'string', choices: [ 'local', 'cloud' ], description: 'Run mode' })\n .option('config', { alias: 'c', type: 'string', description: 'Path to config file (overrides --mode)' })\n .option('port', { alias: 'p', type: 'number', description: 'Gateway port', default: 3000 })\n .option('host', { type: 'string', description: 'Gateway bind host' }),\n async(argv) => {\n try {\n await startRuntime({\n mode: argv.mode as 'local' | 'cloud' | undefined,\n config: argv.config,\n env: argv.env,\n port: argv.port,\n host: argv.host,\n });\n } catch (error: unknown) {\n exitForCliError(error);\n }\n },\n )\n .command(\n 'status',\n 'Show runtime status',\n (y) => y\n .option('env', { alias: 'e', type: 'string', description: 'Path to .env file' })\n .option('json', { type: 'boolean', default: false, description: 'Output JSON' }),\n async(argv) => {\n await commandStatus(argv.env, Boolean(argv.json));\n },\n )\n .command(\n 'health',\n 'Show runtime health',\n (y) => y\n .option('env', { alias: 'e', type: 'string', description: 'Path to .env file' })\n .option('json', { type: 'boolean', default: false, description: 'Output JSON' }),\n async(argv) => {\n await commandHealth(argv.env, Boolean(argv.json));\n },\n )\n .command(\n 'stop',\n 'Stop runtime process',\n (y) => y\n .option('env', { alias: 'e', type: 'string', description: 'Path to .env file' })\n .option('timeout', { type: 'number', default: 10000, description: 'Stop timeout in milliseconds' })\n .option('json', { type: 'boolean', default: false, description: 'Output JSON' }),\n async(argv) => {\n await commandStop(argv.env, argv.timeout as number, Boolean(argv.json));\n },\n )\n .demandCommand(1)\n .strict()\n .help()\n .parseAsync();\n}\n\nmain().catch(exitForCliError);\n"]}
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;AACA,6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EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;SAC/E,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;SAClG,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,EAClF,KAAK,EAAC,IAAI,EAAE,EAAE;QACZ,MAAM,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,OAAiB,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1E,CAAC,CACF;SACA,aAAa,CAAC,CAAC,CAAC;SAChB,MAAM,EAAE;SACR,IAAI,EAAE;SACN,UAAU,EAAE,CAAC;AAClB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport './runtime/configure-drizzle-solid';\nimport { createHash } from 'crypto';\nimport { spawn } from 'child_process';\nimport fs from 'fs';\nimport path from 'path';\nimport { setGlobalLoggerFactory, getLoggerFor } from 'global-logger-factory';\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport { createGatewayAdminProxyAuthSecret, GatewayProxy, getFreePort, PACKAGE_ROOT } from './runtime';\nimport {\n buildApiChildEnv,\n buildCssArgs,\n buildCssChildEnv,\n createCssChildRuntimeConfig,\n} from './runtime/css-process';\nimport { resolveExternalOidcIssuer } from './runtime/oidc-issuer';\nimport { resolveAuthModeFromEnv } from './authorization/AuthMode';\nimport { ConfigurableLoggerFactory } from './logging/ConfigurableLoggerFactory';\nimport { Supervisor } from './supervisor';\n\ninterface RuntimeRecord {\n schemaVersion: '1.0';\n pid: number;\n mode: 'local' | 'cloud';\n port: number;\n baseUrl: string;\n publicUrl?: string;\n envPath?: string;\n configPath: string;\n startTime: string;\n}\n\ninterface HealthReport {\n schemaVersion: '1.0';\n healthy: boolean;\n checks: {\n gateway: 'pass' | 'fail';\n css: 'pass' | 'fail';\n api: 'pass' | 'fail';\n };\n timestamp: string;\n}\n\ninterface RunOptions {\n mode?: 'local' | 'cloud';\n config?: string;\n env?: string;\n port?: number;\n host?: string;\n}\n\nconst EXIT_OK = 0;\nconst EXIT_NOT_RUNNING = 10;\nconst EXIT_CONFIG_ERROR = 20;\nconst EXIT_INTERNAL_ERROR = 50;\n\nlet logger = getLoggerFor('Main');\nconst childJsRuntime = typeof (globalThis as { Bun?: unknown }).Bun !== 'undefined'\n ? (process.env.XPOD_NODE_BINARY ?? 'node')\n : process.execPath;\n\nfunction initLogger(): void {\n const loggerFactory = new ConfigurableLoggerFactory(process.env.CSS_LOGGING_LEVEL || 'info', {\n fileName: path.join(process.cwd(), 'logs/xpod-%DATE%.log'),\n showLocation: true,\n });\n setGlobalLoggerFactory(loggerFactory);\n logger = getLoggerFor('Main');\n}\n\nfunction loadEnvFile(envPath: string): void {\n if (!fs.existsSync(envPath)) {\n throw new Error(`Env file not found: ${envPath}`);\n }\n\n const content = fs.readFileSync(envPath, 'utf-8');\n for (const line of content.split('\\n')) {\n const trimmed = line.trim();\n if (!trimmed || trimmed.startsWith('#')) continue;\n\n const eqIndex = trimmed.indexOf('=');\n if (eqIndex === -1) continue;\n\n const key = trimmed.slice(0, eqIndex).trim();\n let value = trimmed.slice(eqIndex + 1).trim();\n if ((value.startsWith('\"') && value.endsWith('\"')) ||\n (value.startsWith(\"'\") && value.endsWith(\"'\"))) {\n value = value.slice(1, -1);\n }\n\n // Only set if not already defined — CLI / parent env takes precedence.\n if (process.env[key] === undefined) {\n process.env[key] = value;\n }\n }\n}\n\nfunction ensureTrailingSlash(url: string): string {\n return url.endsWith('/') ? url : `${url}/`;\n}\n\nfunction resolveInstanceKey(envPath?: string): string {\n if (!envPath) {\n return 'default';\n }\n const abs = path.resolve(envPath);\n return createHash('sha256').update(abs).digest('hex').slice(0, 12);\n}\n\nfunction getRuntimeFilePath(envPath?: string): string {\n const dir = path.join(process.cwd(), '.xpod/runtime');\n return path.join(dir, `${resolveInstanceKey(envPath)}.json`);\n}\n\nfunction saveRuntimeRecord(record: RuntimeRecord): void {\n const filePath = getRuntimeFilePath(record.envPath);\n fs.mkdirSync(path.dirname(filePath), { recursive: true });\n fs.writeFileSync(filePath, JSON.stringify(record, null, 2), 'utf-8');\n}\n\nfunction loadRuntimeRecord(envPath?: string): RuntimeRecord | undefined {\n const filePath = getRuntimeFilePath(envPath);\n if (!fs.existsSync(filePath)) {\n return undefined;\n }\n\n try {\n return JSON.parse(fs.readFileSync(filePath, 'utf-8')) as RuntimeRecord;\n } catch {\n return undefined;\n }\n}\n\nfunction deleteRuntimeRecord(envPath?: string): void {\n const filePath = getRuntimeFilePath(envPath);\n if (fs.existsSync(filePath)) {\n fs.unlinkSync(filePath);\n }\n}\n\nfunction isProcessRunning(pid?: number): boolean {\n if (!pid || pid <= 0) {\n return false;\n }\n\n try {\n process.kill(pid, 0);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction getVersion(): string {\n try {\n const pkg = JSON.parse(fs.readFileSync(path.join(PACKAGE_ROOT, 'package.json'), 'utf-8')) as { version?: string };\n return pkg.version ?? 'unknown';\n } catch {\n return 'unknown';\n }\n}\n\nasync function checkGateway(baseUrl: string): Promise<boolean> {\n try {\n // Gateway internal endpoints are exposed under /service/* (legacy /_gateway/* has been removed).\n const res = await fetch(new URL('/service/status', ensureTrailingSlash(baseUrl)), {\n signal: AbortSignal.timeout(3000),\n });\n return res.ok;\n } catch {\n return false;\n }\n}\nasync function checkCss(baseUrl: string): Promise<boolean> {\n try {\n // Prefer supervisor status rather than probing CSS routes which can fail on identifier-space/host mismatch.\n const res = await fetch(new URL('/service/status', ensureTrailingSlash(baseUrl)), {\n signal: AbortSignal.timeout(3000),\n });\n if (!res.ok) {\n return false;\n }\n const items = (await res.json()) as Array<{ name?: string; status?: string }>;\n const css = items.find((it) => it?.name === 'css');\n return css?.status === 'running';\n } catch {\n return false;\n }\n}\nasync function checkApi(baseUrl: string): Promise<boolean> {\n try {\n const res = await fetch(new URL('/service/status', ensureTrailingSlash(baseUrl)), {\n signal: AbortSignal.timeout(3000),\n });\n if (!res.ok) {\n return false;\n }\n const items = (await res.json()) as Array<{ name?: string; status?: string }>;\n const api = items.find((it) => it?.name === 'api');\n return api?.status === 'running';\n } catch {\n return false;\n }\n}\nasync function buildHealth(baseUrl: string): Promise<HealthReport> {\n const gateway = await checkGateway(baseUrl);\n const css = await checkCss(baseUrl);\n const api = await checkApi(baseUrl);\n\n return {\n schemaVersion: '1.0',\n healthy: gateway && css && api,\n checks: {\n gateway: gateway ? 'pass' : 'fail',\n css: css ? 'pass' : 'fail',\n api: api ? 'pass' : 'fail',\n },\n timestamp: new Date().toISOString(),\n };\n}\n\nfunction outputJson(payload: unknown): void {\n process.stdout.write(`${JSON.stringify(payload)}\\n`);\n}\n\nfunction exitForCliError(error: unknown): never {\n const message = error instanceof Error ? error.message : String(error);\n console.error(`Failed to start: ${message}`);\n if (message.includes('Env file not found:') || message.includes('Config file not found:')) {\n process.exit(EXIT_CONFIG_ERROR);\n }\n process.exit(EXIT_INTERNAL_ERROR);\n}\n\nasync function startRuntime(options: RunOptions): Promise<void> {\n initLogger();\n const resolvedEnvPath = options.env ? path.resolve(options.env) : undefined;\n if (resolvedEnvPath) {\n process.env.XPOD_ENV_PATH = resolvedEnvPath;\n loadEnvFile(resolvedEnvPath);\n }\n\n const requestedPort = options.port !== undefined ? Number(options.port) : Number.NaN;\n const mainPort = Number.isFinite(requestedPort)\n ? requestedPort\n : parseInt(process.env.XPOD_PORT ?? process.env.PORT ?? '3000', 10);\n const host = options.host ?? '127.0.0.1';\n\n let configPath = path.join(PACKAGE_ROOT, 'config/local.json');\n if (options.config) {\n configPath = options.config;\n } else if (options.mode) {\n configPath = path.join(PACKAGE_ROOT, `config/${options.mode}.json`);\n }\n\n if (!fs.existsSync(configPath)) {\n throw new Error(`Config file not found: ${configPath}`);\n }\n\n const mode: 'local' | 'cloud' = options.mode ?? (configPath.includes('cloud') ? 'cloud' : 'local');\n\n const baseUrl = ensureTrailingSlash(process.env.CSS_BASE_URL || `http://${host}:${mainPort}`);\n const cssPort = await getFreePort(mainPort + 1, host);\n const apiPort = await getFreePort(cssPort + 1, host);\n const runtimeRoot = path.join(process.cwd(), '.xpod/runtime/legacy-css');\n const rdfIndexPath = process.env.CSS_RDF_INDEX_PATH || path.join(runtimeRoot, 'rdf-index.sqlite');\n\n // Make sure GatewayProxy has access to the effective baseUrl for host rewrites.\n process.env.CSS_BASE_URL = baseUrl;\n process.env.CSS_RDF_INDEX_PATH = rdfIndexPath;\n\n logger.info('Orchestration Plan:');\n logger.info(` - Main Entry: ${baseUrl} (${host}:${mainPort})`);\n logger.info(` - CSS (internal): http://localhost:${cssPort}`);\n logger.info(` - API (internal): http://localhost:${apiPort}`);\n\n const supervisor = new Supervisor();\n const cssBinary = require.resolve('@solid/community-server/bin/server.js');\n const cssModuleRoot = PACKAGE_ROOT;\n const externalOidcIssuer = resolveExternalOidcIssuer(process.env);\n const authMode = resolveAuthModeFromEnv(process.env);\n if (externalOidcIssuer) {\n logger.info(` - SP mode external IdP: ${externalOidcIssuer}`);\n }\n logger.info(` - Authorization mode: ${authMode}`);\n\n const cssRuntimeConfig = createCssChildRuntimeConfig({\n configPath,\n runtimeRoot,\n authMode,\n externalOidcIssuer,\n });\n\n // API server: resolve the entry point dynamically\n // In dev (ts-node): use ts-node to run the .ts file\n // In production: use the compiled .js file\n const isDevMode = __filename.endsWith('.ts');\n const apiArgs = isDevMode\n ? [\n '-r',\n require.resolve('ts-node/register/transpile-only'),\n path.join(__dirname, 'api', 'main.ts'),\n ]\n : [path.join(__dirname, 'api', 'main.js')];\n\n const gatewayAdminProxyAuthSecret = createGatewayAdminProxyAuthSecret();\n\n supervisor.register({\n name: 'css',\n command: childJsRuntime,\n args: buildCssArgs({\n cssBinary,\n configPath: cssRuntimeConfig.configPath,\n cssModuleRoot,\n cssPort,\n baseUrl,\n externalOidcIssuer,\n }),\n cwd: cssRuntimeConfig.cwd,\n env: buildCssChildEnv(baseUrl, cssPort, externalOidcIssuer, authMode, process.env, gatewayAdminProxyAuthSecret),\n });\n\n supervisor.register({\n name: 'api',\n command: childJsRuntime,\n args: apiArgs,\n env: buildApiChildEnv({\n apiPort,\n mainPort,\n cssPort,\n baseUrl,\n rdfIndexPath,\n authMode,\n externalOidcIssuer,\n gatewayAdminProxyAuthSecret,\n }),\n });\n\n // Bind host: use CLI --host value; if not explicitly set, derive from the public Base URL.\n // In local dev/sandboxed environments, binding 0.0.0.0 can fail with EPERM.\n const bindHost = options.host || (() => {\n try {\n const hostname = new URL(baseUrl).hostname;\n if (hostname === 'localhost') return '127.0.0.1';\n if (hostname === '::1') return '::1';\n if (hostname.startsWith('127.')) return hostname;\n } catch {\n // ignore\n }\n return '0.0.0.0';\n })();\n\n const proxy = new GatewayProxy(mainPort, supervisor, bindHost, {\n exitOnStop: true,\n baseUrl,\n internalAdminAuthSecret: gatewayAdminProxyAuthSecret,\n });\n proxy.setTargets({\n css: `http://localhost:${cssPort}`,\n api: `http://localhost:${apiPort}`,\n });\n\n await supervisor.startAll();\n await proxy.start();\n\n let restarting = false;\n const restart = async(): Promise<void> => {\n if (restarting) {\n return;\n }\n restarting = true;\n\n logger.info('Received SIGUSR1, restarting...');\n\n // Remove runtime record first so status does not point at a process going down.\n deleteRuntimeRecord(resolvedEnvPath);\n\n try {\n await proxy.stop();\n } catch (err) {\n logger.warn(`Failed to stop gateway server: ${String(err)}`);\n }\n\n await supervisor.stopAll();\n\n // Reload env from file (dashboard writes into the env file).\n if (resolvedEnvPath) {\n loadEnvFile(resolvedEnvPath);\n process.env.XPOD_ENV_PATH = resolvedEnvPath;\n }\n\n const child = spawn(process.execPath, process.argv.slice(1), {\n stdio: 'inherit',\n env: process.env,\n });\n child.unref();\n process.exit(EXIT_OK);\n };\n\n process.on('SIGUSR1', () => {\n void restart();\n });\n\n saveRuntimeRecord({\n schemaVersion: '1.0',\n pid: process.pid,\n mode,\n port: mainPort,\n baseUrl,\n publicUrl: process.env.CSS_PUBLIC_URL,\n envPath: resolvedEnvPath,\n configPath,\n startTime: new Date().toISOString(),\n });\n\n const shutdown = async(signal: string): Promise<void> => {\n logger.info(`Received ${signal}, shutting down...`);\n deleteRuntimeRecord(resolvedEnvPath);\n await proxy.stop();\n await supervisor.stopAll();\n process.exit(EXIT_OK);\n };\n\n process.on('SIGTERM', () => shutdown('SIGTERM'));\n process.on('SIGINT', () => shutdown('SIGINT'));\n}\n\nasync function commandStatus(envPath?: string, asJson = false): Promise<void> {\n const resolvedEnvPath = envPath ? path.resolve(envPath) : undefined;\n const runtime = loadRuntimeRecord(resolvedEnvPath);\n if (!runtime) {\n const payload = {\n schemaVersion: '1.0',\n running: false,\n ready: false,\n baseUrl: '',\n port: 0,\n mode: 'local',\n version: getVersion(),\n };\n if (asJson) {\n outputJson(payload);\n } else {\n console.log('xpod is not running');\n }\n process.exit(EXIT_NOT_RUNNING);\n }\n\n const running = isProcessRunning(runtime.pid);\n const health = running ? await buildHealth(runtime.baseUrl) : undefined;\n\n const payload = {\n schemaVersion: '1.0',\n running,\n ready: Boolean(health?.healthy),\n baseUrl: runtime.baseUrl,\n publicUrl: runtime.publicUrl,\n port: runtime.port,\n mode: runtime.mode,\n pid: running ? runtime.pid : undefined,\n version: getVersion(),\n };\n\n if (asJson) {\n outputJson(payload);\n } else {\n console.log(payload);\n }\n\n process.exit(running ? EXIT_OK : EXIT_NOT_RUNNING);\n}\n\nasync function commandHealth(envPath?: string, asJson = false): Promise<void> {\n const resolvedEnvPath = envPath ? path.resolve(envPath) : undefined;\n const runtime = loadRuntimeRecord(resolvedEnvPath);\n if (!runtime || !isProcessRunning(runtime.pid)) {\n const payload: HealthReport = {\n schemaVersion: '1.0',\n healthy: false,\n checks: {\n gateway: 'fail',\n css: 'fail',\n api: 'fail',\n },\n timestamp: new Date().toISOString(),\n };\n\n if (asJson) {\n outputJson(payload);\n } else {\n console.log(payload);\n }\n process.exit(EXIT_NOT_RUNNING);\n }\n\n const payload = await buildHealth(runtime.baseUrl);\n if (asJson) {\n outputJson(payload);\n } else {\n console.log(payload);\n }\n process.exit(payload.healthy ? EXIT_OK : EXIT_INTERNAL_ERROR);\n}\n\nasync function commandStop(envPath?: string, timeoutMs = 10000, asJson = false): Promise<void> {\n const resolvedEnvPath = envPath ? path.resolve(envPath) : undefined;\n const runtime = loadRuntimeRecord(resolvedEnvPath);\n\n if (!runtime || !isProcessRunning(runtime.pid)) {\n deleteRuntimeRecord(resolvedEnvPath);\n const payload = { stopped: true, running: false };\n if (asJson) {\n outputJson(payload);\n } else {\n console.log('xpod is already stopped');\n }\n process.exit(EXIT_OK);\n }\n\n process.kill(runtime.pid, 'SIGTERM');\n const start = Date.now();\n while (Date.now() - start < timeoutMs) {\n if (!isProcessRunning(runtime.pid)) {\n deleteRuntimeRecord(resolvedEnvPath);\n const payload = { stopped: true, pid: runtime.pid };\n if (asJson) {\n outputJson(payload);\n } else {\n console.log(`xpod stopped (pid=${runtime.pid})`);\n }\n process.exit(EXIT_OK);\n }\n await new Promise((resolve) => setTimeout(resolve, 200));\n }\n\n const payload = {\n stopped: false,\n pid: runtime.pid,\n message: `timeout waiting for process to stop (${timeoutMs}ms)`,\n };\n if (asJson) {\n outputJson(payload);\n } else {\n console.error(payload.message);\n }\n process.exit(EXIT_INTERNAL_ERROR);\n}\n\nasync function main(): Promise<void> {\n const rawArgs = hideBin(process.argv);\n const commandMode = [ 'run', 'status', 'health', 'stop' ].includes(rawArgs[0] ?? '');\n\n if (!commandMode) {\n // Backward-compatible legacy invocation: xpod --mode local --port 3000\n const argv = await yargs(rawArgs)\n .option('mode', { alias: 'm', type: 'string', choices: [ 'local', 'cloud' ], description: 'Run mode' })\n .option('config', { alias: 'c', type: 'string', description: 'Path to config file (overrides --mode)' })\n .option('env', { alias: 'e', type: 'string', description: 'Path to .env file' })\n .option('port', { alias: 'p', type: 'number', description: 'Gateway port', default: 3000 })\n .option('host', { type: 'string', description: 'Gateway bind host' })\n .help()\n .parse();\n\n try {\n await startRuntime({\n mode: argv.mode as 'local' | 'cloud' | undefined,\n config: argv.config,\n env: argv.env,\n port: argv.port,\n host: argv.host,\n });\n } catch (error: unknown) {\n exitForCliError(error);\n }\n return;\n }\n\n await yargs(rawArgs)\n .scriptName('xpod')\n .command(\n 'run',\n 'Run xpod runtime',\n (y) => y\n .option('env', { alias: 'e', type: 'string', description: 'Path to .env file' })\n .option('mode', { alias: 'm', type: 'string', choices: [ 'local', 'cloud' ], description: 'Run mode' })\n .option('config', { alias: 'c', type: 'string', description: 'Path to config file (overrides --mode)' })\n .option('port', { alias: 'p', type: 'number', description: 'Gateway port', default: 3000 })\n .option('host', { type: 'string', description: 'Gateway bind host' }),\n async(argv) => {\n try {\n await startRuntime({\n mode: argv.mode as 'local' | 'cloud' | undefined,\n config: argv.config,\n env: argv.env,\n port: argv.port,\n host: argv.host,\n });\n } catch (error: unknown) {\n exitForCliError(error);\n }\n },\n )\n .command(\n 'status',\n 'Show runtime status',\n (y) => y\n .option('env', { alias: 'e', type: 'string', description: 'Path to .env file' })\n .option('json', { type: 'boolean', default: false, description: 'Output JSON' }),\n async(argv) => {\n await commandStatus(argv.env, Boolean(argv.json));\n },\n )\n .command(\n 'health',\n 'Show runtime health',\n (y) => y\n .option('env', { alias: 'e', type: 'string', description: 'Path to .env file' })\n .option('json', { type: 'boolean', default: false, description: 'Output JSON' }),\n async(argv) => {\n await commandHealth(argv.env, Boolean(argv.json));\n },\n )\n .command(\n 'stop',\n 'Stop runtime process',\n (y) => y\n .option('env', { alias: 'e', type: 'string', description: 'Path to .env file' })\n .option('timeout', { type: 'number', default: 10000, description: 'Stop timeout in milliseconds' })\n .option('json', { type: 'boolean', default: false, description: 'Output JSON' }),\n async(argv) => {\n await commandStop(argv.env, argv.timeout as number, Boolean(argv.json));\n },\n )\n .demandCommand(1)\n .strict()\n .help()\n .parseAsync();\n}\n\nmain().catch(exitForCliError);\n"]}
|
|
@@ -2,7 +2,9 @@ import type { IncomingHttpHeaders, OutgoingHttpHeaders } from 'node:http';
|
|
|
2
2
|
export declare const GATEWAY_ADMIN_PROXY_LOOPBACK_HEADER = "x-xpod-admin-proxy-loopback";
|
|
3
3
|
export declare const GATEWAY_ADMIN_PROXY_TIMESTAMP_HEADER = "x-xpod-admin-proxy-timestamp";
|
|
4
4
|
export declare const GATEWAY_ADMIN_PROXY_SIGNATURE_HEADER = "x-xpod-admin-proxy-signature";
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const GATEWAY_ADMIN_PROXY_INTENT_HEADER = "x-xpod-admin-proxy-intent";
|
|
6
|
+
export declare const GATEWAY_ADMIN_PROXY_NONCE_HEADER = "x-xpod-admin-proxy-nonce";
|
|
7
|
+
export declare const GATEWAY_ADMIN_PROXY_HEADERS: readonly ["x-xpod-admin-proxy-loopback", "x-xpod-admin-proxy-timestamp", "x-xpod-admin-proxy-signature", "x-xpod-admin-proxy-intent", "x-xpod-admin-proxy-nonce"];
|
|
6
8
|
export declare function createGatewayAdminProxyAuthSecret(): string;
|
|
7
9
|
export interface GatewayAdminProxyMarkerInput {
|
|
8
10
|
secret: string;
|
|
@@ -10,13 +12,24 @@ export interface GatewayAdminProxyMarkerInput {
|
|
|
10
12
|
url: string | undefined;
|
|
11
13
|
originalClientLoopback: boolean;
|
|
12
14
|
issuedAt?: number;
|
|
15
|
+
nonce?: string;
|
|
16
|
+
intent?: GatewayAdminProxyIntent;
|
|
13
17
|
}
|
|
14
18
|
export interface GatewayAdminProxyMarkerVerification {
|
|
15
19
|
present: boolean;
|
|
16
20
|
valid: boolean;
|
|
17
21
|
originalClientLoopback: boolean;
|
|
22
|
+
nonce?: string;
|
|
23
|
+
intent?: GatewayAdminProxyIntent;
|
|
18
24
|
reason?: string;
|
|
19
25
|
}
|
|
26
|
+
export interface GatewayAdminProxyIntent {
|
|
27
|
+
ownerWebId: string;
|
|
28
|
+
method: 'GET' | 'PUT' | 'PATCH' | 'DELETE';
|
|
29
|
+
resourceUrl: string;
|
|
30
|
+
principalKind: 'solid-user';
|
|
31
|
+
scopes: string[];
|
|
32
|
+
}
|
|
20
33
|
export declare function createGatewayAdminProxyHeaders(input: GatewayAdminProxyMarkerInput): OutgoingHttpHeaders;
|
|
21
34
|
export declare function stripGatewayAdminProxyHeaders(headers: IncomingHttpHeaders): void;
|
|
22
35
|
export declare function isLoopbackRemoteAddress(remoteAddress: string | undefined): boolean;
|
|
@@ -27,3 +40,4 @@ export declare function verifyGatewayAdminProxyHeaders(input: {
|
|
|
27
40
|
url: string | undefined;
|
|
28
41
|
now?: number;
|
|
29
42
|
}): GatewayAdminProxyMarkerVerification;
|
|
43
|
+
export declare function canonicalGatewayAdminProxyIntent(intent: GatewayAdminProxyIntent): string;
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GATEWAY_ADMIN_PROXY_HEADERS = exports.GATEWAY_ADMIN_PROXY_SIGNATURE_HEADER = exports.GATEWAY_ADMIN_PROXY_TIMESTAMP_HEADER = exports.GATEWAY_ADMIN_PROXY_LOOPBACK_HEADER = void 0;
|
|
3
|
+
exports.GATEWAY_ADMIN_PROXY_HEADERS = exports.GATEWAY_ADMIN_PROXY_NONCE_HEADER = exports.GATEWAY_ADMIN_PROXY_INTENT_HEADER = exports.GATEWAY_ADMIN_PROXY_SIGNATURE_HEADER = exports.GATEWAY_ADMIN_PROXY_TIMESTAMP_HEADER = exports.GATEWAY_ADMIN_PROXY_LOOPBACK_HEADER = void 0;
|
|
4
4
|
exports.createGatewayAdminProxyAuthSecret = createGatewayAdminProxyAuthSecret;
|
|
5
5
|
exports.createGatewayAdminProxyHeaders = createGatewayAdminProxyHeaders;
|
|
6
6
|
exports.stripGatewayAdminProxyHeaders = stripGatewayAdminProxyHeaders;
|
|
7
7
|
exports.isLoopbackRemoteAddress = isLoopbackRemoteAddress;
|
|
8
8
|
exports.verifyGatewayAdminProxyHeaders = verifyGatewayAdminProxyHeaders;
|
|
9
|
+
exports.canonicalGatewayAdminProxyIntent = canonicalGatewayAdminProxyIntent;
|
|
9
10
|
const node_crypto_1 = require("node:crypto");
|
|
10
11
|
const node_net_1 = require("node:net");
|
|
11
12
|
exports.GATEWAY_ADMIN_PROXY_LOOPBACK_HEADER = 'x-xpod-admin-proxy-loopback';
|
|
12
13
|
exports.GATEWAY_ADMIN_PROXY_TIMESTAMP_HEADER = 'x-xpod-admin-proxy-timestamp';
|
|
13
14
|
exports.GATEWAY_ADMIN_PROXY_SIGNATURE_HEADER = 'x-xpod-admin-proxy-signature';
|
|
15
|
+
exports.GATEWAY_ADMIN_PROXY_INTENT_HEADER = 'x-xpod-admin-proxy-intent';
|
|
16
|
+
exports.GATEWAY_ADMIN_PROXY_NONCE_HEADER = 'x-xpod-admin-proxy-nonce';
|
|
14
17
|
exports.GATEWAY_ADMIN_PROXY_HEADERS = [
|
|
15
18
|
exports.GATEWAY_ADMIN_PROXY_LOOPBACK_HEADER,
|
|
16
19
|
exports.GATEWAY_ADMIN_PROXY_TIMESTAMP_HEADER,
|
|
17
20
|
exports.GATEWAY_ADMIN_PROXY_SIGNATURE_HEADER,
|
|
21
|
+
exports.GATEWAY_ADMIN_PROXY_INTENT_HEADER,
|
|
22
|
+
exports.GATEWAY_ADMIN_PROXY_NONCE_HEADER,
|
|
18
23
|
];
|
|
19
24
|
const MAX_CLOCK_SKEW_MS = 60_000;
|
|
20
25
|
function createGatewayAdminProxyAuthSecret() {
|
|
@@ -23,15 +28,20 @@ function createGatewayAdminProxyAuthSecret() {
|
|
|
23
28
|
function createGatewayAdminProxyHeaders(input) {
|
|
24
29
|
const issuedAt = input.issuedAt ?? Date.now();
|
|
25
30
|
const loopback = input.originalClientLoopback ? '1' : '0';
|
|
31
|
+
const intent = input.intent ? canonicalGatewayAdminProxyIntent(input.intent) : undefined;
|
|
26
32
|
return {
|
|
27
33
|
[exports.GATEWAY_ADMIN_PROXY_LOOPBACK_HEADER]: loopback,
|
|
28
34
|
[exports.GATEWAY_ADMIN_PROXY_TIMESTAMP_HEADER]: String(issuedAt),
|
|
35
|
+
...(input.nonce ? { [exports.GATEWAY_ADMIN_PROXY_NONCE_HEADER]: input.nonce } : {}),
|
|
36
|
+
...(intent ? { [exports.GATEWAY_ADMIN_PROXY_INTENT_HEADER]: intent } : {}),
|
|
29
37
|
[exports.GATEWAY_ADMIN_PROXY_SIGNATURE_HEADER]: signGatewayAdminProxyMarker({
|
|
30
38
|
secret: input.secret,
|
|
31
39
|
method: input.method,
|
|
32
40
|
url: input.url,
|
|
33
41
|
loopback,
|
|
34
42
|
issuedAt,
|
|
43
|
+
nonce: input.nonce,
|
|
44
|
+
intent,
|
|
35
45
|
}),
|
|
36
46
|
};
|
|
37
47
|
}
|
|
@@ -55,6 +65,8 @@ function verifyGatewayAdminProxyHeaders(input) {
|
|
|
55
65
|
const loopback = firstHeader(input.headers[exports.GATEWAY_ADMIN_PROXY_LOOPBACK_HEADER]);
|
|
56
66
|
const timestamp = firstHeader(input.headers[exports.GATEWAY_ADMIN_PROXY_TIMESTAMP_HEADER]);
|
|
57
67
|
const signature = firstHeader(input.headers[exports.GATEWAY_ADMIN_PROXY_SIGNATURE_HEADER]);
|
|
68
|
+
const nonce = firstHeader(input.headers[exports.GATEWAY_ADMIN_PROXY_NONCE_HEADER]);
|
|
69
|
+
const intentHeader = firstHeader(input.headers[exports.GATEWAY_ADMIN_PROXY_INTENT_HEADER]);
|
|
58
70
|
const present = loopback !== undefined || timestamp !== undefined || signature !== undefined;
|
|
59
71
|
if (!present) {
|
|
60
72
|
return { present: false, valid: false, originalClientLoopback: false };
|
|
@@ -75,17 +87,23 @@ function verifyGatewayAdminProxyHeaders(input) {
|
|
|
75
87
|
if (Math.abs((input.now ?? Date.now()) - issuedAt) > MAX_CLOCK_SKEW_MS) {
|
|
76
88
|
return { present: true, valid: false, originalClientLoopback: loopback === '1', reason: 'expired_marker' };
|
|
77
89
|
}
|
|
90
|
+
const intent = parseGatewayAdminProxyIntent(intentHeader);
|
|
91
|
+
if (intentHeader !== undefined && !intent) {
|
|
92
|
+
return { present: true, valid: false, originalClientLoopback: loopback === '1', reason: 'invalid_intent' };
|
|
93
|
+
}
|
|
78
94
|
const expected = signGatewayAdminProxyMarker({
|
|
79
95
|
secret: input.secret,
|
|
80
96
|
method: input.method,
|
|
81
97
|
url: input.url,
|
|
82
98
|
loopback,
|
|
83
99
|
issuedAt,
|
|
100
|
+
nonce,
|
|
101
|
+
intent: intentHeader,
|
|
84
102
|
});
|
|
85
103
|
if (!safeEqual(signature, expected)) {
|
|
86
104
|
return { present: true, valid: false, originalClientLoopback: loopback === '1', reason: 'bad_signature' };
|
|
87
105
|
}
|
|
88
|
-
return { present: true, valid: true, originalClientLoopback: loopback === '1' };
|
|
106
|
+
return { present: true, valid: true, originalClientLoopback: loopback === '1', nonce, intent };
|
|
89
107
|
}
|
|
90
108
|
function signGatewayAdminProxyMarker(input) {
|
|
91
109
|
const payload = [
|
|
@@ -94,9 +112,46 @@ function signGatewayAdminProxyMarker(input) {
|
|
|
94
112
|
input.url ?? '/',
|
|
95
113
|
input.loopback,
|
|
96
114
|
String(input.issuedAt),
|
|
115
|
+
input.nonce ?? '',
|
|
116
|
+
input.intent ?? '',
|
|
97
117
|
].join('\n');
|
|
98
118
|
return (0, node_crypto_1.createHmac)('sha256', input.secret).update(payload).digest('base64url');
|
|
99
119
|
}
|
|
120
|
+
function canonicalGatewayAdminProxyIntent(intent) {
|
|
121
|
+
return JSON.stringify({
|
|
122
|
+
ownerWebId: intent.ownerWebId,
|
|
123
|
+
method: intent.method,
|
|
124
|
+
resourceUrl: intent.resourceUrl,
|
|
125
|
+
principalKind: intent.principalKind,
|
|
126
|
+
scopes: [...intent.scopes].sort(),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function parseGatewayAdminProxyIntent(value) {
|
|
130
|
+
if (!value) {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
try {
|
|
134
|
+
const parsed = JSON.parse(value);
|
|
135
|
+
if (typeof parsed.ownerWebId !== 'string' ||
|
|
136
|
+
typeof parsed.resourceUrl !== 'string' ||
|
|
137
|
+
(parsed.method !== 'GET' && parsed.method !== 'PUT' && parsed.method !== 'PATCH' && parsed.method !== 'DELETE') ||
|
|
138
|
+
parsed.principalKind !== 'solid-user' ||
|
|
139
|
+
!Array.isArray(parsed.scopes) ||
|
|
140
|
+
!parsed.scopes.every((scope) => typeof scope === 'string')) {
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
ownerWebId: parsed.ownerWebId,
|
|
145
|
+
method: parsed.method,
|
|
146
|
+
resourceUrl: parsed.resourceUrl,
|
|
147
|
+
principalKind: parsed.principalKind,
|
|
148
|
+
scopes: parsed.scopes,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
100
155
|
function safeEqual(actual, expected) {
|
|
101
156
|
const actualBuffer = Buffer.from(actual);
|
|
102
157
|
const expectedBuffer = Buffer.from(expected);
|