@devbie/fewbie-cli 0.1.0-stage.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/commands/add.d.ts +1 -0
- package/dist/commands/add.js +29 -24
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/apits-templates.d.ts +11 -0
- package/dist/commands/{gen-api-templates.js → apits-templates.js} +7 -7
- package/dist/commands/apits-templates.js.map +1 -0
- package/dist/commands/{gen-api.d.ts → apits.d.ts} +2 -2
- package/dist/commands/apits.js +125 -0
- package/dist/commands/apits.js.map +1 -0
- package/dist/commands/doctor.d.ts +24 -0
- package/dist/commands/doctor.js +216 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.js +1 -7
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts +6 -0
- package/dist/commands/update.js +99 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/index.js +30 -7
- package/dist/index.js.map +1 -1
- package/dist/lib/diff.d.ts +1 -0
- package/dist/lib/diff.js +110 -0
- package/dist/lib/diff.js.map +1 -0
- package/dist/lib/exec-interactive.js.map +1 -1
- package/dist/registry/api-client/item.json +1 -1
- package/dist/registry/auth/item.json +1 -1
- package/dist/registry/build.js +2 -6
- package/dist/registry/build.js.map +1 -1
- package/dist/registry/data-table/item.json +14 -0
- package/dist/registry/login-form/item.json +1 -1
- package/dist/registry/page-header/item.json +14 -0
- package/dist/registry/settings-required-state/item.json +17 -0
- package/dist/registry/store.js +1 -3
- package/dist/registry/store.js.map +1 -1
- package/dist/registry/theme/item.json +1 -1
- package/dist/registry/web-monitor-sdk/item.json +18 -0
- package/package.json +2 -2
- package/dist/commands/gen-api-templates.d.ts +0 -11
- package/dist/commands/gen-api-templates.js.map +0 -1
- package/dist/commands/gen-api.js +0 -105
- package/dist/commands/gen-api.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# @devbie/fewbie-cli
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@devbie/fewbie-cli)
|
|
4
|
+
[](https://github.com/worldzhy/fewbie/blob/dev/LICENSE)
|
|
5
|
+
[](https://www.npmjs.com/package/@devbie/fewbie-cli)
|
|
6
|
+
|
|
7
|
+
Command-line tool for the Fewbie frontend framework. Scaffold Next.js projects
|
|
8
|
+
from the Fewbie basic template, add business components and logic utilities
|
|
9
|
+
from a shadcn-compatible registry, and generate typed API request code from
|
|
10
|
+
OpenAPI documents.
|
|
11
|
+
|
|
12
|
+
The generated projects use **Next.js 16 (App Router), React 19 and Tailwind
|
|
13
|
+
CSS v4**, with shadcn-style UI primitives and design tokens already wired up.
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- Node.js `>= 20`
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
Run it directly with `npx`:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx @devbie/fewbie-cli init my-app
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Or install it globally:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install -g @devbie/fewbie-cli
|
|
31
|
+
fewbie --help
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Quick start
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Scaffold a new project
|
|
38
|
+
npx @devbie/fewbie-cli init my-app
|
|
39
|
+
|
|
40
|
+
cd my-app
|
|
41
|
+
npm install
|
|
42
|
+
npm run dev
|
|
43
|
+
|
|
44
|
+
# Add registry components and utilities (dependencies installed automatically)
|
|
45
|
+
npx fewbie add api-client auth
|
|
46
|
+
npx fewbie add data-table
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Commands
|
|
50
|
+
|
|
51
|
+
### `fewbie init <project-name>`
|
|
52
|
+
|
|
53
|
+
Create a new project from the Fewbie basic template.
|
|
54
|
+
|
|
55
|
+
| Option | Description |
|
|
56
|
+
| ----------------------- | ----------------------------------------------------------------- |
|
|
57
|
+
| `--template-path <dir>` | Use a local template directory instead of cloning the repository. |
|
|
58
|
+
| `--template-ref <ref>` | Git ref of the fewbie repository to clone the template from. |
|
|
59
|
+
| `--no-git-init` | Skip `git init` in the new project. |
|
|
60
|
+
|
|
61
|
+
### `fewbie add <names...>`
|
|
62
|
+
|
|
63
|
+
Add one or more components or logic utilities from the Fewbie registry.
|
|
64
|
+
Registry dependencies are resolved automatically (e.g. `login-form` pulls in
|
|
65
|
+
`auth`, which pulls in `api-client`), and missing npm dependencies are
|
|
66
|
+
installed automatically.
|
|
67
|
+
|
|
68
|
+
| Option | Description |
|
|
69
|
+
| ------------------- | ---------------------------------------------------------------------------- |
|
|
70
|
+
| `-f, --force` | Overwrite files that already exist. |
|
|
71
|
+
| `--skip-install` | Do not run `npm install` for missing dependencies. |
|
|
72
|
+
| `--with-login-form` | Also install the login-form block, e.g. `fewbie add auth --with-login-form`. |
|
|
73
|
+
|
|
74
|
+
### `fewbie apits [input]`
|
|
75
|
+
|
|
76
|
+
Generate typed API request code from an OpenAPI document (a URL or a local
|
|
77
|
+
JSON/YAML file). On the first run the command scaffolds `apits.config.ts`;
|
|
78
|
+
subsequent runs generate the typed request layer via the apits generator.
|
|
79
|
+
|
|
80
|
+
| Option | Description |
|
|
81
|
+
| ------------------- | -------------------------------------------------------- |
|
|
82
|
+
| `-n, --name <name>` | Only generate the config source with this name. |
|
|
83
|
+
| `-w, --watch` | Watch a local OpenAPI document and regenerate on change. |
|
|
84
|
+
| `--skip-install` | Do not install the generator dev dependency. |
|
|
85
|
+
|
|
86
|
+
### `fewbie doctor`
|
|
87
|
+
|
|
88
|
+
Check project health: structure, installed registry items, dependencies,
|
|
89
|
+
design tokens and AI-readability.
|
|
90
|
+
|
|
91
|
+
| Option | Description |
|
|
92
|
+
| -------- | --------------------------- |
|
|
93
|
+
| `--json` | Emit machine-readable JSON. |
|
|
94
|
+
|
|
95
|
+
### `fewbie update [names...]`
|
|
96
|
+
|
|
97
|
+
Show updates for installed registry items as a unified diff. Pass `--write` to
|
|
98
|
+
apply the changes instead of only previewing them.
|
|
99
|
+
|
|
100
|
+
| Option | Description |
|
|
101
|
+
| ------------- | ------------------------------------------------- |
|
|
102
|
+
| `-w, --write` | Apply the updates instead of only printing diffs. |
|
|
103
|
+
|
|
104
|
+
## Registry items
|
|
105
|
+
|
|
106
|
+
The built-in registry follows the shadcn item conventions
|
|
107
|
+
(`registry:lib`, `registry:component`, `registry:block`):
|
|
108
|
+
|
|
109
|
+
| Item | Type | Description |
|
|
110
|
+
| ------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
111
|
+
| `api-client` | `lib` | Axios instance with bearer-token auth, httpOnly refresh-cookie rotation, single-flight 401 retry and proactive token refresh. |
|
|
112
|
+
| `auth` | `lib` | Login/logout helpers, session-expired redirect binding and proactive-refresh bootstrap built on the api-client. |
|
|
113
|
+
| `data-table` | `component` | Generic data table with client-side sorting and pagination. |
|
|
114
|
+
| `login-form` | `block` | Account/password login card; submits through the auth util and honors `?redirect=`. |
|
|
115
|
+
| `page-header` | `component` | Standard page header with title, description and a right-aligned actions slot. |
|
|
116
|
+
| `settings-required-state` | `block` | Empty state shown when required configuration is missing, with a setup call-to-action. |
|
|
117
|
+
| `theme` | `component` | `next-themes` ThemeProvider wrapper and a light/dark toggle button. |
|
|
118
|
+
| `web-monitor-sdk` | `component` | Browser-side monitoring (PV/AJAX/resource/errors) via `@devbie/web-monitor-sdk`; scaffolds a client component for the root layout. |
|
|
119
|
+
|
|
120
|
+
## Global options
|
|
121
|
+
|
|
122
|
+
| Option | Description |
|
|
123
|
+
| ----------------- | ------------------------------------------------------------------- |
|
|
124
|
+
| `-C, --cwd <dir>` | Project root directory (defaults to the current working directory). |
|
|
125
|
+
|
|
126
|
+
Running `fewbie` with no arguments prints help and exits successfully.
|
|
127
|
+
|
|
128
|
+
## Related packages
|
|
129
|
+
|
|
130
|
+
- [`@devbie/heartbeat-sdk`](https://www.npmjs.com/package/@devbie/heartbeat-sdk)
|
|
131
|
+
— the basic template reports application liveness through `instrumentation.ts`
|
|
132
|
+
when `HEARTBEAT_ENDPOINT` and `HEARTBEAT_TOKEN` are configured.
|
|
133
|
+
- [`@devbie/web-monitor-sdk`](https://www.npmjs.com/package/@devbie/web-monitor-sdk)
|
|
134
|
+
— browser-side monitoring SDK available as the `web-monitor-sdk` registry item.
|
|
135
|
+
|
|
136
|
+
## License
|
|
137
|
+
|
|
138
|
+
[MIT](https://github.com/worldzhy/fewbie/blob/dev/LICENSE)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/typescript/lib/lib.es2022.full.d.ts","../../../node_modules/commander/typings/index.d.ts","../../../node_modules/colorette/index.d.ts","../src/lib/errors.ts","../src/lib/exec.ts","../src/commands/init.ts","../src/lib/exec-interactive.ts","../src/registry/types.ts","../src/registry/store.ts","../src/commands/add.ts","../src/commands/apits-templates.ts","../src/commands/apits.ts","../src/commands/doctor.ts","../src/lib/diff.ts","../src/commands/update.ts","../src/index.ts","../src/registry/build.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/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/web-globals/streams.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"],"fileIdsList":[[85,131,132,134,151,152],[85,133,134,151,152],[134,151,152],[85,134,139,151,152,169],[85,134,135,140,145,151,152,154,166,177],[85,134,135,136,145,151,152,154],[85,134,151,152],[80,81,82,85,134,151,152],[85,134,137,151,152,178],[85,134,138,139,146,151,152,155],[85,134,139,151,152,166,174],[85,134,140,142,145,151,152,154],[85,133,134,141,151,152],[85,134,142,143,151,152],[85,134,144,145,151,152],[85,133,134,145,151,152],[85,134,145,146,147,151,152,166,177],[85,134,145,146,147,151,152,161,166,169],[85,126,134,142,145,148,151,152,154,166,177],[85,134,145,146,148,149,151,152,154,166,174,177],[85,134,148,150,151,152,166,174,177],[83,84,85,86,87,88,89,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183],[85,134,145,151,152],[85,134,151,152,153,177],[85,134,142,145,151,152,154,166],[85,134,151,152,155],[85,134,151,152,156],[85,133,134,151,152,157],[85,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183],[85,134,151,152,159],[85,134,151,152,160],[85,134,145,151,152,161,162],[85,134,151,152,161,163,178,180],[85,134,146,151,152],[85,134,145,151,152,166,167,169],[85,134,151,152,168,169],[85,134,151,152,166,167],[85,134,151,152,169],[85,134,151,152,170],[85,131,134,151,152,166,171,177],[85,134,145,151,152,172,173],[85,134,151,152,172,173],[85,134,139,151,152,154,166,174],[85,134,151,152,175],[85,134,151,152,154,176],[85,134,148,151,152,160,177],[85,134,139,151,152,178],[85,134,151,152,166,179],[85,134,151,152,153,180],[85,134,151,152,181],[85,126,134,151,152],[85,126,134,145,147,151,152,157,166,169,177,179,180,182],[85,134,151,152,166,183],[85,98,102,134,151,152,177],[85,98,134,151,152,166,177],[85,93,134,151,152],[85,95,98,134,151,152,174,177],[85,134,151,152,154,174],[85,134,151,152,184],[85,93,134,151,152,184],[85,95,98,134,151,152,154,177],[85,90,91,94,97,134,145,151,152,166,177],[85,98,105,134,151,152],[85,90,96,134,151,152],[85,98,119,120,134,151,152],[85,94,98,134,151,152,169,177,184],[85,119,134,151,152,184],[85,92,93,134,151,152,184],[85,98,134,151,152],[85,92,93,94,95,96,97,98,99,100,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,120,121,122,123,124,125,134,151,152],[85,98,113,134,151,152],[85,98,105,106,134,151,152],[85,96,98,106,107,134,151,152],[85,97,134,151,152],[85,90,93,98,134,151,152],[85,98,102,106,107,134,151,152],[85,102,134,151,152],[85,96,98,101,134,151,152,177],[85,90,95,98,105,134,151,152],[85,134,151,152,166],[85,93,98,119,134,151,152,182,184],[65,66,69,71,85,134,147,151,152,156],[65,66,69,73,85,134,135,147,151,152,156],[65,66,71,85,134,147,151,152,156],[65,66,67,85,134,147,151,152,155,156],[65,66,71,76,85,134,147,151,152,156],[64,65,68,72,74,75,77,85,134,151,152],[85,134,135,151,152],[70,85,134,147,151,152,156],[66,70,85,134,146,147,151,152,156]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"3cbad9a1ba4453443026ed38e4b8be018abb26565fa7c944376463ad9df07c41","impliedFormat":1},{"version":"a722a71d8f3cb0028857b12579c7eca55acc76bf34e5db7eaf6fe817b985f9c3","impliedFormat":1},{"version":"c8adda9f45d2f7ec9fb28c59859db32da6c2835f1fec96433e2729e5805fa46f","impliedFormat":99},{"version":"a8cdc85502802cbd6b0c6ddd258374090390d5caf821eed06f229f679fc91391","signature":"cb1068190dde47ed80b8ffb8db7071d1ca97146f6103e48b6c1ea5ff226ed15a"},{"version":"89a4063732d95c7b11167bcdf2ca8885252f4072acb74198b5d0d0c46ebad396","signature":"6e060bc9a36204997c6738342b0e4fa227a3b86dfdfec85f2b98dd55e2004cc8"},{"version":"3cf6cb6d546dc40065ca84fd20038b42f957ce7b00dd0cb8d1f76208847f9af2","signature":"289b2fcc6b265be3aa0566f383694613169fb7bd3a63c569cd94a65e2c42fa41"},{"version":"265ef6357f414b69790174fcb33b98578dc68f509dcc12055f6fd75c89676bcf","signature":"4f0eadb11f7b100bcf991ac98609cb1b06b541b3449505c282707a5fd41e5052"},{"version":"bd51ca8f5f1853b43c5399322aadc583ec7a423d0d02473a01b3d68e8c8f24c7","signature":"25058b0e610179548fea727eb45239c93ea2b104d20450d83101504bc75483af"},{"version":"16f18a364a8ad0761933ed4faed4715fde05c68ca47f50d9339dd21975d49a35","signature":"405a1e98f5bc2d3b38f5fbebf093cebd749413a336f7da1921c8f48fde97702d"},{"version":"91253609bcad71ace935cd2c2953bb379a6dc199abb6c5dcfa16e3c272c7eb17","signature":"e452ac72aadb9a8d87bbd9954f14acbc6342fdca1543a34fc5704e52761cc79a"},{"version":"5c4351fe2a980c4e0dcea9da248f9f9b38eb7877b6b03dcca8a7d2b8535928be","signature":"e9e745b5e04f9a6a230c85487f8a6c7f73619cc1882cca6dee38a2d4c5589b99"},{"version":"f2e0e4b070b0425a066c0bc03321c711b2a6e40b4c07675864aa726adf6e7f83","signature":"46ba34ffdf486d278733552d14495cc8d586b915563832eba841d89f78f44d93"},{"version":"ef0e8544a250f19c535a37ff84c07c64f2bae09da0ff6f2f4344a4a5e0c3903b","signature":"127820b5ee3b9604d142da219971dc5ac0108c6addcb4c670ea11410548a2683"},{"version":"b369d0916543e2316371925bd970574e95cc1357c9a87ac9fb83687d6a3f94ab","signature":"338b8bdbfc408c202f14e95f34c4ea9e66a7ceda09db95ab736f1fc367615aa0"},{"version":"718a730f5e4e6ccf76db582e93d1e26e407d7bd8c160bd01cf294af818b2e198","signature":"269161785b39cf968d6ca54fdcea115311c721a5b8b4b7d1bab9e8ac433a88ac"},{"version":"064ca7a27d3f9ad36a6bd71b21ff81f0ce2c47668bbe38b5c7bd2ae271b17477","signature":"a0705a5d0588cec443df0211689de00e486a87868bd011f25dc88ffb6e432203"},{"version":"f7661de2673ff27e6f4aa51edf0ea2bc8b06918b119ca063f5d82b6905e63ef9","signature":"6d899feaa3d27455b79700701c5a8dfb4609c9eb10181647d950284901a09024"},{"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":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d97fb21da858fb18b8ae72c314e9743fd52f73ebe2764e12af1db32fc03f853f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"913be43dad2a40e500104700aa26cfb5c51a976114bedf19624de43fdae7474f","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"78dbea00e90d2df8ea3dbef0cc379d95b8be9b71cd6bde4c28728f306811803b","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e1e46d0a9837ee058c100501080c920fa98081ea3956af0374308ba6f22a33e","impliedFormat":1},{"version":"272ca407e0c9068bdc5152552d876e68037ceae3de62e529306403e973dec8e1","impliedFormat":1},{"version":"fa7834c715d5357e4540cee40ce96c3250ddb67a7b879a6b7fa0e86d6696f121","impliedFormat":1},{"version":"22dfb07a7ab15b66ac043829056fe70124844636ae719551812ac631ba04985b","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"0cb167c371eaa8c869f8a7656a7296f2e4fae43b4d8b803a680236b24794e5f9","impliedFormat":1},{"version":"0a839dba0287cc0481ad4beedd48a1c64acf1e212ae865d1315f7007ca215161","impliedFormat":1},{"version":"38dc4655376cd1a4bd6bb3763d92949233e33d38d3dd3cbea7bbf218175a38ef","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"208a6a0bfb227bdf8fb964799d0a206c75cf03ccd72e63bf5495c9331354c6d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"48a679952eefe4cb776d5a0e1ccba2d3eb53b57448bbb7abc1fcebcbd5440188","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2d14da6ecb49bf828d83948765ec2d3a579d476bbb9645e749610baa6ec880ca","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"0aef708fb4c7a6b915e8305cbfac40cd207b032dbaabe9a01889a5fff3254681","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"ad9bdafb4e7abf14cc53ce7970486a84c87831e62891e5dfe798ddcd55e84701","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"71d3ae6a5e73ca4130762560425e00984ebaff64d5353a3333d1bb7eb86ef336","impliedFormat":1}],"root":[[66,79]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":true,"module":1,"outDir":"./","removeComments":true,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strictNullChecks":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[131,1],[132,1],[133,2],[85,3],[134,4],[135,5],[136,6],[80,7],[83,8],[81,7],[82,7],[137,9],[138,10],[139,11],[140,12],[141,13],[142,14],[143,14],[144,15],[145,16],[146,17],[147,18],[86,7],[84,7],[148,19],[149,20],[150,21],[184,22],[151,23],[152,7],[153,24],[154,25],[155,26],[156,27],[157,28],[158,29],[159,30],[160,31],[161,32],[162,32],[163,33],[164,7],[165,34],[166,35],[168,36],[167,37],[169,38],[170,39],[171,40],[172,41],[173,42],[174,43],[175,44],[176,45],[177,46],[178,47],[179,48],[180,49],[181,50],[87,7],[88,7],[89,7],[127,51],[128,7],[129,7],[130,38],[182,52],[183,53],[65,7],[64,7],[61,7],[62,7],[12,7],[10,7],[11,7],[16,7],[15,7],[2,7],[17,7],[18,7],[19,7],[20,7],[21,7],[22,7],[23,7],[24,7],[3,7],[25,7],[26,7],[4,7],[27,7],[31,7],[28,7],[29,7],[30,7],[32,7],[33,7],[34,7],[5,7],[35,7],[36,7],[37,7],[38,7],[6,7],[42,7],[39,7],[40,7],[41,7],[43,7],[7,7],[44,7],[49,7],[50,7],[45,7],[46,7],[47,7],[48,7],[8,7],[54,7],[51,7],[52,7],[53,7],[55,7],[9,7],[56,7],[63,7],[57,7],[58,7],[60,7],[59,7],[1,7],[14,7],[13,7],[105,54],[115,55],[104,54],[125,56],[96,57],[95,58],[124,59],[118,60],[123,61],[98,62],[112,63],[97,64],[121,65],[93,66],[92,59],[122,67],[94,68],[99,69],[100,7],[103,69],[90,7],[126,70],[116,71],[107,72],[108,73],[110,74],[106,75],[109,76],[119,59],[101,77],[102,78],[111,79],[91,80],[114,71],[113,69],[117,7],[120,81],[72,82],[73,7],[74,83],[75,84],[68,85],[77,86],[78,87],[76,7],[66,7],[69,88],[67,88],[79,89],[71,90],[70,7]],"version":"5.9.3"}
|
package/dist/commands/add.d.ts
CHANGED
package/dist/commands/add.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.packageNameOf = packageNameOf;
|
|
6
7
|
exports.runAdd = runAdd;
|
|
7
8
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
8
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -15,6 +16,12 @@ async function assertProjectRoot(projectRoot) {
|
|
|
15
16
|
throw new errors_1.CliError(`No package.json found in ${projectRoot}. Run 'fewbie add' inside a Next.js project.`);
|
|
16
17
|
});
|
|
17
18
|
}
|
|
19
|
+
async function exists(target) {
|
|
20
|
+
return promises_1.default
|
|
21
|
+
.access(target)
|
|
22
|
+
.then(() => true)
|
|
23
|
+
.catch(() => false);
|
|
24
|
+
}
|
|
18
25
|
function packageNameOf(spec) {
|
|
19
26
|
if (spec.startsWith("@")) {
|
|
20
27
|
const at = spec.indexOf("@", 1);
|
|
@@ -24,33 +31,29 @@ function packageNameOf(spec) {
|
|
|
24
31
|
}
|
|
25
32
|
async function missingPackages(projectRoot, specs) {
|
|
26
33
|
const pkg = JSON.parse(await promises_1.default.readFile(node_path_1.default.join(projectRoot, "package.json"), "utf8"));
|
|
27
|
-
const declared = new Set([
|
|
28
|
-
...Object.keys(pkg.dependencies ?? {}),
|
|
29
|
-
...Object.keys(pkg.devDependencies ?? {}),
|
|
30
|
-
]);
|
|
34
|
+
const declared = new Set([...Object.keys(pkg.dependencies ?? {}), ...Object.keys(pkg.devDependencies ?? {})]);
|
|
31
35
|
return specs.filter((spec) => !declared.has(packageNameOf(spec)));
|
|
32
36
|
}
|
|
33
|
-
async function
|
|
34
|
-
const written = [];
|
|
37
|
+
async function findConflicts(items, projectRoot) {
|
|
35
38
|
const conflicts = [];
|
|
39
|
+
for (const item of items) {
|
|
40
|
+
for (const file of item.files) {
|
|
41
|
+
if (await exists(node_path_1.default.join(projectRoot, file.target))) {
|
|
42
|
+
conflicts.push(file.target);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return conflicts;
|
|
47
|
+
}
|
|
48
|
+
async function writeItemFiles(item, projectRoot) {
|
|
49
|
+
const written = [];
|
|
36
50
|
for (const file of item.files) {
|
|
37
51
|
const target = node_path_1.default.join(projectRoot, file.target);
|
|
38
|
-
const exists = await promises_1.default
|
|
39
|
-
.access(target)
|
|
40
|
-
.then(() => true)
|
|
41
|
-
.catch(() => false);
|
|
42
|
-
if (exists && !force) {
|
|
43
|
-
conflicts.push(file.target);
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
52
|
await promises_1.default.mkdir(node_path_1.default.dirname(target), { recursive: true });
|
|
47
53
|
const content = file.content ?? (await promises_1.default.readFile(file.source, "utf8"));
|
|
48
54
|
await promises_1.default.writeFile(target, content);
|
|
49
55
|
written.push(file.target);
|
|
50
56
|
}
|
|
51
|
-
if (conflicts.length > 0) {
|
|
52
|
-
throw new errors_1.CliError(`The following files already exist (re-run with --force to overwrite):\n ${conflicts.join("\n ")}`);
|
|
53
|
-
}
|
|
54
57
|
return written;
|
|
55
58
|
}
|
|
56
59
|
async function runAdd(options) {
|
|
@@ -63,15 +66,19 @@ async function runAdd(options) {
|
|
|
63
66
|
const registryRoot = await (0, store_1.resolveRegistryRoot)();
|
|
64
67
|
const items = await (0, store_1.resolveInstallSet)(registryRoot, requested);
|
|
65
68
|
console.info((0, colorette_1.cyan)(`Installing ${items.map((i) => i.manifest.name).join(", ")} into ${projectRoot}...`));
|
|
69
|
+
if (options.force !== true) {
|
|
70
|
+
const conflicts = await findConflicts(items, projectRoot);
|
|
71
|
+
if (conflicts.length > 0) {
|
|
72
|
+
throw new errors_1.CliError(`The following files already exist (re-run with --force to overwrite):\n ${conflicts.join("\n ")}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
66
75
|
const allWritten = [];
|
|
67
76
|
for (const item of items) {
|
|
68
|
-
const written = await writeItemFiles(item, projectRoot
|
|
77
|
+
const written = await writeItemFiles(item, projectRoot);
|
|
69
78
|
allWritten.push(...written);
|
|
70
79
|
console.info(` ${(0, colorette_1.green)("✓")} ${item.manifest.name}`);
|
|
71
80
|
}
|
|
72
|
-
const specs = [
|
|
73
|
-
...new Set(items.flatMap((i) => i.manifest.dependencies ?? [])),
|
|
74
|
-
];
|
|
81
|
+
const specs = [...new Set(items.flatMap((i) => i.manifest.dependencies ?? []))];
|
|
75
82
|
const missing = await missingPackages(projectRoot, specs);
|
|
76
83
|
if (missing.length > 0) {
|
|
77
84
|
if (options.skipInstall) {
|
|
@@ -85,9 +92,7 @@ async function runAdd(options) {
|
|
|
85
92
|
for (const file of allWritten) {
|
|
86
93
|
console.info(` ${(0, colorette_1.green)("added")} ${file}`);
|
|
87
94
|
}
|
|
88
|
-
const hints = items
|
|
89
|
-
.map((i) => i.manifest.postInstall)
|
|
90
|
-
.filter((hint) => Boolean(hint));
|
|
95
|
+
const hints = items.map((i) => i.manifest.postInstall).filter((hint) => Boolean(hint));
|
|
91
96
|
if (hints.length > 0) {
|
|
92
97
|
console.info(`\n${(0, colorette_1.bold)("Next steps")}:`);
|
|
93
98
|
for (const hint of hints)
|
package/dist/commands/add.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":";;;;;AAyCA,sCAMC;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IAED,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACvG,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,KAAK,IAAA,gBAAI,EAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACzC,KAAK,MAAM,IAAI,IAAI,KAAK;YAAE,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const GENERATOR_PACKAGE_NAME = "apits-gen";
|
|
2
|
+
export declare const GENERATOR_PACKAGE_SPEC = "apits-gen@^1.0.0";
|
|
3
|
+
export declare const GENERATOR_BIN_RELATIVE = "node_modules/apits-gen/bin/apits";
|
|
4
|
+
export declare const CONFIG_PROJECT_PATH = "apits.config.ts";
|
|
5
|
+
export declare const API_CLIENT_PROJECT_PATH = "src/lib/api-client.ts";
|
|
6
|
+
export declare const ADAPTER_PROJECT_PATH = "src/api/request.ts";
|
|
7
|
+
export declare const DEFAULT_OUTPUT_DIR = "src/api/_gen";
|
|
8
|
+
export declare const DEFAULT_GENERATED_NAME = "api";
|
|
9
|
+
export declare const PUBLIC_BASE_URL_ENV = "NEXT_PUBLIC_BASE_URL";
|
|
10
|
+
export declare function renderApitsConfig(input: string): string;
|
|
11
|
+
export declare const ADAPTER_CONTENT = "/**\n * Adapter between generated API code and the fewbie api client.\n *\n * Scaffolded by `fewbie apits` and never overwritten afterwards \u2014 edit it\n * freely (for example to unwrap a { code, data } response envelope).\n */\nimport type { AxiosRequestConfig } from \"axios\";\n\nimport { apiClient } from \"@/lib/api-client\";\n\ntype GeneratedMethod = <Req, Res>(\n url: string,\n config?: AxiosRequestConfig,\n) => Promise<Res>;\n\n// The generator puts POST/PUT/PATCH payloads on config.data; the fewbie\n// apiClient takes the body as a separate positional argument.\nfunction withBodyData(\n call: (\n url: string,\n data?: unknown,\n config?: AxiosRequestConfig,\n ) => Promise<unknown>,\n): GeneratedMethod {\n return (url, config) => {\n const { data, ...rest } = config ?? {};\n return call(url, data, rest) as Promise<never>;\n };\n}\n\n// HEAD/OPTIONS carry no response body; return the full AxiosResponse so\n// status and headers remain observable.\nfunction responseOnly(\n call: (url: string, config?: AxiosRequestConfig) => Promise<unknown>,\n): GeneratedMethod {\n return (url, config) => call(url, config) as Promise<never>;\n}\n\nexport interface GeneratedRequest {\n get: GeneratedMethod;\n post: GeneratedMethod;\n put: GeneratedMethod;\n patch: GeneratedMethod;\n delete: GeneratedMethod;\n head: GeneratedMethod;\n options: GeneratedMethod;\n}\n\nexport const request: GeneratedRequest = {\n get: (url, config) => apiClient.get(url, config) as Promise<never>,\n delete: (url, config) => apiClient.delete(url, config) as Promise<never>,\n head: responseOnly((url, config) => apiClient.head(url, config)),\n options: responseOnly((url, config) => apiClient.options(url, config)),\n post: withBodyData((url, data, config) => apiClient.post(url, data, config)),\n put: withBodyData((url, data, config) => apiClient.put(url, data, config)),\n patch: withBodyData((url, data, config) =>\n apiClient.patch(url, data, config),\n ),\n};\n";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ADAPTER_CONTENT = exports.PUBLIC_BASE_URL_ENV = exports.DEFAULT_GENERATED_NAME = exports.DEFAULT_OUTPUT_DIR = exports.ADAPTER_PROJECT_PATH = exports.API_CLIENT_PROJECT_PATH = exports.CONFIG_PROJECT_PATH = exports.GENERATOR_BIN_RELATIVE = exports.GENERATOR_PACKAGE_SPEC = exports.GENERATOR_PACKAGE_NAME = void 0;
|
|
4
4
|
exports.renderApitsConfig = renderApitsConfig;
|
|
5
|
-
exports.GENERATOR_PACKAGE_NAME = "
|
|
6
|
-
exports.GENERATOR_PACKAGE_SPEC = "
|
|
7
|
-
exports.GENERATOR_BIN_RELATIVE = "node_modules/
|
|
5
|
+
exports.GENERATOR_PACKAGE_NAME = "apits-gen";
|
|
6
|
+
exports.GENERATOR_PACKAGE_SPEC = "apits-gen@^1.0.0";
|
|
7
|
+
exports.GENERATOR_BIN_RELATIVE = "node_modules/apits-gen/bin/apits";
|
|
8
8
|
exports.CONFIG_PROJECT_PATH = "apits.config.ts";
|
|
9
9
|
exports.API_CLIENT_PROJECT_PATH = "src/lib/api-client.ts";
|
|
10
10
|
exports.ADAPTER_PROJECT_PATH = "src/api/request.ts";
|
|
@@ -18,8 +18,8 @@ function renderApitsConfig(input) {
|
|
|
18
18
|
const safeInput = escapeSingleQuoted(input);
|
|
19
19
|
return `import { defineConfig } from '${exports.GENERATOR_PACKAGE_NAME}';
|
|
20
20
|
|
|
21
|
-
// Scaffolded by \`fewbie
|
|
22
|
-
// add more OpenAPI sources here and select one with \`fewbie
|
|
21
|
+
// Scaffolded by \`fewbie apits\`. The generator owns this file afterwards:
|
|
22
|
+
// add more OpenAPI sources here and select one with \`fewbie apits -n <name>\`.
|
|
23
23
|
export default defineConfig([
|
|
24
24
|
{
|
|
25
25
|
// OpenAPI document source: an http(s) URL or a local JSON/YAML file.
|
|
@@ -40,7 +40,7 @@ export default defineConfig([
|
|
|
40
40
|
exports.ADAPTER_CONTENT = `/**
|
|
41
41
|
* Adapter between generated API code and the fewbie api client.
|
|
42
42
|
*
|
|
43
|
-
* Scaffolded by \`fewbie
|
|
43
|
+
* Scaffolded by \`fewbie apits\` and never overwritten afterwards — edit it
|
|
44
44
|
* freely (for example to unwrap a { code, data } response envelope).
|
|
45
45
|
*/
|
|
46
46
|
import type { AxiosRequestConfig } from "axios";
|
|
@@ -97,4 +97,4 @@ export const request: GeneratedRequest = {
|
|
|
97
97
|
),
|
|
98
98
|
};
|
|
99
99
|
`;
|
|
100
|
-
//# sourceMappingURL=
|
|
100
|
+
//# sourceMappingURL=apits-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apits-templates.js","sourceRoot":"","sources":["../../src/commands/apits-templates.ts"],"names":[],"mappings":";;;AA4BA,8CAsBC;AAvCY,QAAA,sBAAsB,GAAG,WAAW,CAAC;AACrC,QAAA,sBAAsB,GAAG,kBAAkB,CAAC;AAC5C,QAAA,sBAAsB,GAAG,kCAAkC,CAAC;AAE5D,QAAA,mBAAmB,GAAG,iBAAiB,CAAC;AACxC,QAAA,uBAAuB,GAAG,uBAAuB,CAAC;AAClD,QAAA,oBAAoB,GAAG,oBAAoB,CAAC;AAC5C,QAAA,kBAAkB,GAAG,cAAc,CAAC;AACpC,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,mBAAmB,GAAG,sBAAsB,CAAC;AAG1D,SAAS,kBAAkB,CAAC,KAAa;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAC3D,CAAC;AAGD,SAAgB,iBAAiB,CAAC,KAAa;IAC7C,MAAM,SAAS,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC5C,OAAO,iCAAiC,8BAAsB;;;;;;;;sCAQ1B,SAAS;eAChC,0BAAkB;aACpB,8BAAsB;;;mCAGA,2BAAmB;;;;;;CAMrD,CAAC;AACF,CAAC;AAQY,QAAA,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2D9B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ApitsOptions {
|
|
2
2
|
input?: string;
|
|
3
3
|
name?: string;
|
|
4
4
|
watch?: boolean;
|
|
5
5
|
skipInstall?: boolean;
|
|
6
6
|
cwd?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function runApits(options: ApitsOptions): Promise<void>;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.runApits = runApits;
|
|
7
|
+
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const node_child_process_1 = require("node:child_process");
|
|
10
|
+
const colorette_1 = require("colorette");
|
|
11
|
+
const errors_1 = require("../lib/errors");
|
|
12
|
+
const exec_interactive_1 = require("../lib/exec-interactive");
|
|
13
|
+
const apits_templates_1 = require("./apits-templates");
|
|
14
|
+
async function exists(target) {
|
|
15
|
+
return promises_1.default
|
|
16
|
+
.access(target)
|
|
17
|
+
.then(() => true)
|
|
18
|
+
.catch(() => false);
|
|
19
|
+
}
|
|
20
|
+
async function readPackageJson(projectRoot) {
|
|
21
|
+
return JSON.parse(await promises_1.default.readFile(node_path_1.default.join(projectRoot, "package.json"), "utf8"));
|
|
22
|
+
}
|
|
23
|
+
function runGenerator(projectRoot, args) {
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
const child = (0, node_child_process_1.spawn)(process.execPath, args, {
|
|
26
|
+
cwd: projectRoot,
|
|
27
|
+
stdio: "inherit",
|
|
28
|
+
});
|
|
29
|
+
child.on("error", reject);
|
|
30
|
+
child.on("close", (code) => {
|
|
31
|
+
if (code === 0)
|
|
32
|
+
resolve();
|
|
33
|
+
else
|
|
34
|
+
reject(new Error(`apits exited with code ${code}`));
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async function runApits(options) {
|
|
39
|
+
const projectRoot = node_path_1.default.resolve(options.cwd ?? process.cwd());
|
|
40
|
+
if (!(await exists(node_path_1.default.join(projectRoot, "package.json")))) {
|
|
41
|
+
throw new errors_1.CliError(`No package.json found in ${projectRoot}. Run 'fewbie apits' inside a fewbie project.`);
|
|
42
|
+
}
|
|
43
|
+
if (!(await exists(node_path_1.default.join(projectRoot, apits_templates_1.API_CLIENT_PROJECT_PATH)))) {
|
|
44
|
+
throw new errors_1.CliError(`'fewbie apits' requires the api-client item. Run 'fewbie add api-client' first.`);
|
|
45
|
+
}
|
|
46
|
+
const configPath = node_path_1.default.join(projectRoot, apits_templates_1.CONFIG_PROJECT_PATH);
|
|
47
|
+
const hasConfig = await exists(configPath);
|
|
48
|
+
if (!hasConfig) {
|
|
49
|
+
if (!options.input) {
|
|
50
|
+
throw new errors_1.CliError(`No OpenAPI input and no ${apits_templates_1.CONFIG_PROJECT_PATH} found.\n` +
|
|
51
|
+
` First run: fewbie apits <openapi-url-or-json-file>\n` +
|
|
52
|
+
` Afterwards: edit ${apits_templates_1.CONFIG_PROJECT_PATH} to manage sources.`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else if (options.input) {
|
|
56
|
+
throw new errors_1.CliError(`${apits_templates_1.CONFIG_PROJECT_PATH} already exists. Update its \`input\` directly (or pass -n <name> to select a source) instead of passing a positional input.`);
|
|
57
|
+
}
|
|
58
|
+
const adapterPath = node_path_1.default.join(projectRoot, apits_templates_1.ADAPTER_PROJECT_PATH);
|
|
59
|
+
if (!(await exists(adapterPath))) {
|
|
60
|
+
await promises_1.default.mkdir(node_path_1.default.dirname(adapterPath), { recursive: true });
|
|
61
|
+
await promises_1.default.writeFile(adapterPath, apits_templates_1.ADAPTER_CONTENT);
|
|
62
|
+
console.info(` ${(0, colorette_1.green)("added")} ${apits_templates_1.ADAPTER_PROJECT_PATH}`);
|
|
63
|
+
}
|
|
64
|
+
if (!hasConfig) {
|
|
65
|
+
await promises_1.default.writeFile(configPath, (0, apits_templates_1.renderApitsConfig)(options.input));
|
|
66
|
+
console.info(` ${(0, colorette_1.green)("added")} ${apits_templates_1.CONFIG_PROJECT_PATH}`);
|
|
67
|
+
}
|
|
68
|
+
const pkg = await readPackageJson(projectRoot);
|
|
69
|
+
const declared = new Set([...Object.keys(pkg.dependencies ?? {}), ...Object.keys(pkg.devDependencies ?? {})]);
|
|
70
|
+
if (!declared.has(apits_templates_1.GENERATOR_PACKAGE_NAME)) {
|
|
71
|
+
if (options.skipInstall) {
|
|
72
|
+
throw new errors_1.CliError(`Generator not installed. Run: npm install -D ${apits_templates_1.GENERATOR_PACKAGE_SPEC}`);
|
|
73
|
+
}
|
|
74
|
+
console.info(`\nInstalling dev dependency: ${apits_templates_1.GENERATOR_PACKAGE_SPEC}`);
|
|
75
|
+
await (0, exec_interactive_1.execInteractive)("npm", ["install", "-D", apits_templates_1.GENERATOR_PACKAGE_SPEC], projectRoot);
|
|
76
|
+
}
|
|
77
|
+
const binPath = node_path_1.default.join(projectRoot, apits_templates_1.GENERATOR_BIN_RELATIVE);
|
|
78
|
+
if (!(await exists(binPath))) {
|
|
79
|
+
throw new errors_1.CliError(`Generator binary not found at ${apits_templates_1.GENERATOR_BIN_RELATIVE}. Run 'npm install' and retry.`);
|
|
80
|
+
}
|
|
81
|
+
const genArgs = [binPath, "gen"];
|
|
82
|
+
if (options.name)
|
|
83
|
+
genArgs.push("-n", options.name);
|
|
84
|
+
if (options.watch)
|
|
85
|
+
genArgs.push("--watch");
|
|
86
|
+
const outputDir = node_path_1.default.join(projectRoot, apits_templates_1.DEFAULT_OUTPUT_DIR);
|
|
87
|
+
const namedOutput = node_path_1.default.join(outputDir, `${options.name ?? apits_templates_1.DEFAULT_GENERATED_NAME}.ts`);
|
|
88
|
+
const beforeStat = await promises_1.default.stat(namedOutput).catch(() => null);
|
|
89
|
+
const beforeDirMtimes = new Map();
|
|
90
|
+
if (!options.name) {
|
|
91
|
+
const entries = await promises_1.default.readdir(outputDir).catch(() => []);
|
|
92
|
+
for (const entry of entries.filter((name) => name.endsWith(".ts"))) {
|
|
93
|
+
const stat = await promises_1.default.stat(node_path_1.default.join(outputDir, entry)).catch(() => null);
|
|
94
|
+
if (stat)
|
|
95
|
+
beforeDirMtimes.set(entry, stat.mtimeMs);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
console.info((0, colorette_1.cyan)(`\nGenerating API code (${apits_templates_1.DEFAULT_OUTPUT_DIR})...`));
|
|
99
|
+
await runGenerator(projectRoot, genArgs);
|
|
100
|
+
if (!options.watch) {
|
|
101
|
+
let refreshed;
|
|
102
|
+
if (options.name) {
|
|
103
|
+
const afterStat = await promises_1.default.stat(namedOutput).catch(() => null);
|
|
104
|
+
refreshed = afterStat !== null && (beforeStat === null || afterStat.mtimeMs > beforeStat.mtimeMs);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
const entries = await promises_1.default.readdir(outputDir).catch(() => []);
|
|
108
|
+
refreshed = false;
|
|
109
|
+
for (const entry of entries.filter((name) => name.endsWith(".ts"))) {
|
|
110
|
+
const stat = await promises_1.default.stat(node_path_1.default.join(outputDir, entry)).catch(() => null);
|
|
111
|
+
if (stat && stat.mtimeMs > (beforeDirMtimes.get(entry) ?? 0)) {
|
|
112
|
+
refreshed = true;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (!refreshed) {
|
|
118
|
+
throw new errors_1.CliError(`Code generation failed: no file in ${apits_templates_1.DEFAULT_OUTPUT_DIR} was produced or updated. See the generator output above.`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
console.info(`\n${(0, colorette_1.bold)("Next steps")}:`);
|
|
122
|
+
console.info(` - Set ${(0, colorette_1.yellow)(apits_templates_1.PUBLIC_BASE_URL_ENV)} in .env.local (generated requests read it at runtime).`);
|
|
123
|
+
console.info(` - Import generated functions from ${apits_templates_1.DEFAULT_OUTPUT_DIR}/api.ts (re-run after schema changes, or use --watch).`);
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=apits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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CAAC;QACD,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,iBAAQ,CAChB,sCAAsC,oCAAkB,2DAA2D,CACpH,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,KAAK,IAAA,gBAAI,EAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IACzC,OAAO,CAAC,IAAI,CAAC,WAAW,IAAA,kBAAM,EAAC,qCAAmB,CAAC,yDAAyD,CAAC,CAAC;IAC9G,OAAO,CAAC,IAAI,CACV,uCAAuC,oCAAkB,wDAAwD,CAClH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface DoctorOptions {
|
|
2
|
+
cwd?: string;
|
|
3
|
+
json?: boolean;
|
|
4
|
+
}
|
|
5
|
+
type Severity = "error" | "warn" | "info";
|
|
6
|
+
interface Finding {
|
|
7
|
+
severity: Severity;
|
|
8
|
+
category: string;
|
|
9
|
+
message: string;
|
|
10
|
+
}
|
|
11
|
+
interface DoctorResult {
|
|
12
|
+
projectRoot: string;
|
|
13
|
+
findings: Finding[];
|
|
14
|
+
installed: string[];
|
|
15
|
+
summary: {
|
|
16
|
+
error: number;
|
|
17
|
+
warn: number;
|
|
18
|
+
info: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare function runDoctor(options: DoctorOptions): Promise<DoctorResult>;
|
|
22
|
+
export declare function formatDoctorReport(result: DoctorResult): string;
|
|
23
|
+
export declare function doctorCommand(options: DoctorOptions): Promise<void>;
|
|
24
|
+
export {};
|