@uniterra-solutions/uniterra 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # @uniterra-solutions/uniterra
2
+
3
+ One-command installer for the Uniterra macOS desktop app.
4
+
5
+ ```bash
6
+ npm install -g @uniterra-solutions/uniterra
7
+ uniterra setup # download the latest app from GitHub Releases → ~/Applications
8
+ uniterra update # update the CLI, then reinstall the latest app and relaunch it
9
+ ```
10
+
11
+ The CLI downloads the release source archive over HTTPS with Node's `fetch` and
12
+ builds the app locally, so no `com.apple.quarantine` attribute is ever set and
13
+ Gatekeeper never blocks the app — no Apple Developer signing/notarization is
14
+ involved.
15
+
16
+ ## Development
17
+
18
+ ```bash
19
+ pnpm --filter @uniterra-solutions/uniterra run build
20
+ pnpm --filter @uniterra-solutions/uniterra run typecheck
21
+ pnpm --filter @uniterra-solutions/uniterra run lint
22
+ ```
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/install-logic.ts","../src/cli.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/index.d.ts"],"fileIdsList":[[65,112,113,115,132,133],[65,114,115,132,133],[115,132,133],[65,115,120,132,133,150],[65,115,116,121,126,132,133,135,147,158],[65,115,116,117,126,132,133,135],[65,115,132,133],[60,61,62,65,115,132,133],[65,115,118,132,133,159],[65,115,119,120,127,132,133,136],[65,115,120,132,133,147,155],[65,115,121,123,126,132,133,135],[65,114,115,122,132,133],[65,115,123,124,132,133],[65,115,125,126,132,133],[65,114,115,126,132,133],[65,115,126,127,128,132,133,147,158],[65,115,126,127,128,132,133,142,147,150],[65,107,115,123,126,129,132,133,135,147,158],[65,115,126,127,129,130,132,133,135,147,155,158],[65,115,129,131,132,133,147,155,158],[63,64,65,66,67,68,69,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164],[65,115,126,132,133],[65,115,132,133,134,158],[65,115,123,126,132,133,135,147],[65,115,132,133,136],[65,115,132,133,137],[65,114,115,132,133,138],[65,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164],[65,115,132,133,140],[65,115,132,133,141],[65,115,126,132,133,142,143],[65,115,132,133,142,144,159,161],[65,115,127,132,133],[65,115,126,132,133,147,148,150],[65,115,132,133,149,150],[65,115,132,133,147,148],[65,115,132,133,150],[65,115,132,133,151],[65,112,115,132,133,147,152,158],[65,115,126,132,133,153,154],[65,115,132,133,153,154],[65,115,120,132,133,135,147,155],[65,115,132,133,156],[65,115,132,133,135,157],[65,115,129,132,133,141,158],[65,115,120,132,133,159],[65,115,132,133,147,160],[65,115,132,133,134,161],[65,115,132,133,162],[65,107,115,132,133],[65,107,115,126,128,132,133,138,147,150,158,160,161,163],[65,115,132,133,147,164],[65,79,83,115,132,133,158],[65,79,115,132,133,147,158],[65,74,115,132,133],[65,76,79,115,132,133,155,158],[65,115,132,133,135,155],[65,115,132,133,165],[65,74,115,132,133,165],[65,76,79,115,132,133,135,158],[65,71,72,75,78,115,126,132,133,147,158],[65,79,86,115,132,133],[65,71,77,115,132,133],[65,79,100,101,115,132,133],[65,75,79,115,132,133,150,158,165],[65,100,115,132,133,165],[65,73,74,115,132,133,165],[65,79,115,132,133],[65,73,74,75,76,77,78,79,80,81,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,101,102,103,104,105,106,115,132,133],[65,79,94,115,132,133],[65,79,86,87,115,132,133],[65,77,79,87,88,115,132,133],[65,78,115,132,133],[65,71,74,79,115,132,133],[65,79,83,87,88,115,132,133],[65,83,115,132,133],[65,77,79,82,115,132,133,158],[65,71,76,79,86,115,132,133],[65,115,132,133,147],[65,74,79,100,115,132,133,163,165],[58,65,115,116,127,128,132,133,136,137,147,148],[65,115,128,132,133,136,137,158]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"3c6fe986e15e6efa5725664cbeb1f3942146839fed6602649d6dc7355c7759a9","signature":"4ba1b8ef7713573accf42e5d75a56d1ad1bd0f12be2ff33bb409be42745e25df","impliedFormat":99},{"version":"9605d7ba59d0a29f3d23ea51d63de829d7ffa3af1ec8a61dc1c10c40bb8d1fb2","signature":"5968d8bdc94a98368278e18860ca8e52f4c1b4141f9be3f68d201a7b89f0d2ff","impliedFormat":99},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d97fb21da858fb18b8ae72c314e9743fd52f73ebe2764e12af1db32fc03f853f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"78dbea00e90d2df8ea3dbef0cc379d95b8be9b71cd6bde4c28728f306811803b","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e1e46d0a9837ee058c100501080c920fa98081ea3956af0374308ba6f22a33e","impliedFormat":1},{"version":"272ca407e0c9068bdc5152552d876e68037ceae3de62e529306403e973dec8e1","impliedFormat":1},{"version":"fa7834c715d5357e4540cee40ce96c3250ddb67a7b879a6b7fa0e86d6696f121","impliedFormat":1},{"version":"22dfb07a7ab15b66ac043829056fe70124844636ae719551812ac631ba04985b","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"0cb167c371eaa8c869f8a7656a7296f2e4fae43b4d8b803a680236b24794e5f9","impliedFormat":1},{"version":"0a839dba0287cc0481ad4beedd48a1c64acf1e212ae865d1315f7007ca215161","impliedFormat":1},{"version":"38dc4655376cd1a4bd6bb3763d92949233e33d38d3dd3cbea7bbf218175a38ef","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"d61e0a64cd175208ac0b83670151a9a6b5916f0d1ffcdc5c29c90b1cebfc5045","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"48a679952eefe4cb776d5a0e1ccba2d3eb53b57448bbb7abc1fcebcbd5440188","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2d14da6ecb49bf828d83948765ec2d3a579d476bbb9645e749610baa6ec880ca","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"0aef708fb4c7a6b915e8305cbfac40cd207b032dbaabe9a01889a5fff3254681","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"ad9bdafb4e7abf14cc53ce7970486a84c87831e62891e5dfe798ddcd55e84701","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"71d3ae6a5e73ca4130762560425e00984ebaff64d5353a3333d1bb7eb86ef336","impliedFormat":1}],"root":[58,59],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":false,"module":199,"noFallthroughCasesInSwitch":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[112,1],[113,1],[114,2],[65,3],[115,4],[116,5],[117,6],[60,7],[63,8],[61,7],[62,7],[118,9],[119,10],[120,11],[121,12],[122,13],[123,14],[124,14],[125,15],[126,16],[127,17],[128,18],[66,7],[64,7],[129,19],[130,20],[131,21],[165,22],[132,23],[133,7],[134,24],[135,25],[136,26],[137,27],[138,28],[139,29],[140,30],[141,31],[142,32],[143,32],[144,33],[145,7],[146,34],[147,35],[149,36],[148,37],[150,38],[151,39],[152,40],[153,41],[154,42],[155,43],[156,44],[157,45],[158,46],[159,47],[160,48],[161,49],[162,50],[67,7],[68,7],[69,7],[108,51],[109,7],[110,7],[111,38],[163,52],[164,53],[70,7],[56,7],[57,7],[11,7],[10,7],[2,7],[12,7],[13,7],[14,7],[15,7],[16,7],[17,7],[18,7],[19,7],[3,7],[20,7],[21,7],[4,7],[22,7],[26,7],[23,7],[24,7],[25,7],[27,7],[28,7],[29,7],[5,7],[30,7],[31,7],[32,7],[33,7],[6,7],[37,7],[34,7],[35,7],[36,7],[38,7],[7,7],[39,7],[44,7],[45,7],[40,7],[41,7],[42,7],[43,7],[8,7],[49,7],[46,7],[47,7],[48,7],[50,7],[9,7],[51,7],[52,7],[53,7],[55,7],[54,7],[1,7],[86,54],[96,55],[85,54],[106,56],[77,57],[76,58],[105,59],[99,60],[104,61],[79,62],[93,63],[78,64],[102,65],[74,66],[73,59],[103,67],[75,68],[80,69],[81,7],[84,69],[71,7],[107,70],[97,71],[88,72],[89,73],[91,74],[87,75],[90,76],[100,59],[82,77],[83,78],[92,79],[72,80],[95,71],[94,69],[98,7],[101,81],[59,82],[58,83]],"latestChangedDtsFile":"./cli.d.ts","version":"5.9.3"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Uniterra desktop installer CLI.
4
+ *
5
+ * `uniterra setup` builds the desktop app from the release's source:
6
+ * 1. Fetch the latest release, download its source — the prebuilt source
7
+ * asset (`uniterra-src-<tag>.tar.gz`, CI-built dist/lib + a `.uniterra-prebuilt`
8
+ * marker) when the release carries one, else the auto-generated tarball.
9
+ * 2. Extract it, `pnpm install --frozen-lockfile`, then `pnpm run build`
10
+ * only when the prebuilt marker is absent (old releases and --source
11
+ * checkouts build as before; the asset skips it).
12
+ * 3. Package the Electron app, then embed the whole source tree into the
13
+ * app resources — the app resolves the bundled dsh CLI, vendored
14
+ * plugins, and skills from there at runtime, and ensures the built-ins
15
+ * into the user's normal dsh profile (~/.dsh).
16
+ * 4. Install and launch:
17
+ * - macOS: the .app goes to ~/Applications; the source embeds under
18
+ * Contents/Resources/src.
19
+ * - Windows: `--win --dir` produces the unpacked win-unpacked/ layout
20
+ * (the NSIS installer cannot carry the source embedded afterwards);
21
+ * it installs to %LOCALAPPDATA%\Programs\Uniterra with a Start Menu
22
+ * shortcut, the source embeds under resources/src (the shell resolves
23
+ * it via process.resourcesPath), and the app launches as Uniterra.exe.
24
+ *
25
+ * No pre-built binary is downloaded: the source is the artifact — built
26
+ * ahead of time by CI when the release asset exists.
27
+ *
28
+ * `uniterra setup --source <dir>` builds from a local workspace checkout
29
+ * instead of downloading a release — the Windows CI verification path.
30
+ *
31
+ * `uniterra update` is the one-command full update: it refreshes the CLI
32
+ * itself (`npm install -g`), then rebuilds + reinstalls the desktop app
33
+ * from the latest release source exactly like `uniterra setup`, and relaunches
34
+ * the app when done. The desktop's Update Now flow quits the app and runs
35
+ * this command, so the relaunch IS the app restart — no separate
36
+ * `uniterra setup` needed.
37
+ */
38
+ export {};
39
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG"}
package/dist/cli.js ADDED
@@ -0,0 +1,459 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Uniterra desktop installer CLI.
4
+ *
5
+ * `uniterra setup` builds the desktop app from the release's source:
6
+ * 1. Fetch the latest release, download its source — the prebuilt source
7
+ * asset (`uniterra-src-<tag>.tar.gz`, CI-built dist/lib + a `.uniterra-prebuilt`
8
+ * marker) when the release carries one, else the auto-generated tarball.
9
+ * 2. Extract it, `pnpm install --frozen-lockfile`, then `pnpm run build`
10
+ * only when the prebuilt marker is absent (old releases and --source
11
+ * checkouts build as before; the asset skips it).
12
+ * 3. Package the Electron app, then embed the whole source tree into the
13
+ * app resources — the app resolves the bundled dsh CLI, vendored
14
+ * plugins, and skills from there at runtime, and ensures the built-ins
15
+ * into the user's normal dsh profile (~/.dsh).
16
+ * 4. Install and launch:
17
+ * - macOS: the .app goes to ~/Applications; the source embeds under
18
+ * Contents/Resources/src.
19
+ * - Windows: `--win --dir` produces the unpacked win-unpacked/ layout
20
+ * (the NSIS installer cannot carry the source embedded afterwards);
21
+ * it installs to %LOCALAPPDATA%\Programs\Uniterra with a Start Menu
22
+ * shortcut, the source embeds under resources/src (the shell resolves
23
+ * it via process.resourcesPath), and the app launches as Uniterra.exe.
24
+ *
25
+ * No pre-built binary is downloaded: the source is the artifact — built
26
+ * ahead of time by CI when the release asset exists.
27
+ *
28
+ * `uniterra setup --source <dir>` builds from a local workspace checkout
29
+ * instead of downloading a release — the Windows CI verification path.
30
+ *
31
+ * `uniterra update` is the one-command full update: it refreshes the CLI
32
+ * itself (`npm install -g`), then rebuilds + reinstalls the desktop app
33
+ * from the latest release source exactly like `uniterra setup`, and relaunches
34
+ * the app when done. The desktop's Update Now flow quits the app and runs
35
+ * this command, so the relaunch IS the app restart — no separate
36
+ * `uniterra setup` needed.
37
+ */
38
+ import { execFile, spawn } from 'node:child_process';
39
+ import { createWriteStream, existsSync } from 'node:fs';
40
+ import { mkdir, mkdtemp, readFile, rename, rm } from 'node:fs/promises';
41
+ import { tmpdir } from 'node:os';
42
+ import { basename, dirname, join } from 'node:path';
43
+ import { Readable } from 'node:stream';
44
+ import { pipeline } from 'node:stream/promises';
45
+ import { REPO, builderArgs, cmdQuote, commandErrorMessage, currentPlatform, embedResourcesDir, embedStrategy, findBuiltApp, findSourceRoot, hasPrebuiltSource, installDestination, installPlan, launchTarget, parseArgs, pnpmInvocation, pnpmVersionFromPackageJson, readVersion, sourceDownloadUrl, startMenuShortcut, } from './install-logic.js';
46
+ const PACKAGE_NAME = '@uniterra-solutions/uniterra';
47
+ const MAX_BUFFER_BYTES = 50 * 1024 * 1024;
48
+ /** robocopy exit codes 0-7 are success (bitmask: 1=copied, 2=extra, 4=mismatch). */
49
+ const ROBOCOPY_SUCCESS_MAX = 7;
50
+ /** /MT:16 — multi-threaded copy: the embedded source tree is hundreds of
51
+ * thousands of small files (pnpm store), where single-threaded robocopy
52
+ * takes minutes and parallel threads finish in seconds.
53
+ * /R:5 /W:5 — bounded retries: robocopy's defaults (1,000,000 retries,
54
+ * 30 s apart) hang for hours when Defender briefly locks a freshly copied
55
+ * file. */
56
+ const ROBOCOPY_QUIET = [
57
+ '/E',
58
+ '/MT:16',
59
+ '/R:5',
60
+ '/W:5',
61
+ '/NFL',
62
+ '/NDL',
63
+ '/NJH',
64
+ '/NJS',
65
+ '/NC',
66
+ '/NS',
67
+ '/NP',
68
+ ];
69
+ /** Run a CLI tool via execFile. Windows ships npm/pnpm/uniterra as `.cmd`
70
+ * shims, which execFile cannot launch directly (spawn ENOENT) — there
71
+ * `shell: true` lets cmd.exe resolve them via PATHEXT, the same pattern dsh
72
+ * uses for its plugin spawns. `.exe` tools (tar, robocopy, powershell) would
73
+ * resolve either way; args containing whitespace are quoted for cmd.exe. */
74
+ function run(file, args, options = {}) {
75
+ const windows = process.platform === 'win32';
76
+ return new Promise((resolve, reject) => {
77
+ execFile(file, windows ? args.map(cmdQuote) : [...args], {
78
+ encoding: 'utf8',
79
+ maxBuffer: MAX_BUFFER_BYTES,
80
+ cwd: options.cwd,
81
+ env: options.env,
82
+ shell: windows,
83
+ }, (error, stdout, stderr) => {
84
+ if (error !== null) {
85
+ reject(new Error(commandErrorMessage(error.message, error.code, stderr, stdout)));
86
+ return;
87
+ }
88
+ resolve({ stdout, stderr });
89
+ });
90
+ });
91
+ }
92
+ /** How to run pnpm for this install. The CLI itself runs on node, so node
93
+ * (with its bundled npm/npx) is guaranteed; pnpm is the only tool that can be
94
+ * absent. When it's missing, npx fetches the exact version the source tree
95
+ * pins (`packageManager` field), so the install self-provisions instead of
96
+ * failing on a machine without a global pnpm. */
97
+ async function resolvePnpm(src) {
98
+ let onPath = false;
99
+ try {
100
+ await run('pnpm', ['--version']);
101
+ onPath = true;
102
+ }
103
+ catch {
104
+ // not installed — self-provision via npx below
105
+ }
106
+ const packageJson = await readFile(join(src, 'package.json'), 'utf8');
107
+ return pnpmInvocation(onPath, pnpmVersionFromPackageJson(packageJson));
108
+ }
109
+ /** Windows recursive copy. Robocopy's exit code is a bitmask where 0-7 all
110
+ * mean success, so a non-zero exit is not a failure unless it is >= 8. */
111
+ function robocopy(from, to) {
112
+ return new Promise((resolve, reject) => {
113
+ execFile('robocopy', [from, to, ...ROBOCOPY_QUIET], { encoding: 'utf8', maxBuffer: MAX_BUFFER_BYTES }, (error, _stdout, stderr) => {
114
+ if (error === null) {
115
+ resolve();
116
+ return;
117
+ }
118
+ const code = typeof error.code === 'number' ? error.code : Number.NaN;
119
+ if (Number.isFinite(code) && code <= ROBOCOPY_SUCCESS_MAX) {
120
+ resolve();
121
+ return;
122
+ }
123
+ reject(new Error(`robocopy ${from} -> ${to} failed (${String(error.code)}): ${error.message}` +
124
+ (stderr.trim().length > 0 ? `\n${stderr.trim()}` : '')));
125
+ });
126
+ });
127
+ }
128
+ /** Fetch the latest release tag, falling back to the newest release when
129
+ * `/releases/latest` 404s (prerelease-only repositories). */
130
+ async function fetchLatestRelease() {
131
+ const headers = { Accept: 'application/vnd.github+json', 'User-Agent': 'uniterra-cli' };
132
+ const latestResponse = await fetch(`https://api.github.com/repos/${REPO}/releases/latest`, {
133
+ headers,
134
+ });
135
+ if (latestResponse.ok) {
136
+ return (await latestResponse.json());
137
+ }
138
+ if (latestResponse.status === 404) {
139
+ // `/releases/latest` only returns non-prerelease releases; fall back to the
140
+ // newest release (which may be a prerelease) so beta tags still install.
141
+ const listResponse = await fetch(`https://api.github.com/repos/${REPO}/releases?per_page=1`, {
142
+ headers,
143
+ });
144
+ if (!listResponse.ok) {
145
+ throw new Error(`Unable to fetch releases of ${REPO} (HTTP ${String(listResponse.status)}). ` +
146
+ 'Make sure a release exists and the repository is public.');
147
+ }
148
+ const releases = (await listResponse.json());
149
+ const newest = releases[0];
150
+ if (newest === undefined) {
151
+ throw new Error(`No releases found for ${REPO}.`);
152
+ }
153
+ return newest;
154
+ }
155
+ throw new Error(`Unable to fetch the latest release of ${REPO} (HTTP ${String(latestResponse.status)}). ` +
156
+ 'Make sure a release exists and the repository is public.');
157
+ }
158
+ async function downloadFile(url, dest) {
159
+ const response = await fetch(url, { redirect: 'follow' });
160
+ if (!response.ok) {
161
+ throw new Error(`Download failed: HTTP ${String(response.status)} ${response.statusText}`);
162
+ }
163
+ if (response.body === null) {
164
+ throw new Error(`Download failed: empty response body for ${url}`);
165
+ }
166
+ await pipeline(Readable.fromWeb(response.body), createWriteStream(dest));
167
+ }
168
+ async function extractTarGz(tarPath, destDir, platform) {
169
+ await mkdir(destDir, { recursive: true });
170
+ // Windows 10+ ships bsdtar on PATH; macOS keeps /usr/bin/tar.
171
+ await run(platform === 'windows' ? 'tar' : '/usr/bin/tar', ['-xzf', tarPath, '-C', destDir]);
172
+ }
173
+ /** Resolve the source tree to build. `--source` uses a local workspace
174
+ * checkout; the default downloads the latest release archive. Returns
175
+ * undefined after a dry-run report. */
176
+ async function resolveInstallSource(options, tmpRoot) {
177
+ const platform = currentPlatform();
178
+ if (options.source !== undefined) {
179
+ if (!existsSync(join(options.source, 'packages', 'uniterra-desktop', 'package.json'))) {
180
+ throw new Error(`--source ${options.source} does not look like a uniterra workspace ` +
181
+ '(packages/uniterra-desktop/package.json missing)');
182
+ }
183
+ if (options.dryRun) {
184
+ process.stdout.write(`[dry-run] Would build from ${options.source} and install for ${platform}\n`);
185
+ return undefined;
186
+ }
187
+ const version = await readVersion(join(options.source, 'packages', 'uniterra-desktop', 'package.json'));
188
+ return { src: options.source, version, downloaded: false };
189
+ }
190
+ const release = await fetchLatestRelease();
191
+ process.stdout.write(`Downloading source ${release.tag_name}...\n`);
192
+ const tarPath = join(tmpRoot, 'source.tar.gz');
193
+ await downloadFile(sourceDownloadUrl(release.tag_name, release.assets ?? []), tarPath);
194
+ const extractDir = join(tmpRoot, 'src');
195
+ await extractTarGz(tarPath, extractDir, platform);
196
+ const src = await findSourceRoot(extractDir);
197
+ if (options.dryRun) {
198
+ process.stdout.write(`[dry-run] Would build from ${src} and install for ${platform}\n`);
199
+ return undefined;
200
+ }
201
+ return { src, version: release.tag_name.replace(/^v/, ''), downloaded: true };
202
+ }
203
+ /** Windows: move a directory, preferring an instant same-volume rename.
204
+ * Rename is only an optimization — ANY failure degrades to a robocopy copy +
205
+ * delete: EXDEV (cross-volume, e.g. CI workspace on D: vs temp on C:), EPERM
206
+ * (Defender briefly locking freshly copied files), or anything else. The
207
+ * fallback surfaces real problems through robocopy's own exit code. */
208
+ async function moveOrRobocopy(from, to) {
209
+ try {
210
+ await rename(from, to);
211
+ return;
212
+ }
213
+ catch {
214
+ // fall through to robocopy
215
+ }
216
+ await robocopy(from, to);
217
+ await rm(from, { recursive: true, force: true });
218
+ }
219
+ /** Move the packaged artifact out of the source tree (it must leave before
220
+ * the source is embedded, or the copy would recurse into itself). */
221
+ async function moveArtifact(appPath, staged, platform) {
222
+ if (platform === 'windows') {
223
+ // `--source` checkouts can live on another volume than the tmp dir
224
+ // (e.g. CI: workspace on D:, temp on C:) — rename fails there with
225
+ // EXDEV and the helper falls back to copy + delete.
226
+ await moveOrRobocopy(appPath, staged);
227
+ return;
228
+ }
229
+ // /bin/mv survives cross-volume moves (copy + delete internally).
230
+ await run('/bin/mv', [appPath, staged]);
231
+ }
232
+ /** Embed the source tree into the packaged app's resources dir. A DOWNLOADED
233
+ * source on Windows is renamed into the app (same volume — instant, robocopy
234
+ * fallback on EXDEV/EPERM); a `--source` checkout is always copied so the
235
+ * user's working tree stays put. macOS copies (APFS clonefile is already
236
+ * near-instant). */
237
+ async function embedSource(staged, src, platform, strategy) {
238
+ const target = join(embedResourcesDir(platform, staged), 'src');
239
+ if (platform === 'windows') {
240
+ if (strategy === 'move') {
241
+ await moveOrRobocopy(src, target);
242
+ return;
243
+ }
244
+ await robocopy(src, target);
245
+ return;
246
+ }
247
+ await run('/bin/cp', ['-R', src, target]);
248
+ }
249
+ /** Install the staged artifact to its destination, replacing any previous
250
+ * install. Windows prefers a same-volume rename (tmp and %LOCALAPPDATA% are
251
+ * both on C:) over a multi-GB robocopy; macOS keeps /usr/bin/ditto. */
252
+ async function copyInstalled(staged, destination, platform) {
253
+ if (existsSync(destination)) {
254
+ await rm(destination, { recursive: true, force: true });
255
+ }
256
+ await mkdir(dirname(destination), { recursive: true });
257
+ if (platform === 'windows') {
258
+ await moveOrRobocopy(staged, destination);
259
+ return;
260
+ }
261
+ await run('/usr/bin/ditto', [staged, destination]);
262
+ }
263
+ /** Create the Start Menu shortcut for the installed Windows app. Best
264
+ * effort: a missing shortcut must never fail the install. */
265
+ async function createStartMenuShortcutBestEffort(destination) {
266
+ try {
267
+ const shortcut = startMenuShortcut(launchTarget('windows', destination), process.env);
268
+ await run('powershell', ['-NoProfile', '-NonInteractive', '-Command', shortcut.script]);
269
+ }
270
+ catch (error) {
271
+ console.warn(`uniterra: skipping Start Menu shortcut: ${error instanceof Error ? error.message : String(error)}`);
272
+ }
273
+ }
274
+ async function openApp(destination, platform) {
275
+ if (platform === 'windows') {
276
+ // Launch detached: `/usr/bin/open`-style, the CLI must not wait for the
277
+ // GUI app to exit.
278
+ const child = spawn(launchTarget(platform, destination), {
279
+ detached: true,
280
+ stdio: 'ignore',
281
+ });
282
+ child.once('error', (error) => {
283
+ console.error('uniterra: failed to launch the app:', error);
284
+ });
285
+ child.unref();
286
+ return;
287
+ }
288
+ await run('/usr/bin/open', [destination]);
289
+ }
290
+ /**
291
+ * Build the app from source, package it with the source tree embedded in
292
+ * the resources, and install it. Returns the install destination —
293
+ * launching is the caller's `launch-app` stage. Returns undefined after a
294
+ * dry-run report.
295
+ */
296
+ async function buildInstallApp(options) {
297
+ const platform = currentPlatform();
298
+ const tmpRoot = await mkdtemp(join(tmpdir(), 'uniterra-'));
299
+ try {
300
+ const resolved = await resolveInstallSource(options, tmpRoot);
301
+ if (resolved === undefined) {
302
+ return undefined; // dry-run reported already
303
+ }
304
+ const { src, version } = resolved;
305
+ const pnpm = await resolvePnpm(src);
306
+ process.stdout.write('Installing dependencies...\n');
307
+ // CI=true: the installer may run without a TTY (CI environments, or
308
+ // spawned detached) and pnpm 11 aborts with
309
+ // ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY otherwise.
310
+ await run(pnpm.file, [...pnpm.args, 'install', '--frozen-lockfile'], {
311
+ cwd: src,
312
+ env: { ...process.env, CI: 'true' },
313
+ });
314
+ if (await hasPrebuiltSource(src)) {
315
+ // The release asset ships the built tree (CI built it on Linux, and
316
+ // tsc/esbuild output is platform-independent), so the multi-minute
317
+ // build is skipped. Pre-asset releases and --source checkouts have no
318
+ // marker and build exactly as before.
319
+ process.stdout.write('Prebuilt artifacts found — skipping the workspace build.\n');
320
+ }
321
+ else {
322
+ process.stdout.write('Building packages...\n');
323
+ await run(pnpm.file, [...pnpm.args, 'run', 'build'], { cwd: src });
324
+ }
325
+ process.stdout.write('Packaging the desktop app...\n');
326
+ await packageApp(src, version, platform, pnpm);
327
+ // Move the packaged artifact OUT of the source tree (electron-builder
328
+ // writes it under <src>/packages/uniterra-desktop/dist), then embed the
329
+ // source — copying src into its own subdirectory is not allowed, so the
330
+ // artifact must leave the tree first.
331
+ const appPath = await findBuiltApp(src, platform);
332
+ const outDir = join(tmpRoot, 'out');
333
+ await mkdir(outDir, { recursive: true });
334
+ const staged = join(outDir, basename(appPath));
335
+ await moveArtifact(appPath, staged, platform);
336
+ // This step moves/copies hundreds of thousands of small files (the
337
+ // embedded node_modules) — the line before it keeps the install log
338
+ // readable.
339
+ process.stdout.write('Embedding source tree into the app...\n');
340
+ await embedSource(staged, src, platform, embedStrategy(platform, resolved.downloaded));
341
+ const destination = installDestination(platform, process.env, staged);
342
+ process.stdout.write(`Installing to ${destination}...\n`);
343
+ await copyInstalled(staged, destination, platform);
344
+ await rm(staged, { recursive: true, force: true });
345
+ if (platform === 'windows') {
346
+ await createStartMenuShortcutBestEffort(destination);
347
+ }
348
+ process.stdout.write(`Installed ${destination}\n`);
349
+ return destination;
350
+ }
351
+ finally {
352
+ await rm(tmpRoot, { recursive: true, force: true });
353
+ }
354
+ }
355
+ /** Execute the command's stage plan (`installPlan`). `uniterra update` runs
356
+ * `update-cli` first so npm/permission problems surface before the long
357
+ * build; `launch-app` is the relaunch after an update (the desktop quits
358
+ * itself before running `uniterra update`, so launching the installed app is
359
+ * the restart). */
360
+ async function runInstallPlan(command, options) {
361
+ const plan = installPlan(command, options.open, options.dryRun);
362
+ if (plan.length === 0) {
363
+ if (command === 'update') {
364
+ // The plan report is complete on its own — no source resolution, no
365
+ // downloads (keeps `uniterra update --dry-run` deterministic and offline).
366
+ process.stdout.write('[dry-run] Would update the CLI, then rebuild + reinstall the desktop app and relaunch it\n');
367
+ return;
368
+ }
369
+ // Setup dry-run: resolve the source for the report only (prints and returns).
370
+ const tmpRoot = await mkdtemp(join(tmpdir(), 'uniterra-'));
371
+ try {
372
+ await resolveInstallSource(options, tmpRoot);
373
+ }
374
+ finally {
375
+ await rm(tmpRoot, { recursive: true, force: true });
376
+ }
377
+ return;
378
+ }
379
+ let destination;
380
+ for (const stage of plan) {
381
+ switch (stage) {
382
+ case 'update-cli':
383
+ await updateCli();
384
+ break;
385
+ case 'build-install-app':
386
+ destination = await buildInstallApp(options);
387
+ break;
388
+ case 'launch-app':
389
+ if (destination !== undefined) {
390
+ await openApp(destination, currentPlatform());
391
+ }
392
+ break;
393
+ }
394
+ }
395
+ }
396
+ /** Package the Electron app; the source is embedded afterwards by the caller. */
397
+ async function packageApp(src, version, platform, pnpm) {
398
+ const desktopDir = join(src, 'packages', 'uniterra-desktop');
399
+ await run(pnpm.file, [...pnpm.args, 'exec', 'electron-builder', ...builderArgs(platform, version)], {
400
+ cwd: desktopDir,
401
+ });
402
+ }
403
+ async function updateCli() {
404
+ process.stdout.write(`Updating CLI (${PACKAGE_NAME})...\n`);
405
+ try {
406
+ const { stdout } = await run('npm', ['install', '-g', `${PACKAGE_NAME}@latest`]);
407
+ if (stdout.trim().length > 0) {
408
+ process.stdout.write(stdout);
409
+ }
410
+ }
411
+ catch (error) {
412
+ throw new Error(`Failed to update the CLI: ${error instanceof Error ? error.message : String(error)} ` +
413
+ '(if this is a permissions error, use a user-level npm prefix or a Node version manager, or rerun with elevated permissions)');
414
+ }
415
+ }
416
+ function printHelp() {
417
+ process.stdout.write([
418
+ 'uniterra — Uniterra desktop app installer',
419
+ '',
420
+ 'Usage:',
421
+ ' uniterra setup [--source <dir>] [--no-open] [--dry-run] Build and install the latest Uniterra desktop app from source',
422
+ ' uniterra update [--source <dir>] [--no-open] [--dry-run] Update the CLI, then rebuild + reinstall the app and relaunch it',
423
+ ' uniterra --version Print the CLI version',
424
+ ' uniterra --help Print this help',
425
+ '',
426
+ ' --source <dir> build from a local uniterra workspace instead of downloading the latest release',
427
+ ' --no-open install without launching the app',
428
+ ' --dry-run resolve the source and report without installing',
429
+ '',
430
+ 'Install targets: macOS → ~/Applications/Uniterra.app; Windows → %LOCALAPPDATA%\\Programs\\Uniterra',
431
+ '',
432
+ `First install: npm install -g ${PACKAGE_NAME} && uniterra setup`,
433
+ '',
434
+ ].join('\n'));
435
+ }
436
+ async function main() {
437
+ const parsed = parseArgs(process.argv.slice(2));
438
+ switch (parsed.command) {
439
+ case 'help':
440
+ printHelp();
441
+ return;
442
+ case 'version':
443
+ process.stdout.write(`${await readVersion()}\n`);
444
+ return;
445
+ case 'setup':
446
+ case 'update':
447
+ await runInstallPlan(parsed.command, {
448
+ open: parsed.open,
449
+ dryRun: parsed.dryRun,
450
+ source: parsed.source,
451
+ });
452
+ return;
453
+ }
454
+ }
455
+ void main().catch((error) => {
456
+ console.error(`uniterra: ${error instanceof Error ? error.message : String(error)}`);
457
+ process.exitCode = 1;
458
+ });
459
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,QAAQ,EAAE,KAAK,EAA0B,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,cAAc,EACd,0BAA0B,EAC1B,WAAW,EACX,iBAAiB,EACjB,iBAAiB,GAGlB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,YAAY,GAAG,8BAA8B,CAAC;AACpD,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAC1C,oFAAoF;AACpF,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B;;;;;WAKW;AACX,MAAM,cAAc,GAAG;IACrB,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,MAAM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rB,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAC,CAAC;YACH,OAAO;IACX,CAAC;AACH,CAAC;AAED,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IACnC,OAAO,CAAC,KAAK,CAAC,aAAa,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,110 @@
1
+ /**
2
+ * Pure install/update business logic for the uniterra CLI — no process side
3
+ * effects, so the installer decisions are testable without running a shell.
4
+ */
5
+ export declare const REPO: string;
6
+ /** The install platform the CLI targets on this machine. The CLI is only
7
+ * exercised on macOS and Windows, so every non-win32 platform maps to the
8
+ * macOS flow. */
9
+ export type InstallPlatform = 'macos' | 'windows';
10
+ export declare function currentPlatform(): InstallPlatform;
11
+ /** The source-archive URL for a release tag (GitHub auto-generates it). */
12
+ export declare function sourceArchiveUrl(tag: string): string;
13
+ /** Root-level marker shipped in the release's prebuilt source asset. When
14
+ * present, the CLI skips `pnpm run build` — the release workflow already
15
+ * built the tree (tsc/esbuild output is platform-independent). */
16
+ export declare const PREBUILT_MARKER = ".uniterra-prebuilt";
17
+ /** A GitHub release asset entry — the fields the source download uses. */
18
+ export interface ReleaseAsset {
19
+ readonly name: string;
20
+ readonly browser_download_url: string;
21
+ }
22
+ /** The release asset carrying the source tree WITH built artifacts (built by
23
+ * the release workflow on Linux; one asset serves both install platforms). */
24
+ export declare function sourceAssetName(tag: string): string;
25
+ /** The source download URL for a release: the prebuilt source asset when the
26
+ * release carries one, the GitHub auto-generated archive otherwise (releases
27
+ * predating the asset keep building on the user's machine). */
28
+ export declare function sourceDownloadUrl(tag: string, assets: readonly ReleaseAsset[]): string;
29
+ /** Whether the source root carries the prebuilt marker: the marker alone
30
+ * decides the build skip — a `--source` checkout without it builds as
31
+ * always. A missing root reports false, so the caller builds (and any real
32
+ * error surfaces from the build itself). */
33
+ export declare function hasPrebuiltSource(root: string): Promise<boolean>;
34
+ /** How `embedSource` places the source into the packaged app: a DOWNLOADED
35
+ * source on Windows sits on the same volume as the staging dir, so a
36
+ * same-volume rename (robocopy fallback) is instant; every other case
37
+ * copies — a `--source` checkout must NEVER be moved away from the user's
38
+ * tree, whatever volume it is on. */
39
+ export declare function embedStrategy(platform: InstallPlatform, downloaded: boolean): 'move' | 'copy';
40
+ /** Build the message for a failed subprocess: the command line, its exit
41
+ * code, and its captured output — the output is what carries the real
42
+ * failure reason (e.g. electron-builder's binary-download error), which the
43
+ * CLI must never swallow. */
44
+ export declare function commandErrorMessage(message: string, code: number | string | null | undefined, stderr: string, stdout: string): string;
45
+ /** The pnpm version pinned by a package.json `packageManager` field, e.g.
46
+ * `"packageManager": "pnpm@11.17.0"` → `"11.17.0"`; undefined when absent. */
47
+ export declare function pnpmVersionFromPackageJson(packageJson: string): string | undefined;
48
+ /** How to invoke pnpm: the installed binary, or npx (bundled with the npm
49
+ * that ships with the node running this CLI) fetching the pinned version —
50
+ * so a machine without a global pnpm self-provisions instead of failing.
51
+ * Throws when pnpm is missing AND the pin is unknown (no version to fetch). */
52
+ export declare function pnpmInvocation(pnpmOnPath: boolean, pnpmVersion: string | undefined): {
53
+ readonly file: string;
54
+ readonly args: readonly string[];
55
+ };
56
+ /** The single extracted source root (GitHub names it `<repo>-<tag>`). */
57
+ export declare function findSourceRoot(dir: string): Promise<string>;
58
+ /** Locate the packaged app under electron-builder's dist dir: the `.app`
59
+ * bundle on macOS (`mac-*` dirs), the `win-unpacked/` directory on Windows
60
+ * (the `--win --dir` layout — no NSIS installer, because the source is
61
+ * embedded into the unpacked tree afterwards). */
62
+ export declare function findBuiltApp(src: string, platform?: InstallPlatform): Promise<string>;
63
+ /** Where the packaged artifact is installed. macOS keeps the `.app` under
64
+ * ~/Applications; Windows installs the unpacked tree under
65
+ * %LOCALAPPDATA%\Programs\Uniterra (the per-user install convention). */
66
+ export declare function installDestination(platform: InstallPlatform, env: NodeJS.ProcessEnv, appPath: string): string;
67
+ /** What to launch after install: the `.app` itself on macOS, `Uniterra.exe`
68
+ * inside the install dir on Windows. */
69
+ export declare function launchTarget(platform: InstallPlatform, destination: string): string;
70
+ /** The app's resources dir inside the packaged artifact, where the source
71
+ * tree is embedded (`Contents/Resources` on macOS, `resources` on Windows —
72
+ * both are `process.resourcesPath` at runtime). */
73
+ export declare function embedResourcesDir(platform: InstallPlatform, appRoot: string): string;
74
+ /** electron-builder CLI args for the platform. Windows adds `--dir` so the
75
+ * build produces the unpacked `win-unpacked/` layout — the NSIS installer
76
+ * cannot carry the source embedded afterwards. */
77
+ export declare function builderArgs(platform: InstallPlatform, version: string): readonly string[];
78
+ /** Escape a value for a single-quoted PowerShell string (`''` escapes `'`). */
79
+ export declare function psSingleQuote(value: string): string;
80
+ /** Quote a token for a `shell: true` cmd.exe command line: wrap tokens
81
+ * containing whitespace in double quotes. Windows command lines have no
82
+ * shell escaping of their own, and execFile does not quote shell args. */
83
+ export declare function cmdQuote(arg: string): string;
84
+ export interface StartMenuShortcut {
85
+ readonly lnkPath: string;
86
+ readonly script: string;
87
+ }
88
+ /** The Start Menu shortcut spec for the installed Windows app (created via
89
+ * WScript.Shell through powershell). Pure builder — the caller runs it. */
90
+ export declare function startMenuShortcut(exePath: string, env: NodeJS.ProcessEnv): StartMenuShortcut;
91
+ export declare function readVersion(pkgPath?: string): Promise<string>;
92
+ /** The ordered execution stages of a uniterra CLI run. Pure so the
93
+ * command/flag semantics are testable without running a shell.
94
+ *
95
+ * `uniterra update` is the one-command full update: it refreshes the CLI
96
+ * itself first (fail fast on npm/permission problems before the long build),
97
+ * then rebuilds + reinstalls the desktop app exactly like `uniterra setup`,
98
+ * and relaunches the app when done — the desktop's Update Now flow quits
99
+ * the app and runs this command, so the relaunch IS the app restart. */
100
+ export type InstallStage = 'update-cli' | 'build-install-app' | 'launch-app';
101
+ export declare function installPlan(command: 'setup' | 'update', open: boolean, dryRun: boolean): readonly InstallStage[];
102
+ export interface ParsedArgs {
103
+ readonly command: 'setup' | 'update' | 'version' | 'help';
104
+ readonly open: boolean;
105
+ readonly dryRun: boolean;
106
+ /** Local source tree for `setup` (skips the release download). */
107
+ readonly source?: string;
108
+ }
109
+ export declare function parseArgs(args: readonly string[]): ParsedArgs;
110
+ //# sourceMappingURL=install-logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-logic.d.ts","sourceRoot":"","sources":["../src/install-logic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,eAAO,MAAM,IAAI,QAAoE,CAAC;AAEtF;;iBAEiB;AACjB,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,CAAC;AAElD,wBAAgB,eAAe,IAAI,eAAe,CAEjD;AAED,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;kEAEkE;AAClE,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,0EAA0E;AAC1E,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC;AAED;8EAC8E;AAC9E,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;+DAE+D;AAC/D,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,CAGtF;AAED;;;4CAG4C;AAC5C,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAMtE;AAED;;;;qCAIqC;AACrC,wBAAgB,aAAa,CAAC,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAE7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MAAM,GAAG,MAAM,CAEnD;AAED;;0EAE0E;AAC1E,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;2EAC2E;AAC3E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,iBAAiB,CAW5F;AAED,wBAAsB,WAAW,CAC/B,OAAO,SAA6D,GACnE,OAAO,CAAC,MAAM,CAAC,CAOjB;AAED;;;;;;;wEAOwE;AACxE,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,mBAAmB,GAAG,YAAY,CAAC;AAE7E,wBAAgB,WAAW,CACzB,OAAO,EAAE,OAAO,GAAG,QAAQ,EAC3B,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,OAAO,GACd,SAAS,YAAY,EAAE,CAazB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IAC1D,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,kEAAkE;IAClE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CAiC7D"}
@@ -0,0 +1,249 @@
1
+ /**
2
+ * Pure install/update business logic for the uniterra CLI — no process side
3
+ * effects, so the installer decisions are testable without running a shell.
4
+ */
5
+ import { readFile, readdir } from 'node:fs/promises';
6
+ import { homedir } from 'node:os';
7
+ import { basename, dirname, join } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ export const REPO = process.env.UNITERRA_GITHUB_REPO ?? 'Uniterra-Solutions/uniterra';
10
+ export function currentPlatform() {
11
+ return process.platform === 'win32' ? 'windows' : 'macos';
12
+ }
13
+ /** The source-archive URL for a release tag (GitHub auto-generates it). */
14
+ export function sourceArchiveUrl(tag) {
15
+ return `https://github.com/${REPO}/archive/refs/tags/${encodeURIComponent(tag)}.tar.gz`;
16
+ }
17
+ /** Root-level marker shipped in the release's prebuilt source asset. When
18
+ * present, the CLI skips `pnpm run build` — the release workflow already
19
+ * built the tree (tsc/esbuild output is platform-independent). */
20
+ export const PREBUILT_MARKER = '.uniterra-prebuilt';
21
+ /** The release asset carrying the source tree WITH built artifacts (built by
22
+ * the release workflow on Linux; one asset serves both install platforms). */
23
+ export function sourceAssetName(tag) {
24
+ return `uniterra-src-${tag}.tar.gz`;
25
+ }
26
+ /** The source download URL for a release: the prebuilt source asset when the
27
+ * release carries one, the GitHub auto-generated archive otherwise (releases
28
+ * predating the asset keep building on the user's machine). */
29
+ export function sourceDownloadUrl(tag, assets) {
30
+ const match = assets.find((asset) => asset.name === sourceAssetName(tag));
31
+ return match?.browser_download_url ?? sourceArchiveUrl(tag);
32
+ }
33
+ /** Whether the source root carries the prebuilt marker: the marker alone
34
+ * decides the build skip — a `--source` checkout without it builds as
35
+ * always. A missing root reports false, so the caller builds (and any real
36
+ * error surfaces from the build itself). */
37
+ export async function hasPrebuiltSource(root) {
38
+ try {
39
+ return (await readdir(root)).includes(PREBUILT_MARKER);
40
+ }
41
+ catch {
42
+ return false;
43
+ }
44
+ }
45
+ /** How `embedSource` places the source into the packaged app: a DOWNLOADED
46
+ * source on Windows sits on the same volume as the staging dir, so a
47
+ * same-volume rename (robocopy fallback) is instant; every other case
48
+ * copies — a `--source` checkout must NEVER be moved away from the user's
49
+ * tree, whatever volume it is on. */
50
+ export function embedStrategy(platform, downloaded) {
51
+ return platform === 'windows' && downloaded ? 'move' : 'copy';
52
+ }
53
+ /** Build the message for a failed subprocess: the command line, its exit
54
+ * code, and its captured output — the output is what carries the real
55
+ * failure reason (e.g. electron-builder's binary-download error), which the
56
+ * CLI must never swallow. */
57
+ export function commandErrorMessage(message, code, stderr, stdout) {
58
+ const output = [stderr.trim(), stdout.trim()].filter((part) => part.length > 0).join('\n');
59
+ const suffix = typeof code === 'number' ? ` (exit code ${String(code)})` : '';
60
+ return `${message}${suffix}${output.length > 0 ? `\n${output}` : ''}`;
61
+ }
62
+ /** The pnpm version pinned by a package.json `packageManager` field, e.g.
63
+ * `"packageManager": "pnpm@11.17.0"` → `"11.17.0"`; undefined when absent. */
64
+ export function pnpmVersionFromPackageJson(packageJson) {
65
+ return /"packageManager"\s*:\s*"pnpm@([^"]+)"/.exec(packageJson)?.[1];
66
+ }
67
+ /** How to invoke pnpm: the installed binary, or npx (bundled with the npm
68
+ * that ships with the node running this CLI) fetching the pinned version —
69
+ * so a machine without a global pnpm self-provisions instead of failing.
70
+ * Throws when pnpm is missing AND the pin is unknown (no version to fetch). */
71
+ export function pnpmInvocation(pnpmOnPath, pnpmVersion) {
72
+ if (pnpmOnPath) {
73
+ return { file: 'pnpm', args: [] };
74
+ }
75
+ if (pnpmVersion === undefined) {
76
+ throw new Error('pnpm is not installed and the source tree has no packageManager pin — cannot self-provision pnpm');
77
+ }
78
+ return { file: 'npx', args: ['--yes', `pnpm@${pnpmVersion}`] };
79
+ }
80
+ /** The single extracted source root (GitHub names it `<repo>-<tag>`). */
81
+ export async function findSourceRoot(dir) {
82
+ const entries = await readdir(dir, { withFileTypes: true });
83
+ const roots = entries.filter((e) => e.isDirectory() && e.name.startsWith('uniterra-'));
84
+ if (roots.length !== 1) {
85
+ throw new Error(`Unexpected source archive layout under ${dir}`);
86
+ }
87
+ const root = roots[0];
88
+ if (root === undefined) {
89
+ throw new Error(`Unexpected source archive layout under ${dir}`);
90
+ }
91
+ return join(dir, root.name);
92
+ }
93
+ /** Locate the packaged app under electron-builder's dist dir: the `.app`
94
+ * bundle on macOS (`mac-*` dirs), the `win-unpacked/` directory on Windows
95
+ * (the `--win --dir` layout — no NSIS installer, because the source is
96
+ * embedded into the unpacked tree afterwards). */
97
+ export async function findBuiltApp(src, platform = 'macos') {
98
+ const desktopDist = join(src, 'packages', 'uniterra-desktop', 'dist');
99
+ if (platform === 'windows') {
100
+ const unpacked = join(desktopDist, 'win-unpacked');
101
+ try {
102
+ const entries = await readdir(unpacked, { withFileTypes: true });
103
+ if (entries.some((entry) => entry.isFile() && entry.name.endsWith('.exe'))) {
104
+ return unpacked;
105
+ }
106
+ }
107
+ catch {
108
+ // fall through
109
+ }
110
+ throw new Error(`No Uniterra.exe found under ${desktopDist}`);
111
+ }
112
+ const candidates = [];
113
+ try {
114
+ for (const entry of await readdir(desktopDist, { withFileTypes: true })) {
115
+ if (entry.isDirectory() && entry.name.startsWith('mac')) {
116
+ candidates.push(join(desktopDist, entry.name));
117
+ }
118
+ }
119
+ }
120
+ catch {
121
+ // fall through
122
+ }
123
+ for (const dir of candidates) {
124
+ for (const entry of await readdir(dir, { withFileTypes: true })) {
125
+ if (entry.isDirectory() && entry.name.endsWith('.app')) {
126
+ return join(dir, entry.name);
127
+ }
128
+ }
129
+ }
130
+ throw new Error(`No .app bundle found under ${desktopDist}`);
131
+ }
132
+ /** Where the packaged artifact is installed. macOS keeps the `.app` under
133
+ * ~/Applications; Windows installs the unpacked tree under
134
+ * %LOCALAPPDATA%\Programs\Uniterra (the per-user install convention). */
135
+ export function installDestination(platform, env, appPath) {
136
+ if (platform === 'windows') {
137
+ const local = env.LOCALAPPDATA ?? join(homedir(), 'AppData', 'Local');
138
+ return join(local, 'Programs', 'Uniterra');
139
+ }
140
+ return join(homedir(), 'Applications', basename(appPath));
141
+ }
142
+ /** What to launch after install: the `.app` itself on macOS, `Uniterra.exe`
143
+ * inside the install dir on Windows. */
144
+ export function launchTarget(platform, destination) {
145
+ return platform === 'windows' ? join(destination, 'Uniterra.exe') : destination;
146
+ }
147
+ /** The app's resources dir inside the packaged artifact, where the source
148
+ * tree is embedded (`Contents/Resources` on macOS, `resources` on Windows —
149
+ * both are `process.resourcesPath` at runtime). */
150
+ export function embedResourcesDir(platform, appRoot) {
151
+ return platform === 'windows'
152
+ ? join(appRoot, 'resources')
153
+ : join(appRoot, 'Contents', 'Resources');
154
+ }
155
+ /** electron-builder CLI args for the platform. Windows adds `--dir` so the
156
+ * build produces the unpacked `win-unpacked/` layout — the NSIS installer
157
+ * cannot carry the source embedded afterwards. */
158
+ export function builderArgs(platform, version) {
159
+ const args = [platform === 'windows' ? '--win' : '--mac'];
160
+ if (platform === 'windows') {
161
+ args.push('--dir');
162
+ }
163
+ args.push('--publish', 'never', `-c.extraMetadata.version=${version}`);
164
+ return args;
165
+ }
166
+ /** Escape a value for a single-quoted PowerShell string (`''` escapes `'`). */
167
+ export function psSingleQuote(value) {
168
+ return value.replace(/'/g, "''");
169
+ }
170
+ /** Quote a token for a `shell: true` cmd.exe command line: wrap tokens
171
+ * containing whitespace in double quotes. Windows command lines have no
172
+ * shell escaping of their own, and execFile does not quote shell args. */
173
+ export function cmdQuote(arg) {
174
+ return /\s/.test(arg) ? `"${arg}"` : arg;
175
+ }
176
+ /** The Start Menu shortcut spec for the installed Windows app (created via
177
+ * WScript.Shell through powershell). Pure builder — the caller runs it. */
178
+ export function startMenuShortcut(exePath, env) {
179
+ const appData = env.APPDATA ?? join(homedir(), 'AppData', 'Roaming');
180
+ const lnkPath = join(appData, 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'Uniterra.lnk');
181
+ const workingDir = dirname(exePath);
182
+ const script = [
183
+ `$s=(New-Object -ComObject WScript.Shell).CreateShortcut('${psSingleQuote(lnkPath)}');`,
184
+ `$s.TargetPath='${psSingleQuote(exePath)}';`,
185
+ `$s.WorkingDirectory='${psSingleQuote(workingDir)}';`,
186
+ '$s.Save()',
187
+ ].join('');
188
+ return { lnkPath, script };
189
+ }
190
+ export async function readVersion(pkgPath = fileURLToPath(new URL('../package.json', import.meta.url))) {
191
+ const content = await readFile(pkgPath, 'utf8');
192
+ const match = /^\s*"version"\s*:\s*"([^"]+)"/m.exec(content);
193
+ if (match === null || match[1] === undefined) {
194
+ throw new Error(`Unable to read version from ${pkgPath}`);
195
+ }
196
+ return match[1];
197
+ }
198
+ export function installPlan(command, open, dryRun) {
199
+ if (dryRun) {
200
+ return [];
201
+ }
202
+ const stages = [];
203
+ if (command === 'update') {
204
+ stages.push('update-cli');
205
+ }
206
+ stages.push('build-install-app');
207
+ if (open) {
208
+ stages.push('launch-app');
209
+ }
210
+ return stages;
211
+ }
212
+ export function parseArgs(args) {
213
+ let open = true;
214
+ let dryRun = false;
215
+ let source;
216
+ const positional = [];
217
+ for (let i = 0; i < args.length; i += 1) {
218
+ const arg = args[i];
219
+ if (arg === '--no-open') {
220
+ open = false;
221
+ }
222
+ else if (arg === '--dry-run') {
223
+ dryRun = true;
224
+ }
225
+ else if (arg === '--source') {
226
+ const value = args[i + 1];
227
+ if (value === undefined) {
228
+ throw new Error('--source requires a path argument');
229
+ }
230
+ source = value;
231
+ i += 1;
232
+ }
233
+ else if (arg !== undefined) {
234
+ positional.push(arg);
235
+ }
236
+ }
237
+ if (positional.some((arg) => arg === '--version' || arg === '-v')) {
238
+ return { command: 'version', open, dryRun, source };
239
+ }
240
+ const command = positional[0];
241
+ if (command === undefined || command === '--help' || command === '-h') {
242
+ return { command: 'help', open, dryRun, source };
243
+ }
244
+ if (command === 'setup' || command === 'update') {
245
+ return { command, open, dryRun, source };
246
+ }
247
+ throw new Error(`Unknown command: ${command} (run "uniterra --help" for usage)`);
248
+ }
249
+ //# sourceMappingURL=install-logic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-logic.js","sourceRoot":"","sources":["../src/install-logic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;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IAAI,CAAC,CAAC;QACT,CAAC;aAAM,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YAC7B,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IACD,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,IAAI,CAAC,EAAE,CAAC;QAClE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACtD,CAAC;IACD,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACtE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACnD,CAAC;IACD,IAAI,OAAO,KAAK,OAAO,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC3C,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,oBAAoB,OAAO,oCAAoC,CAAC,CAAC;AACnF,CAAC"}
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@uniterra-solutions/uniterra",
3
+ "version": "0.9.0",
4
+ "description": "Uniterra desktop app installer: one-command setup and update for the Uniterra desktop app (macOS and Windows).",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/Uniterra-Solutions/uniterra.git"
9
+ },
10
+ "type": "module",
11
+ "bin": {
12
+ "uniterra": "./dist/cli.js"
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "engines": {
18
+ "node": ">=22.0.0"
19
+ },
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "scripts": {
24
+ "build": "tsc -b",
25
+ "typecheck": "tsc -b --noEmit",
26
+ "lint": "eslint src",
27
+ "format": "prettier --write src",
28
+ "test": "pnpm run build && tsc -p tsconfig.test.json && node --test \"test/**/*.test.mts\"",
29
+ "prepack": "pnpm run build"
30
+ },
31
+ "devDependencies": {
32
+ "@types/node": "^22.0.0",
33
+ "fast-check": "^4.9.0"
34
+ }
35
+ }