@saws/core 1.0.11 → 2.0.0-beta.11

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 (61) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/Host.d.ts +62 -0
  3. package/dist/Host.js +202 -0
  4. package/dist/ServiceDefinition.d.ts +66 -0
  5. package/dist/ServiceDefinition.js +182 -0
  6. package/dist/find-service-definition.d.ts +2 -0
  7. package/dist/find-service-definition.js +25 -0
  8. package/dist/get-saws-config.d.ts +14 -0
  9. package/dist/get-saws-config.js +20 -0
  10. package/dist/global-hosts.d.ts +8 -0
  11. package/dist/global-hosts.js +119 -0
  12. package/dist/host-readiness.d.ts +12 -0
  13. package/dist/host-readiness.js +230 -0
  14. package/dist/index.d.ts +7 -0
  15. package/dist/index.js +7 -0
  16. package/dist/secrets-manager.d.ts +66 -0
  17. package/dist/secrets-manager.js +325 -0
  18. package/dist/tsconfig.tsbuildinfo +1 -1
  19. package/dist/utils/constants.d.ts +4 -0
  20. package/dist/utils/constants.js +5 -0
  21. package/dist/utils/create-directories.d.ts +2 -0
  22. package/dist/utils/create-directories.js +20 -0
  23. package/dist/utils/create-file-if-not-exists.d.ts +1 -0
  24. package/dist/utils/create-file-if-not-exists.js +12 -0
  25. package/dist/utils/create-file-if-note-exists.d.ts +1 -0
  26. package/dist/utils/create-file-if-note-exists.js +11 -0
  27. package/dist/utils/dependency-management.d.ts +16 -0
  28. package/dist/utils/dependency-management.js +132 -0
  29. package/dist/utils/file-exists.d.ts +1 -0
  30. package/dist/utils/file-exists.js +12 -0
  31. package/dist/utils/generate-token.d.ts +1 -0
  32. package/dist/utils/generate-token.js +13 -0
  33. package/dist/utils/get-project-name.d.ts +1 -0
  34. package/dist/utils/get-project-name.js +5 -0
  35. package/dist/utils/get-service-path.d.ts +1 -0
  36. package/dist/utils/get-service-path.js +1 -0
  37. package/dist/utils/list-files.d.ts +1 -0
  38. package/dist/utils/list-files.js +17 -0
  39. package/dist/utils/on-exit.d.ts +1 -0
  40. package/dist/utils/on-exit.js +14 -0
  41. package/dist/utils/parameterized-env-var-name.d.ts +1 -0
  42. package/dist/utils/parameterized-env-var-name.js +1 -0
  43. package/dist/utils/recursively-read-dir.d.ts +1 -0
  44. package/dist/utils/recursively-read-dir.js +15 -0
  45. package/dist/utils/retry-until.d.ts +1 -0
  46. package/dist/utils/retry-until.js +9 -0
  47. package/dist/utils/run-local.d.ts +9 -0
  48. package/dist/utils/run-local.js +87 -0
  49. package/dist/utils/shell-quote.d.ts +1 -0
  50. package/dist/utils/shell-quote.js +3 -0
  51. package/dist/utils/stage-outputs.d.ts +3 -0
  52. package/dist/utils/stage-outputs.js +24 -0
  53. package/dist/utils/uppercase.d.ts +1 -0
  54. package/dist/utils/uppercase.js +4 -0
  55. package/package.json +37 -6
  56. package/dist/src/ServiceDefinition.d.ts +0 -30
  57. package/dist/src/ServiceDefinition.js +0 -94
  58. package/dist/src/get-saws-config.d.ts +0 -2
  59. package/dist/src/get-saws-config.js +0 -11
  60. package/dist/src/index.d.ts +0 -2
  61. package/dist/src/index.js +0 -19
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/typescript/lib/lib.es2025.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/typescript/lib/lib.es2025.collection.d.ts","../../../node_modules/typescript/lib/lib.es2025.float16.d.ts","../../../node_modules/typescript/lib/lib.es2025.intl.d.ts","../../../node_modules/typescript/lib/lib.es2025.iterator.d.ts","../../../node_modules/typescript/lib/lib.es2025.promise.d.ts","../../../node_modules/typescript/lib/lib.es2025.regexp.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.temporal.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/secrets-manager.ts","../src/utils/shell-quote.ts","../src/host-readiness.ts","../src/host.ts","../src/utils/constants.ts","../src/utils/stage-outputs.ts","../src/utils/parameterized-env-var-name.ts","../src/utils/run-local.ts","../src/servicedefinition.ts","../src/find-service-definition.ts","../src/get-saws-config.ts","../src/global-hosts.ts","../src/index.ts","../src/utils/create-directories.ts","../src/utils/create-file-if-not-exists.ts","../src/utils/file-exists.ts","../src/utils/dependency-management.ts","../src/utils/generate-token.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/@types/node/web-globals/blob.d.ts","../../../node_modules/@types/node/web-globals/console.d.ts","../../../node_modules/@types/node/web-globals/crypto.d.ts","../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/@types/node/web-globals/encoding.d.ts","../../../node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/undici-types/utility.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client-stats.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/round-robin-pool.d.ts","../../../node_modules/undici-types/h2c-client.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/dispatcher1-wrapper.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-call-history.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/snapshot-agent.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/socks5-proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cache-interceptor.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/@types/node/web-globals/importmeta.d.ts","../../../node_modules/@types/node/web-globals/messaging.d.ts","../../../node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/@types/node/web-globals/performance.d.ts","../../../node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/@types/node/web-globals/timers.d.ts","../../../node_modules/@types/node/web-globals/url.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/ffi.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/@types/node/inspector/promises.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/path/posix.d.ts","../../../node_modules/@types/node/path/win32.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/quic.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/iter.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/test/reporters.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/util/types.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/zlib/iter.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/find-package-json/package-json.d.ts","../../../node_modules/@types/find-package-json/index.d.ts","../src/utils/get-project-name.ts","../src/utils/get-service-path.ts","../src/utils/list-files.ts","../src/utils/on-exit.ts","../src/utils/recursively-read-dir.ts","../src/utils/retry-until.ts","../src/utils/uppercase.ts"],"fileIdsList":[[99,164,172,177,180,182,183,184,196,223,224],[99,164,172,177,180,182,183,184,196],[99,161,162,164,172,177,180,182,183,184,196],[99,163,164,172,177,180,182,183,184,196],[164,172,177,180,182,183,184,196],[99,164,172,177,180,182,183,184,196,205],[99,164,165,170,172,175,177,180,182,183,184,186,196,201,214],[99,164,165,166,172,175,177,180,182,183,184,196],[99,164,167,172,177,180,182,183,184,196,215],[99,164,168,169,172,177,180,182,183,184,187,196],[99,164,169,172,177,180,182,183,184,196,201,211],[99,164,170,172,175,177,180,182,183,184,186,196],[99,163,164,171,172,177,180,182,183,184,196],[99,164,172,173,177,180,182,183,184,196],[99,164,172,174,175,177,180,182,183,184,196],[99,163,164,172,175,177,180,182,183,184,196],[99,164,172,175,177,178,180,182,183,184,196,201,214],[99,164,172,175,177,178,180,182,183,184,196,201,203,205],[99,151,164,172,175,177,179,180,182,183,184,186,196,201,214],[99,164,172,175,177,179,180,182,183,184,186,196,201,211,214],[99,164,172,177,179,180,181,182,183,184,196,201,211,214],[98,99,100,101,102,103,104,105,106,107,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222],[99,164,172,175,177,180,182,183,184,196],[99,164,172,177,180,182,184,196],[99,164,172,177,180,182,183,184,185,196,214],[99,164,172,175,177,180,182,183,184,186,196,201],[99,164,172,177,180,182,183,184,187,196],[99,164,172,177,180,182,183,184,188,196],[99,164,172,175,177,180,182,183,184,191,196],[99,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221],[99,164,172,177,180,182,183,184,193,196],[99,164,172,177,180,182,183,184,194,196],[99,164,169,172,177,180,182,183,184,186,196,205],[99,164,172,175,177,180,182,183,184,196,197],[99,164,172,177,180,182,183,184,196,198,215,218],[99,164,172,175,177,180,182,183,184,196,201,203,204,205],[99,164,172,177,180,182,183,184,196,202,205],[99,164,172,175,177,180,182,183,184,196,201,203],[99,164,172,175,177,180,182,183,184,196,201,204,205],[99,164,172,177,180,182,183,184,196,205,215],[99,164,172,177,180,182,183,184,196,206],[99,161,164,172,177,180,182,183,184,196,201,208,214],[99,164,172,177,180,182,183,184,196,201,207],[99,164,172,175,177,180,182,183,184,196,209,210],[99,164,172,177,180,182,183,184,196,209,210],[99,164,169,172,177,180,182,183,184,186,196,201,211],[99,164,172,177,180,182,183,184,196,212],[99,164,172,177,180,182,183,184,186,196,213],[99,164,172,177,179,180,182,183,184,194,196,214],[99,164,172,177,180,182,183,184,196,215,216],[99,164,169,172,177,180,182,183,184,196,216],[99,164,172,177,180,182,183,184,196,201,217],[99,164,172,177,180,182,183,184,185,196,218],[99,164,172,177,180,182,183,184,196,219],[99,164,167,172,177,180,182,183,184,196],[99,164,169,172,177,180,182,183,184,196],[99,164,172,177,180,182,183,184,196,215],[99,151,164,172,177,180,182,183,184,196],[99,164,172,177,180,182,183,184,196,214],[99,164,172,177,180,182,183,184,196,220],[99,164,172,177,180,182,183,184,191,196],[99,164,172,177,180,182,183,184,196,210],[99,151,164,172,175,177,178,180,182,183,184,191,196,201,205,214,217,218,220],[99,164,172,177,180,182,183,184,196,201,221],[99,164,172,177,180,182,183,184,196,203,222],[99,114,117,120,121,164,172,177,180,182,183,184,196,214],[99,117,164,172,177,180,182,183,184,196,201,214],[99,117,121,164,172,177,180,182,183,184,196,214],[99,164,172,177,180,182,183,184,196,201],[99,111,164,172,177,180,182,183,184,196],[99,115,164,172,177,180,182,183,184,196],[99,113,114,117,164,172,177,180,182,183,184,196,214],[99,164,172,177,180,182,183,184,186,196,211],[99,164,172,177,180,182,183,184,196,223],[99,111,164,172,177,180,182,183,184,196,223],[99,113,117,164,172,177,180,182,183,184,186,196,214],[99,108,109,110,112,116,164,172,175,177,180,182,183,184,196,201,214],[99,117,164,172,177,180,182,183,184,196],[99,117,126,135,164,172,177,180,182,183,184,196],[99,109,115,164,172,177,180,182,183,184,196],[99,117,145,146,164,172,177,180,182,183,184,196],[99,109,112,117,164,172,177,180,182,183,184,196,205,214,223],[99,113,117,164,172,177,180,182,183,184,196,214],[99,108,164,172,177,180,182,183,184,196],[99,111,112,113,115,116,117,118,119,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,146,147,148,149,150,164,172,177,180,182,183,184,196],[99,117,138,141,164,172,177,180,182,183,184,196],[99,117,126,128,129,164,172,177,180,182,183,184,196],[99,115,117,128,130,164,172,177,180,182,183,184,196],[99,116,164,172,177,180,182,183,184,196],[99,109,111,117,164,172,177,180,182,183,184,196],[99,117,121,128,130,164,172,177,180,182,183,184,196],[99,121,164,172,177,180,182,183,184,196],[99,115,117,120,164,172,177,180,182,183,184,196,214],[99,109,113,117,126,164,172,177,180,182,183,184,196],[99,117,138,164,172,177,180,182,183,184,196],[99,130,164,172,177,180,182,183,184,196],[99,109,113,117,121,164,172,177,180,182,183,184,196],[99,111,117,145,164,172,177,180,182,183,184,196,205,220,223],[88,99,164,172,177,180,182,183,184,196],[88,99,164,172,177,180,182,183,184,188,196],[80,83,99,164,172,177,178,180,182,183,184,187,188,196],[81,99,164,169,172,177,180,182,183,184,196],[80,81,82,99,164,165,172,177,178,180,182,183,184,187,188,196,215],[80,82,83,88,89,90,91,99,164,172,177,180,182,183,184,196],[99,164,169,172,177,178,180,182,183,184,188,196],[80,85,86,87,99,164,172,177,180,182,183,184,188,196,201],[84,99,164,172,177,180,182,183,184,196],[99,164,172,177,178,180,182,183,184,196],[88,95,99,164,165,172,177,178,180,182,183,184,188,196],[99,164,172,177,180,182,183,184,196,225],[99,164,172,177,178,180,182,183,184,188,196],[88,99,164,165,172,177,180,182,183,184,196],[84,99,164,172,177,180,182,183,184,188,196]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"999ca32883495a866aa5737fe1babc764a469e4cde6ee6b136a4b9ae68853e4b","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"30d62269b05b584741f19a5369852d5d34895aa2ac4fd948956f886d15f9cc0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f128dae7c44d8f35ee42e0a437000a57c9f06cc04f8b4fb42eebf44954d53dc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"ffbe6d7b295306b2ba88030f65b74c107d8d99bdcf596ea99c62a02f606108b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"996fb27b15277369c68a4ba46ed138b4e9e839a02fb4ec756f7997629242fd9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"79b712591b270d4778c89706ca2cfc56ddb8c3f895840e477388f1710dc5eda9","affectsGlobalScope":true,"impliedFormat":1},{"version":"20884846cef428b992b9bd032e70a4ef88e349263f63aeddf04dda837a7dba26","affectsGlobalScope":true,"impliedFormat":1},{"version":"db59a81f070c1880ad645b2c0275022baa6a0c4f0acdc58d29d349c6efcf0903","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ffedae1d1c2d53fdbca1c96d3c7dda544281f7d262f99b6880634f8fd8d9820","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"643738bafba8c08d0006e6716ecbb01fa08b249199ea2195f89f688726a26501","signature":"ed03f7587c6405bca4aa5cd0e13c159ba6a38d29438bf368174cbc12b7952990","impliedFormat":99},{"version":"4e5ba26929fad27d017e7c6e73a0a52309708891a4fec74ab52f76790875acae","signature":"3fdb492c7902b3162a9fa765e5ce843a831b87bf6a47c1aa4b73056e39a2eb17","impliedFormat":99},{"version":"f0d4b72a03e0a99c579268555222212986b1257f925d5cceb99ab250770d0eca","signature":"d096b43d56e50a815348abdc7f505bff20b7326edd25d5ceab70be8ae550b216","impliedFormat":99},{"version":"b8c59c396d885f4221dddd9248304aaaa1f56d336f3a527863c67b4275abec1c","signature":"f4b14039ec5893b0c7691e5695493a13207b5a6e7ea07e9d58fe3f112e9e87fd","impliedFormat":99},{"version":"70d74136296a169735fee87a5cae8f5765fb40e8752ec72e843ec9d8873a38c6","signature":"d693828e1cf19776aa136f59fe66496ffc17137001a0e7a97dba3468d8eb1c11","impliedFormat":99},{"version":"9a69569c242401ab31a923440ed75bd8b7f18e6613adf172654887be32635d26","signature":"b507173a7718609bb52011f33e6fc61b0f3de62ec38c935b38dcfbb68223dea9","impliedFormat":99},{"version":"b197da4d60883c118a54f78cec3478b5221c60847f3bd1094a6179fdb447a804","signature":"49f2c62555d3f5877b6a995aea392f83f4badffc143e93de43d7827d5b4cc05f","impliedFormat":99},{"version":"b5fb79950e1e2a1d5deb63a769c110595f662b88419901dbba538caf76dc2ddd","signature":"d5af5a55477c977d5c969e0b57015847db4ef7444431770cabb0dc067c35b629","impliedFormat":99},{"version":"b5f69414273c43089f32842b26f7ec51588f8eadf569f749090664af19db99fb","signature":"c2c45e23c9ade84835e6589a92f4b1e0d959f4aad517ca2b9f306d505c8c186b","impliedFormat":99},{"version":"70b25cb6eff685f0b2e8917d9bd41bc996020f5454bfbbc98869e09318ad6c90","signature":"d5f72b73663996558032aae95128fd1c003dbc2a3c7c9616a4b9582885554547","impliedFormat":99},{"version":"cead2c9a032d61b4e67734e113d92f4ecf9d47741972eb12d79e87622b9dd350","signature":"db04ab7cf477c959b90d137c9150114e93ab293f7a82068813e62596e514c8b9","impliedFormat":99},{"version":"059e0ece06b7d1385e7bd53de09ac90dfa74b71a6d96d29f293f1256edb626f1","signature":"7e7edbefeefa7d89d7d0e3b51e4361ff4cbafd2f0b8691af8f00d4ec7a2d0dbb","impliedFormat":99},{"version":"b5a012b8d2b5aedaa0284247fe44638a60a00afb8a4727aa86567f401ae06b1d","impliedFormat":99},{"version":"5a030b089110f5207811abb45eb5c6fe68f6b61b8bfdd5ab6b28b5ee7b41c3e1","signature":"192f6fe16a3d6007464fef483a7a54256e97362c500dab7a42b2e665b53f3a58","impliedFormat":99},{"version":"9b699e18ec514539b2edc64b2b8d973c452cbb7d50aaf7539cfec00c90cc93bc","signature":"aa78957f3cff6c5a1911af33876bb677ab86060e6c692aaeb74573e9c39ba2ce","impliedFormat":99},{"version":"b53b6be0bea418c3de3fbc98016667df54be2d21349930981539309a555fb5b9","signature":"cb5c7d71525f231186e6533d1777efaca83cc03f270ba9f723ee8e4eb6e502d2","impliedFormat":99},{"version":"449a6ae67483f3beb0dd6deeb0a2867142324d3e67e4a7fc761db93483ee2607","signature":"f65327e250d4fbac1ad1b516c28c5ec07e112cde36839a71ff88712c0bf67a9e","impliedFormat":99},{"version":"e6605920f1efca92497c1c323a2a83257dc691e183183dd0671df8742199e909","signature":"2ef60d69fe8c32ed0c83ddd84118eefc4aa22219975774452ecaa9b0cdc38ba8","impliedFormat":99},{"version":"0ccdaa19852d25ecd84eec365c3bfa16e7859cadecf6e9ca6d0dbbbee439743f","affectsGlobalScope":true,"impliedFormat":1},{"version":"cc2110f7decca6bfb9392e30421cfa1436479e4a6756e8fec6cbc22625d4f881","affectsGlobalScope":true,"impliedFormat":1},{"version":"f53a7652392cf26ebbe4e29fd0672aa87c93bd6d0241289c13fab87b9ac35c8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5e01375c9e124a83b52ee4b3244ed1a4d214a6cfb54ac73e164a823a4a7860a","affectsGlobalScope":true,"impliedFormat":1},{"version":"f90ae2bbce1505e67f2f6502392e318f5714bae82d2d969185c4a6cecc8af2fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b58e207b93a8f1c88bbf2a95ddc686ac83962b13830fe8ad3f404ffc7051fb4","affectsGlobalScope":true,"impliedFormat":1},{"version":"1fefabcb2b06736a66d2904074d56268753654805e829989a46a0161cd8412c5","affectsGlobalScope":true,"impliedFormat":1},{"version":"b00a630557d1622ad312633bdbfbdb9c6b7220d948dca9f899db30679f160074","affectsGlobalScope":true,"impliedFormat":1},{"version":"c18a99f01eb788d849ad032b31cafd49de0b19e083fe775370834c5675d7df8e","affectsGlobalScope":true,"impliedFormat":1},{"version":"5247874c2a23b9a62d178ae84f2db6a1d54e6c9a2e7e057e178cc5eea13757fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"88809d6c1b9c78d04a133646a6feb926def05a8774c308c7c93bc32ee163d271","impliedFormat":1},{"version":"156a859e21ef3244d13afeeba4e49760a6afa035c149dda52f0c45ea8903b338","impliedFormat":1},{"version":"3ac40516c33b87f751f7507346933081a26cdb8a3e11a6b3aa07d23f803c85db","impliedFormat":1},{"version":"615754924717c0b1e293e083b83503c0a872717ad5aa60ed7f1a699eb1b4ea5c","impliedFormat":1},{"version":"14e9acf826baba0ef4b5665704084896e7bcc06f65a9ab13af7e93d27d6b7069","impliedFormat":1},{"version":"68834d631c8838c715f225509cfc3927913b9cc7a4870460b5b60c8dbdb99baf","impliedFormat":1},{"version":"829bc57ee8f287b490ab5bbc5a962fca57e432c1e38ec680ecd3ecaf12800613","impliedFormat":1},{"version":"eec76bf6b9346f3f95fa402621b889489e96930e72295b0369022f332e9b4a6a","impliedFormat":1},{"version":"3a3ff14da53d5013f3e6d8c4ad55225e3649c08786c4421ce639c00d8d589b7d","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"38004e6801340cb890afb8cb5a9fc8972297e7f88ab94026e4b0b3c61fb32f8a","impliedFormat":1},{"version":"d243db6b25788f439e7e2f03c05688e92f46764351673bb0e7b2f3631232e186","impliedFormat":1},{"version":"4d327f7d72ad0918275cea3eee49a6a8dc8114ae1d5b7f3f5d0774de75f7439a","impliedFormat":1},{"version":"149f9a9e7f04e67afa0e2a49fc0ff421035c01d6b793cfcae7d2e9f6819431e2","impliedFormat":1},{"version":"e8a9dfa4c75ef6d25df8b40eaa9c31e0a69452aaf2ced4a3f4215dbdbaa876f4","impliedFormat":1},{"version":"a70af845a2eb9dd6e2723e319e14ea7fb28b129ec1361c21509b49305448c323","impliedFormat":1},{"version":"b53dc572d4f187904207ae1166652de47aab8eeb00c254d009cb226863076b56","impliedFormat":1},{"version":"0a60a292b89ca7218b8616f78e5bbd1c96b87e048849469cccb4355e98af959a","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"9666f2f84b985b62400d2e5ab0adae9ff44de9b2a34803c2c5bd3c8325b17dc0","impliedFormat":1},{"version":"40cd35c95e9cf22cfa5bd84e96408b6fcbca55295f4ff822390abb11afbc3dca","impliedFormat":1},{"version":"b1616b8959bf557feb16369c6124a97a0e74ed6f49d1df73bb4b9ddf68acf3f3","impliedFormat":1},{"version":"f501234c5aeeeb5d7659412335227466aaacf30b952372d60afeb21c02c96348","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"9ac977503f15bf13ca7c82ad9a32a782f42d43e474824e8b3bffe228fd5f2639","impliedFormat":1},{"version":"8b91ff5bb912be3ea213cbcf0075aace1f5d4ff249a0d227ed673868cb7bfabc","impliedFormat":1},{"version":"80aae6afc67faa5ac0b32b5b8bc8cc9f7fa299cff15cf09cc2e11fd28c6ae29e","impliedFormat":1},{"version":"f473cd2288991ff3221165dcf73cd5d24da30391f87e85b3dd4d0450c787a391","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"8aee8b6d4f9f62cf3776cda1305fb18763e2aade7e13cea5bbe699112df85214","impliedFormat":1},{"version":"98498b101803bb3dde9f76a56e65c14b75db1cc8bec5f4db72be541570f74fc5","impliedFormat":1},{"version":"7cb4f431a4591b0e23002bed805dc871a874dfed6b9a3994dce68a6df73e6739","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"436d7b4543b340b0f3eef4310d524242e41369b9652aa9c70428767c4dcac455","impliedFormat":1},{"version":"adf27937dba6af9f08a68c5b1d3fce0ca7d4b960c57e6d6c844e7d1a8e53adae","impliedFormat":1},{"version":"12950411eeab8563b349cb7959543d92d8d02c289ed893d78499a19becb5a8cc","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"e99963ae1e3a48ca7a7958c02f3e88bb963eb7978c28b68ae6b8c9f03309d83c","impliedFormat":1},{"version":"c3f5289820990ab66b70c7fb5b63cb674001009ff84b13de40619619a9c8175f","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3275d55fac10b799c9546804126239baf020d220136163f763b55a74e50e750","affectsGlobalScope":true,"impliedFormat":1},{"version":"fa68a0a3b7cb32c00e39ee3cd31f8f15b80cac97dce51b6ee7fc14a1e8deb30b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1cf059eaf468efcc649f8cf6075d3cb98e9a35a0fe9c44419ec3d2f5428d7123","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c36e755bced82df7fb6ce8169265d0a7bb046ab4e2cb6d0da0cb72b22033e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a93de4ff8a63bafe62ba86b89af1df0ccb5e40bb85b0c67d6bbcfdcf96bf3d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"90e85f9bc549dfe2b5749b45fe734144e96cd5d04b38eae244028794e142a77e","affectsGlobalScope":true,"impliedFormat":1},{"version":"e0a5deeb610b2a50a6350bd23df6490036a1773a8a71d70f2f9549ab009e67ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"594ae90cacd813fa392ff80d2e0a8eff4e41f4a136329a940e321399dd8895b4","impliedFormat":1},{"version":"d1f333ade8ff35a409b4984e1f11956fe11c61855b0c7e9b59f0313e48b40c4a","impliedFormat":1},{"version":"0224aa4b3464895d69c413a640a19ac2166778a74eb5eb3b36b021c72d42b274","impliedFormat":1},{"version":"2e6fca0024dd8a076a886d9ec031a936ea59ad878a25b944820495d92f8381dd","affectsGlobalScope":true,"impliedFormat":1},{"version":"177459cba484e2f1e08872a3d2fdbca3162d9d43ca5ec9dc0c946835b55f74be","impliedFormat":1},{"version":"2fbf504c4791f9d32cd766cfe6b605bcda63289b925401953a7900db9af85348","impliedFormat":1},{"version":"ed0fb633cae35948d9e144004299a4bdf1ab912667c787b7fbffcd6d8c7b92a2","impliedFormat":1},{"version":"1678b04557dca52feab73cc67610918a7f5e25bfdba3e7fa081acd625d93106d","impliedFormat":1},{"version":"0e312260895afc9de021ce9de3c8a857392f0ccc7f19d3a030e4d6136a4ac91e","impliedFormat":1},{"version":"2ea729503db9793f2691162fec3dd1118cab62e96d025f8eeb376d43ec293395","impliedFormat":1},{"version":"98fc7231d6c846a8ed19bdef026ddffe5e2182cc818be74899287421ad370a87","impliedFormat":1},{"version":"3a40b5d34e014017539acb92f04cf2bc0aa71e49efb33c66039df93be97842a1","impliedFormat":1},{"version":"2bc7aa4fba46df0bd495425a7c8201437a7d465f83854fac859df2d67f664df3","impliedFormat":1},{"version":"41d17e1ad9a002feb11c8cdd2777e5bbc0cdb1e3f595d237e4dded0b6949983b","impliedFormat":1},{"version":"8c7e618c2a91ea7f6b5cca272a295864e92c16413be8fc56a943e8c7d5320011","affectsGlobalScope":true,"impliedFormat":1},{"version":"79a85c64bf083c5f4dd7074e804d1000c0c47301b84d48417a224decd681be30","impliedFormat":1},{"version":"9f1e3a76d5f509b5579e567de522b402cb79e201c4f47dcd014451c0580b290d","impliedFormat":1},{"version":"2ddab5b6932f9a6327f71baeb82a1d6b0824e0d23a4c7a5de5d355857113c22f","impliedFormat":1},{"version":"70f3f8b2dcaf7388f26731a59c79437813e3620b594903525a303cb2a7901016","impliedFormat":1},{"version":"62e8f884c3bc6dff6189b6e662ebe8b238a645938f2df7a97b8a82fca56773a4","impliedFormat":1},{"version":"2c2bdaa1d8ead9f68628d6d9d250e46ee8e81aa4898b4769a36956ae15e060fe","impliedFormat":1},{"version":"57a0d1b3d59063d4af2d3f8aac27cfe3c20a0f5d1faf0f8598ccf0b779637939","impliedFormat":1},{"version":"5ff4433a2deae4f85ab1377e90a7554ce6b47ae51c69a84ca30a6e22fae85834","impliedFormat":1},{"version":"82b91e4e42e6c41bc7fc1b6c2dc5eba6a2ba98375eb1f210e6ff6bba2d54177e","impliedFormat":1},{"version":"97234c5303866576f913d0ccae7d58d6322d9e803c7bf1228a3fda46ab8087b2","affectsGlobalScope":true,"impliedFormat":1},{"version":"93ecf87143cac7b9d05cffc1d6bdc075b7e4fdd48ff05f1fad85043f6ae678d3","impliedFormat":1},{"version":"6f200afcb82b3e9a54bed6db23f2edf2508cd266801257312c0f124b47f2bdb9","impliedFormat":1},{"version":"ec501101c2a96133a6c695f934c8f6642149cc728571b29cbb7b770984c1088e","impliedFormat":1},{"version":"b214ebcf76c51b115453f69729ee8aa7b7f8eccdae2a922b568a45c2d7ff52f7","impliedFormat":1},{"version":"429c9cdfa7d126255779efd7e6d9057ced2d69c81859bbab32073bad52e9ba76","impliedFormat":1},{"version":"39338f84e8c4d0e3de7b3c4a7024fb3925f42100eed5cbe73be58902799dff4d","impliedFormat":1},{"version":"fbf83eb33bf5e329527add92acc65da59323876c702ddccf5f4bf1e848c92369","affectsGlobalScope":true,"impliedFormat":1},{"version":"230763250f20449fa7b3c9273e1967adb0023dc890d4be1553faca658ee65971","impliedFormat":1},{"version":"c3e9078b60cb329d1221f5878e88cecfa3e74460550e605a58fcfb41a66029ff","impliedFormat":1},{"version":"515318bc6e656f75e9e34db625316bfafbafd800dfb1642574af93735a24ad38","impliedFormat":1},{"version":"441b9bb09013654aa3d050e68b06464d8959b473e85868249d9d18f692acd35b","impliedFormat":1},{"version":"bc18a1991ba681f03e13285fa1d7b99b03b67ee671b7bc936254467177543890","impliedFormat":1},{"version":"55246f15e33ff1e2e9e679b25fa9790a48db55dc63d567fe25fac8b6a0efe911","impliedFormat":1},{"version":"fa94bbf532b7af8f394b95fa310980d6e20bd2d4c871c6a6cb9f70f03750a44b","impliedFormat":1},{"version":"03b7804d69cecd66850abada858ed6d4a59001f8c228a9fe212306ee860a4ff6","impliedFormat":1},{"version":"5b26c4dd672d88336bb929787c9bfb55119e80ba89ec6dc923da1c063892843e","affectsGlobalScope":true,"impliedFormat":1},{"version":"7fa2214bb0d64701bc6f9ce8cde2fd2ff8c571e0b23065fa04a8a5a6beb91511","impliedFormat":1},{"version":"987fd1f85dc36f4b2c927aa3db814ac6b452e970f4f55d24ed4ecbb7df09be00","impliedFormat":1},{"version":"f12624a4a8d042b68914eac1b0a16571fc1c523173fcdf2517c65d191bd5a86c","impliedFormat":1},{"version":"b4769767f13a1692a66186e01c3aa186ff808d5ff72ed36eda8c37738fb2ac92","impliedFormat":1},{"version":"841983e39bd4cbb463be385e92fda11057cab368bf27100a801c492f1d86cbaa","impliedFormat":1},{"version":"683edfc4f2b411ebe04729cb6dc09ddd26fbac2c57771a6d7c55964af776e176","impliedFormat":1},{"version":"1ec3f3a5f04cc42df33274fbe5c0937d9a9e06f249a7a26288d7d54f0763ffd4","impliedFormat":1},{"version":"e4156ddb25aa0e3b5303d372f26957b36778f0f6bbd4326359269873295e3058","affectsGlobalScope":true,"impliedFormat":1},{"version":"cc1b433a84cae05ddc5672d4823170af78606ad21ecef60dbc4570190cbf1357","impliedFormat":1},{"version":"e47f532d6e1617833f13a5b0710c0089d402c89c2f2b54f324e5a20e418d287a","impliedFormat":1},{"version":"7f78cfb2b343838612c192cb251746e3a7c62ac7675726a47e130d9b213f6580","impliedFormat":1},{"version":"201db9cf1687fab1adf5282fcba861f382b32303dc4f67c89d59655e78a25461","impliedFormat":1},{"version":"8e2577e7262051fd3c5bd6ca2b2056d358ff8853565720f92455860824c25188","impliedFormat":1},{"version":"7ec8d7d483f7394f9da611b10d3a0e402f76ff5c991261e6ce43a15f81ca4258","impliedFormat":1},{"version":"bb9dbb4b2ad81e3e71ec5ba4314973718555b9d04ba2a17dfbf875efecb8e2c0","impliedFormat":1},{"version":"82c3cc48c692438e41b94d936b8acd75ca97b18c50fa1af8a0715eb9d07d18cd","impliedFormat":1},{"version":"045a210189ec63c5488410b33f9fca53d77d051599d0d6506d8048551399c5f3","impliedFormat":1},{"version":"99ab6d0d660ce4d21efb52288a39fd35bb3f556980ec5463b1ae8f304a3bbc85","impliedFormat":1},{"version":"632c45ccb4cdc2c3a80c7a36a63dd7763016e59cac5e07bfb3e37e3548957028","impliedFormat":1},{"version":"c9a2daf6cd1eb854cd5b9e424247c5e306692055738c2effd35f7871d942b76e","impliedFormat":1},{"version":"afa1c49f8e559e413d57343339db857d2a8159435cf9cf7d4deb41718fff1b88","impliedFormat":1},{"version":"e50a7130339a951e6da9e968ed5521b0997a5b0479e148914087213839b5474c","impliedFormat":1},{"version":"990db7c9743d636fd3b2820ec8c40b512879da4c82e00488e7a352e2d005fc39","impliedFormat":1},{"version":"f091ed534c92e6408336f94323ecfe1890c0b5e0166154120712ed97ac9754a1","impliedFormat":1},{"version":"22c9738388e99cea7651e60108a6b7a739bc7d2d9f4e77d0dc3d9c1bc5010cb0","signature":"2d41b78352b1d572e3b8f44852bf7f7876efe4ba196a561c16368b9e1a905567","impliedFormat":99},{"version":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":99},{"version":"2594bd3d4bbe870b0aed862e9eb19a9dd32a1e0629a27f2841029412709ad653","signature":"fb0a438a65acb111212232a8daf7138ca1895daf1195839af168f3f528186970","impliedFormat":99},{"version":"fa8489d06c1bfe02503347278104c26f44d984c6aaf9535065d64ded705aca30","signature":"19426460ff98d38db8946aaae2086ba739c2f29c53136d27c434c0668e8f2c29","impliedFormat":99},{"version":"2c945878fdfed391a8b70c68b0ac205cb3bdd393053b26e34eee7d3e47ba413e","signature":"5f8414bf3647abe8ff4d1eed585fe1bd961fdf8eb2062ea30880d8c806a74282","impliedFormat":99},{"version":"9578b80a1d90d39b44ae9ff0b5c2957ff9ca443005953885a02f45bdd2d002cd","signature":"7c157287559c190229ebd0ad0c9dd0cae2e5c8b110e571902cf697870bee99d3","impliedFormat":99},{"version":"779cf4aa0424227d5f08d99fb63bfa9cebd56df743216ca447911202e96e2839","signature":"d0c9b629447d76788e8c9ffd657c0e34e3a0f012e2251e860b1177be91488f3d","impliedFormat":99}],"root":[[80,97],[226,232]],"options":{"composite":true,"esModuleInterop":true,"module":199,"outDir":"./","rootDir":"../src","skipLibCheck":true,"target":12,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[225,1],[224,2],[161,3],[162,3],[163,4],[99,5],[164,6],[165,7],[166,8],[167,9],[168,10],[169,11],[170,12],[171,13],[172,14],[173,14],[174,15],[175,16],[176,2],[177,17],[178,18],[100,2],[98,2],[179,19],[180,20],[181,21],[223,22],[182,23],[183,24],[184,23],[185,25],[186,26],[187,27],[188,28],[189,28],[190,28],[191,29],[192,30],[193,31],[194,32],[195,33],[196,34],[197,34],[198,35],[199,2],[200,2],[201,36],[202,37],[203,38],[204,39],[205,40],[206,41],[207,42],[208,43],[209,44],[210,45],[211,46],[212,47],[213,48],[214,49],[215,50],[216,51],[217,52],[218,53],[219,54],[101,23],[102,2],[103,55],[104,56],[105,2],[106,57],[107,2],[152,58],[153,59],[154,60],[155,60],[156,61],[157,2],[158,6],[159,62],[160,59],[220,63],[221,64],[222,65],[78,2],[79,2],[14,2],[13,2],[2,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[21,2],[22,2],[3,2],[23,2],[24,2],[4,2],[25,2],[29,2],[26,2],[27,2],[28,2],[30,2],[31,2],[32,2],[5,2],[33,2],[34,2],[35,2],[36,2],[6,2],[40,2],[37,2],[38,2],[39,2],[41,2],[7,2],[42,2],[47,2],[48,2],[43,2],[44,2],[45,2],[46,2],[8,2],[52,2],[49,2],[50,2],[51,2],[53,2],[9,2],[54,2],[55,2],[56,2],[58,2],[57,2],[59,2],[60,2],[10,2],[61,2],[62,2],[63,2],[11,2],[64,2],[65,2],[66,2],[67,2],[68,2],[69,2],[12,2],[70,2],[71,2],[72,2],[73,2],[74,2],[1,2],[75,2],[76,2],[77,2],[126,66],[140,67],[123,68],[141,69],[150,70],[114,71],[115,72],[113,73],[149,74],[144,75],[148,76],[117,77],[127,78],[137,79],[116,80],[147,81],[111,82],[112,75],[118,78],[119,2],[125,83],[122,78],[109,84],[151,85],[142,86],[130,87],[129,78],[131,88],[134,89],[128,90],[132,91],[145,74],[120,92],[121,93],[135,94],[110,69],[139,95],[138,78],[124,93],[133,96],[136,97],[143,2],[108,2],[146,98],[89,99],[90,100],[91,101],[82,102],[83,103],[92,104],[80,105],[88,106],[84,28],[93,107],[94,108],[96,109],[95,108],[97,56],[226,110],[227,2],[228,111],[229,2],[86,2],[230,28],[231,2],[87,112],[81,2],[85,113],[232,2]],"latestChangedDtsFile":"./global-hosts.d.ts","version":"6.0.3"}
package/dist/Host.d.ts ADDED
@@ -0,0 +1,62 @@
1
+ import type { SecretReference } from "./secrets-manager.js";
2
+ import { type HostExposure } from "./host-readiness.js";
3
+ export type HostPlatform = `${string}/${string}` | `${string}/${string}/${string}`;
4
+ export interface HostConfig {
5
+ name: string;
6
+ address: string;
7
+ /** Persistent account used for normal deployment operations. */
8
+ user: string;
9
+ /** Global encrypted secret containing this host's Ed25519 private key. */
10
+ sshPrivateKey?: SecretReference;
11
+ sshPort?: number;
12
+ /**
13
+ * How applications on this host are reached. Tunnel mode permits no public
14
+ * application ports; public mode permits allowedTcpPorts.
15
+ */
16
+ exposure?: HostExposure;
17
+ /** Public TCP ports permitted in addition to SSH. Defaults to 80/443. */
18
+ allowedTcpPorts?: number[];
19
+ /** Docker image platform to build for this host, such as "linux/amd64". */
20
+ platform?: HostPlatform;
21
+ dryRun?: boolean;
22
+ }
23
+ export interface HostExecOptions {
24
+ dryRun?: boolean;
25
+ /** Bytes written to the remote command's standard input. Never logged. */
26
+ input?: string;
27
+ }
28
+ export interface ConfigureHostOptions {
29
+ /** Existing account used only to bootstrap the deployment account. */
30
+ bootstrapUser: string;
31
+ deploymentPublicKey: string;
32
+ dryRun?: boolean;
33
+ }
34
+ export declare class Host {
35
+ readonly name: string;
36
+ readonly address: string;
37
+ readonly user: string;
38
+ readonly sshPrivateKey?: SecretReference;
39
+ readonly sshPort: number;
40
+ readonly exposure: HostExposure;
41
+ readonly allowedTcpPorts: number[];
42
+ readonly platform?: HostPlatform;
43
+ readonly dryRun: boolean;
44
+ private readinessVerified;
45
+ constructor(config: HostConfig);
46
+ get sshTarget(): string;
47
+ exec(command: string, options?: HostExecOptions): Promise<void>;
48
+ copyFile(localPath: string, remotePath: string, options?: {
49
+ dryRun?: boolean;
50
+ }): Promise<void>;
51
+ shellQuote(value: string): string;
52
+ assertReady(options?: {
53
+ dryRun?: boolean;
54
+ }): Promise<void>;
55
+ configure(options: ConfigureHostOptions): Promise<void>;
56
+ private get readinessConfig();
57
+ private sshArgs;
58
+ private withPrivateKey;
59
+ private getDeploymentPublicKey;
60
+ }
61
+ export declare function hostSshPrivateKeySecretName(hostName: string): string;
62
+ export declare function hostSshPublicKeyEnvName(hostName: string): string;
package/dist/Host.js ADDED
@@ -0,0 +1,202 @@
1
+ import { execFile, spawn } from "node:child_process";
2
+ import { mkdtemp, rm, writeFile } from "node:fs/promises";
3
+ import { tmpdir } from "node:os";
4
+ import path from "node:path";
5
+ import { promisify } from "node:util";
6
+ import { shellQuote as quoteShell } from "./utils/shell-quote.js";
7
+ import { readinessCheckScript, readinessConfigureScript, } from "./host-readiness.js";
8
+ export class Host {
9
+ name;
10
+ address;
11
+ user;
12
+ sshPrivateKey;
13
+ sshPort;
14
+ exposure;
15
+ allowedTcpPorts;
16
+ platform;
17
+ dryRun;
18
+ readinessVerified = false;
19
+ constructor(config) {
20
+ this.name = requireNonempty(config.name, "Host name");
21
+ this.address = requireNonempty(config.address, "Host address");
22
+ this.user = requireDeploymentUser(config.user);
23
+ if (config.sshPrivateKey != null && config.sshPrivateKey.scope !== "global") {
24
+ throw new Error(`Host "${this.name}" sshPrivateKey must reference a global secret`);
25
+ }
26
+ this.sshPrivateKey = config.sshPrivateKey;
27
+ this.sshPort = config.sshPort ?? 22;
28
+ if (!Number.isInteger(this.sshPort) || this.sshPort < 1 || this.sshPort > 65_535) {
29
+ throw new Error("sshPort must be a valid TCP port");
30
+ }
31
+ this.exposure = config.exposure ?? "tunnel";
32
+ if (this.exposure !== "tunnel" && this.exposure !== "public") {
33
+ throw new Error('exposure must be either "tunnel" or "public"');
34
+ }
35
+ this.allowedTcpPorts = uniquePorts(config.allowedTcpPorts ?? (this.exposure === "public" ? [80, 443] : []));
36
+ if (this.exposure === "tunnel" && this.allowedTcpPorts.length > 0) {
37
+ throw new Error(`Host "${config.name}" cannot allow public TCP ports in tunnel mode`);
38
+ }
39
+ this.platform =
40
+ config.platform == null ? undefined : requireDockerPlatform(config.platform, "Host platform");
41
+ this.dryRun = config.dryRun ?? false;
42
+ }
43
+ get sshTarget() {
44
+ return `${this.user}@${this.address}`;
45
+ }
46
+ async exec(command, options = {}) {
47
+ if (options.dryRun || this.dryRun) {
48
+ console.log(`[dry-run:${this.name}] ssh ${this.sshTarget} ${command}`);
49
+ return;
50
+ }
51
+ await this.withPrivateKey((keyPath) => run("ssh", [...this.sshArgs("ssh", keyPath), this.sshTarget, command], {
52
+ input: options.input,
53
+ }));
54
+ }
55
+ async copyFile(localPath, remotePath, options = {}) {
56
+ if (options.dryRun || this.dryRun) {
57
+ console.log(`[dry-run:${this.name}] scp ${localPath} ${this.sshTarget}:${remotePath}`);
58
+ return;
59
+ }
60
+ await this.withPrivateKey((keyPath) => run("scp", [...this.sshArgs("scp", keyPath), localPath, `${this.sshTarget}:${remotePath}`]));
61
+ }
62
+ shellQuote(value) {
63
+ return quoteShell(value);
64
+ }
65
+ async assertReady(options = {}) {
66
+ if (this.readinessVerified)
67
+ return;
68
+ const deploymentPublicKey = options.dryRun || this.dryRun ? "" : await this.getDeploymentPublicKey();
69
+ await this.exec(readinessCheckScript({
70
+ ...this.readinessConfig,
71
+ deploymentPublicKey,
72
+ }), options);
73
+ if (!options.dryRun && !this.dryRun)
74
+ this.readinessVerified = true;
75
+ }
76
+ async configure(options) {
77
+ const bootstrapUser = requireLinuxUser(options.bootstrapUser, "Bootstrap user");
78
+ const deploymentPublicKey = requireNonempty(options.deploymentPublicKey, "Deployment public key");
79
+ const bootstrapTarget = `${bootstrapUser}@${this.address}`;
80
+ if (options.dryRun || this.dryRun) {
81
+ console.log(`[dry-run:${this.name}] configure ${bootstrapTarget} for deployment user ${this.user}`);
82
+ return;
83
+ }
84
+ const script = readinessConfigureScript({
85
+ ...this.readinessConfig,
86
+ deploymentPublicKey,
87
+ });
88
+ const command = bootstrapUser === "root"
89
+ ? `sh -eu -c ${this.shellQuote(script)}`
90
+ : `sudo sh -eu -c ${this.shellQuote(script)}`;
91
+ await run("ssh", [
92
+ ...(bootstrapUser === "root" ? [] : ["-tt"]),
93
+ ...this.sshArgs("ssh"),
94
+ bootstrapTarget,
95
+ command,
96
+ ], { sensitiveArgs: true });
97
+ this.readinessVerified = false;
98
+ }
99
+ get readinessConfig() {
100
+ return {
101
+ name: this.name,
102
+ deploymentUser: this.user,
103
+ deploymentPublicKey: "",
104
+ exposure: this.exposure,
105
+ sshPort: this.sshPort,
106
+ allowedTcpPorts: this.allowedTcpPorts,
107
+ };
108
+ }
109
+ sshArgs(command = "ssh", keyPath) {
110
+ const portFlag = command === "scp" ? "-P" : "-p";
111
+ return [
112
+ ...(keyPath == null
113
+ ? []
114
+ : ["-i", keyPath, "-o", "BatchMode=yes", "-o", "IdentitiesOnly=yes"]),
115
+ portFlag,
116
+ String(this.sshPort),
117
+ ];
118
+ }
119
+ async withPrivateKey(callback) {
120
+ if (this.sshPrivateKey == null) {
121
+ throw new Error(`Host "${this.name}" does not have a global SSH private-key reference`);
122
+ }
123
+ const directory = await mkdtemp(path.join(tmpdir(), "saws-host-"));
124
+ const keyPath = path.join(directory, "id_ed25519");
125
+ try {
126
+ const privateKey = await this.sshPrivateKey.resolve();
127
+ await writeFile(keyPath, privateKey, { mode: 0o600 });
128
+ return await callback(keyPath);
129
+ }
130
+ finally {
131
+ await rm(directory, { recursive: true, force: true });
132
+ }
133
+ }
134
+ async getDeploymentPublicKey() {
135
+ return this.withPrivateKey(async (keyPath) => {
136
+ const { stdout } = await execFileAsync("ssh-keygen", ["-y", "-f", keyPath]);
137
+ return requireNonempty(stdout.trim(), "Derived deployment public key");
138
+ });
139
+ }
140
+ }
141
+ export function hostSshPrivateKeySecretName(hostName) {
142
+ return `host-${requireNonempty(hostName, "Host name")}-ssh-private-key`;
143
+ }
144
+ export function hostSshPublicKeyEnvName(hostName) {
145
+ const normalized = requireNonempty(hostName, "Host name")
146
+ .replaceAll(/[^a-zA-Z0-9]/g, "_")
147
+ .toUpperCase();
148
+ return `SAWS_HOST_${normalized}_SSH_PUBLIC_KEY`;
149
+ }
150
+ function uniquePorts(ports) {
151
+ return [
152
+ ...new Set(ports.map((port) => {
153
+ if (!Number.isInteger(port) || port < 1 || port > 65_535) {
154
+ throw new Error("allowedTcpPorts must contain valid TCP ports");
155
+ }
156
+ return port;
157
+ })),
158
+ ].sort((left, right) => left - right);
159
+ }
160
+ async function run(command, args, options = {}) {
161
+ await new Promise((resolve, reject) => {
162
+ const child = spawn(command, args, {
163
+ stdio: options.input == null ? "inherit" : ["pipe", "inherit", "inherit"],
164
+ });
165
+ if (options.input != null) {
166
+ child.stdin?.end(options.input);
167
+ }
168
+ child.on("error", reject);
169
+ child.on("exit", (code) => {
170
+ if (code === 0) {
171
+ resolve();
172
+ return;
173
+ }
174
+ reject(new Error(options.sensitiveArgs
175
+ ? `${command} host configuration exited with code ${code}`
176
+ : `${command} exited with code ${code}`));
177
+ });
178
+ });
179
+ }
180
+ function requireNonempty(value, label) {
181
+ if (value.trim().length === 0)
182
+ throw new Error(`${label} cannot be empty`);
183
+ return value;
184
+ }
185
+ function requireDeploymentUser(user) {
186
+ return requireLinuxUser(user, "Host deployment user");
187
+ }
188
+ function requireLinuxUser(user, label) {
189
+ requireNonempty(user, label);
190
+ if (!/^[a-z_][a-z0-9_-]*[$]?$/i.test(user)) {
191
+ throw new Error(`${label} is not a valid Linux username`);
192
+ }
193
+ return user;
194
+ }
195
+ function requireDockerPlatform(platform, label) {
196
+ requireNonempty(platform, label);
197
+ if (!/^[a-z0-9]+(?:[._-][a-z0-9]+)*\/[a-z0-9]+(?:[._-][a-z0-9]+)*(?:\/[a-z0-9]+(?:[._-][a-z0-9]+)*)?$/.test(platform)) {
198
+ throw new Error(`${label} must be a Docker platform like "linux/amd64"`);
199
+ }
200
+ return platform;
201
+ }
202
+ const execFileAsync = promisify(execFile);
@@ -0,0 +1,66 @@
1
+ import { Readable } from "node:stream";
2
+ import { type Outputs } from "./utils/stage-outputs.js";
3
+ import { SecretReference } from "./secrets-manager.js";
4
+ export interface RuntimeLogEntry {
5
+ serviceName: string;
6
+ stream: "stdout" | "stderr";
7
+ chunk: string;
8
+ timestamp: Date;
9
+ }
10
+ export type RuntimeLogSink = (entry: RuntimeLogEntry) => void;
11
+ export type ServiceEnvironmentVariableValue = string | SecretReference;
12
+ export type ServiceEnvironmentTarget = "container" | "host";
13
+ export interface ServiceHookContext {
14
+ signal: AbortSignal;
15
+ log(chunk: string, stream?: "stdout" | "stderr"): void;
16
+ }
17
+ export type ServiceHook = string | ((context: ServiceHookContext) => Promise<void>);
18
+ export type StageEnvironmentVariables = Record<string, Record<string, ServiceEnvironmentVariableValue>>;
19
+ export interface ServiceDefinitionConfig {
20
+ name: string;
21
+ dependencies?: ServiceDefinition[];
22
+ environment?: StageEnvironmentVariables;
23
+ /** Commands or functions to run before this service starts in local development. */
24
+ onDev?: ServiceHook[];
25
+ /** Commands or functions to run locally before this service is deployed. */
26
+ onDeploy?: ServiceHook[];
27
+ }
28
+ export declare class ServiceDefinition {
29
+ name: string;
30
+ dependencies: ServiceDefinition[];
31
+ readonly environment: StageEnvironmentVariables;
32
+ readonly onDev: ServiceHook[];
33
+ readonly onDeploy: ServiceHook[];
34
+ outputs: Outputs;
35
+ deved: boolean;
36
+ deployed: boolean;
37
+ private runtimeLogSink?;
38
+ private readonly onDevAbortController;
39
+ constructor(config: ServiceDefinitionConfig);
40
+ init(): Promise<void>;
41
+ dev(): Promise<void>;
42
+ deploy(stage: string): Promise<void>;
43
+ logs(_stage: string): Promise<void>;
44
+ setRuntimeLogSink(sink: RuntimeLogSink | undefined): void;
45
+ protected writeRuntimeLog(chunk: string, stream?: "stdout" | "stderr"): void;
46
+ protected getRuntimeLogSink(): RuntimeLogSink | undefined;
47
+ getOutputs(): Outputs;
48
+ setOutputs(outputs: Outputs, stage: string): Promise<void>;
49
+ forEachDependency(callback: (serviceDefinition: ServiceDefinition) => void): void;
50
+ forEachDependencyAsync(callback: (serviceDefinition: ServiceDefinition) => Promise<void>): Promise<void>;
51
+ getAllDependencies(): ServiceDefinition[];
52
+ getOnDevLogTabs(): string[];
53
+ exit(): void;
54
+ parameterizedEnvVarName(envVarName: string): string;
55
+ getEnvironmentVariables(stage: string, _target?: ServiceEnvironmentTarget): Promise<Record<string, string>>;
56
+ getDependenciesEnvironmentVariables(stage: string, target?: ServiceEnvironmentTarget): Promise<Record<string, string>>;
57
+ protected getStageEnvironmentVariables(stage: string): Promise<Record<string, string>>;
58
+ getStdOut(): Readable | null | undefined;
59
+ getStdErr(): Readable | null | undefined;
60
+ private runHooks;
61
+ private startDevHooks;
62
+ private runHook;
63
+ private writeHookLog;
64
+ private getServiceDirectory;
65
+ private getHookLogTabName;
66
+ }
@@ -0,0 +1,182 @@
1
+ import path from "node:path";
2
+ import { writeStageOutputs } from "./utils/stage-outputs.js";
3
+ import { parameterizedEnvVarName } from "./utils/parameterized-env-var-name.js";
4
+ import { runLocal } from "./utils/run-local.js";
5
+ import { SecretReference } from "./secrets-manager.js";
6
+ export class ServiceDefinition {
7
+ name;
8
+ dependencies;
9
+ environment;
10
+ onDev;
11
+ onDeploy;
12
+ outputs = {};
13
+ deved = false;
14
+ deployed = false;
15
+ runtimeLogSink;
16
+ onDevAbortController = new AbortController();
17
+ constructor(config) {
18
+ this.name = config.name;
19
+ this.dependencies = config.dependencies ?? [];
20
+ this.environment = config.environment ?? {};
21
+ this.onDev = config.onDev ?? [];
22
+ this.onDeploy = config.onDeploy ?? [];
23
+ }
24
+ async init() {
25
+ return;
26
+ }
27
+ async dev() {
28
+ this.writeRuntimeLog(`Start dev ${this.name}\n`);
29
+ await this.forEachDependencyAsync(async (dependency) => {
30
+ if (dependency.deved)
31
+ return;
32
+ await dependency.dev();
33
+ dependency.deved = true;
34
+ });
35
+ this.startDevHooks();
36
+ }
37
+ async deploy(stage) {
38
+ console.log("Start deploy", this.name);
39
+ await this.forEachDependencyAsync(async (dependency) => {
40
+ if (dependency.deployed)
41
+ return;
42
+ await dependency.deploy(stage);
43
+ dependency.deployed = true;
44
+ });
45
+ await this.runHooks(this.onDeploy, "onDeploy");
46
+ }
47
+ async logs(_stage) {
48
+ return;
49
+ }
50
+ setRuntimeLogSink(sink) {
51
+ this.runtimeLogSink = sink;
52
+ this.forEachDependency((dependency) => dependency.setRuntimeLogSink(sink));
53
+ }
54
+ writeRuntimeLog(chunk, stream = "stdout") {
55
+ if (this.runtimeLogSink == null) {
56
+ const output = stream === "stderr" ? process.stderr : process.stdout;
57
+ output.write(chunk);
58
+ return;
59
+ }
60
+ this.runtimeLogSink({
61
+ serviceName: this.name,
62
+ stream,
63
+ chunk,
64
+ timestamp: new Date(),
65
+ });
66
+ }
67
+ getRuntimeLogSink() {
68
+ return this.runtimeLogSink;
69
+ }
70
+ getOutputs() {
71
+ return this.outputs;
72
+ }
73
+ async setOutputs(outputs, stage) {
74
+ this.outputs = {
75
+ ...this.outputs,
76
+ ...outputs,
77
+ };
78
+ await writeStageOutputs({
79
+ [this.name]: this.outputs,
80
+ }, stage);
81
+ }
82
+ forEachDependency(callback) {
83
+ for (const dependency of this.dependencies) {
84
+ callback(dependency);
85
+ }
86
+ }
87
+ async forEachDependencyAsync(callback) {
88
+ for (const dependency of this.dependencies) {
89
+ await callback(dependency);
90
+ }
91
+ }
92
+ getAllDependencies() {
93
+ const all = [this];
94
+ for (const dependency of this.dependencies) {
95
+ all.push(dependency);
96
+ all.push(...dependency.getAllDependencies());
97
+ }
98
+ return all;
99
+ }
100
+ getOnDevLogTabs() {
101
+ return this.onDev.map((hook, index) => this.getHookLogTabName("onDev", index, hook));
102
+ }
103
+ // this needs to be recursive down dependencies
104
+ exit() {
105
+ this.onDevAbortController.abort();
106
+ this.forEachDependency((dependency) => dependency.exit());
107
+ }
108
+ parameterizedEnvVarName(envVarName) {
109
+ return parameterizedEnvVarName(this.name, envVarName);
110
+ }
111
+ // this needs to be recursive down dependencies
112
+ async getEnvironmentVariables(stage, _target = "container") {
113
+ return {};
114
+ }
115
+ async getDependenciesEnvironmentVariables(stage, target = "container") {
116
+ const environmentVariables = {};
117
+ await this.forEachDependencyAsync(async (definition) => {
118
+ Object.assign(environmentVariables, await definition.getEnvironmentVariables(stage, target));
119
+ });
120
+ return environmentVariables;
121
+ }
122
+ async getStageEnvironmentVariables(stage) {
123
+ const environment = this.environment[stage] ?? {};
124
+ return Object.fromEntries(await Promise.all(Object.entries(environment).map(async ([name, value]) => [
125
+ name,
126
+ value instanceof SecretReference ? await value.resolve({ stage }) : value,
127
+ ])));
128
+ }
129
+ getStdOut() {
130
+ return null;
131
+ }
132
+ getStdErr() {
133
+ return null;
134
+ }
135
+ async runHooks(hooks, hookName) {
136
+ await Promise.all(hooks.map((hook, index) => this.runHook(hook, hookName, index)));
137
+ }
138
+ startDevHooks() {
139
+ for (const [index, hook] of this.onDev.entries()) {
140
+ void this.runHook(hook, "onDev", index, this.onDevAbortController.signal).catch((error) => {
141
+ if (this.onDevAbortController.signal.aborted)
142
+ return;
143
+ this.writeHookLog(this.getHookLogTabName("onDev", index, hook), `${error.message}\n`, "stderr");
144
+ });
145
+ }
146
+ }
147
+ async runHook(hook, hookName, index, signal = new AbortController().signal) {
148
+ const serviceName = this.getHookLogTabName(hookName, index, hook);
149
+ if (typeof hook === "function") {
150
+ await hook({
151
+ signal,
152
+ log: (chunk, stream = "stdout") => this.writeHookLog(serviceName, chunk, stream),
153
+ });
154
+ return;
155
+ }
156
+ await runLocal(hook, {
157
+ cwd: this.getServiceDirectory(),
158
+ logSink: this.runtimeLogSink,
159
+ serviceName,
160
+ signal,
161
+ });
162
+ }
163
+ writeHookLog(serviceName, chunk, stream) {
164
+ if (this.runtimeLogSink == null) {
165
+ const output = stream === "stderr" ? process.stderr : process.stdout;
166
+ output.write(chunk);
167
+ return;
168
+ }
169
+ this.runtimeLogSink({ serviceName, stream, chunk, timestamp: new Date() });
170
+ }
171
+ getServiceDirectory() {
172
+ if (this.constructor === ServiceDefinition)
173
+ return process.cwd();
174
+ return path.resolve(this.name);
175
+ }
176
+ getHookLogTabName(hookName, index, hook) {
177
+ if (hookName === "onDev" && typeof hook === "string") {
178
+ return `${this.name}: ${hook}`;
179
+ }
180
+ return `${this.name}: ${hookName} ${index + 1}`;
181
+ }
182
+ }
@@ -0,0 +1,2 @@
1
+ import type { ServiceDefinition } from "./ServiceDefinition.js";
2
+ export declare function findServiceDefinition(root: ServiceDefinition, name: string): ServiceDefinition;