@oicl-lit/cli 0.6.6
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 +69 -0
- package/bin/lit.js +28 -0
- package/lib/.tsbuildinfo +1 -0
- package/lib/command.d.ts +120 -0
- package/lib/command.js +10 -0
- package/lib/command.js.map +1 -0
- package/lib/commands/help.d.ts +8 -0
- package/lib/commands/help.js +102 -0
- package/lib/commands/help.js.map +1 -0
- package/lib/commands/init.d.ts +14 -0
- package/lib/commands/init.js +60 -0
- package/lib/commands/init.js.map +1 -0
- package/lib/commands/labs.d.ts +8 -0
- package/lib/commands/labs.js +58 -0
- package/lib/commands/labs.js.map +1 -0
- package/lib/commands/localize.d.ts +7 -0
- package/lib/commands/localize.js +13 -0
- package/lib/commands/localize.js.map +1 -0
- package/lib/console.d.ts +17 -0
- package/lib/console.js +37 -0
- package/lib/console.js.map +1 -0
- package/lib/generate/generate.d.ts +14 -0
- package/lib/generate/generate.js +140 -0
- package/lib/generate/generate.js.map +1 -0
- package/lib/init/element-starter/index.d.ts +11 -0
- package/lib/init/element-starter/index.js +39 -0
- package/lib/init/element-starter/index.js.map +1 -0
- package/lib/init/element-starter/templates/demo/index.html.d.ts +7 -0
- package/lib/init/element-starter/templates/demo/index.html.js +23 -0
- package/lib/init/element-starter/templates/demo/index.html.js.map +1 -0
- package/lib/init/element-starter/templates/gitignore.d.ts +8 -0
- package/lib/init/element-starter/templates/gitignore.js +14 -0
- package/lib/init/element-starter/templates/gitignore.js.map +1 -0
- package/lib/init/element-starter/templates/lib/element.d.ts +8 -0
- package/lib/init/element-starter/templates/lib/element.js +86 -0
- package/lib/init/element-starter/templates/lib/element.js.map +1 -0
- package/lib/init/element-starter/templates/package.json.d.ts +8 -0
- package/lib/init/element-starter/templates/package.json.js +48 -0
- package/lib/init/element-starter/templates/package.json.js.map +1 -0
- package/lib/init/element-starter/templates/tsconfig.json.d.ts +7 -0
- package/lib/init/element-starter/templates/tsconfig.json.js +29 -0
- package/lib/init/element-starter/templates/tsconfig.json.js.map +1 -0
- package/lib/lit-cli.d.ts +40 -0
- package/lib/lit-cli.js +266 -0
- package/lib/lit-cli.js.map +1 -0
- package/lib/lit-version.d.ts +1 -0
- package/lib/lit-version.js +2 -0
- package/lib/lit-version.js.map +1 -0
- package/lib/options.d.ts +18 -0
- package/lib/options.js +59 -0
- package/lib/options.js.map +1 -0
- package/package.json +119 -0
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# @lit-labs/cli
|
|
2
|
+
|
|
3
|
+
The `lit` command line tool for Lit.
|
|
4
|
+
|
|
5
|
+
The Lit CLI is a common place for utilities maintained by the Lit team.
|
|
6
|
+
|
|
7
|
+
> IMPORTANT: ⚠️ `@lit-labs/cli` is currently available only as a _pre-release_
|
|
8
|
+
> for early testing. Feel free to try it out, but expect occasional bugs,
|
|
9
|
+
> missing features, and frequent breaking changes! ⚠️
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
Install globally, so you can run the `lit` command anywhere on your system:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm i -g @lit-labs/cli
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Or install into a project, so that the correct version is installed with other dependencies:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
cd my-project
|
|
23
|
+
npm i -D @lit-labs/cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Commands
|
|
27
|
+
|
|
28
|
+
- [`help`](#help)
|
|
29
|
+
- [`localize`](#localize)
|
|
30
|
+
- [`labs gen`](#gen)
|
|
31
|
+
|
|
32
|
+
### `help`
|
|
33
|
+
|
|
34
|
+
Displays a help message with available commands.
|
|
35
|
+
|
|
36
|
+
#### Usage
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
$ lit help
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### `localize`
|
|
43
|
+
|
|
44
|
+
Extract localization messages or build a localized application.
|
|
45
|
+
|
|
46
|
+
#### Usage
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
$ lit localize extract
|
|
50
|
+
$ lit localize build
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### `labs gen`
|
|
54
|
+
|
|
55
|
+
Generate framework wrappers.
|
|
56
|
+
|
|
57
|
+
#### Usage
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
$ lit labs gen --framework=react
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
#### Flags
|
|
64
|
+
|
|
65
|
+
| Flag | Description |
|
|
66
|
+
| ------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
67
|
+
| `--framework` | Framework(s) to generate wrappers for. Supported frameworks: `react`, `vue`. Can be specified multiple times. |
|
|
68
|
+
| `--package` | Folder(s) containing a package to generate wrappers for. Default: `./`. Can be specified multiple times. |
|
|
69
|
+
| `--out` | Folder to output generated packages to. Default: `./gen/` |
|
package/bin/lit.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2022 Google LLC
|
|
6
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import {LitCli} from '../lib/lit-cli.js';
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line no-undef
|
|
12
|
+
process.on('unhandledRejection', (error) => {
|
|
13
|
+
console.error(`Promise rejection: ${error}`);
|
|
14
|
+
if (error?.stack !== undefined) {
|
|
15
|
+
console.error(error.stack);
|
|
16
|
+
}
|
|
17
|
+
// eslint-disable-next-line no-undef
|
|
18
|
+
process.exit(1);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// eslint-disable-next-line no-undef
|
|
22
|
+
const args = process.argv.slice(2);
|
|
23
|
+
// eslint-disable-next-line no-undef
|
|
24
|
+
const cwd = process.cwd();
|
|
25
|
+
const cli = new LitCli(args, {cwd});
|
|
26
|
+
const result = await cli.run();
|
|
27
|
+
// eslint-disable-next-line no-undef
|
|
28
|
+
process.exit(result?.exitCode ?? 0);
|
package/lib/.tsbuildinfo
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/@types/command-line-commands/index.d.ts","../../../../node_modules/@types/command-line-args/index.d.ts","../../../../node_modules/@types/command-line-usage/index.d.ts","../src/lib/command.ts","../src/lib/console.ts","../src/lib/options.ts","../../../../node_modules/chalk/source/vendor/ansi-styles/index.d.ts","../../../../node_modules/chalk/source/vendor/supports-color/index.d.ts","../../../../node_modules/chalk/source/index.d.ts","../src/lib/commands/help.ts","../src/lib/commands/localize.ts","../../../../node_modules/typescript/lib/typescript.d.ts","../../analyzer/lib/paths.d.ts","../../../../node_modules/package-json-type/types/index.d.ts","../../analyzer/lib/model.d.ts","../../analyzer/lib/analyzer.d.ts","../../analyzer/index.d.ts","../../analyzer/lib/package-analyzer.d.ts","../../analyzer/package-analyzer.d.ts","../../gen-utils/lib/file-utils.d.ts","../src/lib/generate/generate.ts","../src/lib/commands/labs.ts","../src/lib/init/element-starter/templates/tsconfig.json.ts","../src/lib/lit-version.ts","../src/lib/init/element-starter/templates/package.json.ts","../../gen-utils/lib/str-utils.d.ts","../src/lib/init/element-starter/templates/demo/index.html.ts","../src/lib/init/element-starter/templates/gitignore.ts","../src/lib/init/element-starter/templates/lib/element.ts","../src/lib/init/element-starter/index.ts","../src/lib/commands/init.ts","../src/lib/lit-cli.ts","../src/index.ts","../../../tests/utils/filesystem-test-rig.d.ts","../src/test/cli-test-utils.ts","../../../../node_modules/uvu/assert/index.d.ts","../../../../node_modules/uvu/index.d.ts","../src/test/uvu-wrapper.ts","../src/test/help_test.ts","../src/test/gen/react_test.ts","../../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../../node_modules/@types/node/compatibility/index.d.ts","../../../../node_modules/@types/node/globals.typedarray.d.ts","../../../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../../node_modules/@types/node/web-globals/events.d.ts","../../../../node_modules/buffer/index.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-types/file.d.ts","../../../../node_modules/undici-types/fetch.d.ts","../../../../node_modules/undici-types/formdata.d.ts","../../../../node_modules/undici-types/connector.d.ts","../../../../node_modules/undici-types/client.d.ts","../../../../node_modules/undici-types/errors.d.ts","../../../../node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/undici-types/global-origin.d.ts","../../../../node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/undici-types/pool.d.ts","../../../../node_modules/undici-types/handlers.d.ts","../../../../node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/undici-types/agent.d.ts","../../../../node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/undici-types/mock-client.d.ts","../../../../node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../../node_modules/undici-types/retry-handler.d.ts","../../../../node_modules/undici-types/retry-agent.d.ts","../../../../node_modules/undici-types/api.d.ts","../../../../node_modules/undici-types/interceptors.d.ts","../../../../node_modules/undici-types/util.d.ts","../../../../node_modules/undici-types/cookies.d.ts","../../../../node_modules/undici-types/patch.d.ts","../../../../node_modules/undici-types/websocket.d.ts","../../../../node_modules/undici-types/eventsource.d.ts","../../../../node_modules/undici-types/filereader.d.ts","../../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/undici-types/content-type.d.ts","../../../../node_modules/undici-types/cache.d.ts","../../../../node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/web-globals/fetch.d.ts","../../../../node_modules/@types/node/web-globals/navigator.d.ts","../../../../node_modules/@types/node/web-globals/storage.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/inspector.generated.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/sea.d.ts","../../../../node_modules/@types/node/sqlite.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/dir-compare/build/src/types.d.ts","../../../../node_modules/dir-compare/build/src/index.d.ts","../../../tests/utils/assert-goldens.d.ts","../src/test/init/element_test.ts"],"fileIdsList":[[96,145,162,163],[96,142,143,145,162,163],[96,144,145,162,163],[145,162,163],[96,145,150,162,163,180],[96,145,146,151,156,162,163,165,177,188],[96,145,146,147,156,162,163,165],[91,92,93,96,145,162,163],[96,145,148,162,163,189],[96,145,149,150,157,162,163,166],[96,145,150,162,163,177,185],[96,145,151,153,156,162,163,165],[96,144,145,152,162,163],[96,145,153,154,162,163],[96,145,155,156,162,163],[96,144,145,156,162,163],[96,145,156,157,158,162,163,177,188],[96,145,156,157,158,162,163,172,177,180],[96,138,145,153,156,159,162,163,165,177,188],[96,145,156,157,159,160,162,163,165,177,185,188],[96,145,159,161,162,163,177,185,188],[94,95,96,97,98,99,100,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,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194],[96,145,156,162,163],[96,145,162,163,164,188],[96,145,153,156,162,163,165,177],[96,145,162,163,166],[96,145,162,163,167],[96,144,145,162,163,168],[96,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194],[96,145,162,163,170],[96,145,162,163,171],[96,145,156,162,163,172,173],[96,145,162,163,172,174,189,191],[96,145,157,162,163],[96,145,156,162,163,177,178,180],[96,145,162,163,179,180],[96,145,162,163,177,178],[96,145,162,163,180],[96,145,162,163,181],[96,142,145,162,163,177,182,188],[96,145,156,162,163,183,184],[96,145,162,163,183,184],[96,145,150,162,163,165,177,185],[96,145,162,163,186],[96,145,162,163,165,187],[96,145,159,162,163,171,188],[96,145,150,162,163,189],[96,145,162,163,177,190],[96,145,162,163,164,191],[96,145,162,163,192],[96,138,145,162,163],[96,138,145,156,158,162,163,168,177,180,188,190,191,193],[96,145,162,163,177,194],[57,58,96,145,162,163],[96,145,162,163,187],[96,145,162,163,196],[96,145,157,162,163,195],[96,110,114,145,162,163,188],[96,110,145,162,163,177,188],[96,105,145,162,163],[96,107,110,145,162,163,185,188],[96,145,162,163,165,185],[96,145,162,163,195],[96,105,145,162,163,195],[96,107,110,145,162,163,165,188],[96,102,103,106,109,145,156,162,163,177,188],[96,110,117,145,162,163],[96,102,108,145,162,163],[96,110,131,132,145,162,163],[96,106,110,145,162,163,180,188,195],[96,131,145,162,163,195],[96,104,105,145,162,163,195],[96,110,145,162,163],[96,104,105,106,107,108,109,110,111,112,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,132,133,134,135,136,137,145,162,163],[96,110,125,145,162,163],[96,110,117,118,145,162,163],[96,108,110,118,119,145,162,163],[96,109,145,162,163],[96,102,105,110,145,162,163],[96,110,114,118,119,145,162,163],[96,114,145,162,163],[96,108,110,113,145,162,163,188],[96,102,107,110,117,145,162,163],[96,145,162,163,177],[96,105,110,131,145,162,163,193,195],[63,65,66,96,145,162,163],[62,63,65,96,145,162,163],[62,63,64,96,145,162,163,167],[63,66,96,145,162,163],[65,96,145,162,163],[67,68,96,145,162,163],[82,96,145,162,163],[53,96,145,162,163],[53,54,56,59,82,96,145,162,163],[54,80,82,96,145,162,163],[54,71,82,96,145,162,163],[54,96,145,162,163],[96,145,148,162,163],[54,62,65,69,70,82,96,145,162,163,166,167],[54,70,73,75,77,78,79,81,82,96,145,162,163,167],[70,76,96,145,162,163],[70,81,96,145,162,163],[70,76,81,96,145,162,163],[70,74,81,96,145,162,163],[70,96,145,162,163],[51,52,54,55,56,60,61,72,81,96,145,146,162,163,164],[55,84,96,145,148,162,163,167,177,188],[82,84,85,86,88,96,145,162,163,167],[54,55,82,84,85,86,88,96,145,148,162,163,177],[82,84,85,86,88,96,145,162,163,167,198],[87,96,145,162,163],[96,145,162,163,197]],"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":"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":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"7e4d5789fc10ac504edaccf50161e3254f6fa124e457805feae9d1545f56c571","impliedFormat":1},{"version":"5b7206ca5f2f6eeaac6daa285664f424e0b728f3e31937da89deb8696c5f1dbc","impliedFormat":1},{"version":"53dd92e141efe47b413a058f3fbcc6e40a84f5afdde16f45de550a476da25d98","impliedFormat":1},{"version":"fca813d54b9574ba382bb7bbab86a8db58aa53dc885d8b3ec25c93a5bf8a441c","signature":"f5caa43162ba4930e260c51eef8b1a0a2c84e9980d2c563d2b5441cd6d6ba4ff"},{"version":"42782f3890766f8cb954609ac86f05849690aba895562f736b7ec71135f52719","signature":"425b2d73b9d38bbafb61cd355ac3b99a9d6748fa3d9694a3a70ece76e51c0378"},{"version":"b47c63b866224594b1b944a76f50a05c347f3a7419307b2e60d5d1cb3ce4d28a","signature":"aa279180ff4db9445d47cf90211cea332a57df2cd5cc3d00385fdc6ec9287718"},{"version":"acfed6cc001e7f7f26d2ba42222a180ba669bb966d4dd9cb4ad5596516061b13","impliedFormat":99},{"version":"f61a4dc92450609c353738f0a2daebf8cae71b24716dbd952456d80b1e1a48b6","impliedFormat":99},{"version":"f3f76db6e76bc76d13cc4bfa10e1f74390b8ebe279535f62243e8d8acd919314","impliedFormat":99},{"version":"c1ef013c9563373429a5444962570dd120e4fd5b0183ee0f723fa6f755cd0d49","signature":"d5a6ff6089a6ba0846c78749f456ea559736c4808be5e28d74854635c5df5b31"},{"version":"e02ba97a8429244aab61fb4dd833878f749fee4ef28f351c12b093c7a90d9c6e","signature":"383c82e973aa38aa7a8ad9705677245849e58152452eca3c7093ff234c92ddb7"},{"version":"e134052a6b1ded61693b4037f615dc72f14e2881e79c1ddbff6c514c8a516b05","impliedFormat":1},"d9ae5199740c6c04096c462bb3eb8caf16b2839ce84af884d97a1af6b8786a4c",{"version":"da83cff57df481b6ae446de656a6d424f8265c04e18a89314e7ede3da9dbe024","impliedFormat":1},"c3a536f85aeae87c6ffc2243fe99fd34cecd32c7faee0c73956d7bb2dbbbea04","7e936e5bde257fcec155c25eaf96efa5158f083023895eff55032b5afd8b9602","9bbd6ebd3c27eb0104b0a5c1de0ecebfc287bb7e11c5e2cfb5093f6b41dd5d24","e6d197d05503b08d75e8453f5700353d865235b89d43b3b3e25d70e60639f648","57882e487e3324af7f69810fcffe68b88becf84eff0072f0cbdbed5bf7c05f92","436f0008f26c4d10faab9361dd1e87a8cb36e73919ffe8cd9a9828fb4f237e49",{"version":"2ba5ac3c71ed6d312870684d4a508583f5108a286d36e7526c82a85d2cf00d83","signature":"7ba97b0a97f40cee9578aabc2f9b0c54ee91b378c172b9d7e68c43be52696cd5"},{"version":"a6e22e3843af09d01dd777699be979f444116f8964ed9ebf9bbb799fcbbb9adb","signature":"b076074df9d43f7e3a166d2169cd43895c2b76ef4fc3a3eb1b2a7c9837e5cfc7"},{"version":"7150739a5ad076b894efafa4f722fbb065ff7d6ac50e5bc6ac0766b6fa25ca6d","signature":"fed8bdb728d51ea558eb4ba77653bfe7e5ff3e5e9636e82d84030e3de162b4bd"},{"version":"41f23065010de20d171c8595dff0e5d4fe0ada22c3af127bd1aa4f938f6523e1","signature":"98b47a68ae3b876d5f50ac64b66cee042816e6be6baffd43ec451940955674eb"},{"version":"8a0e1bc19399b4c1f4bd1c97ee71e43049816120391564314adae1563c9b5986","signature":"01fd5e43cbb1e1c7689ffee34dc8fb336a395e532af17ffbc89b9d0b335b6c00"},"7adcd79a3fb81f74dd7feed7371fb7f43c2ea18af451d904cc16c5c1628a8d6d",{"version":"6126dd9183d224bb28acc81310be470b4c42babd413adb7f51cab48faad31718","signature":"6ce4e68ac4aaf2dbcc7ed362551bf99b8f51072a1b639185aa3f77e7f4e0d716"},{"version":"19d18ae4dfc8d8782621f97f95c5cda2fe06549317a5524ce48ebc16d57ebbcb","signature":"f48fe7637d91c3d06fe68085465893698690e407be8916b5016618398236e160"},{"version":"3c4a6843c4d3f68f7c8748819815e4223930e631f8e72c4821d0775bcd882d49","signature":"192fae0df65633a264c9cf3ad925ff1cfcd3a02a572f5e4ce08d58dd58a5bc57"},{"version":"264fc2d33b67a0c341df16a97fb24070a2db4f89064fae5c1f40b1342700dd1c","signature":"e5306d325dad93f8519f4c0e514a1d50494bfcda3bec70f02cbca1d69b97bec1"},{"version":"271d905e19900847e405beb61520bfff3a559aa0569450cb470d10b88d764ad2","signature":"402f59ff522b1230de49721df45a6f6a8e3e2072cc0fa6c78735d564892e9341"},{"version":"49d063e95a7ef728f6dbaa7b47eac07f33f56229f0ab806edda78145641252b7","signature":"e3b6cdcd92f85e6922a41a4b37d21a6dc09bd612014097222cc19f7b113f5733"},{"version":"12f8fbe3f1c191ddc1d9649d07098e3cec059dfaa94d321fa3408bf233cd1027","signature":"dc2620d8bd7196e9cd69be126c168ae21e4771f3f66546f62ddbcd4add2aafca"},"52003b9a981d0a957315b4e7697bc5287067d0dc95421cc6a4283caf55b19925",{"version":"ea714e7d4f99340580ff1372e5284d81895465f4539c85635f5f620fe74e5bf4","signature":"0776ceff7193ec7f6b71268a359ac5e80f4b486dbe8117468ead40d943f3b7ff"},{"version":"4493fa34357d19ab60c7243fb8ffd9b152a877b2e59ee7ba61ea2a045328484b","impliedFormat":1},{"version":"ec771a84165cf6d628e98d018393ba1002e6bd36207e6908febc1ea756e7a666","impliedFormat":1},{"version":"e8315abbb6bf005315dccdc7c48344ec8d6705e95bac5a7db34a3cf68b6c9eab","signature":"206ccaafa1d24efa376c016c8f7a6153cd5a6566b17c5d922746d05ec374929d"},{"version":"2e85386cd18e3a7472e1723104b632cd3c515779a9586d02197b007c6ef235b5","signature":"f2214cf35d2f77da509556dd30cf8dc0e072903a46df398d4b71fd0d8109499f"},{"version":"54066c5c821d095d14c68f945fdd9de9979be4b81eb1a747d2052b3ce260dcc0","signature":"f2214cf35d2f77da509556dd30cf8dc0e072903a46df398d4b71fd0d8109499f"},{"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":"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":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"58647d85d0f722a1ce9de50955df60a7489f0593bf1a7015521efe901c06d770","impliedFormat":1},{"version":"73b5fa37db36eeac90c4d752e39586f1b57187400c4f5280fd05f16437287a45","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":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"80523c00b8544a2000ae0143e4a90a00b47f99823eb7926c1e03c494216fc363","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"746911b62b329587939560deb5c036aca48aece03147b021fa680223255d5183","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2b55d426ff2b9087485e52ac4bc7cfafe1dc420fc76dad926cd46526567c501a","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":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1},{"version":"2220d07807859044a6c08b9ee0616da152eed0349ac5951eb36ce7c1c5b84781","impliedFormat":1},{"version":"abffc6af74a44c0b2b062baa38edfe205bc2f1e5de302e2186711baf809fb333","impliedFormat":1},"cf8c609c792ac0442d07afdf4ac4169a71958b1d57a8c732ce011ad597c3752a",{"version":"297ae7ac4a0826b0a89c93779c387e669d06166d9865e7115383781f8accb423","signature":"f2214cf35d2f77da509556dd30cf8dc0e072903a46df398d4b71fd0d8109499f"}],"root":[[54,56],60,61,[71,75],[77,83],85,[88,90],199],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"module":7,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"..","preserveConstEnums":true,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":8,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[52,1],[51,1],[53,1],[142,2],[143,2],[144,3],[96,4],[145,5],[146,6],[147,7],[91,1],[94,8],[92,1],[93,1],[148,9],[149,10],[150,11],[151,12],[152,13],[153,14],[154,14],[155,15],[156,16],[157,17],[158,18],[97,1],[95,1],[159,19],[160,20],[161,21],[195,22],[162,23],[163,1],[164,24],[165,25],[166,26],[167,27],[168,28],[169,29],[170,30],[171,31],[172,32],[173,32],[174,33],[175,1],[176,34],[177,35],[179,36],[178,37],[180,38],[181,39],[182,40],[183,41],[184,42],[185,43],[186,44],[187,45],[188,46],[189,47],[190,48],[191,49],[192,50],[98,1],[99,1],[100,1],[139,51],[140,1],[141,1],[193,52],[194,53],[101,1],[59,54],[57,1],[58,55],[197,56],[196,57],[64,1],[49,1],[50,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[19,1],[20,1],[4,1],[21,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[36,1],[33,1],[34,1],[35,1],[37,1],[7,1],[38,1],[43,1],[44,1],[39,1],[40,1],[41,1],[42,1],[8,1],[48,1],[45,1],[46,1],[47,1],[1,1],[62,1],[117,58],[127,59],[116,58],[137,60],[108,61],[107,62],[136,63],[130,64],[135,65],[110,66],[124,67],[109,68],[133,69],[105,70],[104,63],[134,71],[106,72],[111,73],[112,1],[115,73],[102,1],[138,74],[128,75],[119,76],[120,77],[122,78],[118,79],[121,80],[131,63],[113,81],[114,82],[123,83],[103,84],[126,75],[125,73],[129,1],[132,85],[86,1],[87,1],[67,86],[66,87],[65,88],[68,89],[63,90],[69,91],[83,92],[54,93],[60,94],[81,95],[72,96],[61,97],[55,98],[71,99],[80,100],[77,101],[78,102],[79,103],[75,104],[73,105],[82,106],[74,1],[56,93],[85,107],[90,108],[89,109],[199,110],[88,111],[70,1],[76,1],[198,112],[84,34]],"version":"5.9.3"}
|
package/lib/command.d.ts
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
import type { OptionDefinition } from 'command-line-usage';
|
|
7
|
+
import type { Section } from 'command-line-usage';
|
|
8
|
+
export type { OptionDefinition } from 'command-line-usage';
|
|
9
|
+
export type { Section } from 'command-line-usage';
|
|
10
|
+
export type CommandOptions = {
|
|
11
|
+
[name: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
export type Command = ReferenceToCommand | ResolvedCommand;
|
|
14
|
+
export declare function isCommand(maybeCommand: Partial<Command> | undefined): maybeCommand is Command;
|
|
15
|
+
/**
|
|
16
|
+
* A CLI command definition.
|
|
17
|
+
*
|
|
18
|
+
* This object only contains the metadata about a command and its command line
|
|
19
|
+
* options, not the actual command implementation. The module it's defined in
|
|
20
|
+
* should have as few dependencies as possible in order to minimize the load
|
|
21
|
+
* time of the CLI. The `run()` method should dynamically import a module with
|
|
22
|
+
* the actual implementation.
|
|
23
|
+
*/
|
|
24
|
+
export interface ResolvedCommand {
|
|
25
|
+
kind: 'resolved';
|
|
26
|
+
/**
|
|
27
|
+
* The main name of the command.
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Any aliases, such as shorthands, for the command.
|
|
32
|
+
*/
|
|
33
|
+
aliases?: string[];
|
|
34
|
+
description: string;
|
|
35
|
+
options?: OptionDefinition[];
|
|
36
|
+
subcommands?: Command[];
|
|
37
|
+
run(options: CommandOptions, console: Console): Promise<CommandResult | void>;
|
|
38
|
+
/**
|
|
39
|
+
* Documentation to append onto the output of `lit help commandName`.
|
|
40
|
+
*/
|
|
41
|
+
getUsageSections?(): Section[];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A reference to a command whose full definition is in another npm package,
|
|
45
|
+
* which may or may not be installed.
|
|
46
|
+
*/
|
|
47
|
+
export interface ReferenceToCommand {
|
|
48
|
+
kind: 'reference';
|
|
49
|
+
name: string;
|
|
50
|
+
description: string;
|
|
51
|
+
aliases?: string[];
|
|
52
|
+
/** Note: not guaranteed to be complete! */
|
|
53
|
+
subcommands?: Command[];
|
|
54
|
+
/**
|
|
55
|
+
* The import specifier that resolves to an ES module whose exports match
|
|
56
|
+
* the CommandModule interface.
|
|
57
|
+
*
|
|
58
|
+
* This will be resolved with require.resolve relative to the user's current
|
|
59
|
+
* working directory, and imported if found, or potentially installed if
|
|
60
|
+
* not.
|
|
61
|
+
*/
|
|
62
|
+
importSpecifier: string;
|
|
63
|
+
/**
|
|
64
|
+
* The location to `npm install` from, if different from importSpecifier.
|
|
65
|
+
*
|
|
66
|
+
* e.g. this could be a github repo, a relative directory (e.g. for testing, * or it could be an npm package name with a version. Or if the import
|
|
67
|
+
* specifier is 'foo/command.js' then this might be 'foo'.
|
|
68
|
+
*
|
|
69
|
+
* If this is 'foo' then, if this command isn't installed in the user's
|
|
70
|
+
* workspace, we will suggest running `npm install foo`.
|
|
71
|
+
*/
|
|
72
|
+
installFrom?: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* A command may return a CommandResult to indicate an exit code.
|
|
76
|
+
*/
|
|
77
|
+
export interface CommandResult {
|
|
78
|
+
exitCode: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* This is the type that an ES module that a ReferenceToCommand refers to should
|
|
82
|
+
* obey.
|
|
83
|
+
*
|
|
84
|
+
* Note that we try to resolve references to commands to power the `lit help`
|
|
85
|
+
* overview, so to keep that fast it's best for your command to
|
|
86
|
+
* dynamically import its actual implementation in its `run()` method.
|
|
87
|
+
*/
|
|
88
|
+
export interface CommandModule {
|
|
89
|
+
/**
|
|
90
|
+
* Note that this can return a ReferenceToCommand, which the CLI will
|
|
91
|
+
* further resolve.
|
|
92
|
+
*
|
|
93
|
+
* If your module is deferring to another in a different npm package, it's
|
|
94
|
+
* generally preferable to return a ReferenceToCommand rather than doing the
|
|
95
|
+
* dynamic import yourself. That way we use a consistent module resolution
|
|
96
|
+
* strategy, the CLI can offer to install the referenced command if
|
|
97
|
+
* necessary, and we can reuse the error handling code in the CLI core.
|
|
98
|
+
*/
|
|
99
|
+
getCommand(opts: GetCommandsOptions): Command | Promise<Command>;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* This type is an important part of the interface between the CLI and lazily
|
|
103
|
+
* loaded command modules. Fields should not be renamed, and required fields
|
|
104
|
+
* should not be removed, otherwise it's a breaking change to the interface.
|
|
105
|
+
*/
|
|
106
|
+
export interface GetCommandsOptions {
|
|
107
|
+
/**
|
|
108
|
+
* The name (not the alias) of the requested command.
|
|
109
|
+
*/
|
|
110
|
+
requestedCommand?: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Like CommandModule, only we're not certain that the module obeys the
|
|
114
|
+
* contract correctly.
|
|
115
|
+
*
|
|
116
|
+
* This is the type we should use internally when loading a module.
|
|
117
|
+
*/
|
|
118
|
+
export interface MaybeCommandModule {
|
|
119
|
+
getCommand?(opts: GetCommandsOptions): undefined | Command | Promise<Partial<Command> | undefined>;
|
|
120
|
+
}
|
package/lib/command.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
export function isCommand(maybeCommand) {
|
|
7
|
+
return (typeof maybeCommand?.name === 'string' &&
|
|
8
|
+
(maybeCommand.kind === 'reference' || maybeCommand.kind === 'resolved'));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/lib/command.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH,MAAM,UAAU,SAAS,CACvB,YAA0C;IAE1C,OAAO,CACL,OAAO,YAAY,EAAE,IAAI,KAAK,QAAQ;QACtC,CAAC,YAAY,CAAC,IAAI,KAAK,WAAW,IAAI,YAAY,CAAC,IAAI,KAAK,UAAU,CAAC,CACxE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
import chalk from 'chalk';
|
|
7
|
+
import commandLineUsage from 'command-line-usage';
|
|
8
|
+
import { globalOptions } from '../options.js';
|
|
9
|
+
const HELP_HEADER = `${chalk.bold.underline('Lit CLI')}
|
|
10
|
+
Usage: lit <command> [options ...]`;
|
|
11
|
+
export const makeHelpCommand = (cli) => {
|
|
12
|
+
const generateGeneralUsage = async () => {
|
|
13
|
+
return commandLineUsage([
|
|
14
|
+
{
|
|
15
|
+
content: HELP_HEADER,
|
|
16
|
+
raw: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
header: 'Available Commands',
|
|
20
|
+
content: await Promise.all([...cli.commands.values()].map(async (command) => {
|
|
21
|
+
command = await cli.resolveCommandAsMuchAsPossible(command);
|
|
22
|
+
return { name: command.name, summary: command.description };
|
|
23
|
+
})),
|
|
24
|
+
},
|
|
25
|
+
{ header: 'Global Options', optionList: globalOptions },
|
|
26
|
+
{
|
|
27
|
+
content: 'Run `lit help <command>` for help with a specific command.',
|
|
28
|
+
raw: true,
|
|
29
|
+
},
|
|
30
|
+
]);
|
|
31
|
+
};
|
|
32
|
+
const generateCommandUsage = (command, commandNames) => {
|
|
33
|
+
const usageGroups = [
|
|
34
|
+
{
|
|
35
|
+
header: `lit ${commandNames.join(' ')}`,
|
|
36
|
+
content: command.description,
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
if (command.aliases !== undefined && command.aliases.length > 0) {
|
|
40
|
+
usageGroups.push({ header: 'Alias(es)', content: command.aliases });
|
|
41
|
+
}
|
|
42
|
+
if (command.getUsageSections !== undefined) {
|
|
43
|
+
usageGroups.push(...command.getUsageSections());
|
|
44
|
+
}
|
|
45
|
+
if (command.subcommands !== undefined) {
|
|
46
|
+
usageGroups.push({
|
|
47
|
+
header: 'Sub-Commands',
|
|
48
|
+
content: command.subcommands.map((s) => ({
|
|
49
|
+
name: s.name,
|
|
50
|
+
summary: s.description,
|
|
51
|
+
})),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (command.options !== undefined) {
|
|
55
|
+
usageGroups.push({
|
|
56
|
+
header: 'Command Options',
|
|
57
|
+
optionList: command.options,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
usageGroups.push({ header: 'Global Options', optionList: globalOptions });
|
|
61
|
+
return commandLineUsage(usageGroups);
|
|
62
|
+
};
|
|
63
|
+
return {
|
|
64
|
+
kind: 'resolved',
|
|
65
|
+
name: 'help',
|
|
66
|
+
description: 'Shows this help message, or help for a specific command',
|
|
67
|
+
options: [
|
|
68
|
+
{
|
|
69
|
+
name: 'command',
|
|
70
|
+
description: 'The command to display help for',
|
|
71
|
+
type: String,
|
|
72
|
+
multiple: true,
|
|
73
|
+
defaultOption: true,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
async run(options, console) {
|
|
77
|
+
let commandNames = options['command'];
|
|
78
|
+
if (typeof commandNames === 'string') {
|
|
79
|
+
commandNames = commandNames?.split(' ') ?? [];
|
|
80
|
+
}
|
|
81
|
+
commandNames = commandNames?.map((c) => c.trim()) ?? null;
|
|
82
|
+
if (commandNames == null) {
|
|
83
|
+
console.debug('no command given, printing general help...', { options });
|
|
84
|
+
console.log(await generateGeneralUsage());
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const result = await cli.getCommand(cli.commands, commandNames);
|
|
88
|
+
if ('invalidCommand' in result) {
|
|
89
|
+
console.error(`'${commandNames.join(' ')}' is not an available command.`);
|
|
90
|
+
console.log(await generateGeneralUsage());
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
else if ('commandNotInstalled' in result) {
|
|
94
|
+
console.error(`'${commandNames.join(' ')}' wasn't installed.`);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
console.debug(`printing help for command '${commandNames}'...`);
|
|
98
|
+
console.log(generateCommandUsage(result.command, commandNames));
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/lib/commands/help.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;A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
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
import { Command } from '../command.js';
|
|
7
|
+
import { LitCli } from '../lit-cli.js';
|
|
8
|
+
export type Language = 'ts' | 'js';
|
|
9
|
+
export interface InitCommandOptions {
|
|
10
|
+
lang: Language;
|
|
11
|
+
name: string;
|
|
12
|
+
out: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const makeInitCommand: (cli: LitCli) => Command;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
import { run } from '../init/element-starter/index.js';
|
|
7
|
+
export const makeInitCommand = (cli) => {
|
|
8
|
+
return {
|
|
9
|
+
kind: 'resolved',
|
|
10
|
+
name: 'init',
|
|
11
|
+
description: 'Initialize a Lit project',
|
|
12
|
+
subcommands: [
|
|
13
|
+
{
|
|
14
|
+
kind: 'resolved',
|
|
15
|
+
name: 'element',
|
|
16
|
+
description: 'Generate a shareable element starter package',
|
|
17
|
+
options: [
|
|
18
|
+
{
|
|
19
|
+
name: 'lang',
|
|
20
|
+
defaultValue: 'js',
|
|
21
|
+
description: 'Which language to use for the element. Supported languages: js, ts',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'name',
|
|
25
|
+
defaultValue: 'my-element',
|
|
26
|
+
description: 'Tag name of the Element to generate (must include a hyphen).',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'out',
|
|
30
|
+
defaultValue: '.',
|
|
31
|
+
description: 'Directory in which to generate the element package.',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
async run(options, console) {
|
|
35
|
+
const name = options.name;
|
|
36
|
+
/*
|
|
37
|
+
* This is a basic check to ensure that the name is a valid custom
|
|
38
|
+
* element name. Will make sure you start off with a character and
|
|
39
|
+
* at least one hyphen plus more characters. Will not check for the
|
|
40
|
+
* following invalid use cases:
|
|
41
|
+
* - starting with a digit
|
|
42
|
+
*
|
|
43
|
+
* Will not allow the following valid use cases:
|
|
44
|
+
* - including a unicode character as not the first character
|
|
45
|
+
*/
|
|
46
|
+
const customElementMatch = name.match(/\w+(-\w+)+/g);
|
|
47
|
+
if (!customElementMatch || customElementMatch[0] !== name) {
|
|
48
|
+
throw new Error(`"${name}" is not a valid custom-element name. (Must include a hyphen and ascii characters)`);
|
|
49
|
+
}
|
|
50
|
+
return await run(options, console, cli);
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
async run(_options, console) {
|
|
55
|
+
// by default run the element command
|
|
56
|
+
return await run({ lang: 'js', name: 'my-element', out: '.' }, console, cli);
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/lib/commands/init.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAC,GAAG,EAAC,MAAM,kCAAkC,CAAC;AAUrD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAW,EAAW,EAAE;IACtD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,0BAA0B;QACvC,WAAW,EAAE;YACX;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,8CAA8C;gBAC3D,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,YAAY,EAAE,IAAI;wBAClB,WAAW,EACT,oEAAoE;qBACvE;oBACD;wBACE,IAAI,EAAE,MAAM;wBACZ,YAAY,EAAE,YAAY;wBAC1B,WAAW,EACT,8DAA8D;qBACjE;oBACD;wBACE,IAAI,EAAE,KAAK;wBACX,YAAY,EAAE,GAAG;wBACjB,WAAW,EAAE,qDAAqD;qBACnE;iBACF;gBACD,KAAK,CAAC,GAAG,CAAC,OAAuB,EAAE,OAAgB;oBACjD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAc,CAAC;oBACpC;;;;;;;;;uBASG;oBACH,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;oBACrD,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;wBAC1D,MAAM,IAAI,KAAK,CACb,IAAI,IAAI,oFAAoF,CAC7F,CAAC;oBACJ,CAAC;oBACD,OAAO,MAAM,GAAG,CACd,OAAwC,EACxC,OAAO,EACP,GAAG,CACJ,CAAC;gBACJ,CAAC;aACF;SACF;QACD,KAAK,CAAC,GAAG,CAAC,QAAwB,EAAE,OAAgB;YAClD,qCAAqC;YACrC,OAAO,MAAM,GAAG,CACd,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,EAAC,EAC1C,OAAO,EACP,GAAG,CACJ,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const gen = (cli) => {
|
|
7
|
+
return {
|
|
8
|
+
kind: 'resolved',
|
|
9
|
+
name: 'gen',
|
|
10
|
+
description: 'Generate framework wrappers',
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
name: 'package',
|
|
14
|
+
multiple: true,
|
|
15
|
+
defaultValue: './',
|
|
16
|
+
description: 'Folder containing a package to generate wrappers for. For TypeScript projects, if the package folder does not contain a tsconfig.json, this option may also specify a specific tsconfig.json to use.',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'framework',
|
|
20
|
+
multiple: true,
|
|
21
|
+
description: 'Framework to generate wrappers for. Supported frameworks: react, vue.',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'manifest',
|
|
25
|
+
type: Boolean,
|
|
26
|
+
description: 'Generate a custom-elements.json manifest for this package.',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'out',
|
|
30
|
+
defaultValue: './gen',
|
|
31
|
+
description: 'Folder to output generated packages to.',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'exclude',
|
|
35
|
+
multiple: true,
|
|
36
|
+
defaultValue: [],
|
|
37
|
+
description: 'Glob of source files to exclude from analysis.',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
async run({ package: packages, framework: frameworks, manifest, out: outDir, exclude, }, console) {
|
|
41
|
+
const gen = await import('../generate/generate.js');
|
|
42
|
+
await gen.run({ cli, packages, frameworks, manifest, outDir, exclude }, console);
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export const makeLabsCommand = (cli) => {
|
|
47
|
+
return {
|
|
48
|
+
kind: 'resolved',
|
|
49
|
+
name: 'labs',
|
|
50
|
+
description: 'Experimental commands',
|
|
51
|
+
subcommands: [gen(cli)],
|
|
52
|
+
async run() {
|
|
53
|
+
console.error('Use one of the labs subcommands, like `lit gen`. ' +
|
|
54
|
+
'Run `lit help gen` for more help.');
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=labs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labs.js","sourceRoot":"","sources":["../../src/lib/commands/labs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,GAAG,GAAG,CAAC,GAAW,EAAmB,EAAE;IAC3C,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,IAA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