@koed-labs/server 0.0.0-bootstrap.0 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +65 -0
  3. package/bin/koed.js +7 -0
  4. package/package.json +22 -4
  5. package/third-party-notices.json +92 -0
  6. package/vendor/chunk-2BWTLF7A.js +13883 -0
  7. package/vendor/chunk-2DA7EFZV.js +924 -0
  8. package/vendor/chunk-2S3OGPUC.js +58 -0
  9. package/vendor/chunk-473OA62O.js +26827 -0
  10. package/vendor/chunk-6JRWGOQG.js +236 -0
  11. package/vendor/chunk-7NOQSX4T.js +14 -0
  12. package/vendor/chunk-7NXKPDF3.js +1586 -0
  13. package/vendor/chunk-A4NKL2PK.js +153 -0
  14. package/vendor/chunk-A6WMU2GG.js +48 -0
  15. package/vendor/chunk-AFLKCQHF.js +73 -0
  16. package/vendor/chunk-BTS4ZTF3.js +43 -0
  17. package/vendor/chunk-C3N4N5HR.js +108 -0
  18. package/vendor/chunk-DXTAWHY3.js +25 -0
  19. package/vendor/chunk-G4IIVVJO.js +56 -0
  20. package/vendor/chunk-GELDEJJ2.js +4337 -0
  21. package/vendor/chunk-HFM6ROJL.js +188 -0
  22. package/vendor/chunk-HK2H3MVE.js +328 -0
  23. package/vendor/chunk-HZJK5RWC.js +5088 -0
  24. package/vendor/chunk-J2L726BC.js +2497 -0
  25. package/vendor/chunk-JBGD4JLR.js +3779 -0
  26. package/vendor/chunk-JJNLH5GA.js +2470 -0
  27. package/vendor/chunk-JKOG52PE.js +128 -0
  28. package/vendor/chunk-K2EIFEQF.js +89 -0
  29. package/vendor/chunk-KUIWH33N.js +16 -0
  30. package/vendor/chunk-NEWIOOM6.js +34 -0
  31. package/vendor/chunk-NM5NXCVM.js +2404 -0
  32. package/vendor/chunk-PT3AUPGE.js +459 -0
  33. package/vendor/chunk-PY5LYLV7.js +143 -0
  34. package/vendor/chunk-QIIKMG3M.js +103 -0
  35. package/vendor/chunk-QT24SAW6.js +110 -0
  36. package/vendor/chunk-RVYJKKWA.js +22 -0
  37. package/vendor/chunk-SKVYP7NY.js +1647 -0
  38. package/vendor/chunk-TSRPHKAC.js +780 -0
  39. package/vendor/chunk-UI5RLBKQ.js +30 -0
  40. package/vendor/chunk-VPC5NLZG.js +259 -0
  41. package/vendor/chunk-W2HNI6AA.js +75 -0
  42. package/vendor/chunk-X6M525ZJ.js +20 -0
  43. package/vendor/chunk-XIZVLPHZ.js +18 -0
  44. package/vendor/chunk-XNFVSVBS.js +242 -0
  45. package/vendor/chunk-YCDEMYY6.js +2076 -0
  46. package/vendor/chunk-YJ6XUZT6.js +292 -0
  47. package/vendor/chunk-YJWREXN6.js +26020 -0
  48. package/vendor/chunk-YK4F4VY2.js +173 -0
  49. package/vendor/chunk-YOFI4PCH.js +36 -0
  50. package/vendor/chunk-ZUGNCQZE.js +247 -0
  51. package/vendor/chunk-ZXX4ZNJY.js +21 -0
  52. package/vendor/cli.js +7 -0
  53. package/vendor/component-manifest-catalog.js +8 -0
  54. package/vendor/control-plane.js +23 -0
  55. package/vendor/package.json +1 -0
  56. package/vendor/privacy-service-bootstrap.js +6 -0
@@ -0,0 +1,58 @@
1
+ import { createRequire as createKoedRequire } from "node:module"; const require = createKoedRequire(import.meta.url);
2
+ import {
3
+ resolveKoedHome
4
+ } from "./chunk-K2EIFEQF.js";
5
+ import {
6
+ createPdsApplicationSecretStore
7
+ } from "./chunk-473OA62O.js";
8
+
9
+ // packages/koed-server/dist/application-secret-provider.js
10
+ import { existsSync } from "node:fs";
11
+ import { dirname, resolve } from "node:path";
12
+ import { fileURLToPath } from "node:url";
13
+ var bundledCliPath = () => {
14
+ const moduleDirectory = dirname(fileURLToPath(import.meta.url));
15
+ const sibling = resolve(moduleDirectory, "cli.js");
16
+ if (existsSync(sibling))
17
+ return sibling;
18
+ return resolve(moduleDirectory, "../dist/cli.js");
19
+ };
20
+ var bundledPdsSecretProviderEnvironment = (environment) => {
21
+ if (environment.PDS_SECRET_PROVIDER?.trim() || environment.PDS_SECRET_PROVIDER_COMMAND?.trim()) {
22
+ return environment;
23
+ }
24
+ return {
25
+ ...environment,
26
+ PDS_SECRET_PROVIDER: "headless",
27
+ PDS_SECRET_PROVIDER_COMMAND: process.execPath,
28
+ PDS_SECRET_PROVIDER_COMMAND_ARGS_JSON: JSON.stringify([
29
+ bundledCliPath(),
30
+ "secret-provider"
31
+ ])
32
+ };
33
+ };
34
+ var runApplicationSecretProvider = (operation, reference, value, environment = process.env, store) => {
35
+ try {
36
+ const secretStore = store ?? createPdsApplicationSecretStore({
37
+ rootPath: resolveKoedHome(environment)
38
+ });
39
+ if (operation === "get") {
40
+ return Promise.resolve({ ok: true, value: secretStore.get(reference) });
41
+ }
42
+ if (operation === "put") {
43
+ if (value === void 0)
44
+ return Promise.resolve({ ok: false, value: null });
45
+ secretStore.put(reference, value);
46
+ } else {
47
+ secretStore.delete(reference);
48
+ }
49
+ return Promise.resolve({ ok: true, value: null });
50
+ } catch {
51
+ return Promise.resolve({ ok: false, value: null });
52
+ }
53
+ };
54
+
55
+ export {
56
+ bundledPdsSecretProviderEnvironment,
57
+ runApplicationSecretProvider
58
+ };