@shopify/plugin-cloudflare 0.0.0-nightly-20230301132356
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/LICENSE +8 -0
- package/README.md +71 -0
- package/dist/provider.d.ts +3 -0
- package/dist/provider.js +4 -0
- package/dist/provider.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/tunnel.d.ts +8 -0
- package/dist/tunnel.js +90 -0
- package/dist/tunnel.js.map +1 -0
- package/oclif.manifest.json +4 -0
- package/package.json +67 -0
- package/scripts/postinstall.js +145 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Copyright 2019-present, Shopify Inc.
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
5
|
+
|
|
6
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<img src="https://github.com/Shopify/cli/blob/main/assets/logo.png?raw=true" width="150"/>
|
|
2
|
+
|
|
3
|
+
# Shopify CLI
|
|
4
|
+
<a href="http://twitter.com/ShopifyDevs"><img src="https://img.shields.io/twitter/follow/ShopifyDevs?style=flat-square" alt="Twitter Followers"></a>
|
|
5
|
+
<img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License">
|
|
6
|
+
<a href="https://github.com/Shopify/cli/actions/workflows/shopify-cli.yml"></a>
|
|
7
|
+
|
|
8
|
+
With the Shopify command line interface (Shopify CLI 3.0), you can:
|
|
9
|
+
- initialize, build, dev, and deploy Shopify apps, extensions, functions and themes
|
|
10
|
+
- build custom storefronts and manage their hosting
|
|
11
|
+
|
|
12
|
+
<p> </p>
|
|
13
|
+
|
|
14
|
+
### Before you begin ###
|
|
15
|
+
|
|
16
|
+
Install the latest version of [Node.js](https://nodejs.org/en/download/) and [npm](https://docs.npmjs.com/getting-started) (or another package manager of your choice).
|
|
17
|
+
|
|
18
|
+
<p> </p>
|
|
19
|
+
|
|
20
|
+
## Developing apps with Shopify CLI
|
|
21
|
+
|
|
22
|
+
When you’re building a Shopify app, you can initialize your project using your preferred package manager. A single command will install all the dependencies you need — including Shopify CLI itself.
|
|
23
|
+
|
|
24
|
+
Initialize your project using one of the following commands:
|
|
25
|
+
- `npm init @shopify/app@latest` (installed by default with Node)
|
|
26
|
+
- `pnpm create @shopify/create-app@latest`
|
|
27
|
+
- `yarn create @shopify/app`
|
|
28
|
+
|
|
29
|
+
Learn more in the docs: [Create an app](https://shopify.dev/apps/getting-started/create)
|
|
30
|
+
|
|
31
|
+
<p> </p>
|
|
32
|
+
|
|
33
|
+
## Developing themes with Shopify CLI
|
|
34
|
+
|
|
35
|
+
To work with themes, the CLI needs to be installed globally with:
|
|
36
|
+
|
|
37
|
+
- `npm install -g @shopify/cli @shopify/theme`
|
|
38
|
+
|
|
39
|
+
You can also use do it through Homebrew on macOS: `brew install shopify-cli`
|
|
40
|
+
|
|
41
|
+
Learn more in the docs: [Shopify CLI for themes](https://shopify.dev/docs/themes/tools/cli)
|
|
42
|
+
|
|
43
|
+
<p> </p>
|
|
44
|
+
|
|
45
|
+
## Developing Hydrogen custom storefronts with Shopify CLI ##
|
|
46
|
+
|
|
47
|
+
The Hydrogen code lives here: https://github.com/Shopify/hydrogen/tree/main/packages/cli
|
|
48
|
+
|
|
49
|
+
Learn more in the docs: [Shopify CLI for Hydrogen storefronts](https://shopify.dev/docs/custom-storefronts/hydrogen/cli)
|
|
50
|
+
|
|
51
|
+
<p> </p>
|
|
52
|
+
|
|
53
|
+
## Help 🖐
|
|
54
|
+
|
|
55
|
+
If you encounter issues using the CLI or have feedback you'd like to share with us, below are some options:
|
|
56
|
+
|
|
57
|
+
- [Open a GitHub issue](https://github.com/Shopify/cli/issues) - To report bugs or request new features, open an issue in the Shopify CLI repository.
|
|
58
|
+
- [Shopify Community Forums](https://community.shopify.com/) - Visit our forums to connect with the community and learn more about Shopify CLI development.
|
|
59
|
+
- [CLI Documentation - Apps](https://shopify.dev/apps/tools/cli) - To view CLI documentation for app development
|
|
60
|
+
- [CLI Documentation - Themes](https://shopify.dev/themes/tools/cli) - To view CLI documentation for theme development
|
|
61
|
+
- [CLI Documentation - Hydrogen](https://shopify.dev/custom-storefronts/tools/cli) - To view CLI documentation for Hydrogen (custom storefront) development
|
|
62
|
+
|
|
63
|
+
## Contribute 👩🏽💻
|
|
64
|
+
|
|
65
|
+
If you'd like to contribute to the project, check out the [contributors docs](/docs) and the [steps to get started](/docs/cli/get-started.md).
|
|
66
|
+
|
|
67
|
+
<p> </p>
|
|
68
|
+
|
|
69
|
+
## References
|
|
70
|
+
|
|
71
|
+
- [oclif](https://oclif.io/)
|
package/dist/provider.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,sCAAsC,CAAA;AAEnE,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAA;AAC3C,eAAe,cAAc,CAAC,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC,CAAA","sourcesContent":["import {defineProvider} from '@shopify/cli-kit/node/plugins/tunnel'\n\nexport const TUNNEL_PROVIDER = 'cloudflare'\nexport default defineProvider({name: TUNNEL_PROVIDER})\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../cli-kit/dist/public/node/result.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/globals.global.d.ts","../../../node_modules/.pnpm/@types+node@14.18.36/node_modules/@types/node/index.d.ts","../../../node_modules/.pnpm/node-abort-controller@3.0.1/node_modules/node-abort-controller/index.d.ts","../../cli-kit/dist/public/node/abort.d.ts","../../cli-kit/dist/public/node/node-package-manager.d.ts","../../../node_modules/.pnpm/@types+diff@5.0.2/node_modules/@types/diff/index.d.ts","../../cli-kit/dist/private/node/content-tokens.d.ts","../../cli-kit/dist/public/node/output.d.ts","../../../node_modules/.pnpm/@types+react@16.14.0/node_modules/@types/react/global.d.ts","../../../node_modules/.pnpm/csstype@3.1.1/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@types+prop-types@15.7.5/node_modules/@types/prop-types/index.d.ts","../../../node_modules/.pnpm/@types+react@16.14.0/node_modules/@types/react/index.d.ts","../../cli-kit/dist/private/node/ui/components/TokenizedText.d.ts","../../../node_modules/.pnpm/ts-error@1.0.6/node_modules/ts-error/lib/es.d.ts","../../cli-kit/dist/public/node/error.d.ts","../../cli-kit/dist/private/common/json.d.ts","../../cli-kit/dist/public/common/ts/deep-required.d.ts","../../cli-kit/dist/public/node/monorail.d.ts","../../cli-kit/dist/public/common/ts/pick-by-prefix.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/help.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/pjson.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/topic.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/plugin.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/hooks.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/config.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/alphabet.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/errors.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/manifest.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/s3-manifest.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/parser.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/ts-config.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/flags.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/args.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/interfaces/index.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/errors/handle.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/errors/errors/cli.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/errors/errors/exit.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/errors/errors/module-load.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/errors/logger.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/errors/config.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/errors/index.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/config/plugin.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/config/config.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/config/ts-node.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/config/index.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/command.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/main.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/flags.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/args.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/help/formatter.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/help/command.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/help/util.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/help/index.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/parser/help.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/parser/index.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/settings.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/action/base.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/config.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/exit.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/prompt.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/styled/header.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/styled/json.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/styled/object.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/styled/table.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/styled/tree.d.ts","../../../node_modules/.pnpm/@types+cli-progress@3.11.0/node_modules/@types/cli-progress/index.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/styled/progress.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/styled/index.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/wait.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/cli-ux/index.d.ts","../../../node_modules/.pnpm/@oclif+core@2.1.4/node_modules/@oclif/core/lib/index.d.ts","../../cli-kit/dist/public/node/plugins.d.ts","../../cli-kit/dist/public/node/plugins/tunnel.d.ts","../src/provider.ts","../../cli-kit/dist/public/node/system.d.ts","../../cli-kit/dist/public/node/path.d.ts","../src/tunnel.ts","../../../node_modules/.pnpm/@types+minimatch@5.1.2/node_modules/@types/minimatch/index.d.ts","../../../node_modules/.pnpm/@types+glob@8.0.0/node_modules/@types/glob/index.d.ts","../../../node_modules/.pnpm/@types+rimraf@3.0.2/node_modules/@types/rimraf/index.d.ts","../../../node_modules/.pnpm/@types+tmp@0.2.3/node_modules/@types/tmp/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","impliedFormat":1},{"version":"7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","impliedFormat":1},{"version":"8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","impliedFormat":1},{"version":"5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","impliedFormat":1},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true,"impliedFormat":1},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true,"impliedFormat":1},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true,"impliedFormat":1},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true,"impliedFormat":1},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true,"impliedFormat":1},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true,"impliedFormat":1},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true,"impliedFormat":1},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true,"impliedFormat":1},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"6656ee3ecb2a17c7e093eea5e0f1e8b4b5cb2ba87d2b6b78a321793aebcc5ef1","impliedFormat":99},{"version":"4c2c4f53e8eedd970f8afa369d7371544fb6231bf95e659f8602e09abe74d5a5","impliedFormat":1},{"version":"5540267409ab1444c73c786b8ae4caa37d5f0ea41f9255c6123338da790ce5cc","affectsGlobalScope":true,"impliedFormat":1},{"version":"c2b5085f47e41d6940bbc5b0d3bd7cc0037c752efb18aecd243c9cf83ad0c0b7","impliedFormat":1},{"version":"3143a5add0467b83150961ecd33773b561a1207aec727002aa1d70333068eb1b","impliedFormat":1},{"version":"9deb3a5eaf187df1428f0fee83c8c51eedb74f6da3442410bad9688e42a7e2b5","impliedFormat":1},{"version":"d0fc76a91c828fbe3f0be5d683273634b7b101068333ceed975a8a9ac464137b","impliedFormat":1},{"version":"1a048ff164b8d9609f5de3139d4e37f6e8a82af82087ac414b9208f52ef8aac7","affectsGlobalScope":true,"impliedFormat":1},{"version":"3111079f3cb5f2b9c812ca3f46161562bce5bfb355e915f46ed46c41714dc1c3","impliedFormat":1},{"version":"db86f82fac051ae344b47e8fe7ac7990174b41db79b2b220a49dc5a47c71a9b5","impliedFormat":1},{"version":"b32b6b16cb0bda68199582ad6f22242d07ee75fac9b1f28a98cd838afc5eea45","impliedFormat":1},{"version":"4441ee4119824bfaebc49308559edd7545978f9cb41a40f115074e1031dde75f","impliedFormat":1},{"version":"60693a88462d0e97900123b5bf7c73e146ce0cc94da46a61fe6775b430d2ff05","affectsGlobalScope":true,"impliedFormat":1},{"version":"588c69eda58b9202676ec7ca11a72c3762819b46a0ed72462c769846153c447c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ae064ed4f855716b7ff348639ddcd6a6d354a72fae82f506608a7dc9266aa24c","impliedFormat":1},{"version":"92f019c55b21c939616f6a48f678e714ac7b109444cbbf23ad69310ce66ecbdc","impliedFormat":1},{"version":"cf0a69c71aedf2f8fe45925abd554fd3dc7301ce66d6ab7521fb8c3471c24dd8","impliedFormat":1},{"version":"56e6722c6013609b3e5e6ed4a8a7e01f41da6c5e3d6f0ecff3d09ef7a81414cf","impliedFormat":1},{"version":"139fd681eff7771a38d0c025d13c7a11c5474f6aab61e01c41511d71496df173","impliedFormat":1},{"version":"f614c3f61e46ccc2cb58702d5a158338ea57ee09099fde5db4cfc63ed0ce4d74","impliedFormat":1},{"version":"44e42ed6ec9c4451ebe89524e80ac8564e9dd0988c56e6c58f393c810730595d","impliedFormat":1},{"version":"d79fda68cbfb361c4ee9cd9ea169babb65887534d64017726cd01f54783d20a5","impliedFormat":1},{"version":"155865f5f76db0996cd5e20cc5760613ea170ee5ad594c1f3d76fcaa05382161","impliedFormat":1},{"version":"e92852d673c836fc64e10c38640abcd67c463456e5df55723ac699b8e6ab3a8a","impliedFormat":1},{"version":"4455c78d226d061b1203c7614c6c6eb5f4f9db5f00d44ff47d0112de8766fbc4","impliedFormat":1},{"version":"ec369bb9d97c4dc09dd2a4093b7ca3ba69ad284831fccac8a1977785e9e38ce5","affectsGlobalScope":true,"impliedFormat":1},{"version":"4465a636f5f6e9665a90e30691862c9e0a3ac2edc0e66296704f10865e924f2a","impliedFormat":1},{"version":"9af781f03d44f5635ed7844be0ce370d9d595d4b4ec67cad88f0fac03255257e","impliedFormat":1},{"version":"f9fd4c3ef6de27fa0e256f4e75b61711c4be05a3399f7714621d3edc832e36b0","impliedFormat":1},{"version":"e49290b7a927995c0d7e6b2b9c8296284b68a9036d9966531de65185269258d7","impliedFormat":1},{"version":"c3689f70ce7563c2299f2dcb3c72efdf6f87ae510e7456fa6223c767d0ca99fc","impliedFormat":1},{"version":"874ca809b79276460011480a2829f4c8d4db29416dd411f71efbf8f497f0ac09","impliedFormat":1},{"version":"6c903bceaf3f3bc04f2d4c7dcd89ce9fb148b3ba0a5f5408d8f6de2b7eecc7ea","impliedFormat":1},{"version":"504d049d9e550a65466b73ca39da6469ab41786074ea1d16d37c8853f9f6ab2e","impliedFormat":1},{"version":"23a28f834a078986bbf58f4e3705956983ff81c3c2493f3db3e5f0e8a9507779","impliedFormat":1},{"version":"4febdf7f3ec92706c58e0b4e8159cd6de718284ef384260b07c9641c13fc70ce","impliedFormat":1},{"version":"eabefc2999c1489cf870e0c85af908900462fa245822d9a4616780a1a129945d","affectsGlobalScope":true,"impliedFormat":1},{"version":"7335933d9f30dcfd2c4b6080a8b78e81912a7fcefb1dafccb67ca4cb4b3ac23d","impliedFormat":1},{"version":"a6bfe9de9adef749010c118104b071d14943802ff0614732b47ce4f1c3e383cd","impliedFormat":1},{"version":"4c3d0e10396646db4a1e917fb852077ee77ae62e512913bef9cccc2bb0f8bd0e","impliedFormat":1},{"version":"3b220849d58140dcc6718f5b52dcd29fdb79c45bc28f561cbd29eb1cac6cce13","impliedFormat":1},{"version":"0ee22fce41f7417a24c808d266e91b850629113c104713a35854393d55994beb","impliedFormat":1},{"version":"22d1b1d965baba05766613e2e6c753bb005d4386c448cafd72c309ba689e8c24","impliedFormat":1},{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true,"impliedFormat":1},{"version":"c6c0bd221bb1e94768e94218f8298e47633495529d60cae7d8da9374247a1cf5","impliedFormat":1},{"version":"f2ae24bba46613ed01d20d1e18104e161537321ade560e0ea7f5b80279397abe","impliedFormat":1},{"version":"d8aefefcd7cdfd6cd7f123039ca62be5e82289b61a8388faec0c42bbb74e8000","impliedFormat":99},{"version":"8f1fdccb84cc6a2017cf3cce67e5ee8cf133f35699e0810a78549b723b67275d","impliedFormat":99},{"version":"5cd8c47a9c9f0392dbe2d3095cb8549ece7256a2278bee6cf8ef3bfee2a70371","impliedFormat":1},{"version":"ea37ed9ae575a7b08f96c281296ab2e51c7f69731dd6a06a2825e4b996b565c2","impliedFormat":99},{"version":"90797f74a14b846cc70640e371a465a586a246d1f890af1c67998660816b1b8c","impliedFormat":99},{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c29793071152b207c01ea1954e343be9a44d85234447b2b236acae9e709a383","impliedFormat":1},{"version":"6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","impliedFormat":1},{"version":"daccb352940b992b3042ce0481f1d1a57956f187bb66656d2e2992775e8584eb","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ef9b021eeaf27e5211d29acd5f6ff09900012980af8d6cc41bc9123220eb0d2","impliedFormat":99},{"version":"c6d4e9653007664acc0a8971c94d851c9a286b7a80b54a32c47d90f0d0cae3fe","impliedFormat":1},{"version":"c27471e07179b17ce9b4e5971a7685dd6a288dab8d6c39acf21740a96d7c9eee","impliedFormat":99},{"version":"25c689d1004281802c622fb4d1e8eddde2f566dd50fc23d4499eb76b20657d8d","impliedFormat":99},{"version":"1ddbce09db6723dcb00b8da34e9a31a25d7b9f03ef5d98828bda058f274d9091","impliedFormat":99},{"version":"3262bce9abdff5389fdb045c4b790669c151ac42efada99c2267f4fa94fbd822","impliedFormat":99},{"version":"9d2756560141cff595951f54c654c4dd687301f08682a497d7d746fea058877c","impliedFormat":99},{"version":"3184417b619fcdab232c520b9e51c33972a43640fd42c34d2ceb3f2af2e036d0","impliedFormat":1},{"version":"041a18e61cc50362e6df62e0033b9bc4d919da6071545cd7a777ba21eaf55318","impliedFormat":1},{"version":"bd80422c68e0575fee07883efc93fdbf32da39f76ab8479d56eba05e7fac8363","impliedFormat":1},{"version":"e88c90ae8662f7f4b64499f7f881481eba93ea4d76ab1e637cd830ba6a3ba7d2","impliedFormat":1},{"version":"b619e4dcb6c3aaed579cf7650e68be5c8ed6a12b5548e0662b906dd907ab3f9f","impliedFormat":1},{"version":"7c81ee14017f286a23283ade1f4d6874ea9646074bb0782ac5b0c9395b296deb","impliedFormat":1},{"version":"032e362f68a69c4f6af9678b4f5fdcf5b6c348e6aa279a7b2c89099bb7887a0a","impliedFormat":1},{"version":"4cbb99e1685ca6d0cea375d50c7c6e0f1c444fb4bdf301c48f7bfc92b7eea4b1","impliedFormat":1},{"version":"137fcb488abe39cd57437d2bf940862bfcaa709e248602461b82236c5a01c1ce","impliedFormat":1},{"version":"2b3849074b5813376ffe71ff550ef25cce638c43385ed63c1b5be504d3e213f6","impliedFormat":1},{"version":"91e0a3fe23e6599a2cd3a9119d904ab077fe968d269c9438d0d65380115fe4b8","impliedFormat":1},{"version":"5a82a1daacf5f4e73e4ba80040bd0be03d8fcfee4080c973389b39bd0721553b","impliedFormat":1},{"version":"694ce0788daf31dadf82702cb0efe558014a0a210278c78817840f1caa4f3a09","impliedFormat":1},{"version":"99fd2587995ea6001ac20d6ecebe748e163d62e820f369452919c265f140b3c9","impliedFormat":1},{"version":"07296b5920e496727a0f6eb3ca64c6ef880e19c83e0ff4dd7829da4fafccd6d7","impliedFormat":1},{"version":"b1ee01f8c098bbbed20cd174d9ac9737b1562ddafa4f5a9f01f0fe5747d4d096","impliedFormat":1},{"version":"f24b104cf0541b30902b2c947cef8e4955f16068c492d00bc5c70530d8a5ae89","impliedFormat":1},{"version":"4df02f7093cfdaa88c78186c50064ce6307865d5a2b6f52d16b2a477a289840e","impliedFormat":1},{"version":"4a3de027fe2fe214e22db9703023024d85f2863138940a21b4933113313394bb","impliedFormat":1},{"version":"1b9f1ba55985edc074f18ddfe23c6c93d8463ff30651482e8783e56ca0df0653","impliedFormat":1},{"version":"e12f2c48252d0ae261db2be28206e4f1cc282fa5459a0f991a09f86bb766543f","impliedFormat":1},{"version":"19ef1d72f861901d6dd7891cc14c6ca0bd860b3089e33188f4764232b1bfaa38","impliedFormat":1},{"version":"0a2b731add430de466c4894bbf5523b1be33f36e3f1b7e1012c070d42a2ef21e","impliedFormat":1},{"version":"3c0c8c6e33c28839ca26fa3b2dce799516a3ae1f638c3de8573d05cc47ccc9ac","impliedFormat":1},{"version":"064572e167723c12fa332de7ca48fe3fbef12f16aa58360381d8b3752b8cdc6d","impliedFormat":1},{"version":"a92c7fc820badc697c7e9e99a9c6046d10edd876611a81c1efe4303ab4b8fecc","impliedFormat":1},{"version":"18ddf620e4f2a269905eb9a89e934371d3a71f2fdfad80965917bcfbf4093c43","impliedFormat":1},{"version":"e8f74aaf39b5c253ccb810b1451558c0536ab526aefbc97d35b563083db1a0a5","impliedFormat":1},{"version":"64bd4308b81c3b91cf2dad86a3de6b25b3db7a740968645dca9cdb3575917799","impliedFormat":1},{"version":"2f49438d884d9213cf818e8dbb099aca5a610fb0afee5b178e58cdb20e18cd47","impliedFormat":1},{"version":"766089db9a6dfde973076bc4b0198e36a06fb7a6fc572be910ab3f0729efaabf","impliedFormat":1},{"version":"fb50971755e1a3ae7775d50e323062c4b5ab86307f9d815dd7357a3ed9e1505f","impliedFormat":1},{"version":"f0023e6c5b951d9aa820b86adeeb7b4dba49447b3ea30f489e8edbfdfa0cb32a","impliedFormat":1},{"version":"f8bf1455ac2c42adf42d8e805efb1d5f31f1caafa66b9e67bd02b983ace037f3","impliedFormat":1},{"version":"98bb229db2d81eaec4ba5ef6e7bbb77f24c424e63217bed49a951e9c6b518507","impliedFormat":1},{"version":"57db29be78958cdc0150a4c3f0972d1ff02f471a4083473c6b3c39d792771c7e","impliedFormat":1},{"version":"ee5d6ffd69a8dc1ae67e91df939e83025dfe55b7b1cdae0522c02e2ad189b328","impliedFormat":1},{"version":"c5dcddb11f17e4e6b6798f089b2c68fb0b6d7f77fc5e6885f48f95b5d8d034c9","impliedFormat":1},{"version":"f46dd858efc9056e361553628bb84124c150a85ea5a787024f175b452dbdc1d9","impliedFormat":1},{"version":"168840936351f71eba6047f128bd450e7f1d724ef92d66d1514f98907061e2e9","impliedFormat":1},{"version":"797cc548454e0dbe50b0767a0b061fa7564b71b57fe541482f0a655a7d2bafb6","impliedFormat":1},{"version":"de8ede1a3263a477c17a9702db5eb4bf65c64f0a5cfc2843db886fa9f3bd8e76","impliedFormat":1},{"version":"56e79a504c6d8570c1e5bdd0536182dd2fb461cdd8468cda2b2fade49fe559c9","impliedFormat":1},{"version":"b363b85c8e93be17e1cdb62c400e08ea1dd88df8dc9a6c9ac1d34b79695b9694","impliedFormat":1},{"version":"781cc223d1c1b6539094df46dce708348a90376e8cde19babdbe743057e44642","impliedFormat":1},{"version":"b9c05c23f53be5b435dde4349f70d5851c74b891a3cdd252efbf149437c3c5f0","impliedFormat":1},{"version":"6d8c708a5237a8508ee8553f22143a6d2fb60807de0574b41622c1e281b04c6d","impliedFormat":1},{"version":"7c610268bd1c45fd2d3722b590e303173b96822508eeabdfafc97b926fe370ea","impliedFormat":1},{"version":"bc860804744a3eba271ce1bc3a76385e0e993a788a16c9b359cae059974c05ee","impliedFormat":1},{"version":"9d3fe3b9bfb39058d0632a883821ec42596cba09cfe88905bbe1d36530362383","impliedFormat":1},{"version":"6ba6d854eb37a0474a45c7afe9d2c8e04f271f0e63e444d643eab5fe67f28d90","impliedFormat":1},{"version":"570b5ef05eaf59c4b3f59d7f31421110b8bcb353787c6407e8a0d194ef05ceb6","impliedFormat":1},{"version":"e149f4a997ee1703c84a6b5bf2c0220a2b89018a44f173b86e130b1d191e14c8","impliedFormat":99},{"version":"3d9bc9b263eda0b36f3c6d5473e688dfc939485541444d4ca702a6029660888b","impliedFormat":99},{"version":"fef3c13cf87de67938369cfe31c9bad9a79792bc4117a8148966e02935abf7c3","signature":"8b92c2c6342887696d616b39d6c99e83e5d369b5452c2aec76658c1946a8f881","impliedFormat":99},{"version":"5ca2b27fe2939d6b3a4cccb9a8cc7c3fe2cb1e39ad5ebb4a9cca92a9200538b6","impliedFormat":99},{"version":"df0b3f6d97b0ba6746f1b3037070fb05f4bbc6fd5b70b99488532275ecada31f","impliedFormat":99},{"version":"33618b2bd5f83f5c98d495deec2c57beca41523e93d0305d3f5df0a57616fc8f","signature":"e76573f2f7f0bd74501284208547cb0e2734e7dc3a870ee5e14b2e1c128d7056","impliedFormat":99},{"version":"963d59066dd6742da1918a6213a209bcc205b8ee53b1876ee2b4e6d80f97c85e","impliedFormat":1},{"version":"a55ca8b5f8c6a8535bb26fac1e10132a5338234ca3d5b9ed739fbc8ef41c8075","impliedFormat":1},{"version":"f4cf5f0ad1cfb0ceebbe4fbe8aaf0aa728e899c99cc36ec6c0c4b8f6e8a84c83","impliedFormat":1},{"version":"6061aa83817c30d3a590f037b3cba22cdd809fbe697926d6511b45147928a342","impliedFormat":1}],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"inlineSources":true,"jsx":2,"module":6,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipDefaultLibCheck":true,"skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"target":7,"tsBuildInfoFile":"./tsconfig.tsbuildinfo"},"fileIdsList":[[65,73,101],[128],[112,128,129,130,131,139,140],[132,133,134,135,136,138],[137],[105],[94,96,98,101,112,116],[94,96,105,113,117],[113,114,115],[92,93,94,99,112,117],[110],[98],[105,107],[105,106,107,108,109,110,111],[65,73,101,105],[105,117,121],[105,117],[105,117,121,122,123],[105,124],[95,105,112,116,117,118,119,120,121,123,124,126,127,141],[101],[92,93,94,95,117],[94,96,117],[91,92,93,94,95,96,97,98,99,100,101,102,103,104],[117],[96,97,117],[91],[92,93,117],[105,116],[101,125],[42,73],[42,43,73,149],[30],[32],[33,38],[34,42,43,50,59],[34,35,42,50],[36,66],[37,38,43,51],[38,59],[39,40,42,50],[40],[41,42],[42],[42,43,44,59,65],[43,44],[45,50,59,65],[42,43,45,46,50,59,62,65],[45,47,59,62,65],[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72],[42,48],[49,65],[40,42,50,59],[51],[52],[32,53],[54,64],[55],[56],[42,57],[57,58,66,68],[42,59],[60],[61],[50,59,62],[63],[50,64],[56,65],[66],[59,67],[68],[69],[42,44,59,65,68,70],[59,71],[80,81,82],[43,73,150],[77,79],[83],[74],[79,84,85],[87,88],[59,73,75,86],[59,73,75,76,77,78],[65,73],[29,87,89,90,142,144],[29,86,143],[59,73,75],[144],[29,59,65,144,145,146,147],[29,144]],"referencedMap":[[120,1],[129,2],[141,3],[139,4],[138,5],[135,6],[117,7],[114,8],[116,9],[113,10],[111,11],[107,12],[108,13],[109,13],[106,6],[112,14],[119,15],[122,16],[121,17],[124,18],[123,19],[142,20],[104,21],[96,22],[103,21],[95,23],[105,24],[99,25],[101,26],[92,27],[94,28],[118,29],[125,21],[126,30],[137,31],[150,32],[30,33],[32,34],[33,35],[34,36],[35,37],[36,38],[37,39],[38,40],[39,41],[40,42],[41,43],[42,44],[43,45],[44,46],[45,47],[46,48],[47,49],[73,50],[48,51],[49,52],[50,53],[51,54],[52,55],[53,56],[54,57],[55,58],[56,59],[57,60],[58,61],[59,62],[60,63],[61,64],[62,65],[63,66],[64,67],[65,68],[66,69],[67,70],[68,71],[69,72],[70,73],[71,74],[83,75],[151,76],[78,77],[84,78],[75,79],[86,80],[89,81],[76,82],[79,83],[147,84],[143,85],[144,86],[146,87],[145,88],[148,89]],"exportedModulesMap":[[120,1],[129,2],[141,3],[139,4],[138,5],[135,6],[117,7],[114,8],[116,9],[113,10],[111,11],[107,12],[108,13],[109,13],[106,6],[112,14],[119,15],[122,16],[121,17],[124,18],[123,19],[142,20],[104,21],[96,22],[103,21],[95,23],[105,24],[99,25],[101,26],[92,27],[94,28],[118,29],[125,21],[126,30],[137,31],[150,32],[30,33],[32,34],[33,35],[34,36],[35,37],[36,38],[37,39],[38,40],[39,41],[40,42],[41,43],[42,44],[43,45],[44,46],[45,47],[46,48],[47,49],[73,50],[48,51],[49,52],[50,53],[51,54],[52,55],[53,56],[54,57],[55,58],[56,59],[57,60],[58,61],[59,62],[60,63],[61,64],[62,65],[63,66],[64,67],[65,68],[66,69],[67,70],[68,71],[69,72],[70,73],[71,74],[83,75],[151,76],[78,77],[84,78],[75,79],[86,80],[89,81],[76,82],[79,83],[147,84],[143,85],[144,86],[146,87],[145,88],[148,90]],"semanticDiagnosticsPerFile":[120,128,129,130,141,131,132,139,133,134,138,135,136,140,117,114,116,113,115,111,107,108,109,106,112,110,119,122,121,124,123,142,97,104,96,98,103,91,95,105,99,101,92,94,100,93,102,118,125,126,127,137,77,150,149,30,32,33,34,35,36,37,38,39,40,41,42,43,44,31,72,45,46,47,73,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,82,80,83,151,152,81,74,85,7,6,2,8,9,10,11,12,13,14,15,3,4,19,16,17,18,20,21,22,5,23,24,25,26,27,1,28,87,78,84,88,90,75,86,89,76,79,147,143,144,29,146,145,148],"latestChangedDtsFile":"./tunnel.d.ts"},"version":"4.9.4"}
|
package/dist/tunnel.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TunnelError } from '@shopify/cli-kit/node/plugins/tunnel';
|
|
2
|
+
import { Result } from '@shopify/cli-kit/node/result';
|
|
3
|
+
declare const _default: import("@shopify/cli-kit/node/plugins/tunnel").TunnelStartFunction;
|
|
4
|
+
export default _default;
|
|
5
|
+
export type ReturnType = Promise<Result<{
|
|
6
|
+
url: string;
|
|
7
|
+
}, TunnelError>>;
|
|
8
|
+
export declare function hookStart(port: number): ReturnType;
|
package/dist/tunnel.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { TUNNEL_PROVIDER } from './provider.js';
|
|
2
|
+
import { startTunnel, TunnelError } from '@shopify/cli-kit/node/plugins/tunnel';
|
|
3
|
+
import { err, ok } from '@shopify/cli-kit/node/result';
|
|
4
|
+
import { exec } from '@shopify/cli-kit/node/system';
|
|
5
|
+
import { joinPath, dirname } from '@shopify/cli-kit/node/path';
|
|
6
|
+
import { Writable } from 'stream';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
export default startTunnel({ provider: TUNNEL_PROVIDER, action: hookStart });
|
|
9
|
+
// How much time to wait for a tunnel to be established. in seconds.
|
|
10
|
+
const TUNNEL_TIMEOUT = 20;
|
|
11
|
+
export async function hookStart(port) {
|
|
12
|
+
try {
|
|
13
|
+
const { url } = await tunnel({ port });
|
|
14
|
+
return ok({ url });
|
|
15
|
+
// eslint-disable-next-line no-catch-all/no-catch-all, @typescript-eslint/no-explicit-any
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
const tunnelError = new TunnelError('unknown', error.message);
|
|
19
|
+
return err(tunnelError);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async function tunnel(options) {
|
|
23
|
+
const args = ['tunnel', '--url', `http://localhost:${options.port}`, '--no-autoupdate'];
|
|
24
|
+
let connected = false;
|
|
25
|
+
let resolved = false;
|
|
26
|
+
let url;
|
|
27
|
+
return new Promise((resolve, reject) => {
|
|
28
|
+
setTimeout(() => {
|
|
29
|
+
if (!resolved) {
|
|
30
|
+
resolved = true;
|
|
31
|
+
reject(new Error('Timed out waiting for a cloudflare tunnel'));
|
|
32
|
+
}
|
|
33
|
+
}, TUNNEL_TIMEOUT * 1000);
|
|
34
|
+
const customStdout = new Writable({
|
|
35
|
+
write(chunk, _, callback) {
|
|
36
|
+
if (resolved)
|
|
37
|
+
return;
|
|
38
|
+
if (!url)
|
|
39
|
+
url = findUrl(chunk);
|
|
40
|
+
if (findConnection(chunk))
|
|
41
|
+
connected = true;
|
|
42
|
+
if (connected) {
|
|
43
|
+
if (!url)
|
|
44
|
+
return reject(new Error('A connection was stablished but no Tunnel URL was found'));
|
|
45
|
+
resolved = true;
|
|
46
|
+
resolve({ url });
|
|
47
|
+
}
|
|
48
|
+
const errorMessage = findError(chunk);
|
|
49
|
+
if (errorMessage)
|
|
50
|
+
reject(new Error(errorMessage));
|
|
51
|
+
callback();
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
55
|
+
exec(getBinPathTarget(), args, {
|
|
56
|
+
stdout: customStdout,
|
|
57
|
+
stderr: customStdout,
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function findUrl(data) {
|
|
62
|
+
const match = data.toString().match(/(https?:\/\/[^\s]+trycloudflare\.com)/) ?? undefined;
|
|
63
|
+
return match && match[1];
|
|
64
|
+
}
|
|
65
|
+
function findError(data) {
|
|
66
|
+
const knownErrors = [
|
|
67
|
+
/failed to request quick Tunnel/,
|
|
68
|
+
/failed to unmarshal quick Tunnel/,
|
|
69
|
+
/failed to parse quick Tunnel ID/,
|
|
70
|
+
/failed to provision routing/,
|
|
71
|
+
/ERR Couldn't start tunnel/,
|
|
72
|
+
];
|
|
73
|
+
const match = knownErrors.some((error) => error.test(data.toString()));
|
|
74
|
+
return match ? data.toString() : undefined;
|
|
75
|
+
}
|
|
76
|
+
function findConnection(data) {
|
|
77
|
+
const match = data.toString().match(/INF Connection/) ?? undefined;
|
|
78
|
+
return match && match[0];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Get the path where the binary was installed.
|
|
82
|
+
* If the environment variable SHOPIFY_CLI_CLOUDFLARED_PATH is set, use that.
|
|
83
|
+
*/
|
|
84
|
+
function getBinPathTarget() {
|
|
85
|
+
if (process.env.SHOPIFY_CLI_CLOUDFLARED_PATH) {
|
|
86
|
+
return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH;
|
|
87
|
+
}
|
|
88
|
+
return joinPath(dirname(fileURLToPath(import.meta.url)), '..', 'bin', process.platform === 'win32' ? 'cloudflared.exe' : 'cloudflared');
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=tunnel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tunnel.js","sourceRoot":"","sources":["../src/tunnel.ts"],"names":[],"mappings":"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","sourcesContent":["import {TUNNEL_PROVIDER} from './provider.js'\nimport {startTunnel, TunnelError} from '@shopify/cli-kit/node/plugins/tunnel'\nimport {err, ok, Result} from '@shopify/cli-kit/node/result'\nimport {exec} from '@shopify/cli-kit/node/system'\nimport {joinPath, dirname} from '@shopify/cli-kit/node/path'\nimport {Writable} from 'stream'\nimport {fileURLToPath} from 'url'\n\nexport default startTunnel({provider: TUNNEL_PROVIDER, action: hookStart})\n\nexport type ReturnType = Promise<Result<{url: string}, TunnelError>>\n\n// How much time to wait for a tunnel to be established. in seconds.\nconst TUNNEL_TIMEOUT = 20\n\nexport async function hookStart(port: number): ReturnType {\n try {\n const {url} = await tunnel({port})\n return ok({url})\n // eslint-disable-next-line no-catch-all/no-catch-all, @typescript-eslint/no-explicit-any\n } catch (error: any) {\n const tunnelError = new TunnelError('unknown', error.message)\n return err(tunnelError)\n }\n}\n\nasync function tunnel(options: {port: number}): Promise<{url: string}> {\n const args: string[] = ['tunnel', '--url', `http://localhost:${options.port}`, '--no-autoupdate']\n\n let connected = false\n let resolved = false\n let url: string | undefined\n\n return new Promise<{url: string}>((resolve, reject) => {\n setTimeout(() => {\n if (!resolved) {\n resolved = true\n reject(new Error('Timed out waiting for a cloudflare tunnel'))\n }\n }, TUNNEL_TIMEOUT * 1000)\n\n const customStdout = new Writable({\n write(chunk, _, callback) {\n if (resolved) return\n if (!url) url = findUrl(chunk)\n if (findConnection(chunk)) connected = true\n if (connected) {\n if (!url) return reject(new Error('A connection was stablished but no Tunnel URL was found'))\n resolved = true\n resolve({url})\n }\n const errorMessage = findError(chunk)\n if (errorMessage) reject(new Error(errorMessage))\n callback()\n },\n })\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n exec(getBinPathTarget(), args, {\n stdout: customStdout,\n stderr: customStdout,\n })\n })\n}\n\nfunction findUrl(data: Buffer): string | undefined {\n const match = data.toString().match(/(https?:\\/\\/[^\\s]+trycloudflare\\.com)/) ?? undefined\n return match && match[1]\n}\n\nfunction findError(data: Buffer): string | undefined {\n const knownErrors = [\n /failed to request quick Tunnel/,\n /failed to unmarshal quick Tunnel/,\n /failed to parse quick Tunnel ID/,\n /failed to provision routing/,\n /ERR Couldn't start tunnel/,\n ]\n const match = knownErrors.some((error) => error.test(data.toString()))\n return match ? data.toString() : undefined\n}\n\nfunction findConnection(data: Buffer): string | undefined {\n const match = data.toString().match(/INF Connection/) ?? undefined\n return match && match[0]\n}\n\n/**\n * Get the path where the binary was installed.\n * If the environment variable SHOPIFY_CLI_CLOUDFLARED_PATH is set, use that.\n */\nfunction getBinPathTarget() {\n if (process.env.SHOPIFY_CLI_CLOUDFLARED_PATH) {\n return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH\n }\n return joinPath(\n dirname(fileURLToPath(import.meta.url)),\n '..',\n 'bin',\n process.platform === 'win32' ? 'cloudflared.exe' : 'cloudflared',\n )\n}\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@shopify/plugin-cloudflare",
|
|
3
|
+
"version": "0.0.0-nightly-20230301132356",
|
|
4
|
+
"description": "Enables the creation of Cloudflare tunnels from `shopify app dev`, allowing previews from any device",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"shopify",
|
|
7
|
+
"shopify-cli",
|
|
8
|
+
"shopify-partners"
|
|
9
|
+
],
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/Shopify/cli/issues"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "Shopify",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"module": "dist/index.js",
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
18
|
+
"files": [
|
|
19
|
+
"/dist",
|
|
20
|
+
"/scripts",
|
|
21
|
+
"/oclif.manifest.json"
|
|
22
|
+
],
|
|
23
|
+
"eslintConfig": {
|
|
24
|
+
"extends": [
|
|
25
|
+
"../../.eslintrc.cjs"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@oclif/core": "1.21.0",
|
|
30
|
+
"@shopify/cli-kit": "0.0.0-nightly-20230301132356",
|
|
31
|
+
"node-fetch": "3.3.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"vite": "^2.9.13",
|
|
35
|
+
"vitest": "^0.28.5"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=14.17.0"
|
|
39
|
+
},
|
|
40
|
+
"os": [
|
|
41
|
+
"darwin",
|
|
42
|
+
"linux",
|
|
43
|
+
"win32"
|
|
44
|
+
],
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"@shopify:registry": "https://registry.npmjs.org",
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"engine-strict": true,
|
|
50
|
+
"oclif": {
|
|
51
|
+
"commands": "dist/commands",
|
|
52
|
+
"hooks": {
|
|
53
|
+
"tunnel_start": "dist/tunnel",
|
|
54
|
+
"tunnel_provider": "dist/provider"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "nx build",
|
|
59
|
+
"clean": "nx clean",
|
|
60
|
+
"lint": "nx lint",
|
|
61
|
+
"lint:fix": "nx lint:fix",
|
|
62
|
+
"test": "nx run plugin-cloudflare:test",
|
|
63
|
+
"test:watch": "nx test:watch",
|
|
64
|
+
"type-check": "nx type-check",
|
|
65
|
+
"postinstall": "node scripts/postinstall.js"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
// Install script for cloudflared, derived from https://github.com/JacobLinCool/node-cloudflared
|
|
2
|
+
import * as path from 'path'
|
|
3
|
+
import {fileURLToPath} from 'url'
|
|
4
|
+
import util from 'util'
|
|
5
|
+
import {pipeline} from 'stream'
|
|
6
|
+
import {execSync} from 'child_process'
|
|
7
|
+
import {createHash} from 'node:crypto'
|
|
8
|
+
import {chmodSync, existsSync, mkdirSync, renameSync, unlinkSync, createWriteStream, readFileSync} from 'fs'
|
|
9
|
+
import fetch from 'node-fetch'
|
|
10
|
+
|
|
11
|
+
const CLOUDFLARE_VERSION = '2023.2.1'
|
|
12
|
+
const CLOUDFLARE_REPO = `https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARE_VERSION}/`
|
|
13
|
+
|
|
14
|
+
const LINUX_URL = {
|
|
15
|
+
arm64: {
|
|
16
|
+
filename: 'cloudflared-linux-arm64',
|
|
17
|
+
checksum: '03e8f22ad61465834154ccb8656d20eaf0a73789173e3c70fcabddb7f1b67fd1',
|
|
18
|
+
},
|
|
19
|
+
arm: {
|
|
20
|
+
filename: 'cloudflared-linux-arm',
|
|
21
|
+
checksum: '2fbe0c2eb438ffa8d0f459e7f41b2cf8c8f1bbe88a7362dd15b63380fd2777b5',
|
|
22
|
+
},
|
|
23
|
+
x64: {
|
|
24
|
+
filename: 'cloudflared-linux-amd64',
|
|
25
|
+
checksum: '41fa4fc3f43214c2121d1006d4cfffa9dc3b952b6cde3a79440d799de658d138',
|
|
26
|
+
},
|
|
27
|
+
ia32: {
|
|
28
|
+
filename: 'cloudflared-linux-386',
|
|
29
|
+
checksum: '38208ff59b6fc1b356b51ce4a0041f71abe739b89ccf7d7676e4b941f958f7ca',
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const MACOS_URL = {
|
|
34
|
+
arm64: {
|
|
35
|
+
filename: 'cloudflared-darwin-amd64.tgz',
|
|
36
|
+
checksum: 'c58a66da2f153592c366262f5100539f54d3db9d0fd90262afc01f73be5f18f1',
|
|
37
|
+
},
|
|
38
|
+
x64: {
|
|
39
|
+
filename: 'cloudflared-darwin-amd64.tgz',
|
|
40
|
+
checksum: 'c58a66da2f153592c366262f5100539f54d3db9d0fd90262afc01f73be5f18f1',
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const WINDOWS_URL = {
|
|
45
|
+
x64: {
|
|
46
|
+
filename: 'cloudflared-windows-amd64.exe',
|
|
47
|
+
checksum: 'd3a0e1a79158f3985cd49607ebe0cdfcc49cb9af96b8f43aefd0cdfe2f22e663',
|
|
48
|
+
},
|
|
49
|
+
ia32: {
|
|
50
|
+
filename: 'cloudflared-windows-386.exe',
|
|
51
|
+
checksum: 'd14c52d9220b606f428a8fe9f7c108b0d6f14cf71e7384749e98e6a95962e68f',
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const URL = {
|
|
56
|
+
linux: CLOUDFLARE_REPO + LINUX_URL[process.arch]?.filename,
|
|
57
|
+
darwin: CLOUDFLARE_REPO + MACOS_URL[process.arch]?.filename,
|
|
58
|
+
win32: CLOUDFLARE_REPO + WINDOWS_URL[process.arch]?.filename,
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const CHECKSUM = {
|
|
62
|
+
linux: LINUX_URL[process.arch]?.checksum,
|
|
63
|
+
darwin: MACOS_URL[process.arch]?.checksum,
|
|
64
|
+
win32: WINDOWS_URL[process.arch]?.checksum,
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Get the path where the binary should be installed.
|
|
69
|
+
* If the environment variable SHOPIFY_CLI_CLOUDFLARED_PATH is set, use that.
|
|
70
|
+
*/
|
|
71
|
+
function getBinPathTarget() {
|
|
72
|
+
if (process.env.SHOPIFY_CLI_CLOUDFLARED_PATH) {
|
|
73
|
+
return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH
|
|
74
|
+
}
|
|
75
|
+
return path.join(
|
|
76
|
+
path.dirname(fileURLToPath(import.meta.url)),
|
|
77
|
+
'..',
|
|
78
|
+
'bin',
|
|
79
|
+
process.platform === 'win32' ? 'cloudflared.exe' : 'cloudflared',
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export default async function install() {
|
|
84
|
+
const fileUrlPath = URL[process.platform]
|
|
85
|
+
if (fileUrlPath === undefined) {
|
|
86
|
+
throw new Error(`Unsupported system platform: ${process.platform} or arch: ${process.arch}`)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const binTarget = getBinPathTarget()
|
|
90
|
+
if (existsSync(binTarget)) {
|
|
91
|
+
console.log('cloudflared already installed, skipping')
|
|
92
|
+
return
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (process.platform === 'linux') {
|
|
96
|
+
await installLinux(fileUrlPath, binTarget)
|
|
97
|
+
} else if (process.platform === 'darwin') {
|
|
98
|
+
await installMacos(fileUrlPath, binTarget)
|
|
99
|
+
} else if (process.platform === 'win32') {
|
|
100
|
+
await installWindows(fileUrlPath, binTarget)
|
|
101
|
+
} else {
|
|
102
|
+
throw new Error(`Unsupported platform: ${process.platform}`)
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function installLinux(file, binTarget) {
|
|
107
|
+
await downloadFile(file, binTarget)
|
|
108
|
+
if (sha256(binTarget) !== CHECKSUM.linux) throw new Error('Checksum mismatch')
|
|
109
|
+
chmodSync(binTarget, '755')
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
async function installWindows(file, binTarget) {
|
|
113
|
+
await downloadFile(file, binTarget)
|
|
114
|
+
if (sha256(binTarget) !== CHECKSUM.win32) throw new Error('Checksum mismatch')
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
async function installMacos(file, binTarget) {
|
|
118
|
+
await downloadFile(file, `${binTarget}.tgz`)
|
|
119
|
+
const filename = path.basename(`${binTarget}.tgz`)
|
|
120
|
+
execSync(`tar -xzf ${filename}`, {cwd: path.dirname(binTarget)})
|
|
121
|
+
unlinkSync(`${binTarget}.tgz`)
|
|
122
|
+
renameSync(`${path.dirname(binTarget)}/cloudflared`, binTarget)
|
|
123
|
+
if (sha256(binTarget) !== CHECKSUM.darwin) throw new Error('Checksum mismatch')
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
async function downloadFile(url, to) {
|
|
127
|
+
if (!existsSync(path.dirname(to))) {
|
|
128
|
+
mkdirSync(path.dirname(to))
|
|
129
|
+
}
|
|
130
|
+
const streamPipeline = util.promisify(pipeline)
|
|
131
|
+
const response = await fetch(url, {redirect: 'follow'})
|
|
132
|
+
if (!response.ok) throw new Error("Couldn't download file")
|
|
133
|
+
const fileObject = createWriteStream(to)
|
|
134
|
+
await streamPipeline(response.body, fileObject)
|
|
135
|
+
return to
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function sha256(filePath) {
|
|
139
|
+
const fileBuffer = readFileSync(filePath)
|
|
140
|
+
return createHash('sha256').update(fileBuffer).digest('hex')
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
install().catch((err) => {
|
|
144
|
+
throw err
|
|
145
|
+
})
|