@anvil-works/anvil-cli 0.8.0-dev.0 → 0.8.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 +55 -1
- package/dist/CLILogger.d.ts.map +1 -1
- package/dist/SavePathRouter.d.ts +4 -2
- package/dist/SavePathRouter.d.ts.map +1 -1
- package/dist/WatchSession.d.ts +5 -2
- package/dist/WatchSession.d.ts.map +1 -1
- package/dist/api.d.ts +7 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/appRoot.d.ts +11 -0
- package/dist/appRoot.d.ts.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +18736 -16819
- package/dist/cliProgram.d.ts +4 -0
- package/dist/cliProgram.d.ts.map +1 -0
- package/dist/cliReporting.d.ts +4 -0
- package/dist/cliReporting.d.ts.map +1 -0
- package/dist/commands/appDetection.d.ts +68 -1
- package/dist/commands/appDetection.d.ts.map +1 -1
- package/dist/commands/checkout.d.ts +1 -0
- package/dist/commands/checkout.d.ts.map +1 -1
- package/dist/commands/create.d.ts +52 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/db.d.ts.map +1 -1
- package/dist/commands/deps.d.ts.map +1 -1
- package/dist/commands/env.d.ts +3 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/repl.d.ts.map +1 -1
- package/dist/commands/secret.d.ts +3 -0
- package/dist/commands/secret.d.ts.map +1 -0
- package/dist/commands/test.d.ts +15 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/validate.d.ts +11 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/watch.d.ts +1 -25
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/config.d.ts +3 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/formTemplateValidation.d.ts.map +1 -1
- package/dist/index.js +663 -334
- package/dist/logger.d.ts +2 -2
- package/dist/program.d.ts +2 -9
- package/dist/program.d.ts.map +1 -1
- package/dist/programBase.d.ts +5 -0
- package/dist/programBase.d.ts.map +1 -0
- package/dist/reporting.d.ts +24 -0
- package/dist/reporting.d.ts.map +1 -0
- package/dist/serviceSources.d.ts.map +1 -1
- package/dist/services/anvil-api.d.ts +20 -0
- package/dist/services/anvil-api.d.ts.map +1 -1
- package/dist/services/db.d.ts +2 -0
- package/dist/services/db.d.ts.map +1 -1
- package/dist/services/deps.d.ts +7 -24
- package/dist/services/deps.d.ts.map +1 -1
- package/dist/services/depsCache.d.ts +25 -0
- package/dist/services/depsCache.d.ts.map +1 -0
- package/dist/services/environment.d.ts +4 -0
- package/dist/services/environment.d.ts.map +1 -1
- package/dist/services/git.d.ts +5 -2
- package/dist/services/git.d.ts.map +1 -1
- package/dist/services/path-open.d.ts +1 -0
- package/dist/services/path-open.d.ts.map +1 -1
- package/dist/services/repl.d.ts +2 -0
- package/dist/services/repl.d.ts.map +1 -1
- package/dist/services/secret.d.ts +43 -0
- package/dist/services/secret.d.ts.map +1 -0
- package/dist/services/server-tests.d.ts +47 -0
- package/dist/services/server-tests.d.ts.map +1 -0
- package/dist/services/validation.d.ts +2 -1
- package/dist/services/validation.d.ts.map +1 -1
- package/dist/validateFormTemplateHtml.d.ts.map +1 -1
- package/dist/validatePython.d.ts +5 -5
- package/dist/validatePython.d.ts.map +1 -1
- package/dist/validateThemeCss.d.ts +4 -0
- package/dist/validateThemeCss.d.ts.map +1 -0
- package/dist/validators.d.ts +2 -2
- package/dist/validators.d.ts.map +1 -1
- package/dist/watch/ConflictResolver.d.ts +5 -4
- package/dist/watch/ConflictResolver.d.ts.map +1 -1
- package/dist/watch/FileWatcher.d.ts +3 -1
- package/dist/watch/FileWatcher.d.ts.map +1 -1
- package/dist/watch/SaveProcessor.d.ts +5 -2
- package/dist/watch/SaveProcessor.d.ts.map +1 -1
- package/dist/watch/SyncManager.d.ts +3 -1
- package/dist/watch/SyncManager.d.ts.map +1 -1
- package/dist/watch/WebSocketClient.d.ts +3 -0
- package/dist/watch/WebSocketClient.d.ts.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -135,11 +135,43 @@ Useful options:
|
|
|
135
135
|
|
|
136
136
|
- `-O, --open` open the app folder after checkout
|
|
137
137
|
- `-b, --branch <BRANCH>` check out a specific branch
|
|
138
|
+
- `--git-url <GIT_URL>` use a separate Git server
|
|
138
139
|
- `-Q, --query <QUERY>` prefill the interactive search
|
|
139
140
|
- `-u, --url <ANVIL_URL>` choose the Anvil installation explicitly
|
|
140
141
|
- `-U, --user <USERNAME>` choose the logged-in account explicitly
|
|
141
142
|
- `-f, --force` override destination safety checks
|
|
142
143
|
|
|
144
|
+
### `anvil create`
|
|
145
|
+
|
|
146
|
+
Create a blank Anvil app and check it out locally. Without a name, the CLI prompts for one. The server supplies current Python 3 runtime defaults.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
anvil create "My App"
|
|
150
|
+
anvil create "My App" ./my-app --tag internal sales
|
|
151
|
+
anvil create "My App" --directory my-app --url anvil.works --user me@example.com
|
|
152
|
+
anvil create "My App" --no-checkout --tag internal sales
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Useful options:
|
|
156
|
+
|
|
157
|
+
- `-d, --directory <PATH>` choose the local directory (defaults to the app name with spaces replaced by underscores)
|
|
158
|
+
- `--no-checkout` create only the remote app and print its ID and editor URL
|
|
159
|
+
- `--tag <TAG...>` add space-separated tags or repeat the option; place after the name and destination
|
|
160
|
+
- `-u, --url <ANVIL_URL>` choose the Anvil installation
|
|
161
|
+
- `-U, --user <USERNAME>` choose the logged-in account
|
|
162
|
+
- `--git-url <GIT_URL>` use a separate Git server
|
|
163
|
+
- `-O, --open` open the checkout after creation
|
|
164
|
+
|
|
165
|
+
App names need quotes when they contain spaces. Leading and trailing whitespace is removed; the remaining name is preserved. Supply the destination as the second argument or with `--directory`, but not both. The destination must be empty and outside an existing Git repository. These checks run before creating the remote app.
|
|
166
|
+
|
|
167
|
+
With `--no-checkout`, no local directory is created or checked. It cannot be combined with a destination argument, `--directory`, `--git-url`, or `--open`; these combinations fail before login or creation. JSON output includes the app ID, name, server, account, tags, and `editorUrl`, without checkout fields.
|
|
168
|
+
|
|
169
|
+
Tags are combined, trimmed, lowercased, and deduplicated. An app can have at most 20 unique tags, each containing 1 to 50 letters, digits, hyphens, or underscores.
|
|
170
|
+
|
|
171
|
+
Server and account selection follow `checkout`, including interactive selection and login when needed. In scripts, supply the name and use `--url` and `--user` when the selection is ambiguous. `--json` disables prompts.
|
|
172
|
+
|
|
173
|
+
If creation succeeds but checkout fails, the error identifies the created app and explains how to recover it. Do not rerun `create`, which would create another app. JSON errors include the created app details in `data.created`. Failure to open an editor after checkout produces a warning and preserves the successful result.
|
|
174
|
+
|
|
143
175
|
### `anvil watch`
|
|
144
176
|
|
|
145
177
|
Keep your local app folder synced with Anvil while you work.
|
|
@@ -181,6 +213,7 @@ When given a file, the command chooses the validator from the file path. When gi
|
|
|
181
213
|
- `anvil.yaml`
|
|
182
214
|
- `.yaml` files under `client_code/`, including `client_code/**/form_template.yaml`
|
|
183
215
|
- `.html` files under `client_code/`, including `client_code/**/form_template.html` and module-form `client_code/<Form>.html`
|
|
216
|
+
- `.css` files under `theme/assets/`, including `theme.css`: warns about selectors targeting the removed `anvil-dropzone` wrappers. These warnings do not fail validation; general CSS syntax is not checked.
|
|
184
217
|
- `.py` files under `client_code/` and `server_code/`
|
|
185
218
|
|
|
186
219
|
Common examples:
|
|
@@ -193,12 +226,13 @@ anvil validate client_code/Form1/form_template.html
|
|
|
193
226
|
anvil validate client_code/Form1.html
|
|
194
227
|
anvil validate client_code/Helpers.py
|
|
195
228
|
anvil validate server_code/ServerModule.py
|
|
229
|
+
anvil validate theme/assets/theme.css
|
|
196
230
|
anvil validate .
|
|
197
231
|
```
|
|
198
232
|
|
|
199
233
|
HTML validation parses the template with `@anvil-works/form-template-parser`, checks optional YAML frontmatter, and reports semantic issues such as duplicate explicit component names or invalid component types.
|
|
200
234
|
|
|
201
|
-
Python validation in the `anvil validate` command uses the bundled `@anvil-works/anvil-
|
|
235
|
+
Python validation in the `anvil validate` command uses the native checker bundled by `@anvil-works/anvil-ty` for semantic app checks when validating existing Python files. Set `ANVIL_TY` to an executable path to override the bundled checker. `ANVIL_TY_TIMEOUT_MS` sets its timeout in milliseconds (default: 300000), and `ANVIL_API_STUBS_PATH` selects an alternative Anvil API stub directory. The programmatic `validatePath()` API keeps a lightweight synchronous fallback that checks syntax using a local Python interpreter (`ANVIL_PYTHON`, `uv`, `python3`, or `python`) and performs basic form structure checks.
|
|
202
236
|
|
|
203
237
|
Validation never fetches dependencies. Apps with dependencies use the existing `.anvil/deps` cache; a missing, incomplete, or configuration-mismatched cache produces a non-fatal warning with instructions to run `anvil deps fetch`.
|
|
204
238
|
|
|
@@ -230,6 +264,25 @@ Use `--json` with `anvil convert-template` to emit the source path, output path,
|
|
|
230
264
|
|
|
231
265
|
Conversion uses `@anvil-works/form-template-parser`. When package-qualified form specs such as `form:MyForm` or dependency `item_template` values are present, the command reads `anvil.yaml` (and `.anvil/deps/manifest.json` when needed) to canonicalize them before serializing HTML.
|
|
232
266
|
|
|
267
|
+
### `anvil test`
|
|
268
|
+
|
|
269
|
+
Run your app's server tests (`tests/server_tests`) on Anvil, and print pytest's output as they run.
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
anvil test
|
|
273
|
+
anvil test tests/server_tests/test_orders.py::test_refund
|
|
274
|
+
anvil test -k "login and not slow"
|
|
275
|
+
anvil test --collect-only
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
The tests run on the commit you have checked out (`HEAD`), which must already be pushed to Anvil. If you have uncommitted changes, the command warns you that they aren't included.
|
|
279
|
+
|
|
280
|
+
Targets are paths or pytest node IDs in `tests/server_tests`, relative to the current directory. `-k` takes a pytest keyword expression.
|
|
281
|
+
|
|
282
|
+
The app, server and account are chosen as `anvil watch` chooses them, including asking you when there's a choice. In CI, use `-A, --appid <APP_ID>`, `-u, --url <ANVIL_URL>` and `-U, --user <USERNAME>` when the choice is ambiguous. `--json` disables prompts.
|
|
283
|
+
|
|
284
|
+
The command exits with pytest's exit code, for example `0` if every test passed and `1` if any failed, so you can use it in CI. If the run couldn't start or finish, for example because the server runtime failed to launch, it prints the error and exits `1`. Press Ctrl-C to cancel the run.
|
|
285
|
+
|
|
233
286
|
### Other useful commands
|
|
234
287
|
|
|
235
288
|
```bash
|
|
@@ -242,6 +295,7 @@ anvil config set <key> <value>
|
|
|
242
295
|
anvil config reset
|
|
243
296
|
anvil validate <file>
|
|
244
297
|
anvil convert-template <file>
|
|
298
|
+
anvil test
|
|
245
299
|
anvil version
|
|
246
300
|
anvil update
|
|
247
301
|
anvil --help
|
package/dist/CLILogger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CLILogger.d.ts","sourceRoot":"","sources":["../src/CLILogger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CLILogger.d.ts","sourceRoot":"","sources":["../src/CLILogger.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAY,aAAa,EAAoB,MAAM,UAAU,CAAC;AAE7E,MAAM,WAAW,gBAAgB;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAUD;;;;GAIG;AACH,qBAAa,SAAU,YAAW,MAAM;IACpC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAA6C;IAC7D,OAAO,CAAC,kBAAkB,CAAqB;IAC/C,OAAO,CAAC,cAAc,CAAU;gBAEpB,OAAO,GAAE,gBAAqB;IAI1C,OAAO,KAAK,QAAQ,GAEnB;IAED,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,OAAO;IAUf;;OAEG;IACH,OAAO,CAAC,GAAG;IAoBX,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAU3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+1,6 @@
|
|
|
1
1
|
import { type FormTemplateSavePayload } from "@anvil-works/form-template-parser";
|
|
2
2
|
import { EditorYamlManager } from "./EditorYaml";
|
|
3
|
+
import { type Logger, type ReportingOptions } from "./reporting";
|
|
3
4
|
type SavePath = Array<any>;
|
|
4
5
|
export interface ModuleData {
|
|
5
6
|
name: string;
|
|
@@ -25,6 +26,7 @@ export type SaveResult = {
|
|
|
25
26
|
reason: string;
|
|
26
27
|
};
|
|
27
28
|
export interface RouteContext {
|
|
29
|
+
logger?: Logger;
|
|
28
30
|
repoPath: string;
|
|
29
31
|
editorYaml: EditorYamlManager;
|
|
30
32
|
stagedOnly?: boolean;
|
|
@@ -42,7 +44,7 @@ export declare function deduplicateFormChanges(changes: Array<{
|
|
|
42
44
|
path: string;
|
|
43
45
|
type: "change" | "add" | "unlink" | "rename";
|
|
44
46
|
from?: string;
|
|
45
|
-
}>): Array<{
|
|
47
|
+
}>, options?: Pick<ReportingOptions, "logger">): Array<{
|
|
46
48
|
path: string;
|
|
47
49
|
type: "change" | "add" | "unlink" | "rename";
|
|
48
50
|
from?: string;
|
|
@@ -55,7 +57,7 @@ export declare function routeFileChange(change: RouteFileChange, context: RouteC
|
|
|
55
57
|
* @param previousYaml - Previous state of anvil.yaml for diffing (optional)
|
|
56
58
|
* @returns Array of {key, value} pairs for changed keys
|
|
57
59
|
*/
|
|
58
|
-
export declare function getAnvilYamlChanges(repoPath: string, previousYaml?: Record<string, any> | null): Promise<Array<{
|
|
60
|
+
export declare function getAnvilYamlChanges(repoPath: string, previousYaml?: Record<string, any> | null, options?: Pick<ReportingOptions, "logger">): Promise<Array<{
|
|
59
61
|
key: string;
|
|
60
62
|
value: any;
|
|
61
63
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SavePathRouter.d.ts","sourceRoot":"","sources":["../src/SavePathRouter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SavePathRouter.d.ts","sourceRoot":"","sources":["../src/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AAsB,CAClC,OAAO,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EAC7F,OAAO,GAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAM,GAC/C,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA+DtF;AAED,wBAAsB,eAAe,CACjC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,YAAY,GACtB,OAAO,CAAC,UAAU,GAAG,UAAU,EAAE,CAAC,CAsBpC;AAyzBD;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACrC,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EACzC,OAAO,GAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAM,GAC/C,OAAO,CAAC,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,GAAG,CAAA;CAAE,CAAC,CAAC,CAkE7C"}
|
package/dist/WatchSession.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Emitter } from "./Emitter";
|
|
2
2
|
import { AnvilEnvironmentBinding, EnvBranchChangeMode } from "./environment";
|
|
3
|
+
import { type ReportingOptions } from "./reporting";
|
|
3
4
|
import { type FileChange } from "./watch";
|
|
4
5
|
import { type WatchDiagnostic } from "./watch/diagnostics";
|
|
5
6
|
export interface WatchSessionEvents {
|
|
@@ -72,7 +73,7 @@ export interface WatchSessionEvents {
|
|
|
72
73
|
error: string;
|
|
73
74
|
fileCount: number;
|
|
74
75
|
} & WatchDiagnostic;
|
|
75
|
-
|
|
76
|
+
saved: {
|
|
76
77
|
oldCommitId: string | null;
|
|
77
78
|
newCommitId: string;
|
|
78
79
|
branch: string;
|
|
@@ -95,6 +96,8 @@ export type WatchDiagnosticEventName = "save-failed" | "validation-failed" | "ma
|
|
|
95
96
|
export type WatchDiagnosticEventPayload = WatchSessionEvents[WatchDiagnosticEventName];
|
|
96
97
|
export declare class WatchSession extends Emitter<WatchSessionEvents> {
|
|
97
98
|
private sessionId;
|
|
99
|
+
private readonly logger;
|
|
100
|
+
private readonly progress;
|
|
98
101
|
private repoPath;
|
|
99
102
|
private appId;
|
|
100
103
|
private anvilUrl;
|
|
@@ -135,7 +138,7 @@ export declare class WatchSession extends Emitter<WatchSessionEvents> {
|
|
|
135
138
|
private readonly BRANCH_CHANGE_SETTLE_MS;
|
|
136
139
|
private readonly LOCAL_CHANGE_POLL_MS;
|
|
137
140
|
private stagedOnly;
|
|
138
|
-
constructor(repoPath: string, appId: string, options: {
|
|
141
|
+
constructor(repoPath: string, appId: string, options: ReportingOptions & {
|
|
139
142
|
anvilUrl: string;
|
|
140
143
|
gitUrl: string;
|
|
141
144
|
authToken: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WatchSession.d.ts","sourceRoot":"","sources":["../src/WatchSession.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACH,uBAAuB,EACvB,mBAAmB,EAOtB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"WatchSession.d.ts","sourceRoot":"","sources":["../src/WatchSession.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACH,uBAAuB,EACvB,mBAAmB,EAOtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAoE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAatH,OAAO,EAMH,KAAK,UAAU,EACl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BAAoB;IAgB5B;;;OAGG;IACU,iBAAiB,CAC1B,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAChC,OAAO,CAAC;QAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC;QAAC,SAAS,EAAE,UAAU,EAAE,CAAA;KAAE,CAAC;IAcvE,OAAO,IAAI,IAAI;IAwBT,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAoCpC,OAAO,CAAC,6BAA6B;IAmBrC,yBAAyB,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI;YAOrD,gCAAgC;IAkB9C,OAAO,CAAC,+BAA+B;YAUzB,yBAAyB;IAiCvC,OAAO,CAAC,yBAAyB;YAgBnB,gBAAgB;IAsB9B,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,sBAAsB;IAI9B;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAOhC,2FAA2F;IACrF,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;YAenB,iBAAiB;YAajB,qBAAqB;CAkCtC"}
|
package/dist/api.d.ts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { WatchSession } from "./WatchSession";
|
|
2
2
|
import { AuthError, GitError } from "./errors";
|
|
3
|
+
import { type ReportingOptions } from "./reporting";
|
|
3
4
|
import { ValidationServiceError } from "./services/validation";
|
|
4
5
|
import { AnvilEnvironmentBinding, EnvBranchChangeMode } from "./environment";
|
|
5
6
|
export { WatchSession };
|
|
7
|
+
export type { Logger, ProgressReporter, ReportingOptions } from "./reporting";
|
|
6
8
|
export type { WatchDiagnosticEventName, WatchDiagnosticEventPayload, WatchSessionEvents } from "./WatchSession";
|
|
7
9
|
export { branchFromEnvironmentVersion, readEnvironmentPid, requireEnvironmentBranch, writeEnvironmentPid, } from "./environment";
|
|
8
10
|
export type { AnvilEnvironmentBinding, AnvilEnvironmentVersion, EnvBranchChangeMode } from "./environment";
|
|
9
|
-
export { AppIdCandidate, AppIdWithContext, CheckoutAppListItem, detectAppIdsByCommitLookup, detectAppIdsFromAllRemotes, filterCandidates, formatCandidateLabel, getGitFetchUrl, getGitPushUrl, getLatestVersion, getWebSocketUrl, listAppsForCheckout, lookupRemoteInfoForAppId, lookupByCommit, saveUpdates, ValidateAppIdResponse, validateAppId, } from "./services/anvil-api";
|
|
11
|
+
export { AppIdCandidate, AppIdWithContext, CheckoutAppListItem, CreatedAnvilApp, createAnvilApp, detectAppIdsByCommitLookup, detectAppIdsFromAllRemotes, filterCandidates, formatCandidateLabel, getGitFetchUrl, getGitPushUrl, getLatestVersion, getWebSocketUrl, listAppsForCheckout, lookupRemoteInfoForAppId, lookupByCommit, saveUpdates, ValidateAppIdResponse, validateAppId, } from "./services/anvil-api";
|
|
10
12
|
export { ANVIL_SYNC_CLIENT_ID, getAccountsForUrl, getAvailableAnvilUrls, getValidAuthToken, GetValidAuthTokenOptions, hasTokensForUrl, REFRESH_REQUEST_TIMEOUT_MS, verifyAndStoreTokens, LoginResult, LogoutResult, logout, TokenData, clearInMemoryTokens, setInMemoryTokens, verifyAuth, } from "./services/auth";
|
|
11
13
|
export { DeviceAuthorizationResponse, OAuthTokenResponse, pollDeviceAuthorization, requestDeviceAuthorization, } from "./services/oauth-login";
|
|
12
14
|
export { CheckoutCloneOptions, CheckoutExecutionDeps, CheckoutOptions, CheckoutResult, executeCheckout, getDefaultDestinationDirectory, isDirectoryNonEmpty, isPathInsideGitRepo, parseCheckoutInput, ParsedCheckoutInput, sanitizeDirectoryName, validateCheckoutDestination, } from "./commands/checkout";
|
|
15
|
+
export { executeCreate, CreateCheckoutError } from "./commands/create";
|
|
16
|
+
export type { CreateExecutionDeps, CreateOptions, CreateResult, RemoteCreateResult, CreatedAppDetails, } from "./commands/create";
|
|
13
17
|
export { createCheckoutPickerSource, type CheckoutPickerDeps, type CheckoutPickerSourceController, type CheckoutPickerSourceOptions, } from "./commands/checkout-picker";
|
|
14
18
|
export { buildGitAuthDoctorReport, formatGitAuthDoctorReport, inspectCredentialHelperCommand, parseCredentialHelperCommand, } from "./commands/gitAuth";
|
|
15
19
|
export type { CredentialFillResult, GitAuthDoctorAppReport, GitAuthDoctorFinding, GitAuthDoctorRemote, GitAuthDoctorReport, GitAuthDoctorStatus, GitCredentialHelperDetails, GitCredentialSimulation, InspectCredentialHelperOptions, } from "./commands/gitAuth";
|
|
@@ -32,14 +36,14 @@ export interface UncommittedChanges {
|
|
|
32
36
|
staged: string[];
|
|
33
37
|
}
|
|
34
38
|
export type WatchError = AuthError | GitError | ValidationServiceError;
|
|
35
|
-
export interface SyncToLatestOptions {
|
|
39
|
+
export interface SyncToLatestOptions extends ReportingOptions {
|
|
36
40
|
anvilUrl: string;
|
|
37
41
|
gitUrl?: string;
|
|
38
42
|
authToken: string;
|
|
39
43
|
currentBranch: string;
|
|
40
44
|
username?: string;
|
|
41
45
|
}
|
|
42
|
-
export interface WatchOptions {
|
|
46
|
+
export interface WatchOptions extends ReportingOptions {
|
|
43
47
|
anvilUrl?: string;
|
|
44
48
|
gitUrl?: string;
|
|
45
49
|
stagedOnly?: boolean;
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAkB,QAAQ,EAAgB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAkB,QAAQ,EAAgB,MAAM,UAAU,CAAC;AAC7E,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGlE,OAAO,EAA4B,sBAAsB,EAAE,MAAM,u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O,CAAC;CAC7B;AAMD;;;GAGG;AACH,wBAAsB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAsB3F;AAMD;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CA6BjH;AAMD;;;GAGG;AACH,wBAAsB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CA0K9G"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find the root directory of the Anvil app (the directory holding its anvil.yaml) that
|
|
3
|
+
* contains `filePath`, or null if `filePath` doesn't exist or isn't inside an app.
|
|
4
|
+
*/
|
|
5
|
+
export declare function findAnvilAppRoot(filePath: string): string | null;
|
|
6
|
+
/**
|
|
7
|
+
* The root of the Anvil app containing `startPath`, so that app commands work from any of its subdirectories.
|
|
8
|
+
* Throws if `startPath` isn't inside an app.
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveAppRoot(startPath?: string): string;
|
|
11
|
+
//# sourceMappingURL=appRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appRoot.d.ts","sourceRoot":"","sources":["../src/appRoot.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAuChE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,GAAE,MAAsB,GAAG,MAAM,CAQxE"}
|
package/dist/cli.d.ts
CHANGED
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAMA,
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAMA,wBAAgB,YAAY,IAAI,UAAU,CAAC,cAAc,WAAW,EAAE,YAAY,CAAC,CAElF"}
|