@undefineds.co/xpod 0.1.7 → 0.2.0-preview.2

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.
Files changed (305) hide show
  1. package/README.md +141 -2
  2. package/config/cli.json +9 -71
  3. package/config/cloud.json +34 -7
  4. package/config/local.json +6 -2
  5. package/config/resolver.json +11 -49
  6. package/config/runtime-open.json +22 -0
  7. package/config/xpod.base.json +32 -0
  8. package/config/xpod.cluster.json +2 -44
  9. package/config/xpod.json +5 -2
  10. package/dist/api/auth/AuthContext.d.ts +12 -1
  11. package/dist/api/auth/AuthContext.js +18 -1
  12. package/dist/api/auth/AuthContext.js.map +1 -1
  13. package/dist/api/auth/ClientCredentialsAuthenticator.d.ts +0 -1
  14. package/dist/api/auth/ClientCredentialsAuthenticator.js.map +1 -1
  15. package/dist/api/auth/ServiceTokenAuthenticator.d.ts +18 -0
  16. package/dist/api/auth/ServiceTokenAuthenticator.js +50 -0
  17. package/dist/api/auth/ServiceTokenAuthenticator.js.map +1 -0
  18. package/dist/api/auth/index.d.ts +1 -0
  19. package/dist/api/auth/index.js +1 -0
  20. package/dist/api/auth/index.js.map +1 -1
  21. package/dist/api/chatkit/ai-provider.d.ts +0 -10
  22. package/dist/api/chatkit/ai-provider.js +11 -120
  23. package/dist/api/chatkit/ai-provider.js.map +1 -1
  24. package/dist/api/chatkit/default-agent.js +11 -8
  25. package/dist/api/chatkit/default-agent.js.map +1 -1
  26. package/dist/api/chatkit/pod-store.js +19 -3
  27. package/dist/api/chatkit/pod-store.js.map +1 -1
  28. package/dist/api/chatkit/schema.d.ts +9 -3
  29. package/dist/api/chatkit/schema.js +14 -6
  30. package/dist/api/chatkit/schema.js.map +1 -1
  31. package/dist/api/container/business-token.d.ts +9 -0
  32. package/dist/api/container/business-token.js +32 -0
  33. package/dist/api/container/business-token.js.map +1 -0
  34. package/dist/api/container/cloud.js +36 -12
  35. package/dist/api/container/cloud.js.map +1 -1
  36. package/dist/api/container/common.js +12 -5
  37. package/dist/api/container/common.js.map +1 -1
  38. package/dist/api/container/index.js +94 -14
  39. package/dist/api/container/index.js.map +1 -1
  40. package/dist/api/container/local.js +2 -1
  41. package/dist/api/container/local.js.map +1 -1
  42. package/dist/api/container/routes.js +81 -9
  43. package/dist/api/container/routes.js.map +1 -1
  44. package/dist/api/container/types.d.ts +8 -6
  45. package/dist/api/container/types.js.map +1 -1
  46. package/dist/api/handlers/AdminHandler.js +9 -9
  47. package/dist/api/handlers/AdminHandler.js.map +1 -1
  48. package/dist/api/handlers/ApiKeyHandler.js +0 -6
  49. package/dist/api/handlers/ApiKeyHandler.js.map +1 -1
  50. package/dist/api/handlers/EdgeNodeSignalHandler.d.ts +17 -0
  51. package/dist/api/handlers/EdgeNodeSignalHandler.js +171 -0
  52. package/dist/api/handlers/EdgeNodeSignalHandler.js.map +1 -0
  53. package/dist/api/handlers/PodManagementHandler.d.ts +5 -4
  54. package/dist/api/handlers/PodManagementHandler.js +11 -10
  55. package/dist/api/handlers/PodManagementHandler.js.map +1 -1
  56. package/dist/api/handlers/ProvisionHandler.d.ts +42 -0
  57. package/dist/api/handlers/ProvisionHandler.js +161 -0
  58. package/dist/api/handlers/ProvisionHandler.js.map +1 -0
  59. package/dist/api/handlers/QuotaHandler.d.ts +7 -7
  60. package/dist/api/handlers/QuotaHandler.js +143 -73
  61. package/dist/api/handlers/QuotaHandler.js.map +1 -1
  62. package/dist/api/handlers/SubdomainClientHandler.js +2 -2
  63. package/dist/api/handlers/SubdomainClientHandler.js.map +1 -1
  64. package/dist/api/handlers/SubdomainHandler.js +13 -8
  65. package/dist/api/handlers/SubdomainHandler.js.map +1 -1
  66. package/dist/api/handlers/UsageHandler.d.ts +14 -0
  67. package/dist/api/handlers/UsageHandler.js +123 -0
  68. package/dist/api/handlers/UsageHandler.js.map +1 -0
  69. package/dist/api/handlers/index.d.ts +3 -1
  70. package/dist/api/handlers/index.js +3 -1
  71. package/dist/api/handlers/index.js.map +1 -1
  72. package/dist/api/main.js +18 -0
  73. package/dist/api/main.js.map +1 -1
  74. package/dist/api/middleware/OpenAuthMiddleware.d.ts +12 -0
  75. package/dist/api/middleware/OpenAuthMiddleware.js +27 -0
  76. package/dist/api/middleware/OpenAuthMiddleware.js.map +1 -0
  77. package/dist/api/runtime.d.ts +15 -0
  78. package/dist/api/runtime.js +104 -0
  79. package/dist/api/runtime.js.map +1 -0
  80. package/dist/api/service/VercelChatService.d.ts +16 -7
  81. package/dist/api/service/VercelChatService.js +98 -178
  82. package/dist/api/service/VercelChatService.js.map +1 -1
  83. package/dist/api/store/DrizzleClientCredentialsStore.d.ts +6 -11
  84. package/dist/api/store/DrizzleClientCredentialsStore.js +9 -39
  85. package/dist/api/store/DrizzleClientCredentialsStore.js.map +1 -1
  86. package/dist/authorization/AuthModeSelector.d.ts +10 -0
  87. package/dist/authorization/AuthModeSelector.js +27 -0
  88. package/dist/authorization/AuthModeSelector.js.map +1 -0
  89. package/dist/authorization/AuthModeSelector.jsonld +81 -0
  90. package/dist/cli/commands/account.d.ts +6 -0
  91. package/dist/cli/commands/account.js +119 -0
  92. package/dist/cli/commands/account.js.map +1 -0
  93. package/dist/cli/commands/auth.js +20 -29
  94. package/dist/cli/commands/auth.js.map +1 -1
  95. package/dist/cli/commands/backup.d.ts +15 -0
  96. package/dist/cli/commands/backup.js +286 -0
  97. package/dist/cli/commands/backup.js.map +1 -0
  98. package/dist/cli/commands/config.d.ts +34 -3
  99. package/dist/cli/commands/config.js +195 -258
  100. package/dist/cli/commands/config.js.map +1 -1
  101. package/dist/cli/commands/doctor.d.ts +6 -0
  102. package/dist/cli/commands/doctor.js +94 -0
  103. package/dist/cli/commands/doctor.js.map +1 -0
  104. package/dist/cli/commands/pod.d.ts +6 -0
  105. package/dist/cli/commands/pod.js +124 -0
  106. package/dist/cli/commands/pod.js.map +1 -0
  107. package/dist/cli/commands/start.js +28 -5
  108. package/dist/cli/commands/start.js.map +1 -1
  109. package/dist/cli/index.js +9 -0
  110. package/dist/cli/index.js.map +1 -1
  111. package/dist/cli/lib/credentials-store.d.ts +17 -0
  112. package/dist/cli/lib/credentials-store.js +73 -0
  113. package/dist/cli/lib/credentials-store.js.map +1 -0
  114. package/dist/cli/lib/css-account.d.ts +17 -0
  115. package/dist/cli/lib/css-account.js +56 -0
  116. package/dist/cli/lib/css-account.js.map +1 -1
  117. package/dist/cli/lib/pod-thread-store.d.ts +57 -0
  118. package/dist/cli/lib/pod-thread-store.js +310 -0
  119. package/dist/cli/lib/pod-thread-store.js.map +1 -0
  120. package/dist/cli/lib/solid-auth.d.ts +20 -0
  121. package/dist/cli/lib/solid-auth.js +70 -0
  122. package/dist/cli/lib/solid-auth.js.map +1 -0
  123. package/dist/components/components.jsonld +5 -8
  124. package/dist/components/context.jsonld +114 -244
  125. package/dist/edge/EdgeNodeAgent.js +2 -2
  126. package/dist/edge/EdgeNodeAgent.js.map +1 -1
  127. package/dist/edge/EdgeNodeDnsCoordinator.d.ts +1 -7
  128. package/dist/edge/EdgeNodeDnsCoordinator.js +31 -41
  129. package/dist/edge/EdgeNodeDnsCoordinator.js.map +1 -1
  130. package/dist/edge/EdgeNodeDnsCoordinator.jsonld +1 -27
  131. package/dist/edge/EdgeNodeModeDetector.d.ts +1 -1
  132. package/dist/edge/EdgeNodeModeDetector.js +9 -11
  133. package/dist/edge/EdgeNodeModeDetector.js.map +1 -1
  134. package/dist/http/ClusterIngressRouter.js +3 -3
  135. package/dist/http/ClusterIngressRouter.js.map +1 -1
  136. package/dist/http/ClusterWebSocketConfigurator.js +2 -2
  137. package/dist/http/ClusterWebSocketConfigurator.js.map +1 -1
  138. package/dist/http/PodRoutingHttpHandler.js +2 -2
  139. package/dist/http/PodRoutingHttpHandler.js.map +1 -1
  140. package/dist/http/cluster/PodMigrationHttpHandler.d.ts +1 -1
  141. package/dist/http/cluster/PodMigrationHttpHandler.js +1 -1
  142. package/dist/http/cluster/PodMigrationHttpHandler.js.map +1 -1
  143. package/dist/identity/drizzle/EdgeNodeRepository.d.ts +37 -4
  144. package/dist/identity/drizzle/EdgeNodeRepository.js +120 -128
  145. package/dist/identity/drizzle/EdgeNodeRepository.js.map +1 -1
  146. package/dist/identity/drizzle/ServiceTokenRepository.d.ts +52 -0
  147. package/dist/identity/drizzle/ServiceTokenRepository.js +143 -0
  148. package/dist/identity/drizzle/ServiceTokenRepository.js.map +1 -0
  149. package/dist/identity/drizzle/db.d.ts +9 -0
  150. package/dist/identity/drizzle/db.js +208 -1
  151. package/dist/identity/drizzle/db.js.map +1 -1
  152. package/dist/identity/drizzle/schema.pg.d.ts +5 -0
  153. package/dist/identity/drizzle/schema.pg.js +49 -20
  154. package/dist/identity/drizzle/schema.pg.js.map +1 -1
  155. package/dist/identity/drizzle/schema.sqlite.d.ts +332 -57
  156. package/dist/identity/drizzle/schema.sqlite.js +48 -18
  157. package/dist/identity/drizzle/schema.sqlite.js.map +1 -1
  158. package/dist/identity/oidc/AutoDetectIdentityProviderHandler.js +6 -4
  159. package/dist/identity/oidc/AutoDetectIdentityProviderHandler.js.map +1 -1
  160. package/dist/index.d.ts +6 -9
  161. package/dist/index.js +12 -14
  162. package/dist/index.js.map +1 -1
  163. package/dist/main.js +25 -8
  164. package/dist/main.js.map +1 -1
  165. package/dist/provision/ProvisionCodeCodec.d.ts +39 -0
  166. package/dist/provision/ProvisionCodeCodec.js +65 -0
  167. package/dist/provision/ProvisionCodeCodec.js.map +1 -0
  168. package/dist/provision/ProvisionCodeCodec.jsonld +47 -0
  169. package/dist/provision/ProvisionPodCreator.d.ts +20 -0
  170. package/dist/provision/ProvisionPodCreator.js +84 -0
  171. package/dist/provision/ProvisionPodCreator.js.map +1 -0
  172. package/dist/provision/ProvisionPodCreator.jsonld +118 -0
  173. package/dist/quota/DrizzleQuotaService.d.ts +17 -3
  174. package/dist/quota/DrizzleQuotaService.js +108 -8
  175. package/dist/quota/DrizzleQuotaService.js.map +1 -1
  176. package/dist/quota/DrizzleQuotaService.jsonld +33 -22
  177. package/dist/quota/NoopQuotaService.d.ts +7 -1
  178. package/dist/quota/NoopQuotaService.js +12 -0
  179. package/dist/quota/NoopQuotaService.js.map +1 -1
  180. package/dist/quota/NoopQuotaService.jsonld +24 -0
  181. package/dist/quota/QuotaService.d.ts +17 -0
  182. package/dist/quota/QuotaService.js +5 -0
  183. package/dist/quota/QuotaService.js.map +1 -1
  184. package/dist/quota/QuotaService.jsonld +50 -0
  185. package/dist/runtime/Proxy.d.ts +22 -4
  186. package/dist/runtime/Proxy.js +154 -35
  187. package/dist/runtime/Proxy.js.map +1 -1
  188. package/dist/runtime/XpodRuntime.d.ts +49 -0
  189. package/dist/runtime/XpodRuntime.js +374 -0
  190. package/dist/runtime/XpodRuntime.js.map +1 -0
  191. package/dist/runtime/env-utils.d.ts +2 -0
  192. package/dist/runtime/env-utils.js +55 -0
  193. package/dist/runtime/env-utils.js.map +1 -0
  194. package/dist/runtime/index.d.ts +4 -0
  195. package/dist/runtime/index.js +8 -1
  196. package/dist/runtime/index.js.map +1 -1
  197. package/dist/runtime/socket-fetch.d.ts +1 -0
  198. package/dist/runtime/socket-fetch.js +72 -0
  199. package/dist/runtime/socket-fetch.js.map +1 -0
  200. package/dist/runtime/socket-http.d.ts +1 -0
  201. package/dist/runtime/socket-http.js +142 -0
  202. package/dist/runtime/socket-http.js.map +1 -0
  203. package/dist/runtime/socket-utils.d.ts +2 -0
  204. package/dist/runtime/socket-utils.js +34 -0
  205. package/dist/runtime/socket-utils.js.map +1 -0
  206. package/dist/service/{EdgeNodeHeartbeatService.d.ts → EdgeNodeSignalClient.d.ts} +3 -3
  207. package/dist/service/{EdgeNodeHeartbeatService.js → EdgeNodeSignalClient.js} +4 -4
  208. package/dist/service/EdgeNodeSignalClient.js.map +1 -0
  209. package/dist/service/PodMigrationService.d.ts +1 -2
  210. package/dist/service/PodMigrationService.js +1 -2
  211. package/dist/service/PodMigrationService.js.map +1 -1
  212. package/dist/storage/SparqlUpdateResourceStore.js +1 -1
  213. package/dist/storage/SparqlUpdateResourceStore.js.map +1 -1
  214. package/dist/storage/accessors/MinioDataAccessor.d.ts +6 -0
  215. package/dist/storage/accessors/MinioDataAccessor.js +10 -0
  216. package/dist/storage/accessors/MinioDataAccessor.js.map +1 -1
  217. package/dist/storage/accessors/MinioDataAccessor.jsonld +4 -0
  218. package/dist/storage/accessors/MixDataAccessor.d.ts +2 -1
  219. package/dist/storage/accessors/MixDataAccessor.js +12 -1
  220. package/dist/storage/accessors/MixDataAccessor.js.map +1 -1
  221. package/dist/storage/accessors/MixDataAccessor.jsonld +19 -0
  222. package/dist/storage/locking/UrlAwareRedisLocker.d.ts +18 -0
  223. package/dist/storage/locking/UrlAwareRedisLocker.js +60 -0
  224. package/dist/storage/locking/UrlAwareRedisLocker.js.map +1 -0
  225. package/dist/storage/locking/UrlAwareRedisLocker.jsonld +123 -0
  226. package/dist/storage/quota/UsageRepository.d.ts +41 -8
  227. package/dist/storage/quota/UsageRepository.js +252 -50
  228. package/dist/storage/quota/UsageRepository.js.map +1 -1
  229. package/dist/storage/sparql/ComunicaQuintEngine.d.ts +9 -0
  230. package/dist/storage/sparql/ComunicaQuintEngine.js +50 -9
  231. package/dist/storage/sparql/ComunicaQuintEngine.js.map +1 -1
  232. package/dist/storage/sparql/QueryOptimizer.js +13 -1
  233. package/dist/storage/sparql/QueryOptimizer.js.map +1 -1
  234. package/dist/storage/sparql/QuintQuerySource.d.ts +14 -0
  235. package/dist/storage/sparql/QuintQuerySource.js +152 -1
  236. package/dist/storage/sparql/QuintQuerySource.js.map +1 -1
  237. package/dist/storage/sparql/SubgraphQueryEngine.d.ts +1 -0
  238. package/dist/storage/sparql/SubgraphQueryEngine.js +6 -2
  239. package/dist/storage/sparql/SubgraphQueryEngine.js.map +1 -1
  240. package/dist/storage/sparql/SubgraphQueryEngine.jsonld +4 -0
  241. package/dist/subdomain/SubdomainClient.d.ts +3 -3
  242. package/dist/subdomain/SubdomainClient.js +1 -1
  243. package/dist/subdomain/SubdomainClient.js.map +1 -1
  244. package/dist/subdomain/SubdomainService.d.ts +15 -16
  245. package/dist/subdomain/SubdomainService.js +80 -54
  246. package/dist/subdomain/SubdomainService.js.map +1 -1
  247. package/dist/subdomain/SubdomainService.jsonld +22 -26
  248. package/dist/supervisor/Supervisor.d.ts +7 -2
  249. package/dist/supervisor/Supervisor.js +33 -1
  250. package/dist/supervisor/Supervisor.js.map +1 -1
  251. package/dist/test-utils/index.d.ts +4 -0
  252. package/dist/test-utils/index.js +8 -0
  253. package/dist/test-utils/index.js.map +1 -0
  254. package/dist/test-utils/no-auth-xpod.d.ts +11 -0
  255. package/dist/test-utils/no-auth-xpod.js +25 -0
  256. package/dist/test-utils/no-auth-xpod.js.map +1 -0
  257. package/dist/test-utils/seed-pod.d.ts +5 -0
  258. package/dist/test-utils/seed-pod.js +61 -0
  259. package/dist/test-utils/seed-pod.js.map +1 -0
  260. package/package.json +23 -5
  261. package/templates/identity/account/create-pod.html.ejs +110 -0
  262. package/templates/main.html.ejs +10 -0
  263. package/dist/api/handlers/DevHandler.d.ts +0 -18
  264. package/dist/api/handlers/DevHandler.js +0 -276
  265. package/dist/api/handlers/DevHandler.js.map +0 -1
  266. package/dist/api/handlers/SignalHandler.d.ts +0 -13
  267. package/dist/api/handlers/SignalHandler.js +0 -122
  268. package/dist/api/handlers/SignalHandler.js.map +0 -1
  269. package/dist/gateway/Proxy.d.ts +0 -24
  270. package/dist/gateway/Proxy.js +0 -209
  271. package/dist/gateway/Proxy.js.map +0 -1
  272. package/dist/gateway/Supervisor.d.ts +0 -2
  273. package/dist/gateway/Supervisor.js +0 -7
  274. package/dist/gateway/Supervisor.js.map +0 -1
  275. package/dist/gateway/port-finder.d.ts +0 -4
  276. package/dist/gateway/port-finder.js +0 -15
  277. package/dist/gateway/port-finder.js.map +0 -1
  278. package/dist/gateway/types.d.ts +0 -1
  279. package/dist/gateway/types.js +0 -3
  280. package/dist/gateway/types.js.map +0 -1
  281. package/dist/http/SignalInterceptHttpHandler.d.ts +0 -24
  282. package/dist/http/SignalInterceptHttpHandler.js +0 -47
  283. package/dist/http/SignalInterceptHttpHandler.js.map +0 -1
  284. package/dist/http/SignalInterceptHttpHandler.jsonld +0 -103
  285. package/dist/http/admin/EdgeNodeSignalHttpHandler.d.ts +0 -71
  286. package/dist/http/admin/EdgeNodeSignalHttpHandler.js +0 -674
  287. package/dist/http/admin/EdgeNodeSignalHttpHandler.js.map +0 -1
  288. package/dist/http/admin/EdgeNodeSignalHttpHandler.jsonld +0 -406
  289. package/dist/http/cluster/PodMigrationHttpHandler.jsonld +0 -169
  290. package/dist/quota/DefaultQuotaService.d.ts +0 -16
  291. package/dist/quota/DefaultQuotaService.js +0 -37
  292. package/dist/quota/DefaultQuotaService.js.map +0 -1
  293. package/dist/quota/DefaultQuotaService.jsonld +0 -85
  294. package/dist/service/EdgeNodeHeartbeatService.js.map +0 -1
  295. package/dist/service/PodMigrationService.jsonld +0 -76
  296. package/dist/storage/MigratableDataAccessor.d.ts +0 -63
  297. package/dist/storage/MigratableDataAccessor.js +0 -11
  298. package/dist/storage/MigratableDataAccessor.js.map +0 -1
  299. package/dist/storage/MigratableDataAccessor.jsonld +0 -60
  300. package/dist/storage/accessors/TieredMinioDataAccessor.d.ts +0 -150
  301. package/dist/storage/accessors/TieredMinioDataAccessor.js +0 -582
  302. package/dist/storage/accessors/TieredMinioDataAccessor.js.map +0 -1
  303. package/dist/storage/accessors/TieredMinioDataAccessor.jsonld +0 -333
  304. package/static/app/assets/index.css +0 -1
  305. package/static/app/assets/main.js +0 -11
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.apiClientCredentials = exports.edgeNodePods = exports.edgeNodes = exports.ddnsRecords = exports.ddnsDomains = exports.webidProfiles = exports.podUsage = exports.accountUsage = void 0;
3
+ exports.serviceTokens = exports.apiClientCredentials = exports.edgeNodePods = exports.edgeNodes = exports.ddnsRecords = exports.ddnsDomains = exports.webidProfiles = exports.podUsage = exports.accountUsage = void 0;
4
4
  const sqlite_core_1 = require("drizzle-orm/sqlite-core");
5
5
  exports.accountUsage = (0, sqlite_core_1.sqliteTable)('identity_account_usage', {
6
6
  accountId: (0, sqlite_core_1.text)('account_id').primaryKey(),
@@ -9,7 +9,12 @@ exports.accountUsage = (0, sqlite_core_1.sqliteTable)('identity_account_usage',
9
9
  egressBytes: (0, sqlite_core_1.integer)('egress_bytes').notNull().default(0),
10
10
  storageLimitBytes: (0, sqlite_core_1.integer)('storage_limit_bytes'),
11
11
  bandwidthLimitBps: (0, sqlite_core_1.integer)('bandwidth_limit_bps'),
12
- updatedAt: (0, sqlite_core_1.integer)('updated_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),
12
+ computeSeconds: (0, sqlite_core_1.integer)('compute_seconds').notNull().default(0),
13
+ tokensUsed: (0, sqlite_core_1.integer)('tokens_used').notNull().default(0),
14
+ computeLimitSeconds: (0, sqlite_core_1.integer)('compute_limit_seconds'),
15
+ tokenLimitMonthly: (0, sqlite_core_1.integer)('token_limit_monthly'),
16
+ periodStart: (0, sqlite_core_1.integer)('period_start'),
17
+ updatedAt: (0, sqlite_core_1.integer)('updated_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),
13
18
  });
14
19
  exports.podUsage = (0, sqlite_core_1.sqliteTable)('identity_pod_usage', {
15
20
  podId: (0, sqlite_core_1.text)('pod_id').primaryKey(),
@@ -19,7 +24,12 @@ exports.podUsage = (0, sqlite_core_1.sqliteTable)('identity_pod_usage', {
19
24
  egressBytes: (0, sqlite_core_1.integer)('egress_bytes').notNull().default(0),
20
25
  storageLimitBytes: (0, sqlite_core_1.integer)('storage_limit_bytes'),
21
26
  bandwidthLimitBps: (0, sqlite_core_1.integer)('bandwidth_limit_bps'),
22
- updatedAt: (0, sqlite_core_1.integer)('updated_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),
27
+ computeSeconds: (0, sqlite_core_1.integer)('compute_seconds').notNull().default(0),
28
+ tokensUsed: (0, sqlite_core_1.integer)('tokens_used').notNull().default(0),
29
+ computeLimitSeconds: (0, sqlite_core_1.integer)('compute_limit_seconds'),
30
+ tokenLimitMonthly: (0, sqlite_core_1.integer)('token_limit_monthly'),
31
+ periodStart: (0, sqlite_core_1.integer)('period_start'),
32
+ updatedAt: (0, sqlite_core_1.integer)('updated_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),
23
33
  });
24
34
  /**
25
35
  * WebID Profile 托管表
@@ -33,8 +43,8 @@ exports.webidProfiles = (0, sqlite_core_1.sqliteTable)('identity_webid_profile',
33
43
  oidcIssuer: (0, sqlite_core_1.text)('oidc_issuer'), // https://id.undefineds.co/
34
44
  profileData: (0, sqlite_core_1.text)('profile_data', { mode: 'json' }), // WebID Profile 的 JSON-LD 表示
35
45
  accountId: (0, sqlite_core_1.text)('account_id'), // 关联的 CSS 账户 ID
36
- createdAt: (0, sqlite_core_1.integer)('created_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),
37
- updatedAt: (0, sqlite_core_1.integer)('updated_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),
46
+ createdAt: (0, sqlite_core_1.integer)('created_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),
47
+ updatedAt: (0, sqlite_core_1.integer)('updated_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),
38
48
  });
39
49
  /**
40
50
  * DDNS 域名池表
@@ -45,7 +55,7 @@ exports.ddnsDomains = (0, sqlite_core_1.sqliteTable)('identity_ddns_domain', {
45
55
  status: (0, sqlite_core_1.text)('status').default('active'), // 'active' | 'suspended'
46
56
  provider: (0, sqlite_core_1.text)('provider'), // 'cloudflare' | 'tencent'
47
57
  zoneId: (0, sqlite_core_1.text)('zone_id'), // DNS Zone ID
48
- createdAt: (0, sqlite_core_1.integer)('created_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),
58
+ createdAt: (0, sqlite_core_1.integer)('created_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),
49
59
  });
50
60
  /**
51
61
  * DDNS 记录表
@@ -62,28 +72,36 @@ exports.ddnsRecords = (0, sqlite_core_1.sqliteTable)('identity_ddns_record', {
62
72
  status: (0, sqlite_core_1.text)('status').default('active'), // 'active' | 'banned'
63
73
  bannedReason: (0, sqlite_core_1.text)('banned_reason'),
64
74
  ttl: (0, sqlite_core_1.integer)('ttl').default(60),
65
- createdAt: (0, sqlite_core_1.integer)('created_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),
66
- updatedAt: (0, sqlite_core_1.integer)('updated_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),
75
+ createdAt: (0, sqlite_core_1.integer)('created_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),
76
+ updatedAt: (0, sqlite_core_1.integer)('updated_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),
67
77
  });
68
78
  exports.edgeNodes = (0, sqlite_core_1.sqliteTable)('identity_edge_node', {
69
79
  id: (0, sqlite_core_1.text)('id').primaryKey(),
70
80
  ownerAccountId: (0, sqlite_core_1.text)('owner_account_id'), // Owner of the node
71
81
  displayName: (0, sqlite_core_1.text)('display_name'),
72
82
  tokenHash: (0, sqlite_core_1.text)('token_hash').notNull(),
73
- nodeType: (0, sqlite_core_1.text)('node_type').default('edge'), // 'center' | 'edge'
83
+ nodeType: (0, sqlite_core_1.text)('node_type').default('edge'), // 'center' | 'edge' | 'sp'
74
84
  subdomain: (0, sqlite_core_1.text)('subdomain').unique(),
75
85
  accessMode: (0, sqlite_core_1.text)('access_mode'),
76
- publicIp: (0, sqlite_core_1.text)('public_ip'),
86
+ ipv4: (0, sqlite_core_1.text)('ipv4'), // IPv4 地址
77
87
  publicPort: (0, sqlite_core_1.integer)('public_port'),
88
+ publicUrl: (0, sqlite_core_1.text)('public_url'), // SP 的公网地址 (e.g. https://sp.example)
89
+ serviceTokenHash: (0, sqlite_core_1.text)('service_token_hash'), // Cloud → SP 回调认证 token (明文)
90
+ provisionCodeHash: (0, sqlite_core_1.text)('provision_code_hash'), // bind 时用户传入的配对码 (hash)
78
91
  internalIp: (0, sqlite_core_1.text)('internal_ip'), // Internal network IP for center nodes
79
92
  internalPort: (0, sqlite_core_1.integer)('internal_port'),
80
- capabilities: (0, sqlite_core_1.text)('capabilities', { mode: 'json' }),
81
- metadata: (0, sqlite_core_1.text)('metadata', { mode: 'json' }),
93
+ // Extracted from metadata
94
+ hostname: (0, sqlite_core_1.text)('hostname'), // 节点主机名
95
+ ipv6: (0, sqlite_core_1.text)('ipv6'), // IPv6 地址
96
+ version: (0, sqlite_core_1.text)('version'), // Agent 版本
97
+ // JSON fields
98
+ capabilities: (0, sqlite_core_1.text)('capabilities'), // JSON string: 能力列表
99
+ metadata: (0, sqlite_core_1.text)('metadata'), // JSON string: 复杂对象 (tunnel, certificate, metrics)
82
100
  connectivityStatus: (0, sqlite_core_1.text)('connectivity_status').default('unknown'),
83
- lastConnectivityCheck: (0, sqlite_core_1.integer)('last_connectivity_check', { mode: 'timestamp' }),
84
- createdAt: (0, sqlite_core_1.integer)('created_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),
85
- updatedAt: (0, sqlite_core_1.integer)('updated_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),
86
- lastSeen: (0, sqlite_core_1.integer)('last_seen', { mode: 'timestamp' }),
101
+ lastConnectivityCheck: (0, sqlite_core_1.integer)('last_connectivity_check'),
102
+ createdAt: (0, sqlite_core_1.integer)('created_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),
103
+ updatedAt: (0, sqlite_core_1.integer)('updated_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),
104
+ lastSeen: (0, sqlite_core_1.integer)('last_seen'),
87
105
  });
88
106
  exports.edgeNodePods = (0, sqlite_core_1.sqliteTable)('identity_edge_node_pod', {
89
107
  nodeId: (0, sqlite_core_1.text)('node_id').notNull().references(() => exports.edgeNodes.id, { onDelete: 'cascade' }),
@@ -91,10 +109,22 @@ exports.edgeNodePods = (0, sqlite_core_1.sqliteTable)('identity_edge_node_pod',
91
109
  });
92
110
  exports.apiClientCredentials = (0, sqlite_core_1.sqliteTable)('identity_api_client_credentials', {
93
111
  clientId: (0, sqlite_core_1.text)('client_id').primaryKey(),
94
- clientSecretEncrypted: (0, sqlite_core_1.text)('client_secret_encrypted').notNull(),
95
112
  webId: (0, sqlite_core_1.text)('web_id').notNull(),
96
113
  accountId: (0, sqlite_core_1.text)('account_id').notNull(),
97
114
  displayName: (0, sqlite_core_1.text)('display_name'),
98
- createdAt: (0, sqlite_core_1.integer)('created_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),
115
+ createdAt: (0, sqlite_core_1.integer)('created_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),
116
+ });
117
+ /**
118
+ * Service Token 表
119
+ * 用于服务间认证 (Business, Local SP, Cloud, Compute)
120
+ */
121
+ exports.serviceTokens = (0, sqlite_core_1.sqliteTable)('identity_service_token', {
122
+ id: (0, sqlite_core_1.text)('id').primaryKey(),
123
+ tokenHash: (0, sqlite_core_1.text)('token_hash').notNull().unique(),
124
+ serviceType: (0, sqlite_core_1.text)('service_type').notNull(), // 'local' | 'business' | 'cloud' | 'compute'
125
+ serviceId: (0, sqlite_core_1.text)('service_id').notNull(),
126
+ scopes: (0, sqlite_core_1.text)('scopes').notNull(), // JSON array: ["quota:write","usage:read"]
127
+ createdAt: (0, sqlite_core_1.integer)('created_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),
128
+ expiresAt: (0, sqlite_core_1.integer)('expires_at'),
99
129
  });
100
130
  //# sourceMappingURL=schema.sqlite.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.sqlite.js","sourceRoot":"","sources":["../../../src/identity/drizzle/schema.sqlite.ts"],"names":[],"mappings":";;;AAAA,yDAAqE;AAExD,QAAA,YAAY,GAAG,IAAA,yBAAW,EAAC,wBAAwB,EAAE;IAChE,SAAS,EAAE,IAAA,kBAAI,EAAC,YAAY,CAAC,CAAC,U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,kBAAI,EAAC,YAAY,CAAC,CAAC,OAAO,EAAE;IACvC,WAAW,EAAE,IAAA,kBAAI,EAAC,cAAc,CAAC;IACjC,SAAS,EAAE,IAAA,qBAAO,EAAC,YAAY,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;CAC/F,CAAC,CAAC","sourcesContent":["import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core';\n\nexport const accountUsage = sqliteTable('identity_account_usage', {\n accountId: text('account_id').primaryKey(),\n storageBytes: integer('storage_bytes').notNull().default(0),\n ingressBytes: integer('ingress_bytes').notNull().default(0),\n egressBytes: integer('egress_bytes').notNull().default(0),\n storageLimitBytes: integer('storage_limit_bytes'),\n bandwidthLimitBps: integer('bandwidth_limit_bps'),\n updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),\n});\n\nexport const podUsage = sqliteTable('identity_pod_usage', {\n podId: text('pod_id').primaryKey(),\n accountId: text('account_id').notNull(),\n storageBytes: integer('storage_bytes').notNull().default(0),\n ingressBytes: integer('ingress_bytes').notNull().default(0),\n egressBytes: integer('egress_bytes').notNull().default(0),\n storageLimitBytes: integer('storage_limit_bytes'),\n bandwidthLimitBps: integer('bandwidth_limit_bps'),\n updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),\n});\n\n/**\n * WebID Profile 托管表\n * 用于身份与存储分离架构,Cloud 托管用户的 WebID Profile\n */\nexport const webidProfiles = sqliteTable('identity_webid_profile', {\n username: text('username').primaryKey(),\n webidUrl: text('webid_url').notNull(), // https://id.undefineds.co/alice/profile/card#me\n storageUrl: text('storage_url'), // https://alice.undefineds.xyz/ 或 https://pods.undefineds.co/alice/\n storageMode: text('storage_mode').default('cloud'), // 'cloud' | 'local' | 'custom'\n oidcIssuer: text('oidc_issuer'), // https://id.undefineds.co/\n profileData: text('profile_data', { mode: 'json' }), // WebID Profile 的 JSON-LD 表示\n accountId: text('account_id'), // 关联的 CSS 账户 ID\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),\n updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),\n});\n\n/**\n * DDNS 域名池表\n * 管理可用的 DDNS 域名\n */\nexport const ddnsDomains = sqliteTable('identity_ddns_domain', {\n domain: text('domain').primaryKey(), // undefineds.xyz\n status: text('status').default('active'), // 'active' | 'suspended'\n provider: text('provider'), // 'cloudflare' | 'tencent'\n zoneId: text('zone_id'), // DNS Zone ID\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),\n});\n\n/**\n * DDNS 记录表\n * 已分配的子域名记录\n */\nexport const ddnsRecords = sqliteTable('identity_ddns_record', {\n subdomain: text('subdomain').primaryKey(), // alice\n domain: text('domain').notNull(), // undefineds.xyz\n ipAddress: text('ip_address'),\n ipv6Address: text('ipv6_address'),\n recordType: text('record_type').default('A'), // 'A' | 'AAAA'\n nodeId: text('node_id'), // 关联的节点 ID\n username: text('username'), // 关联的用户名\n status: text('status').default('active'), // 'active' | 'banned'\n bannedReason: text('banned_reason'),\n ttl: integer('ttl').default(60),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),\n updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),\n});\n\nexport const edgeNodes = sqliteTable('identity_edge_node', {\n id: text('id').primaryKey(),\n ownerAccountId: text('owner_account_id'), // Owner of the node\n displayName: text('display_name'),\n tokenHash: text('token_hash').notNull(),\n nodeType: text('node_type').default('edge'), // 'center' | 'edge'\n subdomain: text('subdomain').unique(),\n accessMode: text('access_mode'),\n publicIp: text('public_ip'),\n publicPort: integer('public_port'),\n internalIp: text('internal_ip'), // Internal network IP for center nodes\n internalPort: integer('internal_port'),\n capabilities: text('capabilities', { mode: 'json' }),\n metadata: text('metadata', { mode: 'json' }),\n connectivityStatus: text('connectivity_status').default('unknown'),\n lastConnectivityCheck: integer('last_connectivity_check', { mode: 'timestamp' }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),\n updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),\n lastSeen: integer('last_seen', { mode: 'timestamp' }),\n});\n\nexport const edgeNodePods = sqliteTable('identity_edge_node_pod', {\n nodeId: text('node_id').notNull().references(() => edgeNodes.id, { onDelete: 'cascade' }),\n baseUrl: text('base_url').notNull(),\n});\n\nexport const apiClientCredentials = sqliteTable('identity_api_client_credentials', {\n clientId: text('client_id').primaryKey(),\n clientSecretEncrypted: text('client_secret_encrypted').notNull(),\n webId: text('web_id').notNull(),\n accountId: text('account_id').notNull(),\n displayName: text('display_name'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()),\n});\n"]}
1
+ {"version":3,"file":"schema.sqlite.js","sourceRoot":"","sources":["../../../src/identity/drizzle/schema.sqlite.ts"],"names":[],"mappings":";;;AAAA,yDAAqE;AAExD,QAAA,YAAY,GAAG,IAAA,yBAAW,EAAC,wBAAwB,EAAE;IAChE,SAAS,EAAE,IAAA,kBAAI,EAAC,YAAY,CAAC,CAAC,UAAU,EAAE;IAC1C,YAAY,EAAE,IAAA,qBAAO,EAAC,eAAe,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,YAAY,EAAE,IAAA,qBAAO,EAAC,eAAe,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,WAAW,EAAE,IAAA,qBAAO,EAAC,cAAc,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,iBAAiB,EAAE,IAAA,qBAAO,EAAC,qBAAqB,CAAC;IACjD,iBAAiB,EAAE,IAAA,qBAAO,EAAC,qBAAqB,CAAC;IACjD,cAAc,EAAE,IA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SAAS,EAAE,IAAA,kBAAI,EAAC,YAAY,CAAC,CAAC,OAAO,EAAE;IACvC,MAAM,EAAE,IAAA,kBAAI,EAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE,2CAA2C;IAC7E,SAAS,EAAE,IAAA,qBAAO,EAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAC1F,SAAS,EAAE,IAAA,qBAAO,EAAC,YAAY,CAAC;CACjC,CAAC,CAAC","sourcesContent":["import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core';\n\nexport const accountUsage = sqliteTable('identity_account_usage', {\n accountId: text('account_id').primaryKey(),\n storageBytes: integer('storage_bytes').notNull().default(0),\n ingressBytes: integer('ingress_bytes').notNull().default(0),\n egressBytes: integer('egress_bytes').notNull().default(0),\n storageLimitBytes: integer('storage_limit_bytes'),\n bandwidthLimitBps: integer('bandwidth_limit_bps'),\n computeSeconds: integer('compute_seconds').notNull().default(0),\n tokensUsed: integer('tokens_used').notNull().default(0),\n computeLimitSeconds: integer('compute_limit_seconds'),\n tokenLimitMonthly: integer('token_limit_monthly'),\n periodStart: integer('period_start'),\n updatedAt: integer('updated_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),\n});\n\nexport const podUsage = sqliteTable('identity_pod_usage', {\n podId: text('pod_id').primaryKey(),\n accountId: text('account_id').notNull(),\n storageBytes: integer('storage_bytes').notNull().default(0),\n ingressBytes: integer('ingress_bytes').notNull().default(0),\n egressBytes: integer('egress_bytes').notNull().default(0),\n storageLimitBytes: integer('storage_limit_bytes'),\n bandwidthLimitBps: integer('bandwidth_limit_bps'),\n computeSeconds: integer('compute_seconds').notNull().default(0),\n tokensUsed: integer('tokens_used').notNull().default(0),\n computeLimitSeconds: integer('compute_limit_seconds'),\n tokenLimitMonthly: integer('token_limit_monthly'),\n periodStart: integer('period_start'),\n updatedAt: integer('updated_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),\n});\n\n/**\n * WebID Profile 托管表\n * 用于身份与存储分离架构,Cloud 托管用户的 WebID Profile\n */\nexport const webidProfiles = sqliteTable('identity_webid_profile', {\n username: text('username').primaryKey(),\n webidUrl: text('webid_url').notNull(), // https://id.undefineds.co/alice/profile/card#me\n storageUrl: text('storage_url'), // https://alice.undefineds.xyz/ 或 https://pods.undefineds.co/alice/\n storageMode: text('storage_mode').default('cloud'), // 'cloud' | 'local' | 'custom'\n oidcIssuer: text('oidc_issuer'), // https://id.undefineds.co/\n profileData: text('profile_data', { mode: 'json' }), // WebID Profile 的 JSON-LD 表示\n accountId: text('account_id'), // 关联的 CSS 账户 ID\n createdAt: integer('created_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),\n updatedAt: integer('updated_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),\n});\n\n/**\n * DDNS 域名池表\n * 管理可用的 DDNS 域名\n */\nexport const ddnsDomains = sqliteTable('identity_ddns_domain', {\n domain: text('domain').primaryKey(), // undefineds.xyz\n status: text('status').default('active'), // 'active' | 'suspended'\n provider: text('provider'), // 'cloudflare' | 'tencent'\n zoneId: text('zone_id'), // DNS Zone ID\n createdAt: integer('created_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),\n});\n\n/**\n * DDNS 记录表\n * 已分配的子域名记录\n */\nexport const ddnsRecords = sqliteTable('identity_ddns_record', {\n subdomain: text('subdomain').primaryKey(), // alice\n domain: text('domain').notNull(), // undefineds.xyz\n ipAddress: text('ip_address'),\n ipv6Address: text('ipv6_address'),\n recordType: text('record_type').default('A'), // 'A' | 'AAAA'\n nodeId: text('node_id'), // 关联的节点 ID\n username: text('username'), // 关联的用户名\n status: text('status').default('active'), // 'active' | 'banned'\n bannedReason: text('banned_reason'),\n ttl: integer('ttl').default(60),\n createdAt: integer('created_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),\n updatedAt: integer('updated_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),\n});\n\nexport const edgeNodes = sqliteTable('identity_edge_node', {\n id: text('id').primaryKey(),\n ownerAccountId: text('owner_account_id'), // Owner of the node\n displayName: text('display_name'),\n tokenHash: text('token_hash').notNull(),\n nodeType: text('node_type').default('edge'), // 'center' | 'edge' | 'sp'\n subdomain: text('subdomain').unique(),\n accessMode: text('access_mode'),\n ipv4: text('ipv4'), // IPv4 地址\n publicPort: integer('public_port'),\n publicUrl: text('public_url'), // SP 的公网地址 (e.g. https://sp.example)\n serviceTokenHash: text('service_token_hash'), // Cloud → SP 回调认证 token (明文)\n provisionCodeHash: text('provision_code_hash'), // bind 时用户传入的配对码 (hash)\n internalIp: text('internal_ip'), // Internal network IP for center nodes\n internalPort: integer('internal_port'),\n // Extracted from metadata\n hostname: text('hostname'), // 节点主机名\n ipv6: text('ipv6'), // IPv6 地址\n version: text('version'), // Agent 版本\n // JSON fields\n capabilities: text('capabilities'), // JSON string: 能力列表\n metadata: text('metadata'), // JSON string: 复杂对象 (tunnel, certificate, metrics)\n connectivityStatus: text('connectivity_status').default('unknown'),\n lastConnectivityCheck: integer('last_connectivity_check'),\n createdAt: integer('created_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),\n updatedAt: integer('updated_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),\n lastSeen: integer('last_seen'),\n});\n\nexport const edgeNodePods = sqliteTable('identity_edge_node_pod', {\n nodeId: text('node_id').notNull().references(() => edgeNodes.id, { onDelete: 'cascade' }),\n baseUrl: text('base_url').notNull(),\n});\n\nexport const apiClientCredentials = sqliteTable('identity_api_client_credentials', {\n clientId: text('client_id').primaryKey(),\n webId: text('web_id').notNull(),\n accountId: text('account_id').notNull(),\n displayName: text('display_name'),\n createdAt: integer('created_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),\n});\n\n/**\n * Service Token 表\n * 用于服务间认证 (Business, Local SP, Cloud, Compute)\n */\nexport const serviceTokens = sqliteTable('identity_service_token', {\n id: text('id').primaryKey(),\n tokenHash: text('token_hash').notNull().unique(),\n serviceType: text('service_type').notNull(), // 'local' | 'business' | 'cloud' | 'compute'\n serviceId: text('service_id').notNull(),\n scopes: text('scopes').notNull(), // JSON array: [\"quota:write\",\"usage:read\"]\n createdAt: integer('created_at').notNull().$defaultFn(() => Math.floor(Date.now() / 1000)),\n expiresAt: integer('expires_at'),\n});\n"]}
@@ -35,9 +35,9 @@ class AutoDetectIdentityProviderHandler extends community_server_1.HttpHandler {
35
35
  if (!this.isIdpPath(url)) {
36
36
  throw new community_server_1.NotImplementedHttpError('Not an IdP request');
37
37
  }
38
- // SP 模式:拒绝所有 IdP 请求
38
+ // SP 模式:接受 IdP 路径请求,在 handle 中返回 404
39
39
  if (this.idpUrl) {
40
- throw new community_server_1.NotImplementedHttpError(`External IdP mode: ${this.message}. Please use the external identity provider.`);
40
+ return;
41
41
  }
42
42
  // 标准模式:委托给 source Handler
43
43
  if (this.source) {
@@ -54,8 +54,10 @@ class AutoDetectIdentityProviderHandler extends community_server_1.HttpHandler {
54
54
  */
55
55
  async handle(input) {
56
56
  if (this.idpUrl) {
57
- // SP 模式下不应该到达这里
58
- throw new community_server_1.NotImplementedHttpError(`External IdP mode: ${this.message}. Please use the external identity provider.`);
57
+ const { response } = input;
58
+ response.writeHead(404, { 'Content-Type': 'application/json' });
59
+ response.end(JSON.stringify({ error: this.message }));
60
+ return;
59
61
  }
60
62
  // 标准模式:委托给 source Handler
61
63
  if (this.source) {
@@ -1 +1 @@
1
- {"version":3,"file":"AutoDetectIdentityProviderHandler.js","sourceRoot":"","sources":["../../../src/identity/oidc/AutoDetectIdentityProviderHandler.ts"],"names":[],"mappings":";;;AAAA,iEAAqD;AACrD,8DAIiC;AAWjC;;;;;;GAMG;AACH,MAAa,iCAAkC,SAAQ,8BAAW;IAMhE,YAAY,UAAoD,EAAE;QAChE,KAAK,EAAE,CAAC;QANO,WAAM,GAAG,IAAA,oCAA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I,0CAAuB,CAC/B,sBAAsB,IAAI,CAAC,OAAO,8CAA8C,CACjF,CAAC;QACJ,CAAC;QAED,0BAA0B;QAC1B,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,0CAAuB,CAAC,8CAA8C,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;IAED;;OAEG;IACK,SAAS,CAAC,GAAW;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvC,OAAO,CACL,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;YAC5B,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC;YACjC,QAAQ,KAAK,WAAW;YACxB,QAAQ,KAAK,QAAQ;YACrB,QAAQ,KAAK,SAAS,CACvB,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,WAAW,CAAC,GAAW;QAC7B,IAAI,CAAC;YACH,OAAO,IAAI,GAAG,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC,QAAQ,CAAC;QACnD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CACF;AA5FD,8EA4FC","sourcesContent":["import { getLoggerFor } from 'global-logger-factory';\nimport {\n HttpHandler,\n type HttpHandlerInput,\n NotImplementedHttpError,\n} from '@solid/community-server';\n\nexport interface AutoDetectIdentityProviderHandlerOptions {\n /** 外部 IdP 的基础 URL,如果提供则启用 SP 模式 */\n idpUrl?: string;\n /** 禁用时的消息 */\n message?: string;\n /** CSS 默认的 IdentityProviderHandler,标准模式下委托给它 */\n source?: HttpHandler;\n}\n\n/**\n * Auto-detect Identity Provider Handler\n *\n * 自动检测运行模式:\n * - 如果配置了 idpUrl -> SP 模式:禁用本地账户管理\n * - 如果没有配置 idpUrl -> 标准模式:委托给 CSS 默认 Handler\n */\nexport class AutoDetectIdentityProviderHandler extends HttpHandler {\n private readonly logger = getLoggerFor(this);\n private readonly idpUrl?: string;\n private readonly message: string;\n private readonly source?: HttpHandler;\n\n constructor(options: AutoDetectIdentityProviderHandlerOptions = {}) {\n super();\n this.idpUrl = options.idpUrl;\n this.message = options.message ?? 'Account management handled by external IdP';\n this.source = options.source;\n\n if (this.idpUrl) {\n this.logger.info(`SP mode enabled: ${this.message}, external IdP: ${this.idpUrl}`);\n } else {\n this.logger.info('Standard mode enabled, delegating to source IdentityProviderHandler');\n }\n }\n\n /**\n * 判断是否处理请求\n * - SP 模式:拒绝所有 IdP 请求\n * - 标准模式:委托给 source Handler\n */\n public override async canHandle(input: HttpHandlerInput): Promise<void> {\n const url = input.request.url ?? '';\n\n // 检查是否是 IdP 路径\n if (!this.isIdpPath(url)) {\n throw new NotImplementedHttpError('Not an IdP request');\n }\n\n // SP 模式:拒绝所有 IdP 请求\n if (this.idpUrl) {\n throw new NotImplementedHttpError(\n `External IdP mode: ${this.message}. Please use the external identity provider.`\n );\n }\n\n // 标准模式:委托给 source Handler\n if (this.source) {\n await this.source.canHandle(input);\n } else {\n throw new NotImplementedHttpError('No source IdentityProviderHandler configured');\n }\n }\n\n /**\n * 处理请求\n * - SP 模式:不应该到达这里\n * - 标准模式:委托给 source Handler\n */\n public override async handle(input: HttpHandlerInput): Promise<void> {\n if (this.idpUrl) {\n // SP 模式下不应该到达这里\n throw new NotImplementedHttpError(\n `External IdP mode: ${this.message}. Please use the external identity provider.`\n );\n }\n\n // 标准模式:委托给 source Handler\n if (this.source) {\n await this.source.handle(input);\n } else {\n throw new NotImplementedHttpError('No source IdentityProviderHandler configured');\n }\n }\n\n /**\n * 检查是否是 IdP 路径\n */\n private isIdpPath(url: string): boolean {\n const pathname = this.getPathname(url);\n return (\n pathname.startsWith('/idp/') ||\n pathname.startsWith('/.account/') ||\n pathname === '/register' ||\n pathname === '/login' ||\n pathname === '/logout'\n );\n }\n\n /**\n * 从 URL 提取 pathname\n */\n private getPathname(url: string): string {\n try {\n return new URL(url, 'http://localhost').pathname;\n } catch {\n return url.split('?')[0];\n }\n }\n}\n"]}
1
+ {"version":3,"file":"AutoDetectIdentityProviderHandler.js","sourceRoot":"","sources":["../../../src/identity/oidc/AutoDetectIdentityProviderHandler.ts"],"names":[],"mappings":";;;AAAA,iEAAqD;AACrD,8DAIiC;AAWjC;;;;;;GAMG;AACH,MAAa,iCAAkC,SAAQ,8BAAW;IAMhE,YAAY,UAAoD,EAAE;QAChE,KAAK,EAAE,CAAC;QANO,WAAM,GAAG,IAAA,oCAAY,EAAC,IAAI,CAAC,CAAC;QAO3C,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,4CAA4C,CAAC;QAC/E,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAE7B,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,OAAO,mBAAmB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACrF,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAC;QAC1F,CAAC;IACH,CAAC;IAED;;;;OAIG;IACa,KAAK,CAAC,SAAS,CAAC,KAAuB;QACrD,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC;QAEpC,eAAe;QACf,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,0CAAuB,CAAC,oBAAoB,CAAC,CAAC;QAC1D,CAAC;QAED,qCAAqC;QACrC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO;QACT,CAA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,QAAQ,CAAC;QACnD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CACF;AA1FD,8EA0FC","sourcesContent":["import { getLoggerFor } from 'global-logger-factory';\nimport {\n HttpHandler,\n type HttpHandlerInput,\n NotImplementedHttpError,\n} from '@solid/community-server';\n\nexport interface AutoDetectIdentityProviderHandlerOptions {\n /** 外部 IdP 的基础 URL,如果提供则启用 SP 模式 */\n idpUrl?: string;\n /** 禁用时的消息 */\n message?: string;\n /** CSS 默认的 IdentityProviderHandler,标准模式下委托给它 */\n source?: HttpHandler;\n}\n\n/**\n * Auto-detect Identity Provider Handler\n *\n * 自动检测运行模式:\n * - 如果配置了 idpUrl -> SP 模式:禁用本地账户管理\n * - 如果没有配置 idpUrl -> 标准模式:委托给 CSS 默认 Handler\n */\nexport class AutoDetectIdentityProviderHandler extends HttpHandler {\n private readonly logger = getLoggerFor(this);\n private readonly idpUrl?: string;\n private readonly message: string;\n private readonly source?: HttpHandler;\n\n constructor(options: AutoDetectIdentityProviderHandlerOptions = {}) {\n super();\n this.idpUrl = options.idpUrl;\n this.message = options.message ?? 'Account management handled by external IdP';\n this.source = options.source;\n\n if (this.idpUrl) {\n this.logger.info(`SP mode enabled: ${this.message}, external IdP: ${this.idpUrl}`);\n } else {\n this.logger.info('Standard mode enabled, delegating to source IdentityProviderHandler');\n }\n }\n\n /**\n * 判断是否处理请求\n * - SP 模式:拒绝所有 IdP 请求\n * - 标准模式:委托给 source Handler\n */\n public override async canHandle(input: HttpHandlerInput): Promise<void> {\n const url = input.request.url ?? '';\n\n // 检查是否是 IdP 路径\n if (!this.isIdpPath(url)) {\n throw new NotImplementedHttpError('Not an IdP request');\n }\n\n // SP 模式:接受 IdP 路径请求,在 handle 中返回 404\n if (this.idpUrl) {\n return;\n }\n\n // 标准模式:委托给 source Handler\n if (this.source) {\n await this.source.canHandle(input);\n } else {\n throw new NotImplementedHttpError('No source IdentityProviderHandler configured');\n }\n }\n\n /**\n * 处理请求\n * - SP 模式:不应该到达这里\n * - 标准模式:委托给 source Handler\n */\n public override async handle(input: HttpHandlerInput): Promise<void> {\n if (this.idpUrl) {\n const { response } = input;\n response.writeHead(404, { 'Content-Type': 'application/json' });\n response.end(JSON.stringify({ error: this.message }));\n return;\n }\n\n // 标准模式:委托给 source Handler\n if (this.source) {\n await this.source.handle(input);\n } else {\n throw new NotImplementedHttpError('No source IdentityProviderHandler configured');\n }\n }\n\n /**\n * 检查是否是 IdP 路径\n */\n private isIdpPath(url: string): boolean {\n const pathname = this.getPathname(url);\n return (\n pathname.startsWith('/idp/') ||\n pathname.startsWith('/.account/') ||\n pathname === '/register' ||\n pathname === '/login' ||\n pathname === '/logout'\n );\n }\n\n /**\n * 从 URL 提取 pathname\n */\n private getPathname(url: string): string {\n try {\n return new URL(url, 'http://localhost').pathname;\n } catch {\n return url.split('?')[0];\n }\n }\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -8,13 +8,11 @@ import { SubgraphQueryEngine, QuadstoreSparqlEngine, QuintstoreSparqlEngine } fr
8
8
  export type { SparqlEngine } from './storage/sparql/SubgraphQueryEngine';
9
9
  import { SubgraphSparqlHttpHandler } from './http/SubgraphSparqlHttpHandler';
10
10
  import { QuotaAdminHttpHandler } from './http/quota/QuotaAdminHttpHandler';
11
- import { EdgeNodeSignalHttpHandler } from './http/admin/EdgeNodeSignalHttpHandler';
12
11
  import { SparqlUpdateResourceStore } from './storage/SparqlUpdateResourceStore';
13
12
  import { ClusterIngressRouter } from './http/ClusterIngressRouter';
14
13
  import { ClusterWebSocketConfigurator } from './http/ClusterWebSocketConfigurator';
15
14
  import { EdgeNodeDirectDebugHttpHandler } from './http/EdgeNodeDirectDebugHttpHandler';
16
15
  import { EdgeNodeProxyHttpHandler } from './http/EdgeNodeProxyHttpHandler';
17
- import { SignalInterceptHttpHandler } from './http/SignalInterceptHttpHandler';
18
16
  import { RouterHttpHandler } from './http/RouterHttpHandler';
19
17
  import { RouterHttpRoute } from './http/RouterHttpRoute';
20
18
  import { TracingHandler } from './http/TracingHandler';
@@ -25,7 +23,6 @@ import { DrizzleIndexedStorage } from './identity/drizzle/DrizzleIndexedStorage'
25
23
  import { PostgresKeyValueStorage } from './storage/keyvalue/PostgresKeyValueStorage';
26
24
  import { RedisKeyValueStorage } from './storage/keyvalue/RedisKeyValueStorage';
27
25
  import { SqliteKeyValueStorage } from './storage/keyvalue/SqliteKeyValueStorage';
28
- import { DefaultQuotaService } from './quota/DefaultQuotaService';
29
26
  import { DrizzleQuotaService } from './quota/DrizzleQuotaService';
30
27
  import { NoopQuotaService } from './quota/NoopQuotaService';
31
28
  import { PerAccountQuotaStrategy } from './storage/quota/PerAccountQuotaStrategy';
@@ -43,9 +40,6 @@ import { EdgeNodeModeDetector } from './edge/EdgeNodeModeDetector';
43
40
  import { ClusterIdentifierStrategy } from './util/identifiers/ClusterIdentifierStrategy';
44
41
  import { CenterNodeRegistrationService } from './identity/CenterNodeRegistrationService';
45
42
  import { PodRoutingHttpHandler } from './http/PodRoutingHttpHandler';
46
- import { TieredMinioDataAccessor } from './storage/accessors/TieredMinioDataAccessor';
47
- import { PodMigrationHttpHandler } from './http/cluster/PodMigrationHttpHandler';
48
- import { PodMigrationService } from './service/PodMigrationService';
49
43
  import { ReactAppViewHandler } from './identity/ReactAppViewHandler';
50
44
  import { SqliteQuintStore } from './storage/quint/SqliteQuintStore';
51
45
  import { PgQuintStore } from './storage/quint/PgQuintStore';
@@ -63,18 +57,21 @@ import { VectorStore } from './storage/vector/VectorStore';
63
57
  import { CloudflareTunnelProvider } from './tunnel/CloudflareTunnelProvider';
64
58
  import { LocalTunnelProvider } from './tunnel/LocalTunnelProvider';
65
59
  import { SubdomainService } from './subdomain/SubdomainService';
60
+ import { UrlAwareRedisLocker } from './storage/locking/UrlAwareRedisLocker';
66
61
  import { MultiDomainIdentifierStrategy } from './util/identifiers/MultiDomainIdentifierStrategy';
67
62
  import { SubdomainPodIdentifierStrategy } from './util/identifiers/SubdomainPodIdentifierStrategy';
68
63
  import { DisabledOidcHandler } from './identity/oidc/DisabledOidcHandler';
69
64
  import { DisabledIdentityProviderHandler } from './identity/oidc/DisabledIdentityProviderHandler';
70
65
  import { AutoDetectOidcHandler } from './identity/oidc/AutoDetectOidcHandler';
71
66
  import { AutoDetectIdentityProviderHandler } from './identity/oidc/AutoDetectIdentityProviderHandler';
72
- export type { MigratableDataAccessor, MigrationProgress } from './storage/MigratableDataAccessor';
67
+ import { ProvisionPodCreator } from './provision/ProvisionPodCreator';
68
+ import { ProvisionCodeCodec } from './provision/ProvisionCodeCodec';
69
+ import { AuthModeSelector } from './authorization/AuthModeSelector';
73
70
  export type { DnsProvider, ListDnsRecordsInput, ListableDnsProvider, DeleteDnsRecordInput, DnsRecordSummary, UpsertDnsRecordInput, } from './dns/DnsProvider';
74
71
  export type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';
75
72
  export type { EdgeNodeTunnelManager } from './edge/interfaces/EdgeNodeTunnelManager';
76
- export type { QuotaService } from './quota/QuotaService';
73
+ export type { QuotaService, AccountQuota } from './quota/QuotaService';
77
74
  export type { TunnelProvider, TunnelConfig, TunnelSetupOptions, TunnelStatus, } from './tunnel/TunnelProvider';
78
75
  export type { SubdomainRegistration, ConnectivityResult, SubdomainServiceOptions, } from './subdomain/SubdomainService';
79
76
  export { AppStaticAssetHandler } from './http/AppStaticAssetHandler';
80
- export { RepresentationPartialConvertingStore, MinioDataAccessor, QuadstoreSparqlDataAccessor, QuintStoreSparqlDataAccessor, MixDataAccessor, ConfigurableLoggerFactory, SparqlUpdateResourceStore, SubgraphQueryEngine, QuadstoreSparqlEngine, QuintstoreSparqlEngine, SubgraphSparqlHttpHandler, QuotaAdminHttpHandler, EdgeNodeSignalHttpHandler, ClusterIngressRouter, ClusterWebSocketConfigurator, EdgeNodeDirectDebugHttpHandler, EdgeNodeProxyHttpHandler, SignalInterceptHttpHandler, RouterHttpHandler, RouterHttpRoute, TracingHandler, EdgeNodeCertificateHttpHandler, TerminalHttpHandler, ReservedSuffixIdentifierGenerator, DrizzleIndexedStorage, PostgresKeyValueStorage, RedisKeyValueStorage, SqliteKeyValueStorage, DefaultQuotaService, DrizzleQuotaService, NoopQuotaService, PerAccountQuotaStrategy, TencentDnsProvider, EdgeNodeDnsCoordinator, Dns01CertificateProvisioner, SimpleEdgeNodeTunnelManager, NoopEdgeNodeTunnelManager, FrpTunnelManager, EdgeNodeHealthProbeService, EdgeNodeAgent, EdgeNodeCertificateService, AcmeCertificateManager, EdgeNodeModeDetector, ClusterIdentifierStrategy, UsageTrackingStore, CenterNodeRegistrationService, PodRoutingHttpHandler, TieredMinioDataAccessor, PodMigrationHttpHandler, PodMigrationService, ReactAppViewHandler, QuintStore, SqliteQuintStore, PgQuintStore, BaseQuintStore, VectorStore, SqliteVectorStore, PostgresVectorStore, VectorHttpHandler, ProviderRegistry, ProviderRegistryImpl, EmbeddingService, EmbeddingServiceImpl, CredentialReader, CredentialReaderImpl, CloudflareTunnelProvider, LocalTunnelProvider, SubdomainService, MultiDomainIdentifierStrategy, SubdomainPodIdentifierStrategy, DisabledOidcHandler, DisabledIdentityProviderHandler, AutoDetectOidcHandler, AutoDetectIdentityProviderHandler, };
77
+ export { RepresentationPartialConvertingStore, MinioDataAccessor, QuadstoreSparqlDataAccessor, QuintStoreSparqlDataAccessor, MixDataAccessor, ConfigurableLoggerFactory, SparqlUpdateResourceStore, SubgraphQueryEngine, QuadstoreSparqlEngine, QuintstoreSparqlEngine, SubgraphSparqlHttpHandler, QuotaAdminHttpHandler, ClusterIngressRouter, ClusterWebSocketConfigurator, EdgeNodeDirectDebugHttpHandler, EdgeNodeProxyHttpHandler, RouterHttpHandler, RouterHttpRoute, TracingHandler, EdgeNodeCertificateHttpHandler, TerminalHttpHandler, ReservedSuffixIdentifierGenerator, DrizzleIndexedStorage, PostgresKeyValueStorage, RedisKeyValueStorage, SqliteKeyValueStorage, DrizzleQuotaService, NoopQuotaService, PerAccountQuotaStrategy, TencentDnsProvider, EdgeNodeDnsCoordinator, Dns01CertificateProvisioner, SimpleEdgeNodeTunnelManager, NoopEdgeNodeTunnelManager, FrpTunnelManager, EdgeNodeHealthProbeService, EdgeNodeAgent, EdgeNodeCertificateService, AcmeCertificateManager, EdgeNodeModeDetector, ClusterIdentifierStrategy, UsageTrackingStore, CenterNodeRegistrationService, PodRoutingHttpHandler, ReactAppViewHandler, QuintStore, SqliteQuintStore, PgQuintStore, BaseQuintStore, VectorStore, SqliteVectorStore, PostgresVectorStore, VectorHttpHandler, ProviderRegistry, ProviderRegistryImpl, EmbeddingService, EmbeddingServiceImpl, CredentialReader, CredentialReaderImpl, CloudflareTunnelProvider, LocalTunnelProvider, SubdomainService, MultiDomainIdentifierStrategy, SubdomainPodIdentifierStrategy, DisabledOidcHandler, DisabledIdentityProviderHandler, AutoDetectOidcHandler, AutoDetectIdentityProviderHandler, UrlAwareRedisLocker, ProvisionPodCreator, ProvisionCodeCodec, AuthModeSelector, };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PodMigrationHttpHandler = exports.TieredMinioDataAccessor = exports.PodRoutingHttpHandler = exports.CenterNodeRegistrationService = exports.UsageTrackingStore = exports.ClusterIdentifierStrategy = exports.EdgeNodeModeDetector = exports.AcmeCertificateManager = exports.EdgeNodeCertificateService = exports.EdgeNodeAgent = exports.EdgeNodeHealthProbeService = exports.FrpTunnelManager = exports.NoopEdgeNodeTunnelManager = exports.SimpleEdgeNodeTunnelManager = exports.Dns01CertificateProvisioner = exports.EdgeNodeDnsCoordinator = exports.TencentDnsProvider = exports.PerAccountQuotaStrategy = exports.NoopQuotaService = exports.DrizzleQuotaService = exports.DefaultQuotaService = exports.SqliteKeyValueStorage = exports.RedisKeyValueStorage = exports.PostgresKeyValueStorage = exports.DrizzleIndexedStorage = exports.ReservedSuffixIdentifierGenerator = exports.TerminalHttpHandler = exports.EdgeNodeCertificateHttpHandler = exports.TracingHandler = exports.RouterHttpRoute = exports.RouterHttpHandler = exports.SignalInterceptHttpHandler = exports.EdgeNodeProxyHttpHandler = exports.EdgeNodeDirectDebugHttpHandler = exports.ClusterWebSocketConfigurator = exports.ClusterIngressRouter = exports.EdgeNodeSignalHttpHandler = exports.QuotaAdminHttpHandler = exports.SubgraphSparqlHttpHandler = exports.QuintstoreSparqlEngine = exports.QuadstoreSparqlEngine = exports.SubgraphQueryEngine = exports.SparqlUpdateResourceStore = exports.ConfigurableLoggerFactory = exports.MixDataAccessor = exports.QuintStoreSparqlDataAccessor = exports.QuadstoreSparqlDataAccessor = exports.MinioDataAccessor = exports.RepresentationPartialConvertingStore = exports.AppStaticAssetHandler = void 0;
4
- exports.AutoDetectIdentityProviderHandler = exports.AutoDetectOidcHandler = exports.DisabledIdentityProviderHandler = exports.DisabledOidcHandler = exports.SubdomainPodIdentifierStrategy = exports.MultiDomainIdentifierStrategy = exports.SubdomainService = 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.BaseQuintStore = exports.PgQuintStore = exports.SqliteQuintStore = exports.QuintStore = exports.ReactAppViewHandler = exports.PodMigrationService = void 0;
3
+ exports.BaseQuintStore = exports.PgQuintStore = exports.SqliteQuintStore = exports.QuintStore = exports.ReactAppViewHandler = exports.PodRoutingHttpHandler = exports.CenterNodeRegistrationService = exports.UsageTrackingStore = exports.ClusterIdentifierStrategy = exports.EdgeNodeModeDetector = exports.AcmeCertificateManager = exports.EdgeNodeCertificateService = exports.EdgeNodeAgent = exports.EdgeNodeHealthProbeService = exports.FrpTunnelManager = exports.NoopEdgeNodeTunnelManager = exports.SimpleEdgeNodeTunnelManager = exports.Dns01CertificateProvisioner = exports.EdgeNodeDnsCoordinator = exports.TencentDnsProvider = exports.PerAccountQuotaStrategy = exports.NoopQuotaService = exports.DrizzleQuotaService = exports.SqliteKeyValueStorage = exports.RedisKeyValueStorage = exports.PostgresKeyValueStorage = exports.DrizzleIndexedStorage = exports.ReservedSuffixIdentifierGenerator = exports.TerminalHttpHandler = exports.EdgeNodeCertificateHttpHandler = exports.TracingHandler = exports.RouterHttpRoute = exports.RouterHttpHandler = exports.EdgeNodeProxyHttpHandler = exports.EdgeNodeDirectDebugHttpHandler = exports.ClusterWebSocketConfigurator = exports.ClusterIngressRouter = exports.QuotaAdminHttpHandler = exports.SubgraphSparqlHttpHandler = exports.QuintstoreSparqlEngine = exports.QuadstoreSparqlEngine = exports.SubgraphQueryEngine = exports.SparqlUpdateResourceStore = exports.ConfigurableLoggerFactory = exports.MixDataAccessor = exports.QuintStoreSparqlDataAccessor = exports.QuadstoreSparqlDataAccessor = exports.MinioDataAccessor = exports.RepresentationPartialConvertingStore = exports.AppStaticAssetHandler = void 0;
4
+ exports.AuthModeSelector = exports.ProvisionCodeCodec = exports.ProvisionPodCreator = exports.UrlAwareRedisLocker = exports.AutoDetectIdentityProviderHandler = exports.AutoDetectOidcHandler = exports.DisabledIdentityProviderHandler = exports.DisabledOidcHandler = exports.SubdomainPodIdentifierStrategy = exports.MultiDomainIdentifierStrategy = exports.SubdomainService = exports.LocalTunnelProvider = exports.CloudflareTunnelProvider = exports.CredentialReaderImpl = exports.CredentialReader = exports.EmbeddingServiceImpl = exports.EmbeddingService = exports.ProviderRegistryImpl = exports.ProviderRegistry = exports.VectorHttpHandler = exports.PostgresVectorStore = exports.SqliteVectorStore = exports.VectorStore = void 0;
5
5
  const RepresentationPartialConvertingStore_1 = require("./storage/RepresentationPartialConvertingStore");
6
6
  Object.defineProperty(exports, "RepresentationPartialConvertingStore", { enumerable: true, get: function () { return RepresentationPartialConvertingStore_1.RepresentationPartialConvertingStore; } });
7
7
  const MinioDataAccessor_1 = require("./storage/accessors/MinioDataAccessor");
@@ -22,8 +22,6 @@ const SubgraphSparqlHttpHandler_1 = require("./http/SubgraphSparqlHttpHandler");
22
22
  Object.defineProperty(exports, "SubgraphSparqlHttpHandler", { enumerable: true, get: function () { return SubgraphSparqlHttpHandler_1.SubgraphSparqlHttpHandler; } });
23
23
  const QuotaAdminHttpHandler_1 = require("./http/quota/QuotaAdminHttpHandler");
24
24
  Object.defineProperty(exports, "QuotaAdminHttpHandler", { enumerable: true, get: function () { return QuotaAdminHttpHandler_1.QuotaAdminHttpHandler; } });
25
- const EdgeNodeSignalHttpHandler_1 = require("./http/admin/EdgeNodeSignalHttpHandler");
26
- Object.defineProperty(exports, "EdgeNodeSignalHttpHandler", { enumerable: true, get: function () { return EdgeNodeSignalHttpHandler_1.EdgeNodeSignalHttpHandler; } });
27
25
  const SparqlUpdateResourceStore_1 = require("./storage/SparqlUpdateResourceStore");
28
26
  Object.defineProperty(exports, "SparqlUpdateResourceStore", { enumerable: true, get: function () { return SparqlUpdateResourceStore_1.SparqlUpdateResourceStore; } });
29
27
  const ClusterIngressRouter_1 = require("./http/ClusterIngressRouter");
@@ -34,8 +32,6 @@ const EdgeNodeDirectDebugHttpHandler_1 = require("./http/EdgeNodeDirectDebugHttp
34
32
  Object.defineProperty(exports, "EdgeNodeDirectDebugHttpHandler", { enumerable: true, get: function () { return EdgeNodeDirectDebugHttpHandler_1.EdgeNodeDirectDebugHttpHandler; } });
35
33
  const EdgeNodeProxyHttpHandler_1 = require("./http/EdgeNodeProxyHttpHandler");
36
34
  Object.defineProperty(exports, "EdgeNodeProxyHttpHandler", { enumerable: true, get: function () { return EdgeNodeProxyHttpHandler_1.EdgeNodeProxyHttpHandler; } });
37
- const SignalInterceptHttpHandler_1 = require("./http/SignalInterceptHttpHandler");
38
- Object.defineProperty(exports, "SignalInterceptHttpHandler", { enumerable: true, get: function () { return SignalInterceptHttpHandler_1.SignalInterceptHttpHandler; } });
39
35
  const RouterHttpHandler_1 = require("./http/RouterHttpHandler");
40
36
  Object.defineProperty(exports, "RouterHttpHandler", { enumerable: true, get: function () { return RouterHttpHandler_1.RouterHttpHandler; } });
41
37
  const RouterHttpRoute_1 = require("./http/RouterHttpRoute");
@@ -56,8 +52,6 @@ const RedisKeyValueStorage_1 = require("./storage/keyvalue/RedisKeyValueStorage"
56
52
  Object.defineProperty(exports, "RedisKeyValueStorage", { enumerable: true, get: function () { return RedisKeyValueStorage_1.RedisKeyValueStorage; } });
57
53
  const SqliteKeyValueStorage_1 = require("./storage/keyvalue/SqliteKeyValueStorage");
58
54
  Object.defineProperty(exports, "SqliteKeyValueStorage", { enumerable: true, get: function () { return SqliteKeyValueStorage_1.SqliteKeyValueStorage; } });
59
- const DefaultQuotaService_1 = require("./quota/DefaultQuotaService");
60
- Object.defineProperty(exports, "DefaultQuotaService", { enumerable: true, get: function () { return DefaultQuotaService_1.DefaultQuotaService; } });
61
55
  const DrizzleQuotaService_1 = require("./quota/DrizzleQuotaService");
62
56
  Object.defineProperty(exports, "DrizzleQuotaService", { enumerable: true, get: function () { return DrizzleQuotaService_1.DrizzleQuotaService; } });
63
57
  const NoopQuotaService_1 = require("./quota/NoopQuotaService");
@@ -93,12 +87,6 @@ const CenterNodeRegistrationService_1 = require("./identity/CenterNodeRegistrati
93
87
  Object.defineProperty(exports, "CenterNodeRegistrationService", { enumerable: true, get: function () { return CenterNodeRegistrationService_1.CenterNodeRegistrationService; } });
94
88
  const PodRoutingHttpHandler_1 = require("./http/PodRoutingHttpHandler");
95
89
  Object.defineProperty(exports, "PodRoutingHttpHandler", { enumerable: true, get: function () { return PodRoutingHttpHandler_1.PodRoutingHttpHandler; } });
96
- const TieredMinioDataAccessor_1 = require("./storage/accessors/TieredMinioDataAccessor");
97
- Object.defineProperty(exports, "TieredMinioDataAccessor", { enumerable: true, get: function () { return TieredMinioDataAccessor_1.TieredMinioDataAccessor; } });
98
- const PodMigrationHttpHandler_1 = require("./http/cluster/PodMigrationHttpHandler");
99
- Object.defineProperty(exports, "PodMigrationHttpHandler", { enumerable: true, get: function () { return PodMigrationHttpHandler_1.PodMigrationHttpHandler; } });
100
- const PodMigrationService_1 = require("./service/PodMigrationService");
101
- Object.defineProperty(exports, "PodMigrationService", { enumerable: true, get: function () { return PodMigrationService_1.PodMigrationService; } });
102
90
  const ReactAppViewHandler_1 = require("./identity/ReactAppViewHandler");
103
91
  Object.defineProperty(exports, "ReactAppViewHandler", { enumerable: true, get: function () { return ReactAppViewHandler_1.ReactAppViewHandler; } });
104
92
  const SqliteQuintStore_1 = require("./storage/quint/SqliteQuintStore");
@@ -136,6 +124,8 @@ const LocalTunnelProvider_1 = require("./tunnel/LocalTunnelProvider");
136
124
  Object.defineProperty(exports, "LocalTunnelProvider", { enumerable: true, get: function () { return LocalTunnelProvider_1.LocalTunnelProvider; } });
137
125
  const SubdomainService_1 = require("./subdomain/SubdomainService");
138
126
  Object.defineProperty(exports, "SubdomainService", { enumerable: true, get: function () { return SubdomainService_1.SubdomainService; } });
127
+ const UrlAwareRedisLocker_1 = require("./storage/locking/UrlAwareRedisLocker");
128
+ Object.defineProperty(exports, "UrlAwareRedisLocker", { enumerable: true, get: function () { return UrlAwareRedisLocker_1.UrlAwareRedisLocker; } });
139
129
  // IdP/SP separation components
140
130
  const MultiDomainIdentifierStrategy_1 = require("./util/identifiers/MultiDomainIdentifierStrategy");
141
131
  Object.defineProperty(exports, "MultiDomainIdentifierStrategy", { enumerable: true, get: function () { return MultiDomainIdentifierStrategy_1.MultiDomainIdentifierStrategy; } });
@@ -149,6 +139,14 @@ const AutoDetectOidcHandler_1 = require("./identity/oidc/AutoDetectOidcHandler")
149
139
  Object.defineProperty(exports, "AutoDetectOidcHandler", { enumerable: true, get: function () { return AutoDetectOidcHandler_1.AutoDetectOidcHandler; } });
150
140
  const AutoDetectIdentityProviderHandler_1 = require("./identity/oidc/AutoDetectIdentityProviderHandler");
151
141
  Object.defineProperty(exports, "AutoDetectIdentityProviderHandler", { enumerable: true, get: function () { return AutoDetectIdentityProviderHandler_1.AutoDetectIdentityProviderHandler; } });
142
+ // Provision components
143
+ const ProvisionPodCreator_1 = require("./provision/ProvisionPodCreator");
144
+ Object.defineProperty(exports, "ProvisionPodCreator", { enumerable: true, get: function () { return ProvisionPodCreator_1.ProvisionPodCreator; } });
145
+ const ProvisionCodeCodec_1 = require("./provision/ProvisionCodeCodec");
146
+ Object.defineProperty(exports, "ProvisionCodeCodec", { enumerable: true, get: function () { return ProvisionCodeCodec_1.ProvisionCodeCodec; } });
147
+ // Authorization components
148
+ const AuthModeSelector_1 = require("./authorization/AuthModeSelector");
149
+ Object.defineProperty(exports, "AuthModeSelector", { enumerable: true, get: function () { return AuthModeSelector_1.AuthModeSelector; } });
152
150
  // Export the new AppStaticAssetHandler
153
151
  var AppStaticAssetHandler_1 = require("./http/AppStaticAssetHandler");
154
152
  Object.defineProperty(exports, "AppStaticAssetHandler", { enumerable: true, get: function () { return AppStaticAssetHandler_1.AppStaticAssetHandler; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,yGAAsG;AAyGlG,qHAzGK,2EAAoC,OAyGL;AAxGxC,6EAA0E;AAyGtE,kGAzGK,qCAAiB,OAyGL;AAxGrB,iGAA8F;AAyG1F,4GAzGK,yDAA2B,OAyGL;AAxG/B,mGAAgG;AAyG5F,6GAzGK,2DAA4B,OAyGL;AAxGhC,yEAAsE;AAyGlE,gGAzGK,iCAAe,OAyGL;AAxGnB,mFAAgF;AAyG5E,0GAzGK,qDAAyB,OAyGL;AAxG7B,8EAA0H;AA0GtH,oGA1GK,yCAAmB,OA0GL;AACnB,sGA3G0B,2CAAqB,OA2G1B;AACrB,uGA5GiD,4CAAsB,OA4GjD;AA1G1B,gFAA6E;AA2GzE,0GA3GK,qDAAyB,OA2GL;AA1G7B,8EAA2E;AA2GvE,sGA3GK,6CAAqB,OA2GL;AA1GzB,sFAAmF;A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OA6GP;AA5GtB,oEAAiE;AA6G/D,iGA7GO,mCAAgB,OA6GP;AA5GlB,4EAAyE;AA6GvE,qGA7GO,2CAAoB,OA6GP;AA5GtB,8DAA2D;AAkGzD,4FAlGO,yBAAW,OAkGP;AAjGb,kCAAkC;AAClC,gFAA6E;AA4G3E,yGA5GO,mDAAwB,OA4GP;AA3G1B,sEAAmE;AA4GjE,oGA5GO,yCAAmB,OA4GP;AA3GrB,mEAAgE;AA4G9D,iGA5GO,mCAAgB,OA4GP;AA3GlB,+BAA+B;AAC/B,oGAAiG;AA4G/F,8GA5GO,6DAA6B,OA4GP;AA3G/B,sGAAmG;AA4GjG,+GA5GO,+DAA8B,OA4GP;AA3GhC,6EAA0E;AA4GxE,oGA5GO,yCAAmB,OA4GP;AA3GrB,qGAAkG;AA4GhG,gHA5GO,iEAA+B,OA4GP;AA3GjC,iFAA8E;AA4G5E,sGA5GO,6CAAqB,OA4GP;AA3GvB,yGAAsG;AA4GpG,kHA5GO,qEAAiC,OA4GP;AAlFnC,uCAAuC;AACvC,sEAAqE;AAA5D,8HAAA,qBAAqB,OAAA","sourcesContent":["import { RepresentationPartialConvertingStore } from './storage/RepresentationPartialConvertingStore';\nimport { MinioDataAccessor } from './storage/accessors/MinioDataAccessor';\nimport { QuadstoreSparqlDataAccessor } from './storage/accessors/QuadstoreSparqlDataAccessor';\nimport { QuintStoreSparqlDataAccessor } from './storage/accessors/QuintStoreSparqlDataAccessor';\nimport { MixDataAccessor } from './storage/accessors/MixDataAccessor';\nimport { ConfigurableLoggerFactory } from './logging/ConfigurableLoggerFactory';\nimport { SubgraphQueryEngine, QuadstoreSparqlEngine, QuintstoreSparqlEngine } from './storage/sparql/SubgraphQueryEngine';\nexport type { SparqlEngine } from './storage/sparql/SubgraphQueryEngine';\nimport { SubgraphSparqlHttpHandler } from './http/SubgraphSparqlHttpHandler';\nimport { QuotaAdminHttpHandler } from './http/quota/QuotaAdminHttpHandler';\nimport { EdgeNodeSignalHttpHandler } from './http/admin/EdgeNodeSignalHttpHandler';\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 { SignalInterceptHttpHandler } from './http/SignalInterceptHttpHandler';\nimport { RouterHttpHandler } from './http/RouterHttpHandler';\nimport { RouterHttpRoute } from './http/RouterHttpRoute';\nimport { TracingHandler } from './http/TracingHandler';\nimport { TerminalHttpHandler } from './http/terminal/TerminalHttpHandler';\nimport { EdgeNodeCertificateHttpHandler } from './http/admin/EdgeNodeCertificateHttpHandler';\nimport { ReservedSuffixIdentifierGenerator } from './pods/ReservedSuffixIdentifierGenerator';\nimport { DrizzleIndexedStorage } from './identity/drizzle/DrizzleIndexedStorage';\nimport { PostgresKeyValueStorage } from './storage/keyvalue/PostgresKeyValueStorage';\nimport { RedisKeyValueStorage } from './storage/keyvalue/RedisKeyValueStorage';\nimport { SqliteKeyValueStorage } from './storage/keyvalue/SqliteKeyValueStorage';\nimport { DefaultQuotaService } from './quota/DefaultQuotaService';\nimport { DrizzleQuotaService } from './quota/DrizzleQuotaService';\nimport { NoopQuotaService } from './quota/NoopQuotaService';\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 { 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 { TieredMinioDataAccessor } from './storage/accessors/TieredMinioDataAccessor';\nimport { PodMigrationHttpHandler } from './http/cluster/PodMigrationHttpHandler';\nimport { PodMigrationService } from './service/PodMigrationService';\nimport { ReactAppViewHandler } from './identity/ReactAppViewHandler';\nimport { SqliteQuintStore } from './storage/quint/SqliteQuintStore';\nimport { PgQuintStore } from './storage/quint/PgQuintStore';\nimport { BaseQuintStore } from './storage/quint/BaseQuintStore';\nimport { QuintStore } from './storage/quint/types';\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 { SubdomainService } from './subdomain/SubdomainService';\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';\nexport type { MigratableDataAccessor, MigrationProgress } from './storage/MigratableDataAccessor';\n// Note: isMigratableAccessor is a function, not exported to avoid componentsjs-generator issues\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 { EdgeNodeTunnelManager } from './edge/interfaces/EdgeNodeTunnelManager';\nexport type { QuotaService } from './quota/QuotaService';\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 MixDataAccessor,\n ConfigurableLoggerFactory,\n SparqlUpdateResourceStore,\n SubgraphQueryEngine,\n QuadstoreSparqlEngine,\n QuintstoreSparqlEngine,\n SubgraphSparqlHttpHandler,\n QuotaAdminHttpHandler,\n EdgeNodeSignalHttpHandler,\n ClusterIngressRouter,\n ClusterWebSocketConfigurator,\n EdgeNodeDirectDebugHttpHandler,\n EdgeNodeProxyHttpHandler,\n SignalInterceptHttpHandler,\n RouterHttpHandler,\n RouterHttpRoute,\n TracingHandler,\n EdgeNodeCertificateHttpHandler,\n TerminalHttpHandler,\n ReservedSuffixIdentifierGenerator,\n DrizzleIndexedStorage,\n PostgresKeyValueStorage,\n RedisKeyValueStorage,\n SqliteKeyValueStorage,\n DefaultQuotaService,\n DrizzleQuotaService,\n NoopQuotaService,\n PerAccountQuotaStrategy,\n TencentDnsProvider,\n EdgeNodeDnsCoordinator,\n Dns01CertificateProvisioner,\n SimpleEdgeNodeTunnelManager,\n NoopEdgeNodeTunnelManager,\n FrpTunnelManager,\n EdgeNodeHealthProbeService,\n EdgeNodeAgent,\n EdgeNodeCertificateService,\n AcmeCertificateManager,\n EdgeNodeModeDetector,\n ClusterIdentifierStrategy,\n UsageTrackingStore,\n CenterNodeRegistrationService,\n PodRoutingHttpHandler,\n TieredMinioDataAccessor,\n PodMigrationHttpHandler,\n PodMigrationService,\n ReactAppViewHandler,\n // Quint exports\n QuintStore,\n SqliteQuintStore,\n PgQuintStore,\n BaseQuintStore,\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 SubdomainService,\n // IdP/SP separation exports\n MultiDomainIdentifierStrategy,\n SubdomainPodIdentifierStrategy,\n DisabledOidcHandler,\n DisabledIdentityProviderHandler,\n AutoDetectOidcHandler,\n AutoDetectIdentityProviderHandler,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,yGAAsG;AAuGlG,qHAvGK,2EAAoC,OAuGL;AAtGxC,6EAA0E;AAuGtE,kGAvGK,qCAAiB,OAuGL;AAtGrB,iGAA8F;AAuG1F,4GAvGK,yDAA2B,OAuGL;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AAiE;AA2G/D,iGA3GO,mCAAgB,OA2GP;AA1GlB,4EAAyE;AA2GvE,qGA3GO,2CAAoB,OA2GP;AA1GtB,oEAAiE;AA2G/D,iGA3GO,mCAAgB,OA2GP;AA1GlB,4EAAyE;AA2GvE,qGA3GO,2CAAoB,OA2GP;AA1GtB,8DAA2D;AAgGzD,4FAhGO,yBAAW,OAgGP;AA/Fb,kCAAkC;AAClC,gFAA6E;AA0G3E,yGA1GO,mDAAwB,OA0GP;AAzG1B,sEAAmE;AA0GjE,oGA1GO,yCAAmB,OA0GP;AAzGrB,mEAAgE;AA0G9D,iGA1GO,mCAAgB,OA0GP;AAzGlB,+EAA4E;AAiH1E,oGAjHO,yCAAmB,OAiHP;AAhHrB,+BAA+B;AAC/B,oGAAiG;AAyG/F,8GAzGO,6DAA6B,OAyGP;AAxG/B,sGAAmG;AAyGjG,+GAzGO,+DAA8B,OAyGP;AAxGhC,6EAA0E;AAyGxE,oGAzGO,yCAAmB,OAyGP;AAxGrB,qGAAkG;AAyGhG,gHAzGO,iEAA+B,OAyGP;AAxGjC,iFAA8E;AAyG5E,sGAzGO,6CAAqB,OAyGP;AAxGvB,yGAAsG;AAyGpG,kHAzGO,qEAAiC,OAyGP;AAxGnC,uBAAuB;AACvB,yEAAsE;AA0GpE,oGA1GO,yCAAmB,OA0GP;AAzGrB,uEAAoE;AA0GlE,mGA1GO,uCAAkB,OA0GP;AAzGpB,2BAA2B;AAC3B,uEAAoE;AA0GlE,iGA1GO,mCAAgB,OA0GP;AAlFlB,uCAAuC;AACvC,sEAAqE;AAA5D,8HAAA,qBAAqB,OAAA","sourcesContent":["import { RepresentationPartialConvertingStore } from './storage/RepresentationPartialConvertingStore';\nimport { MinioDataAccessor } from './storage/accessors/MinioDataAccessor';\nimport { QuadstoreSparqlDataAccessor } from './storage/accessors/QuadstoreSparqlDataAccessor';\nimport { QuintStoreSparqlDataAccessor } from './storage/accessors/QuintStoreSparqlDataAccessor';\nimport { MixDataAccessor } from './storage/accessors/MixDataAccessor';\nimport { ConfigurableLoggerFactory } from './logging/ConfigurableLoggerFactory';\nimport { SubgraphQueryEngine, QuadstoreSparqlEngine, QuintstoreSparqlEngine } from './storage/sparql/SubgraphQueryEngine';\nexport type { SparqlEngine } from './storage/sparql/SubgraphQueryEngine';\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 { EdgeNodeCertificateHttpHandler } from './http/admin/EdgeNodeCertificateHttpHandler';\nimport { ReservedSuffixIdentifierGenerator } from './pods/ReservedSuffixIdentifierGenerator';\nimport { DrizzleIndexedStorage } from './identity/drizzle/DrizzleIndexedStorage';\nimport { PostgresKeyValueStorage } from './storage/keyvalue/PostgresKeyValueStorage';\nimport { RedisKeyValueStorage } from './storage/keyvalue/RedisKeyValueStorage';\nimport { SqliteKeyValueStorage } from './storage/keyvalue/SqliteKeyValueStorage';\nimport { DrizzleQuotaService } from './quota/DrizzleQuotaService';\nimport { NoopQuotaService } from './quota/NoopQuotaService';\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 { 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 { BaseQuintStore } from './storage/quint/BaseQuintStore';\nimport { QuintStore } from './storage/quint/types';\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 { 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';\n// Provision components\nimport { ProvisionPodCreator } from './provision/ProvisionPodCreator';\nimport { ProvisionCodeCodec } from './provision/ProvisionCodeCodec';\n// Authorization components\nimport { AuthModeSelector } from './authorization/AuthModeSelector';\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 { EdgeNodeTunnelManager } from './edge/interfaces/EdgeNodeTunnelManager';\nexport type { QuotaService, AccountQuota } from './quota/QuotaService';\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 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 ReservedSuffixIdentifierGenerator,\n DrizzleIndexedStorage,\n PostgresKeyValueStorage,\n RedisKeyValueStorage,\n SqliteKeyValueStorage,\n DrizzleQuotaService,\n NoopQuotaService,\n PerAccountQuotaStrategy,\n TencentDnsProvider,\n EdgeNodeDnsCoordinator,\n Dns01CertificateProvisioner,\n SimpleEdgeNodeTunnelManager,\n NoopEdgeNodeTunnelManager,\n FrpTunnelManager,\n EdgeNodeHealthProbeService,\n EdgeNodeAgent,\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 BaseQuintStore,\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 SubdomainService,\n // IdP/SP separation exports\n MultiDomainIdentifierStrategy,\n SubdomainPodIdentifierStrategy,\n DisabledOidcHandler,\n DisabledIdentityProviderHandler,\n AutoDetectOidcHandler,\n AutoDetectIdentityProviderHandler,\n UrlAwareRedisLocker,\n // Provision exports\n ProvisionPodCreator,\n ProvisionCodeCodec,\n // Authorization exports\n AuthModeSelector,\n};\n\n"]}
package/dist/main.js CHANGED
@@ -45,7 +45,10 @@ function loadEnvFile(envPath) {
45
45
  (value.startsWith("'") && value.endsWith("'"))) {
46
46
  value = value.slice(1, -1);
47
47
  }
48
- process.env[key] = value;
48
+ // Only set if not already defined — CLI / parent env takes precedence.
49
+ if (process.env[key] === undefined) {
50
+ process.env[key] = value;
51
+ }
49
52
  }
50
53
  }
51
54
  function ensureTrailingSlash(url) {
@@ -228,10 +231,21 @@ async function startRuntime(options) {
228
231
  CSS_BASE_URL: baseUrl,
229
232
  },
230
233
  });
234
+ // API server: resolve the entry point dynamically
235
+ // In dev (ts-node): use ts-node to run the .ts file
236
+ // In production: use the compiled .js file
237
+ const isDevMode = __filename.endsWith('.ts');
238
+ const apiArgs = isDevMode
239
+ ? [
240
+ '-r',
241
+ require.resolve('ts-node/register/transpile-only'),
242
+ path_1.default.join(__dirname, 'api', 'main.ts'),
243
+ ]
244
+ : [path_1.default.join(__dirname, 'api', 'main.js')];
231
245
  supervisor.register({
232
246
  name: 'api',
233
247
  command: process.execPath,
234
- args: [path_1.default.join(__dirname, 'api', 'main.js')],
248
+ args: apiArgs,
235
249
  env: {
236
250
  ...process.env,
237
251
  API_PORT: apiPort.toString(),
@@ -241,9 +255,9 @@ async function startRuntime(options) {
241
255
  CSS_TOKEN_ENDPOINT: `${baseUrl}.oidc/token`,
242
256
  },
243
257
  });
244
- // Default bind host: prefer explicit XPOD_LISTEN_HOST; otherwise derive from the public Base URL.
258
+ // Bind host: use CLI --host value; if not explicitly set, derive from the public Base URL.
245
259
  // In local dev/sandboxed environments, binding 0.0.0.0 can fail with EPERM.
246
- const bindHost = process.env.XPOD_LISTEN_HOST || (() => {
260
+ const bindHost = options.host || (() => {
247
261
  try {
248
262
  const hostname = new URL(baseUrl).hostname;
249
263
  if (hostname === 'localhost')
@@ -258,13 +272,16 @@ async function startRuntime(options) {
258
272
  }
259
273
  return '0.0.0.0';
260
274
  })();
261
- const proxy = new runtime_1.GatewayProxy(mainPort, supervisor, bindHost);
275
+ const proxy = new runtime_1.GatewayProxy(mainPort, supervisor, bindHost, {
276
+ exitOnStop: true,
277
+ baseUrl,
278
+ });
262
279
  proxy.setTargets({
263
280
  css: `http://localhost:${cssPort}`,
264
281
  api: `http://localhost:${apiPort}`,
265
282
  });
266
283
  await supervisor.startAll();
267
- proxy.start();
284
+ await proxy.start();
268
285
  let restarting = false;
269
286
  const restart = async () => {
270
287
  if (restarting) {
@@ -443,7 +460,7 @@ async function main() {
443
460
  .option('config', { alias: 'c', type: 'string', description: 'Path to config file (overrides --mode)' })
444
461
  .option('env', { alias: 'e', type: 'string', description: 'Path to .env file' })
445
462
  .option('port', { alias: 'p', type: 'number', description: 'Gateway port', default: 3000 })
446
- .option('host', { type: 'string', description: 'Gateway host', default: '127.0.0.1' })
463
+ .option('host', { type: 'string', description: 'Gateway bind host' })
447
464
  .help()
448
465
  .parse();
449
466
  try {
@@ -467,7 +484,7 @@ async function main() {
467
484
  .option('mode', { alias: 'm', type: 'string', choices: ['local', 'cloud'], description: 'Run mode' })
468
485
  .option('config', { alias: 'c', type: 'string', description: 'Path to config file (overrides --mode)' })
469
486
  .option('port', { alias: 'p', type: 'number', description: 'Gateway port', default: 3000 })
470
- .option('host', { type: 'string', description: 'Gateway host', default: '127.0.0.1' }), async (argv) => {
487
+ .option('host', { type: 'string', description: 'Gateway bind host' }), async (argv) => {
471
488
  try {
472
489
  await startRuntime({
473
490
  mode: argv.mode,