@gadgetinc/ggt 0.0.0-alpha.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.
Files changed (50) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +177 -0
  3. package/assets/favicon-128@4x.png +0 -0
  4. package/bin/dev +20 -0
  5. package/bin/dev.cmd +3 -0
  6. package/bin/run +7 -0
  7. package/bin/run.cmd +3 -0
  8. package/dist/commands/help.d.ts +16 -0
  9. package/dist/commands/help.js +37 -0
  10. package/dist/commands/help.js.map +1 -0
  11. package/dist/commands/login.d.ts +7 -0
  12. package/dist/commands/login.js +36 -0
  13. package/dist/commands/login.js.map +1 -0
  14. package/dist/commands/logout.d.ts +7 -0
  15. package/dist/commands/logout.js +41 -0
  16. package/dist/commands/logout.js.map +1 -0
  17. package/dist/commands/sync.d.ts +64 -0
  18. package/dist/commands/sync.js +534 -0
  19. package/dist/commands/sync.js.map +1 -0
  20. package/dist/commands/whoami.d.ts +7 -0
  21. package/dist/commands/whoami.js +45 -0
  22. package/dist/commands/whoami.js.map +1 -0
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.js +6 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/lib/base-command.d.ts +87 -0
  27. package/dist/lib/base-command.js +318 -0
  28. package/dist/lib/base-command.js.map +1 -0
  29. package/dist/lib/client.d.ts +39 -0
  30. package/dist/lib/client.js +155 -0
  31. package/dist/lib/client.js.map +1 -0
  32. package/dist/lib/env.d.ts +10 -0
  33. package/dist/lib/env.js +25 -0
  34. package/dist/lib/env.js.map +1 -0
  35. package/dist/lib/errors.d.ts +74 -0
  36. package/dist/lib/errors.js +320 -0
  37. package/dist/lib/errors.js.map +1 -0
  38. package/dist/lib/fs-utils.d.ts +18 -0
  39. package/dist/lib/fs-utils.js +108 -0
  40. package/dist/lib/fs-utils.js.map +1 -0
  41. package/dist/lib/help.d.ts +14 -0
  42. package/dist/lib/help.js +30 -0
  43. package/dist/lib/help.js.map +1 -0
  44. package/dist/lib/sleep.d.ts +5 -0
  45. package/dist/lib/sleep.js +23 -0
  46. package/dist/lib/sleep.js.map +1 -0
  47. package/dist/lib/types.d.ts +9 -0
  48. package/dist/lib/types.js +3 -0
  49. package/dist/lib/types.js.map +1 -0
  50. package/package.json +107 -0
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2022 Gadget Software Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,177 @@
1
+ <div align="center">
2
+ <h1>ggt</h1>
3
+ The command-line interface for <a href="https://gadget.dev">Gadget</a>
4
+
5
+ <br>
6
+ <br>
7
+
8
+ <i>Status: alpha -- please report any issues to the [issue tracker](https://github.com/gadget-inc/ggt/issues?q=is%3Aissue+is%3Aopen) here so we can fix them!</i>
9
+
10
+ </div>
11
+
12
+ ## Intro
13
+
14
+ `ggt` is the command line interface for the Gadget platform, providing additional functionality for working with your Gadget applications using your existing tools on your machine. `ggt` isn't required for building end-to-end Gadget apps but supports syncing files locally (and more soon) for your preferred coding experience.
15
+
16
+ ## Quick Start
17
+
18
+ Run the following to sync a `my-app.gadget.app` application to the `~/gadget/my-app` on your local machine:
19
+
20
+ ```sh
21
+ npx @gadgetinc/ggt sync --app my-app ~/gadget/my-app
22
+ ```
23
+
24
+ With this running in the background, your local `~/gadget/my-app` folder will become two-way synced with your application's filesystem in Gadget's cloud. Changes you make locally will be immediately reflected by your application's API and actions if you re-run them.
25
+
26
+ ## Usage
27
+
28
+ ```sh-session
29
+ $ npm install -g @gadgetinc/ggt
30
+ $ ggt COMMAND
31
+ running command...
32
+ $ ggt --version
33
+ @gadgetinc/ggt/0.0.0 darwin-arm64 node-v18.0.0
34
+ $ ggt help [COMMAND]
35
+ USAGE
36
+ $ ggt COMMAND
37
+ ...
38
+ ```
39
+
40
+ ## Commands
41
+
42
+ <!-- commands -->
43
+
44
+ - [`ggt sync --app <name> [DIRECTORY]`](#ggt-sync---app-name-directory)
45
+ - [`ggt help [COMMAND]`](#ggt-help-command)
46
+ - [`ggt login`](#ggt-login)
47
+ - [`ggt logout`](#ggt-logout)
48
+ - [`ggt whoami`](#ggt-whoami)
49
+
50
+ ### `ggt sync --app <name> [DIRECTORY]`
51
+
52
+ Sync your Gadget application's source code to and from your local filesystem.
53
+
54
+ ```
55
+ USAGE
56
+ $ ggt sync --app <name> [DIRECTORY]
57
+
58
+ ARGUMENTS
59
+ DIRECTORY [default: .] The directory to sync files to. If the directory doesn't exist, it will be created.
60
+
61
+ DESCRIPTION
62
+ Sync provides the ability to sync your Gadget application's source code to and from your local
63
+ filesystem. While `ggt sync` is running, local file changes are immediately reflected within
64
+ Gadget, while files that are changed remotely are immediately saved to your local filesystem.
65
+
66
+ Use cases for this include:
67
+ * Developing locally with your own editor like VSCode (https://code.visualstudio.com/)
68
+ * Storing your source code in a Git repository like GitHub (https://github.com/)
69
+
70
+ Sync includes the concept of a `.ignore` file. This file can contain a list of files and
71
+ directories that won't be sent to Gadget when syncing.
72
+
73
+ The following files and directories are always ignored:
74
+ * .gadget
75
+ * .ggt
76
+ * .git
77
+ * node_modules
78
+
79
+ Note:
80
+ * Sync does not support node_modules, so you will have to run `npm install` yourself.
81
+ * Since file changes are immediately reflected in Gadget, avoid the following while `ggt sync` is running:
82
+ * Deleting all your files
83
+ * Moving all your files to a different directory
84
+
85
+ EXAMPLES
86
+ $ ggt sync --app my-app ~/gadget/my-app
87
+ Ready
88
+ Received
89
+ ← routes/GET.js
90
+ ← user/signUp/signIn.js
91
+ Sent
92
+ → routes/GET.js
93
+ ^C Stopping... (press Ctrl+C again to force)
94
+ Done
95
+
96
+ # These are equivalent
97
+
98
+ $ ggt sync -A my-app
99
+ $ ggt sync --app my-app
100
+ $ ggt sync --app my-app.gadget.app
101
+ $ ggt sync --app https://my-app.gadget.app
102
+ $ ggt sync --app https://my-app.gadget.app/edit
103
+ ```
104
+
105
+ _See code: [src/commands/sync.ts](https://github.com/gadget-inc/ggt/blob/v0.0.0-alpha.0/src/commands/sync.ts)_
106
+
107
+ ### `ggt help [COMMAND]`
108
+
109
+ Display help for ggt.
110
+
111
+ ```
112
+ USAGE
113
+ $ ggt help [COMMAND]
114
+
115
+ ARGUMENTS
116
+ COMMAND The command to show help for.
117
+ ```
118
+
119
+ _See code: [src/commands/help.ts](https://github.com/gadget-inc/ggt/blob/v0.0.0-alpha.0/src/commands/help.ts)_
120
+
121
+ ### `ggt login`
122
+
123
+ Log in to your account.
124
+
125
+ ```
126
+ USAGE
127
+ $ ggt login
128
+
129
+ EXAMPLES
130
+ $ ggt login
131
+ Your browser has been opened. Please log in to your account.
132
+ Hello, Jane Doe (jane@example.com)
133
+ ```
134
+
135
+ _See code: [src/commands/login.ts](https://github.com/gadget-inc/ggt/blob/v0.0.0-alpha.0/src/commands/login.ts)_
136
+
137
+ ### `ggt logout`
138
+
139
+ Log out of your account.
140
+
141
+ ```
142
+ USAGE
143
+ $ ggt logout
144
+
145
+ EXAMPLES
146
+ $ ggt logout
147
+ Goodbye
148
+ ```
149
+
150
+ _See code: [src/commands/logout.ts](https://github.com/gadget-inc/ggt/blob/v0.0.0-alpha.0/src/commands/logout.ts)_
151
+
152
+ ### `ggt whoami`
153
+
154
+ Show the name and email address of the currently logged in user.
155
+
156
+ ```
157
+ USAGE
158
+ $ ggt whoami
159
+
160
+ EXAMPLES
161
+ $ ggt whoami
162
+ You are logged in as Jane Doe (jane@example.com)
163
+ ```
164
+
165
+ _See code: [src/commands/whoami.ts](https://github.com/gadget-inc/ggt/blob/v0.0.0-alpha.0/src/commands/whoami.ts)_
166
+
167
+ <!-- commandsstop -->
168
+
169
+ ## Global Flags
170
+
171
+ ### App
172
+
173
+ The `--app` flag, shorthand `-A`, specifies the Gadget application the command applies to.
174
+
175
+ ### Debug
176
+
177
+ The `--debug` flag, shorthand `-D`, enables verbose output for debugging purposes.
Binary file
package/bin/dev ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+
3
+ const path = require("path");
4
+
5
+ process.env.NODE_ENV = "development";
6
+ process.env.GGT_ENV = "development";
7
+
8
+ // store files in the project's tmp directory
9
+ // https://github.com/oclif/core/blob/main/src/config/config.ts#L171
10
+ process.env["GGT_CONFIG_DIR"] = path.join(__dirname, "..", "tmp", "config");
11
+ process.env["GGT_CACHE_DIR"] = path.join(__dirname, "..", "tmp", "cache");
12
+ process.env["GGT_DATA_DIR"] = path.join(__dirname, "..", "tmp", "data");
13
+
14
+ require("ts-node").register({ project: path.join(__dirname, "..", "tsconfig.json"), swc: true });
15
+
16
+ const oclif = require("@oclif/core");
17
+
18
+ process.on("unhandledRejection", oclif.Errors.handle);
19
+
20
+ oclif.run().then(oclif.flush).catch(oclif.Errors.handle);
package/bin/dev.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\dev" %*
package/bin/run ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+
3
+ const oclif = require("@oclif/core");
4
+
5
+ process.on("unhandledRejection", oclif.Errors.handle);
6
+
7
+ oclif.run().then(oclif.flush).catch(oclif.Errors.handle);
package/bin/run.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\run" %*
@@ -0,0 +1,16 @@
1
+ import { Command } from "@oclif/core";
2
+ /**
3
+ * Copied from @oclif/plugin-help. Uses our own {@link Help} template class instead of the one from @oclif/core.
4
+ *
5
+ * @see https://github.com/oclif/plugin-help/blob/67b580570257b45e92d3a04d50bf2a432c59afe3/src/commands/help.ts
6
+ */
7
+ export default class HelpCommand extends Command {
8
+ static strict: boolean;
9
+ static summary: string;
10
+ static args: {
11
+ name: string;
12
+ required: boolean;
13
+ description: string;
14
+ }[];
15
+ run(): Promise<void>;
16
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
5
+ const help_1 = tslib_1.__importDefault(require("../lib/help"));
6
+ /**
7
+ * Copied from @oclif/plugin-help. Uses our own {@link Help} template class instead of the one from @oclif/core.
8
+ *
9
+ * @see https://github.com/oclif/plugin-help/blob/67b580570257b45e92d3a04d50bf2a432c59afe3/src/commands/help.ts
10
+ */
11
+ class HelpCommand extends core_1.Command {
12
+ async run() {
13
+ const { argv } = await this.parse();
14
+ const help = new help_1.default(this.config, { all: true });
15
+ await help.showHelp(argv);
16
+ }
17
+ }
18
+ exports.default = HelpCommand;
19
+ Object.defineProperty(HelpCommand, "strict", {
20
+ enumerable: true,
21
+ configurable: true,
22
+ writable: true,
23
+ value: false
24
+ });
25
+ Object.defineProperty(HelpCommand, "summary", {
26
+ enumerable: true,
27
+ configurable: true,
28
+ writable: true,
29
+ value: "Display help for ggt."
30
+ });
31
+ Object.defineProperty(HelpCommand, "args", {
32
+ enumerable: true,
33
+ configurable: true,
34
+ writable: true,
35
+ value: [{ name: "command", required: false, description: "The command to show help for." }]
36
+ });
37
+ //# sourceMappingURL=help.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACtC,+DAA+B;AAE/B;;;;GAIG;AACH,MAAqB,WAAY,SAAQ,cAAO;IAO9C,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;QACpC,MAAM,IAAI,GAAG,IAAI,cAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;QAClD,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;;AAXH,8BAYC;AAXC;;;;WAAyB,KAAK;GAAC;AAE/B;;;;WAA0B,uBAAuB;GAAC;AAElD;;;;WAAuB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;GAAC","sourcesContent":["import { Command } from \"@oclif/core\";\nimport Help from \"../lib/help\";\n\n/**\n * Copied from @oclif/plugin-help. Uses our own {@link Help} template class instead of the one from @oclif/core.\n *\n * @see https://github.com/oclif/plugin-help/blob/67b580570257b45e92d3a04d50bf2a432c59afe3/src/commands/help.ts\n */\nexport default class HelpCommand extends Command {\n static override strict = false;\n\n static override summary = \"Display help for ggt.\";\n\n static override args = [{ name: \"command\", required: false, description: \"The command to show help for.\" }];\n\n async run(): Promise<void> {\n const { argv } = await this.parse();\n const help = new Help(this.config, { all: true });\n await help.showHelp(argv);\n }\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { BaseCommand } from "../lib/base-command";
2
+ export default class Login extends BaseCommand {
3
+ static summary: string;
4
+ static usage: string;
5
+ static examples: string[];
6
+ run(): Promise<void>;
7
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const ts_dedent_1 = tslib_1.__importDefault(require("ts-dedent"));
5
+ const base_command_1 = require("../lib/base-command");
6
+ class Login extends base_command_1.BaseCommand {
7
+ async run() {
8
+ await this.login();
9
+ }
10
+ }
11
+ exports.default = Login;
12
+ Object.defineProperty(Login, "summary", {
13
+ enumerable: true,
14
+ configurable: true,
15
+ writable: true,
16
+ value: "Log in to your account."
17
+ });
18
+ Object.defineProperty(Login, "usage", {
19
+ enumerable: true,
20
+ configurable: true,
21
+ writable: true,
22
+ value: "login"
23
+ });
24
+ Object.defineProperty(Login, "examples", {
25
+ enumerable: true,
26
+ configurable: true,
27
+ writable: true,
28
+ value: [
29
+ (0, ts_dedent_1.default) `
30
+ $ ggt login
31
+ Your browser has been opened. Please log in to your account.
32
+ Hello, Jane Doe (jane@example.com)
33
+ `,
34
+ ]
35
+ });
36
+ //# sourceMappingURL=login.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":";;;AAAA,kEAA+B;AAC/B,sDAAkD;AAElD,MAAqB,KAAM,SAAQ,0BAAW;IAa5C,KAAK,CAAC,GAAG;QACP,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;;AAfH,wBAgBC;AAfC;;;;WAA0B,yBAAyB;GAAC;AAEpD;;;;WAAwB,OAAO;GAAC;AAEhC;;;;WAA2B;QACzB,IAAA,mBAAM,EAAA;;;;KAIL;KACF;GAAC","sourcesContent":["import dedent from \"ts-dedent\";\nimport { BaseCommand } from \"../lib/base-command\";\n\nexport default class Login extends BaseCommand {\n static override summary = \"Log in to your account.\";\n\n static override usage = \"login\";\n\n static override examples = [\n dedent`\n $ ggt login\n Your browser has been opened. Please log in to your account.\n Hello, Jane Doe (jane@example.com)\n `,\n ];\n\n async run(): Promise<void> {\n await this.login();\n }\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { BaseCommand } from "../lib/base-command";
2
+ export default class Logout extends BaseCommand {
3
+ static summary: string;
4
+ static usage: string;
5
+ static examples: string[];
6
+ run(): Promise<void>;
7
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const ts_dedent_1 = tslib_1.__importDefault(require("ts-dedent"));
5
+ const base_command_1 = require("../lib/base-command");
6
+ class Logout extends base_command_1.BaseCommand {
7
+ // eslint-disable-next-line @typescript-eslint/require-await
8
+ async run() {
9
+ if (this.logout()) {
10
+ this.log("Goodbye");
11
+ }
12
+ else {
13
+ this.log("You are not logged in");
14
+ }
15
+ }
16
+ }
17
+ exports.default = Logout;
18
+ Object.defineProperty(Logout, "summary", {
19
+ enumerable: true,
20
+ configurable: true,
21
+ writable: true,
22
+ value: "Log out of your account."
23
+ });
24
+ Object.defineProperty(Logout, "usage", {
25
+ enumerable: true,
26
+ configurable: true,
27
+ writable: true,
28
+ value: "logout"
29
+ });
30
+ Object.defineProperty(Logout, "examples", {
31
+ enumerable: true,
32
+ configurable: true,
33
+ writable: true,
34
+ value: [
35
+ (0, ts_dedent_1.default) `
36
+ $ ggt logout
37
+ Goodbye
38
+ `,
39
+ ]
40
+ });
41
+ //# sourceMappingURL=logout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logout.js","sourceRoot":"","sources":["../../src/commands/logout.ts"],"names":[],"mappings":";;;AAAA,kEAA+B;AAC/B,sDAAkD;AAElD,MAAqB,MAAO,SAAQ,0BAAW;IAY7C,4DAA4D;IAC5D,KAAK,CAAC,GAAG;QACP,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE;YACjB,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;SACrB;aAAM;YACL,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;SACnC;IACH,CAAC;;AAnBH,yBAoBC;AAnBC;;;;WAA0B,0BAA0B;GAAC;AAErD;;;;WAAwB,QAAQ;GAAC;AAEjC;;;;WAA2B;QACzB,IAAA,mBAAM,EAAA;;;KAGL;KACF;GAAC","sourcesContent":["import dedent from \"ts-dedent\";\nimport { BaseCommand } from \"../lib/base-command\";\n\nexport default class Logout extends BaseCommand {\n static override summary = \"Log out of your account.\";\n\n static override usage = \"logout\";\n\n static override examples = [\n dedent`\n $ ggt logout\n Goodbye\n `,\n ];\n\n // eslint-disable-next-line @typescript-eslint/require-await\n async run(): Promise<void> {\n if (this.logout()) {\n this.log(\"Goodbye\");\n } else {\n this.log(\"You are not logged in\");\n }\n }\n}\n"]}
@@ -0,0 +1,64 @@
1
+ import type { OptionFlag } from "@oclif/core/lib/interfaces";
2
+ import { FSWatcher } from "chokidar";
3
+ import type { DebouncedFunc } from "lodash";
4
+ import PQueue from "p-queue";
5
+ import { BaseCommand } from "../lib/base-command";
6
+ import type { Query } from "../lib/client";
7
+ import { Ignorer } from "../lib/fs-utils";
8
+ import type { PublishFileSyncEventsMutation, PublishFileSyncEventsMutationVariables, RemoteFilesVersionQuery, RemoteFilesVersionQueryVariables, RemoteFileSyncEventsSubscription, RemoteFileSyncEventsSubscriptionVariables } from "../__generated__/graphql";
9
+ export default class Sync extends BaseCommand {
10
+ static priority: number;
11
+ static summary: string;
12
+ static usage: string;
13
+ static description: string;
14
+ static args: {
15
+ name: string;
16
+ description: string;
17
+ default: string;
18
+ }[];
19
+ static flags: {
20
+ "file-push-delay": OptionFlag<number>;
21
+ "file-stability-threshold": OptionFlag<number>;
22
+ "file-poll-interval": OptionFlag<number>;
23
+ };
24
+ static examples: string[];
25
+ readonly requireApp = true;
26
+ status: SyncStatus;
27
+ dir: string;
28
+ recentWrites: Set<unknown>;
29
+ filePushDelay: number;
30
+ queue: PQueue<import("p-queue/dist/priority-queue").default, import("p-queue").DefaultAddOptions>;
31
+ ignorer: Ignorer;
32
+ watcher: FSWatcher;
33
+ metadata: {
34
+ lastWritten: {
35
+ filesVersion: string;
36
+ mtime: number;
37
+ };
38
+ };
39
+ publish: DebouncedFunc<() => void>;
40
+ stop: (error?: unknown) => Promise<void>;
41
+ relative(to: string): string;
42
+ absolute(...pathSegments: string[]): string;
43
+ normalize(filepath: string): string;
44
+ logPaths(filepaths: string[], { limit, sep }?: {
45
+ limit?: number | undefined;
46
+ sep?: string | undefined;
47
+ }): void;
48
+ init(): Promise<void>;
49
+ run(): Promise<void>;
50
+ }
51
+ export declare enum SyncStatus {
52
+ STARTING = 0,
53
+ RUNNING = 1,
54
+ STOPPING = 2,
55
+ STOPPED = 3
56
+ }
57
+ export declare enum Action {
58
+ CANCEL = "Cancel (Ctrl+C)",
59
+ MERGE = "Merge local files with remote ones",
60
+ RESET = "Reset local files to remote ones"
61
+ }
62
+ export declare const REMOTE_FILE_SYNC_EVENTS_SUBSCRIPTION: Query<RemoteFileSyncEventsSubscription, RemoteFileSyncEventsSubscriptionVariables>;
63
+ export declare const REMOTE_FILES_VERSION_QUERY: Query<RemoteFilesVersionQuery, RemoteFilesVersionQueryVariables>;
64
+ export declare const PUBLISH_FILE_SYNC_EVENTS_MUTATION: Query<PublishFileSyncEventsMutation, PublishFileSyncEventsMutationVariables>;