@gadgetinc/ggt 0.1.8 → 0.1.10

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 CHANGED
@@ -6,7 +6,7 @@
6
6
  <br>
7
7
 
8
8
  <a href="https://github.com/gadget-inc/ggt/actions/workflows/ci.yml?query=branch%3Amain">
9
- <img alt="ci workflow status" src="https://img.shields.io/github/workflow/status/gadget-inc/ggt/ci/main?label=ci">
9
+ <img alt="ci workflow status" src="https://img.shields.io/github/actions/workflow/status/gadget-inc/ggt/ci.yml?branch=main&label=ci">
10
10
  </a>
11
11
  <a href="https://www.npmjs.com/package/@gadgetinc/ggt">
12
12
  <img alt="npm version" src="https://img.shields.io/npm/v/@gadgetinc/ggt">
@@ -54,72 +54,81 @@ USAGE
54
54
 
55
55
  <!-- commands -->
56
56
 
57
- - [`ggt sync [--app=<value>] [DIRECTORY]`](#ggt-sync---appvalue-directory)
57
+ - [`ggt sync [DIRECTORY] [--app <name>]`](#ggt-sync-directory---app-name)
58
58
  - [`ggt help [COMMAND]`](#ggt-help-command)
59
59
  - [`ggt login`](#ggt-login)
60
60
  - [`ggt logout`](#ggt-logout)
61
61
  - [`ggt whoami`](#ggt-whoami)
62
62
 
63
- ### `ggt sync [--app=<value>] [DIRECTORY]`
63
+ ### `ggt sync [DIRECTORY] [--app <name>]`
64
64
 
65
65
  Sync your Gadget application's source code to and from your local filesystem.
66
66
 
67
67
  ```
68
68
  USAGE
69
- $ ggt sync [--app=<value>] [DIRECTORY]
69
+ $ ggt sync [DIRECTORY] [--app <name>]
70
70
 
71
71
  ARGUMENTS
72
72
  DIRECTORY [default: .] The directory to sync files to. If the directory doesn't exist, it will be created.
73
73
 
74
74
  FLAGS
75
- -a, --app=<value> The Gadget application to sync files to.
76
- --force Whether to sync even if we can't determine the state of your local files relative to your remote
77
- ones.
75
+ -a, --app=<name> The Gadget application to sync files to.
76
+ --force Whether to sync even if we can't determine the state of your local files relative to your remote
77
+ ones.
78
78
 
79
79
  DESCRIPTION
80
80
  Sync provides the ability to sync your Gadget application's source code to and from your local
81
- filesystem. While `ggt sync` is running, local file changes are immediately reflected within
81
+ filesystem. While ggt sync is running, local file changes are immediately reflected within
82
82
  Gadget, while files that are changed remotely are immediately saved to your local filesystem.
83
83
 
84
84
  Use cases for this include:
85
- * Developing locally with your own editor like VSCode (https://code.visualstudio.com/)
86
- * Storing your source code in a Git repository like GitHub (https://github.com/)
85
+ - Developing locally with your own editor like VSCode (https://code.visualstudio.com/)
86
+ - Storing your source code in a Git repository like GitHub (https://github.com/)
87
87
 
88
- Sync includes the concept of a `.ignore` file. This file can contain a list of files and
89
- directories that won't be received or sent to Gadget when syncing.
88
+ Sync includes the concept of a .ignore file. This file may contain a list of files and
89
+ directories that won't be received or sent to Gadget when syncing. The format of this file is
90
+ identical to the one used by Git (https://git-scm.com/docs/gitignore).
90
91
 
91
92
  The following files and directories are always ignored:
92
- * .gadget
93
- * .git
94
- * node_modules
93
+ - .gadget
94
+ - .git
95
+ - node_modules
95
96
 
96
97
  Note:
97
- * Gadget applications only support installing dependencies with Yarn 1 (https://classic.yarnpkg.com/lang/en/).
98
- * Since file changes are immediately reflected in Gadget, avoid the following while `ggt sync` is running:
99
- * Deleting all your files
100
- * Moving all your files to a different directory
98
+ - If you have separate development and production environments, ggt sync will only sync with your development environment
99
+ - Gadget applications only support installing dependencies with Yarn 1 (https://classic.yarnpkg.com/lang/en/)
100
+ - Since file changes are immediately reflected in Gadget, avoid the following while ggt sync is running:
101
+ - Deleting all your files
102
+ - Moving all your files to a different directory
101
103
 
102
104
  EXAMPLES
103
105
  $ ggt sync --app my-app ~/gadget/my-app
104
- Ready
105
- Received
106
- ← routes/GET.js
107
- ← user/signUp/signIn.js
108
- Sent
109
- → routes/GET.js
110
- ^C Stopping... (press Ctrl+C again to force)
111
- Done
112
106
 
113
- # These are equivalent
107
+ App my-app
108
+ Editor https://my-app.gadget.app/edit
109
+ Playground https://my-app.gadget.app/api/graphql/playground
110
+ Docs https://docs.gadget.dev/api/my-app
111
+
112
+ Endpoints
113
+ - https://my-app.gadget.app
114
+ - https://my-app--development.gadget.app
115
+
116
+ Watching for file changes... Press Ctrl+C to stop
117
+
118
+ Received 12:00:00 PM
119
+ ← routes/GET.js (changed)
120
+ ← user/signUp/signIn.js (changed)
121
+ 2 files in total. 2 changed, 0 deleted.
114
122
 
115
- $ ggt sync -a my-app
116
- $ ggt sync --app my-app
117
- $ ggt sync --app my-app.gadget.app
118
- $ ggt sync --app https://my-app.gadget.app
119
- $ ggt sync --app https://my-app.gadget.app/edit
123
+ Sent 12:00:03 PM
124
+ routes/GET.ts (changed)
125
+ 1 file in total. 1 changed, 0 deleted.
126
+
127
+ ^C Stopping... (press Ctrl+C again to force)
128
+ Goodbye!
120
129
  ```
121
130
 
122
- _See code: [src/commands/sync.ts](https://github.com/gadget-inc/ggt/blob/v0.1.8/src/commands/sync.ts)_
131
+ _See code: [src/commands/sync.ts](https://github.com/gadget-inc/ggt/blob/v0.1.10/src/commands/sync.ts)_
123
132
 
124
133
  ### `ggt help [COMMAND]`
125
134
 
@@ -133,7 +142,7 @@ ARGUMENTS
133
142
  COMMAND The command to show help for.
134
143
  ```
135
144
 
136
- _See code: [src/commands/help.ts](https://github.com/gadget-inc/ggt/blob/v0.1.8/src/commands/help.ts)_
145
+ _See code: [src/commands/help.ts](https://github.com/gadget-inc/ggt/blob/v0.1.10/src/commands/help.ts)_
137
146
 
138
147
  ### `ggt login`
139
148
 
@@ -145,11 +154,14 @@ USAGE
145
154
 
146
155
  EXAMPLES
147
156
  $ ggt login
148
- Your browser has been opened. Please log in to your account.
157
+ We've opened Gadget's login page using your default browser.
158
+
159
+ Please log in and then return to this terminal.
160
+
149
161
  Hello, Jane Doe (jane@example.com)
150
162
  ```
151
163
 
152
- _See code: [src/commands/login.ts](https://github.com/gadget-inc/ggt/blob/v0.1.8/src/commands/login.ts)_
164
+ _See code: [src/commands/login.ts](https://github.com/gadget-inc/ggt/blob/v0.1.10/src/commands/login.ts)_
153
165
 
154
166
  ### `ggt logout`
155
167
 
@@ -164,7 +176,7 @@ EXAMPLES
164
176
  Goodbye
165
177
  ```
166
178
 
167
- _See code: [src/commands/logout.ts](https://github.com/gadget-inc/ggt/blob/v0.1.8/src/commands/logout.ts)_
179
+ _See code: [src/commands/logout.ts](https://github.com/gadget-inc/ggt/blob/v0.1.10/src/commands/logout.ts)_
168
180
 
169
181
  ### `ggt whoami`
170
182
 
@@ -179,7 +191,7 @@ EXAMPLES
179
191
  You are logged in as Jane Doe (jane@example.com)
180
192
  ```
181
193
 
182
- _See code: [src/commands/whoami.ts](https://github.com/gadget-inc/ggt/blob/v0.1.8/src/commands/whoami.ts)_
194
+ _See code: [src/commands/whoami.ts](https://github.com/gadget-inc/ggt/blob/v0.1.10/src/commands/whoami.ts)_
183
195
 
184
196
  <!-- commandsstop -->
185
197
 
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * ======================================================
3
- * THIS IS A GENERATED FILE! You shouldn't edit it manually. Regenerate it using `npm run generate-graphql`.
3
+ * THIS IS A GENERATED FILE! DO NOT EDIT IT MANUALLY!
4
+ *
5
+ * You can regenerate it by running `npm run generate-graphql`.
4
6
  * ======================================================
5
7
  */
6
8
  export type Maybe<T> = T | null;
@@ -23,12 +25,26 @@ export type Scalars = {
23
25
  Boolean: boolean;
24
26
  Int: number;
25
27
  Float: number;
28
+ /** A date string, such as 2007-12-03, compliant with the `full-date` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */
26
29
  Date: any;
30
+ /** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */
27
31
  DateTime: any;
28
32
  JSON: {
29
33
  [key: string]: any;
30
34
  };
31
35
  };
36
+ export type ChangeAppDomainResult = {
37
+ __typename?: 'ChangeAppDomainResult';
38
+ onlyValidate?: Maybe<Scalars['Boolean']>;
39
+ reason?: Maybe<Scalars['String']>;
40
+ success: Scalars['Boolean'];
41
+ };
42
+ export type ContributorResult = {
43
+ __typename?: 'ContributorResult';
44
+ email: Scalars['String'];
45
+ isOwner: Scalars['Boolean'];
46
+ isPending: Scalars['Boolean'];
47
+ };
32
48
  export type DeleteAppStatusResult = {
33
49
  __typename?: 'DeleteAppStatusResult';
34
50
  isNotCreator?: Maybe<Scalars['Boolean']>;
@@ -46,6 +62,10 @@ export type EnvironmentSubscriptionResult = {
46
62
  __typename?: 'EnvironmentSubscriptionResult';
47
63
  patches: Array<Scalars['JSON']>;
48
64
  };
65
+ export type EnvironmentTreeClientId = {
66
+ clientType: Scalars['String'];
67
+ id: Scalars['String'];
68
+ };
49
69
  export type FileSyncChangedEvent = {
50
70
  __typename?: 'FileSyncChangedEvent';
51
71
  content: Scalars['String'];
@@ -88,6 +108,7 @@ export type MigrateEnvironmentsResult = {
88
108
  };
89
109
  export type Mutation = {
90
110
  __typename?: 'Mutation';
111
+ changeAppDomain?: Maybe<ChangeAppDomainResult>;
91
112
  deleteApp?: Maybe<DeleteAppStatusResult>;
92
113
  migrateEnvironments?: Maybe<MigrateEnvironmentsResult>;
93
114
  patchEnvironmentTree?: Maybe<EnvironmentPatchResult>;
@@ -95,10 +116,19 @@ export type Mutation = {
95
116
  publishFileSyncEvents: PublishFileSyncEventsResult;
96
117
  refreshScopes?: Maybe<RefreshScopesResult>;
97
118
  registerWebhooks?: Maybe<RegisterWebhooksResult>;
119
+ removeContributor?: Maybe<RemoveContributorResult>;
120
+ sendAppInvitation?: Maybe<SendAppInvitationResult>;
98
121
  unregisterWebhooks?: Maybe<UnregisterWebhooksResult>;
99
122
  };
123
+ export type MutationChangeAppDomainArgs = {
124
+ newSubdomain: Scalars['String'];
125
+ onlyValidate?: InputMaybe<Scalars['Boolean']>;
126
+ };
127
+ export type MutationMigrateEnvironmentsArgs = {
128
+ existingToProduction: Scalars['Boolean'];
129
+ };
100
130
  export type MutationPatchEnvironmentTreeArgs = {
101
- clientID: Scalars['String'];
131
+ clientID: EnvironmentTreeClientId;
102
132
  patches: Array<Scalars['JSON']>;
103
133
  };
104
134
  export type MutationPublishFileSyncEventsArgs = {
@@ -115,6 +145,14 @@ export type MutationRegisterWebhooksArgs = {
115
145
  modelKeys?: InputMaybe<Array<Scalars['String']>>;
116
146
  shopIds: Array<Scalars['String']>;
117
147
  };
148
+ export type MutationRemoveContributorArgs = {
149
+ email: Scalars['String'];
150
+ isInvitation: Scalars['Boolean'];
151
+ };
152
+ export type MutationSendAppInvitationArgs = {
153
+ email: Scalars['String'];
154
+ resend?: InputMaybe<Scalars['Boolean']>;
155
+ };
118
156
  export type MutationUnregisterWebhooksArgs = {
119
157
  connectionKey: Scalars['String'];
120
158
  modelKeys?: InputMaybe<Array<Scalars['String']>>;
@@ -133,6 +171,7 @@ export type Query = {
133
171
  __typename?: 'Query';
134
172
  currentUser: User;
135
173
  environmentTreePath?: Maybe<Scalars['JSON']>;
174
+ listContributors: Array<ContributorResult>;
136
175
  logsSearch: LogSearchResult;
137
176
  remoteFilesVersion: Scalars['String'];
138
177
  roles: Array<GadgetRole>;
@@ -164,6 +203,16 @@ export type RemoteFileSyncEvents = {
164
203
  deleted: Array<FileSyncDeletedEvent>;
165
204
  remoteFilesVersion: Scalars['String'];
166
205
  };
206
+ export type RemoveContributorResult = {
207
+ __typename?: 'RemoveContributorResult';
208
+ reason?: Maybe<Scalars['String']>;
209
+ success: Scalars['Boolean'];
210
+ };
211
+ export type SendAppInvitationResult = {
212
+ __typename?: 'SendAppInvitationResult';
213
+ reason?: Maybe<Scalars['String']>;
214
+ success: Scalars['Boolean'];
215
+ };
167
216
  export type Subscription = {
168
217
  __typename?: 'Subscription';
169
218
  editorActive?: Maybe<Scalars['Boolean']>;
@@ -173,7 +222,7 @@ export type Subscription = {
173
222
  typesManifestStream: TypesManifest;
174
223
  };
175
224
  export type SubscriptionEnvironmentTreePathPatchesArgs = {
176
- clientID: Scalars['String'];
225
+ clientID: EnvironmentTreeClientId;
177
226
  path: Scalars['String'];
178
227
  };
179
228
  export type SubscriptionLogsSearchArgs = {
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  /**
3
3
  * ======================================================
4
- * THIS IS A GENERATED FILE! You shouldn't edit it manually. Regenerate it using `npm run generate-graphql`.
4
+ * THIS IS A GENERATED FILE! DO NOT EDIT IT MANUALLY!
5
+ *
6
+ * You can regenerate it by running `npm run generate-graphql`.
5
7
  * ======================================================
6
8
  */
7
9
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/__generated__/graphql.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAgEH,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,iCAAa,CAAA;AACf,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B","sourcesContent":["/**\n * ======================================================\n * THIS IS A GENERATED FILE! You shouldn't edit it manually. Regenerate it using `npm run generate-graphql`.\n * ======================================================\n */\n\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: string;\n String: string;\n Boolean: boolean;\n Int: number;\n Float: number;\n Date: any;\n DateTime: any;\n JSON: { [key: string]: any };\n};\n\nexport type DeleteAppStatusResult = {\n __typename?: 'DeleteAppStatusResult';\n isNotCreator?: Maybe<Scalars['Boolean']>;\n success: Scalars['Boolean'];\n};\n\nexport type EnvironmentPatchResult = {\n __typename?: 'EnvironmentPatchResult';\n success: Scalars['Boolean'];\n};\n\nexport type EnvironmentPublishResult = {\n __typename?: 'EnvironmentPublishResult';\n success: Scalars['Boolean'];\n};\n\nexport type EnvironmentSubscriptionResult = {\n __typename?: 'EnvironmentSubscriptionResult';\n patches: Array<Scalars['JSON']>;\n};\n\nexport type FileSyncChangedEvent = {\n __typename?: 'FileSyncChangedEvent';\n content: Scalars['String'];\n encoding: FileSyncEncoding;\n mode: Scalars['Float'];\n path: Scalars['String'];\n};\n\nexport type FileSyncChangedEventInput = {\n content: Scalars['String'];\n encoding?: InputMaybe<FileSyncEncoding>;\n mode: Scalars['Float'];\n path: Scalars['String'];\n};\n\nexport type FileSyncDeletedEvent = {\n __typename?: 'FileSyncDeletedEvent';\n path: Scalars['String'];\n};\n\nexport type FileSyncDeletedEventInput = {\n path: Scalars['String'];\n};\n\nexport enum FileSyncEncoding {\n Base64 = 'base64',\n Utf8 = 'utf8'\n}\n\nexport type GadgetRole = {\n __typename?: 'GadgetRole';\n key: Scalars['String'];\n name: Scalars['String'];\n order: Scalars['Int'];\n selectable: Scalars['Boolean'];\n};\n\nexport type LogSearchResult = {\n __typename?: 'LogSearchResult';\n data: Scalars['JSON'];\n status: Scalars['String'];\n};\n\nexport type MigrateEnvironmentsResult = {\n __typename?: 'MigrateEnvironmentsResult';\n success: Scalars['Boolean'];\n};\n\nexport type Mutation = {\n __typename?: 'Mutation';\n deleteApp?: Maybe<DeleteAppStatusResult>;\n migrateEnvironments?: Maybe<MigrateEnvironmentsResult>;\n patchEnvironmentTree?: Maybe<EnvironmentPatchResult>;\n publish?: Maybe<EnvironmentPublishResult>;\n publishFileSyncEvents: PublishFileSyncEventsResult;\n refreshScopes?: Maybe<RefreshScopesResult>;\n registerWebhooks?: Maybe<RegisterWebhooksResult>;\n unregisterWebhooks?: Maybe<UnregisterWebhooksResult>;\n};\n\n\nexport type MutationPatchEnvironmentTreeArgs = {\n clientID: Scalars['String'];\n patches: Array<Scalars['JSON']>;\n};\n\n\nexport type MutationPublishFileSyncEventsArgs = {\n input: PublishFileSyncEventsInput;\n};\n\n\nexport type MutationRefreshScopesArgs = {\n appConfigKey: Scalars['String'];\n connectionKey: Scalars['String'];\n shopId: Scalars['String'];\n};\n\n\nexport type MutationRegisterWebhooksArgs = {\n connectionKey: Scalars['String'];\n keepExtraTopics?: InputMaybe<Scalars['Boolean']>;\n modelKeys?: InputMaybe<Array<Scalars['String']>>;\n shopIds: Array<Scalars['String']>;\n};\n\n\nexport type MutationUnregisterWebhooksArgs = {\n connectionKey: Scalars['String'];\n modelKeys?: InputMaybe<Array<Scalars['String']>>;\n shopIds?: InputMaybe<Array<Scalars['String']>>;\n};\n\nexport type PublishFileSyncEventsInput = {\n changed: Array<FileSyncChangedEventInput>;\n deleted: Array<FileSyncDeletedEventInput>;\n expectedRemoteFilesVersion: Scalars['String'];\n};\n\nexport type PublishFileSyncEventsResult = {\n __typename?: 'PublishFileSyncEventsResult';\n remoteFilesVersion: Scalars['String'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n currentUser: User;\n environmentTreePath?: Maybe<Scalars['JSON']>;\n logsSearch: LogSearchResult;\n remoteFilesVersion: Scalars['String'];\n roles: Array<GadgetRole>;\n runTestSupportFunction?: Maybe<Scalars['JSON']>;\n typesManifest: TypesManifest;\n};\n\n\nexport type QueryEnvironmentTreePathArgs = {\n path: Scalars['String'];\n};\n\n\nexport type QueryLogsSearchArgs = {\n direction?: InputMaybe<Scalars['String']>;\n end?: InputMaybe<Scalars['DateTime']>;\n limit?: InputMaybe<Scalars['Int']>;\n query: Scalars['String'];\n start?: InputMaybe<Scalars['DateTime']>;\n step?: InputMaybe<Scalars['Int']>;\n};\n\nexport type RefreshScopesResult = {\n __typename?: 'RefreshScopesResult';\n success: Scalars['Boolean'];\n};\n\nexport type RegisterWebhooksResult = {\n __typename?: 'RegisterWebhooksResult';\n success: Scalars['Boolean'];\n};\n\nexport type RemoteFileSyncEvents = {\n __typename?: 'RemoteFileSyncEvents';\n changed: Array<FileSyncChangedEvent>;\n deleted: Array<FileSyncDeletedEvent>;\n remoteFilesVersion: Scalars['String'];\n};\n\nexport type Subscription = {\n __typename?: 'Subscription';\n editorActive?: Maybe<Scalars['Boolean']>;\n environmentTreePathPatches?: Maybe<EnvironmentSubscriptionResult>;\n logsSearch: LogSearchResult;\n remoteFileSyncEvents: RemoteFileSyncEvents;\n typesManifestStream: TypesManifest;\n};\n\n\nexport type SubscriptionEnvironmentTreePathPatchesArgs = {\n clientID: Scalars['String'];\n path: Scalars['String'];\n};\n\n\nexport type SubscriptionLogsSearchArgs = {\n limit?: InputMaybe<Scalars['Int']>;\n query: Scalars['String'];\n start?: InputMaybe<Scalars['DateTime']>;\n};\n\n\nexport type SubscriptionRemoteFileSyncEventsArgs = {\n encoding?: InputMaybe<FileSyncEncoding>;\n localFilesVersion: Scalars['String'];\n};\n\nexport type TypeManifestEntry = {\n __typename?: 'TypeManifestEntry';\n declaration: Scalars['String'];\n path: Scalars['String'];\n};\n\nexport type TypesManifest = {\n __typename?: 'TypesManifest';\n dependenciesHash: Scalars['String'];\n entries: Array<TypeManifestEntry>;\n environmentVersion: Scalars['Int'];\n};\n\nexport type UnregisterWebhooksResult = {\n __typename?: 'UnregisterWebhooksResult';\n success: Scalars['Boolean'];\n};\n\nexport type User = {\n __typename?: 'User';\n email: Scalars['String'];\n name?: Maybe<Scalars['String']>;\n};\n\nexport type RemoteFileSyncEventsSubscriptionVariables = Exact<{\n localFilesVersion: Scalars['String'];\n}>;\n\n\nexport type RemoteFileSyncEventsSubscription = { __typename?: 'Subscription', remoteFileSyncEvents: { __typename?: 'RemoteFileSyncEvents', remoteFilesVersion: string, changed: Array<{ __typename?: 'FileSyncChangedEvent', path: string, mode: number, content: string, encoding: FileSyncEncoding }>, deleted: Array<{ __typename?: 'FileSyncDeletedEvent', path: string }> } };\n\nexport type RemoteFilesVersionQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type RemoteFilesVersionQuery = { __typename?: 'Query', remoteFilesVersion: string };\n\nexport type PublishFileSyncEventsMutationVariables = Exact<{\n input: PublishFileSyncEventsInput;\n}>;\n\n\nexport type PublishFileSyncEventsMutation = { __typename?: 'Mutation', publishFileSyncEvents: { __typename?: 'PublishFileSyncEventsResult', remoteFilesVersion: string } };\n"]}
1
+ {"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/__generated__/graphql.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAqFH,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,iCAAa,CAAA;AACf,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B","sourcesContent":["/**\n * ======================================================\n * THIS IS A GENERATED FILE! DO NOT EDIT IT MANUALLY!\n *\n * You can regenerate it by running `npm run generate-graphql`.\n * ======================================================\n */\n\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: string;\n String: string;\n Boolean: boolean;\n Int: number;\n Float: number;\n /** A date string, such as 2007-12-03, compliant with the `full-date` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */\n Date: any;\n /** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */\n DateTime: any;\n JSON: { [key: string]: any };\n};\n\nexport type ChangeAppDomainResult = {\n __typename?: 'ChangeAppDomainResult';\n onlyValidate?: Maybe<Scalars['Boolean']>;\n reason?: Maybe<Scalars['String']>;\n success: Scalars['Boolean'];\n};\n\nexport type ContributorResult = {\n __typename?: 'ContributorResult';\n email: Scalars['String'];\n isOwner: Scalars['Boolean'];\n isPending: Scalars['Boolean'];\n};\n\nexport type DeleteAppStatusResult = {\n __typename?: 'DeleteAppStatusResult';\n isNotCreator?: Maybe<Scalars['Boolean']>;\n success: Scalars['Boolean'];\n};\n\nexport type EnvironmentPatchResult = {\n __typename?: 'EnvironmentPatchResult';\n success: Scalars['Boolean'];\n};\n\nexport type EnvironmentPublishResult = {\n __typename?: 'EnvironmentPublishResult';\n success: Scalars['Boolean'];\n};\n\nexport type EnvironmentSubscriptionResult = {\n __typename?: 'EnvironmentSubscriptionResult';\n patches: Array<Scalars['JSON']>;\n};\n\nexport type EnvironmentTreeClientId = {\n clientType: Scalars['String'];\n id: Scalars['String'];\n};\n\nexport type FileSyncChangedEvent = {\n __typename?: 'FileSyncChangedEvent';\n content: Scalars['String'];\n encoding: FileSyncEncoding;\n mode: Scalars['Float'];\n path: Scalars['String'];\n};\n\nexport type FileSyncChangedEventInput = {\n content: Scalars['String'];\n encoding?: InputMaybe<FileSyncEncoding>;\n mode: Scalars['Float'];\n path: Scalars['String'];\n};\n\nexport type FileSyncDeletedEvent = {\n __typename?: 'FileSyncDeletedEvent';\n path: Scalars['String'];\n};\n\nexport type FileSyncDeletedEventInput = {\n path: Scalars['String'];\n};\n\nexport enum FileSyncEncoding {\n Base64 = 'base64',\n Utf8 = 'utf8'\n}\n\nexport type GadgetRole = {\n __typename?: 'GadgetRole';\n key: Scalars['String'];\n name: Scalars['String'];\n order: Scalars['Int'];\n selectable: Scalars['Boolean'];\n};\n\nexport type LogSearchResult = {\n __typename?: 'LogSearchResult';\n data: Scalars['JSON'];\n status: Scalars['String'];\n};\n\nexport type MigrateEnvironmentsResult = {\n __typename?: 'MigrateEnvironmentsResult';\n success: Scalars['Boolean'];\n};\n\nexport type Mutation = {\n __typename?: 'Mutation';\n changeAppDomain?: Maybe<ChangeAppDomainResult>;\n deleteApp?: Maybe<DeleteAppStatusResult>;\n migrateEnvironments?: Maybe<MigrateEnvironmentsResult>;\n patchEnvironmentTree?: Maybe<EnvironmentPatchResult>;\n publish?: Maybe<EnvironmentPublishResult>;\n publishFileSyncEvents: PublishFileSyncEventsResult;\n refreshScopes?: Maybe<RefreshScopesResult>;\n registerWebhooks?: Maybe<RegisterWebhooksResult>;\n removeContributor?: Maybe<RemoveContributorResult>;\n sendAppInvitation?: Maybe<SendAppInvitationResult>;\n unregisterWebhooks?: Maybe<UnregisterWebhooksResult>;\n};\n\n\nexport type MutationChangeAppDomainArgs = {\n newSubdomain: Scalars['String'];\n onlyValidate?: InputMaybe<Scalars['Boolean']>;\n};\n\n\nexport type MutationMigrateEnvironmentsArgs = {\n existingToProduction: Scalars['Boolean'];\n};\n\n\nexport type MutationPatchEnvironmentTreeArgs = {\n clientID: EnvironmentTreeClientId;\n patches: Array<Scalars['JSON']>;\n};\n\n\nexport type MutationPublishFileSyncEventsArgs = {\n input: PublishFileSyncEventsInput;\n};\n\n\nexport type MutationRefreshScopesArgs = {\n appConfigKey: Scalars['String'];\n connectionKey: Scalars['String'];\n shopId: Scalars['String'];\n};\n\n\nexport type MutationRegisterWebhooksArgs = {\n connectionKey: Scalars['String'];\n keepExtraTopics?: InputMaybe<Scalars['Boolean']>;\n modelKeys?: InputMaybe<Array<Scalars['String']>>;\n shopIds: Array<Scalars['String']>;\n};\n\n\nexport type MutationRemoveContributorArgs = {\n email: Scalars['String'];\n isInvitation: Scalars['Boolean'];\n};\n\n\nexport type MutationSendAppInvitationArgs = {\n email: Scalars['String'];\n resend?: InputMaybe<Scalars['Boolean']>;\n};\n\n\nexport type MutationUnregisterWebhooksArgs = {\n connectionKey: Scalars['String'];\n modelKeys?: InputMaybe<Array<Scalars['String']>>;\n shopIds?: InputMaybe<Array<Scalars['String']>>;\n};\n\nexport type PublishFileSyncEventsInput = {\n changed: Array<FileSyncChangedEventInput>;\n deleted: Array<FileSyncDeletedEventInput>;\n expectedRemoteFilesVersion: Scalars['String'];\n};\n\nexport type PublishFileSyncEventsResult = {\n __typename?: 'PublishFileSyncEventsResult';\n remoteFilesVersion: Scalars['String'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n currentUser: User;\n environmentTreePath?: Maybe<Scalars['JSON']>;\n listContributors: Array<ContributorResult>;\n logsSearch: LogSearchResult;\n remoteFilesVersion: Scalars['String'];\n roles: Array<GadgetRole>;\n runTestSupportFunction?: Maybe<Scalars['JSON']>;\n typesManifest: TypesManifest;\n};\n\n\nexport type QueryEnvironmentTreePathArgs = {\n path: Scalars['String'];\n};\n\n\nexport type QueryLogsSearchArgs = {\n direction?: InputMaybe<Scalars['String']>;\n end?: InputMaybe<Scalars['DateTime']>;\n limit?: InputMaybe<Scalars['Int']>;\n query: Scalars['String'];\n start?: InputMaybe<Scalars['DateTime']>;\n step?: InputMaybe<Scalars['Int']>;\n};\n\nexport type RefreshScopesResult = {\n __typename?: 'RefreshScopesResult';\n success: Scalars['Boolean'];\n};\n\nexport type RegisterWebhooksResult = {\n __typename?: 'RegisterWebhooksResult';\n success: Scalars['Boolean'];\n};\n\nexport type RemoteFileSyncEvents = {\n __typename?: 'RemoteFileSyncEvents';\n changed: Array<FileSyncChangedEvent>;\n deleted: Array<FileSyncDeletedEvent>;\n remoteFilesVersion: Scalars['String'];\n};\n\nexport type RemoveContributorResult = {\n __typename?: 'RemoveContributorResult';\n reason?: Maybe<Scalars['String']>;\n success: Scalars['Boolean'];\n};\n\nexport type SendAppInvitationResult = {\n __typename?: 'SendAppInvitationResult';\n reason?: Maybe<Scalars['String']>;\n success: Scalars['Boolean'];\n};\n\nexport type Subscription = {\n __typename?: 'Subscription';\n editorActive?: Maybe<Scalars['Boolean']>;\n environmentTreePathPatches?: Maybe<EnvironmentSubscriptionResult>;\n logsSearch: LogSearchResult;\n remoteFileSyncEvents: RemoteFileSyncEvents;\n typesManifestStream: TypesManifest;\n};\n\n\nexport type SubscriptionEnvironmentTreePathPatchesArgs = {\n clientID: EnvironmentTreeClientId;\n path: Scalars['String'];\n};\n\n\nexport type SubscriptionLogsSearchArgs = {\n limit?: InputMaybe<Scalars['Int']>;\n query: Scalars['String'];\n start?: InputMaybe<Scalars['DateTime']>;\n};\n\n\nexport type SubscriptionRemoteFileSyncEventsArgs = {\n encoding?: InputMaybe<FileSyncEncoding>;\n localFilesVersion: Scalars['String'];\n};\n\nexport type TypeManifestEntry = {\n __typename?: 'TypeManifestEntry';\n declaration: Scalars['String'];\n path: Scalars['String'];\n};\n\nexport type TypesManifest = {\n __typename?: 'TypesManifest';\n dependenciesHash: Scalars['String'];\n entries: Array<TypeManifestEntry>;\n environmentVersion: Scalars['Int'];\n};\n\nexport type UnregisterWebhooksResult = {\n __typename?: 'UnregisterWebhooksResult';\n success: Scalars['Boolean'];\n};\n\nexport type User = {\n __typename?: 'User';\n email: Scalars['String'];\n name?: Maybe<Scalars['String']>;\n};\n\nexport type RemoteFileSyncEventsSubscriptionVariables = Exact<{\n localFilesVersion: Scalars['String'];\n}>;\n\n\nexport type RemoteFileSyncEventsSubscription = { __typename?: 'Subscription', remoteFileSyncEvents: { __typename?: 'RemoteFileSyncEvents', remoteFilesVersion: string, changed: Array<{ __typename?: 'FileSyncChangedEvent', path: string, mode: number, content: string, encoding: FileSyncEncoding }>, deleted: Array<{ __typename?: 'FileSyncDeletedEvent', path: string }> } };\n\nexport type RemoteFilesVersionQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type RemoteFilesVersionQuery = { __typename?: 'Query', remoteFilesVersion: string };\n\nexport type PublishFileSyncEventsMutationVariables = Exact<{\n input: PublishFileSyncEventsInput;\n}>;\n\n\nexport type PublishFileSyncEventsMutation = { __typename?: 'Mutation', publishFileSyncEvents: { __typename?: 'PublishFileSyncEventsResult', remoteFilesVersion: string } };\n"]}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const ts_dedent_1 = tslib_1.__importDefault(require("ts-dedent"));
5
5
  const base_command_1 = require("../utils/base-command");
6
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
7
  class Login extends base_command_1.BaseCommand {
7
8
  async run() {
8
9
  await this.login();
@@ -26,11 +27,14 @@ Object.defineProperty(Login, "examples", {
26
27
  configurable: true,
27
28
  writable: true,
28
29
  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
- `,
30
+ (0, ts_dedent_1.default)((0, chalk_1.default) `
31
+ {gray $ ggt login}
32
+ We've opened Gadget's login page using your default browser.
33
+
34
+ Please log in and then return to this terminal.
35
+
36
+ Hello, Jane Doe {gray (jane@example.com)}
37
+ `),
34
38
  ]
35
39
  });
36
40
  //# sourceMappingURL=login.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":";;;AAAA,kEAA+B;AAC/B,wDAAoD;AAEpD,MAAqB,KAAM,SAAQ,0BAAW;IAa5C,KAAK,CAAC,GAAG;QACP,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;;AAfH,wBAgBC;AAfQ;;;;WAAmB,yBAAyB;GAAC;AAE7C;;;;WAAiB,OAAO;GAAC;AAEzB;;;;WAAoB;QACzB,IAAA,mBAAM,EAAA;;;;KAIL;KACF;GAAC","sourcesContent":["import dedent from \"ts-dedent\";\nimport { BaseCommand } from \"../utils/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"]}
1
+ {"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":";;;AAAA,kEAA+B;AAC/B,wDAAoD;AACpD,0DAA0B;AAE1B,MAAqB,KAAM,SAAQ,0BAAW;IAgB5C,KAAK,CAAC,GAAG;QACP,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;;AAlBH,wBAmBC;AAlBQ;;;;WAAmB,yBAAyB;GAAC;AAE7C;;;;WAAiB,OAAO;GAAC;AAEzB;;;;WAAoB;QACzB,IAAA,mBAAM,EAAC,IAAA,eAAK,EAAA;;;;;;;KAOX,CAAC;KACH;GAAC","sourcesContent":["import dedent from \"ts-dedent\";\nimport { BaseCommand } from \"../utils/base-command\";\nimport chalk from \"chalk\";\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(chalk`\n {gray $ ggt login}\n We've opened Gadget's login page using your default browser.\n\n Please log in and then return to this terminal.\n\n Hello, Jane Doe {gray (jane@example.com)}\n `),\n ];\n\n async run(): Promise<void> {\n await this.login();\n }\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
4
5
  const ts_dedent_1 = tslib_1.__importDefault(require("ts-dedent"));
5
6
  const base_command_1 = require("../utils/base-command");
6
7
  const context_1 = require("../utils/context");
@@ -34,10 +35,10 @@ Object.defineProperty(Logout, "examples", {
34
35
  configurable: true,
35
36
  writable: true,
36
37
  value: [
37
- (0, ts_dedent_1.default) `
38
- $ ggt logout
38
+ (0, ts_dedent_1.default)((0, chalk_1.default) `
39
+ {gray $ ggt logout}
39
40
  Goodbye
40
- `,
41
+ `),
41
42
  ]
42
43
  });
43
44
  //# sourceMappingURL=logout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logout.js","sourceRoot":"","sources":["../../src/commands/logout.ts"],"names":[],"mappings":";;;AAAA,kEAA+B;AAC/B,wDAAoD;AACpD,8CAA2C;AAE3C,MAAqB,MAAO,SAAQ,0BAAW;IAY7C,4DAA4D;IAC5D,KAAK,CAAC,GAAG;QACP,IAAI,iBAAO,CAAC,OAAO,EAAE;YACnB,iBAAO,CAAC,OAAO,GAAG,SAAS,CAAC;YAC5B,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;SACrB;aAAM;YACL,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;SACnC;IACH,CAAC;;AApBH,yBAqBC;AApBQ;;;;WAAmB,0BAA0B;GAAC;AAE9C;;;;WAAiB,QAAQ;GAAC;AAE1B;;;;WAAoB;QACzB,IAAA,mBAAM,EAAA;;;KAGL;KACF;GAAC","sourcesContent":["import dedent from \"ts-dedent\";\nimport { BaseCommand } from \"../utils/base-command\";\nimport { context } from \"../utils/context\";\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 (context.session) {\n context.session = undefined;\n this.log(\"Goodbye\");\n } else {\n this.log(\"You are not logged in\");\n }\n }\n}\n"]}
1
+ {"version":3,"file":"logout.js","sourceRoot":"","sources":["../../src/commands/logout.ts"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,kEAA+B;AAC/B,wDAAoD;AACpD,8CAA2C;AAE3C,MAAqB,MAAO,SAAQ,0BAAW;IAY7C,4DAA4D;IAC5D,KAAK,CAAC,GAAG;QACP,IAAI,iBAAO,CAAC,OAAO,EAAE;YACnB,iBAAO,CAAC,OAAO,GAAG,SAAS,CAAC;YAC5B,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;SACrB;aAAM;YACL,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;SACnC;IACH,CAAC;;AApBH,yBAqBC;AApBQ;;;;WAAmB,0BAA0B;GAAC;AAE9C;;;;WAAiB,QAAQ;GAAC;AAE1B;;;;WAAoB;QACzB,IAAA,mBAAM,EAAC,IAAA,eAAK,EAAA;;;KAGX,CAAC;KACH;GAAC","sourcesContent":["import chalk from \"chalk\";\nimport dedent from \"ts-dedent\";\nimport { BaseCommand } from \"../utils/base-command\";\nimport { context } from \"../utils/context\";\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(chalk`\n {gray $ ggt logout}\n Goodbye\n `),\n ];\n\n // eslint-disable-next-line @typescript-eslint/require-await\n async run(): Promise<void> {\n if (context.session) {\n context.session = undefined;\n this.log(\"Goodbye\");\n } else {\n this.log(\"You are not logged in\");\n }\n }\n}\n"]}
@@ -43,9 +43,8 @@ export default class Sync extends BaseCommand {
43
43
  relative(to: string): string;
44
44
  absolute(...pathSegments: string[]): string;
45
45
  normalize(filepath: string): string;
46
- logPaths(filepaths: string[], { limit, sep }?: {
46
+ logPaths(prefix: string, changed: string[], deleted: string[], { limit }?: {
47
47
  limit?: number | undefined;
48
- sep?: string | undefined;
49
48
  }): void;
50
49
  init(): Promise<void>;
51
50
  run(): Promise<void>;