@gadgetinc/ggt 0.2.0 → 0.2.2

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 (46) hide show
  1. package/README.md +6 -6
  2. package/bin/dev.js +2 -2
  3. package/bin/run.js +1 -1
  4. package/lib/__generated__/graphql.js.map +1 -1
  5. package/lib/commands/help.js +3 -3
  6. package/lib/commands/help.js.map +1 -1
  7. package/lib/commands/list.js +4 -4
  8. package/lib/commands/list.js.map +1 -1
  9. package/lib/commands/login.js +2 -2
  10. package/lib/commands/login.js.map +1 -1
  11. package/lib/commands/logout.js +2 -2
  12. package/lib/commands/logout.js.map +1 -1
  13. package/lib/commands/sync.js +239 -83
  14. package/lib/commands/sync.js.map +1 -1
  15. package/lib/commands/whoami.js +2 -2
  16. package/lib/commands/whoami.js.map +1 -1
  17. package/lib/{utils → services}/base-command.js +25 -10
  18. package/lib/services/base-command.js.map +1 -0
  19. package/lib/{utils → services}/client.js +70 -21
  20. package/lib/services/client.js.map +1 -0
  21. package/lib/{utils → services}/context.js +42 -27
  22. package/lib/services/context.js.map +1 -0
  23. package/lib/{utils → services}/errors.js +8 -8
  24. package/lib/services/errors.js.map +1 -0
  25. package/lib/{utils → services}/flags.js +4 -3
  26. package/lib/services/flags.js.map +1 -0
  27. package/lib/{utils → services}/fs-utils.js +6 -2
  28. package/lib/services/fs-utils.js.map +1 -0
  29. package/lib/{utils → services}/help.js +1 -1
  30. package/lib/services/help.js.map +1 -0
  31. package/lib/services/promise.js.map +1 -0
  32. package/lib/{utils → services}/sleep.js +6 -2
  33. package/lib/services/sleep.js.map +1 -0
  34. package/npm-shrinkwrap.json +2378 -2704
  35. package/oclif.manifest.json +35 -15
  36. package/package.json +35 -34
  37. package/lib/utils/base-command.js.map +0 -1
  38. package/lib/utils/client.js.map +0 -1
  39. package/lib/utils/context.js.map +0 -1
  40. package/lib/utils/errors.js.map +0 -1
  41. package/lib/utils/flags.js.map +0 -1
  42. package/lib/utils/fs-utils.js.map +0 -1
  43. package/lib/utils/help.js.map +0 -1
  44. package/lib/utils/promise.js.map +0 -1
  45. package/lib/utils/sleep.js.map +0 -1
  46. /package/lib/{utils → services}/promise.js +0 -0
package/README.md CHANGED
@@ -129,7 +129,7 @@ EXAMPLES
129
129
  Goodbye!
130
130
  ```
131
131
 
132
- _See code: [src/commands/sync.ts](https://github.com/gadget-inc/ggt/blob/v0.2.0/src/commands/sync.ts)_
132
+ _See code: [src/commands/sync.ts](https://github.com/gadget-inc/ggt/blob/v0.2.2/src/commands/sync.ts)_
133
133
 
134
134
  ### `ggt help [COMMAND]`
135
135
 
@@ -143,7 +143,7 @@ ARGUMENTS
143
143
  COMMAND The command to show help for.
144
144
  ```
145
145
 
146
- _See code: [src/commands/help.ts](https://github.com/gadget-inc/ggt/blob/v0.2.0/src/commands/help.ts)_
146
+ _See code: [src/commands/help.ts](https://github.com/gadget-inc/ggt/blob/v0.2.2/src/commands/help.ts)_
147
147
 
148
148
  ### `ggt list`
149
149
 
@@ -170,7 +170,7 @@ EXAMPLES
170
170
  $ ggt list --sort=slug
171
171
  ```
172
172
 
173
- _See code: [src/commands/list.ts](https://github.com/gadget-inc/ggt/blob/v0.2.0/src/commands/list.ts)_
173
+ _See code: [src/commands/list.ts](https://github.com/gadget-inc/ggt/blob/v0.2.2/src/commands/list.ts)_
174
174
 
175
175
  ### `ggt login`
176
176
 
@@ -189,7 +189,7 @@ EXAMPLES
189
189
  Hello, Jane Doe (jane@example.com)
190
190
  ```
191
191
 
192
- _See code: [src/commands/login.ts](https://github.com/gadget-inc/ggt/blob/v0.2.0/src/commands/login.ts)_
192
+ _See code: [src/commands/login.ts](https://github.com/gadget-inc/ggt/blob/v0.2.2/src/commands/login.ts)_
193
193
 
194
194
  ### `ggt logout`
195
195
 
@@ -204,7 +204,7 @@ EXAMPLES
204
204
  Goodbye
205
205
  ```
206
206
 
207
- _See code: [src/commands/logout.ts](https://github.com/gadget-inc/ggt/blob/v0.2.0/src/commands/logout.ts)_
207
+ _See code: [src/commands/logout.ts](https://github.com/gadget-inc/ggt/blob/v0.2.2/src/commands/logout.ts)_
208
208
 
209
209
  ### `ggt whoami`
210
210
 
@@ -219,7 +219,7 @@ EXAMPLES
219
219
  You are logged in as Jane Doe (jane@example.com)
220
220
  ```
221
221
 
222
- _See code: [src/commands/whoami.ts](https://github.com/gadget-inc/ggt/blob/v0.2.0/src/commands/whoami.ts)_
222
+ _See code: [src/commands/whoami.ts](https://github.com/gadget-inc/ggt/blob/v0.2.2/src/commands/whoami.ts)_
223
223
 
224
224
  <!-- commandsstop -->
225
225
 
package/bin/dev.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node --loader ts-node/esm --no-warnings
2
2
 
3
+ import oclif from "@oclif/core";
3
4
  import path from "node:path";
4
- import url from "node:url";
5
5
  import process from "node:process";
6
- import oclif from "@oclif/core";
6
+ import url from "node:url";
7
7
 
8
8
  process.env["NODE_ENV"] = "development";
9
9
  process.env["GGT_ENV"] ??= "development";
package/bin/run.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import process from "node:process";
4
3
  import oclif from "@oclif/core";
4
+ import process from "node:process";
5
5
 
6
6
  process.on("unhandledRejection", oclif.Errors.handle);
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/__generated__/graphql.ts"],"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"],"names":["FileSyncEncoding","Base64","Utf8"],"mappings":"AAAA;;;;;;CAMC,cAqFM;UAAKA,gBAAgB;IAAhBA,iBACVC,YAAS;IADCD,iBAEVE,UAAO;GAFGF,qBAAAA"}
1
+ {"version":3,"sources":["../../src/__generated__/graphql.ts"],"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]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string | number; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: 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: { input: any; output: 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: { input: any; output: any; }\n JSON: { input: { [key: string]: any }; output: { [key: string]: any }; }\n /** The `Upload` scalar type represents a file upload. */\n Upload: { input: any; output: any; }\n};\n\nexport type ApiUpgradeConvergePlanResult = {\n __typename?: 'APIUpgradeConvergePlanResult';\n items: Array<Scalars['JSON']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type ChangeAppDomainResult = {\n __typename?: 'ChangeAppDomainResult';\n onlyValidate?: Maybe<Scalars['Boolean']['output']>;\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type ContributorResult = {\n __typename?: 'ContributorResult';\n email: Scalars['String']['output'];\n isOwner: Scalars['Boolean']['output'];\n isPending: Scalars['Boolean']['output'];\n};\n\nexport type DeleteAppStatusResult = {\n __typename?: 'DeleteAppStatusResult';\n isNotCreator?: Maybe<Scalars['Boolean']['output']>;\n isNotOwner?: Maybe<Scalars['Boolean']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type EnableFrontendResult = {\n __typename?: 'EnableFrontendResult';\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type EnvironmentPatchResult = {\n __typename?: 'EnvironmentPatchResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type EnvironmentPublishResult = {\n __typename?: 'EnvironmentPublishResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type EnvironmentSubscriptionResult = {\n __typename?: 'EnvironmentSubscriptionResult';\n patches: Array<Scalars['JSON']['output']>;\n};\n\nexport type EnvironmentTreeClientId = {\n clientType: Scalars['String']['input'];\n id: Scalars['String']['input'];\n};\n\nexport type FileSyncChangedEvent = {\n __typename?: 'FileSyncChangedEvent';\n content: Scalars['String']['output'];\n encoding: FileSyncEncoding;\n mode: Scalars['Float']['output'];\n path: Scalars['String']['output'];\n};\n\nexport type FileSyncChangedEventInput = {\n content: Scalars['String']['input'];\n encoding?: InputMaybe<FileSyncEncoding>;\n mode: Scalars['Float']['input'];\n oldPath?: InputMaybe<Scalars['String']['input']>;\n path: Scalars['String']['input'];\n};\n\nexport type FileSyncDeletedEvent = {\n __typename?: 'FileSyncDeletedEvent';\n path: Scalars['String']['output'];\n};\n\nexport type FileSyncDeletedEventInput = {\n path: Scalars['String']['input'];\n};\n\nexport enum FileSyncEncoding {\n Base64 = 'base64',\n Utf8 = 'utf8'\n}\n\nexport type GadgetRole = {\n __typename?: 'GadgetRole';\n key: Scalars['String']['output'];\n name: Scalars['String']['output'];\n order: Scalars['Int']['output'];\n selectable: Scalars['Boolean']['output'];\n};\n\nexport type IdentifySupportConversationResult = {\n __typename?: 'IdentifySupportConversationResult';\n identificationEmail: Scalars['String']['output'];\n identificationToken: Scalars['String']['output'];\n};\n\nexport type LogSearchResult = {\n __typename?: 'LogSearchResult';\n data: Scalars['JSON']['output'];\n status: Scalars['String']['output'];\n};\n\nexport type MigrateEnvironmentsResult = {\n __typename?: 'MigrateEnvironmentsResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type Mutation = {\n __typename?: 'Mutation';\n changeAppDomain?: Maybe<ChangeAppDomainResult>;\n deleteApp?: Maybe<DeleteAppStatusResult>;\n enableFrontend?: Maybe<EnableFrontendResult>;\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 uploadFiles: UploadFilesResult;\n};\n\n\nexport type MutationChangeAppDomainArgs = {\n newSubdomain: Scalars['String']['input'];\n onlyValidate?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationEnableFrontendArgs = {\n hasShopifyConnection: Scalars['Boolean']['input'];\n};\n\n\nexport type MutationMigrateEnvironmentsArgs = {\n existingToProduction: Scalars['Boolean']['input'];\n};\n\n\nexport type MutationPatchEnvironmentTreeArgs = {\n clientID: EnvironmentTreeClientId;\n patches: Array<Scalars['JSON']['input']>;\n};\n\n\nexport type MutationPublishFileSyncEventsArgs = {\n input: PublishFileSyncEventsInput;\n};\n\n\nexport type MutationRefreshScopesArgs = {\n appConfigKey: Scalars['String']['input'];\n connectionKey: Scalars['String']['input'];\n shopId: Scalars['String']['input'];\n};\n\n\nexport type MutationRegisterWebhooksArgs = {\n connectionKey: Scalars['String']['input'];\n keepExtraTopics?: InputMaybe<Scalars['Boolean']['input']>;\n modelKeys?: InputMaybe<Array<Scalars['String']['input']>>;\n shopIds: Array<Scalars['String']['input']>;\n};\n\n\nexport type MutationRemoveContributorArgs = {\n email: Scalars['String']['input'];\n isInvitation: Scalars['Boolean']['input'];\n};\n\n\nexport type MutationSendAppInvitationArgs = {\n email?: InputMaybe<Scalars['String']['input']>;\n emails?: InputMaybe<Array<Scalars['String']['input']>>;\n resend?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationUnregisterWebhooksArgs = {\n apiKeys?: InputMaybe<Array<Scalars['String']['input']>>;\n connectionKey: Scalars['String']['input'];\n modelKeys?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type MutationUploadFilesArgs = {\n files: Array<UploadFile>;\n};\n\nexport type PublishFileSyncEventsInput = {\n changed: Array<FileSyncChangedEventInput>;\n deleted: Array<FileSyncDeletedEventInput>;\n expectedRemoteFilesVersion: Scalars['String']['input'];\n};\n\nexport type PublishFileSyncEventsResult = {\n __typename?: 'PublishFileSyncEventsResult';\n remoteFilesVersion: Scalars['String']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n apiUpgradeConvergePlan?: Maybe<ApiUpgradeConvergePlanResult>;\n currentUser: User;\n environmentTreeChildKeys: Array<Scalars['String']['output']>;\n environmentTreePath?: Maybe<Scalars['JSON']['output']>;\n identifySupportConversation?: Maybe<IdentifySupportConversationResult>;\n listContributors: Array<ContributorResult>;\n logsSearch: LogSearchResult;\n remoteFilesVersion: Scalars['String']['output'];\n roles: Array<GadgetRole>;\n runTestSupportFunction?: Maybe<Scalars['JSON']['output']>;\n team: TeamResult;\n typesManifest: TypesManifest;\n};\n\n\nexport type QueryApiUpgradeConvergePlanArgs = {\n currentVersion: Scalars['String']['input'];\n targetVersion: Scalars['String']['input'];\n};\n\n\nexport type QueryEnvironmentTreeChildKeysArgs = {\n path: Scalars['String']['input'];\n};\n\n\nexport type QueryEnvironmentTreePathArgs = {\n hydrateChildrenGlobs?: InputMaybe<Array<Scalars['String']['input']>>;\n path: Scalars['String']['input'];\n};\n\n\nexport type QueryLogsSearchArgs = {\n direction?: InputMaybe<Scalars['String']['input']>;\n end?: InputMaybe<Scalars['DateTime']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n query: Scalars['String']['input'];\n start?: InputMaybe<Scalars['DateTime']['input']>;\n step?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryTypesManifestArgs = {\n dependenciesHash: Scalars['String']['input'];\n};\n\nexport type RefreshScopesResult = {\n __typename?: 'RefreshScopesResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type RegisterWebhooksResult = {\n __typename?: 'RegisterWebhooksResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type RemoteFileSyncEvents = {\n __typename?: 'RemoteFileSyncEvents';\n changed: Array<FileSyncChangedEvent>;\n deleted: Array<FileSyncDeletedEvent>;\n remoteFilesVersion: Scalars['String']['output'];\n};\n\nexport type RemoveContributorResult = {\n __typename?: 'RemoveContributorResult';\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type SendAppInvitationResult = {\n __typename?: 'SendAppInvitationResult';\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type Subscription = {\n __typename?: 'Subscription';\n editorActive?: Maybe<Scalars['Boolean']['output']>;\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']['input'];\n};\n\n\nexport type SubscriptionLogsSearchArgs = {\n limit?: InputMaybe<Scalars['Int']['input']>;\n query: Scalars['String']['input'];\n start?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\n\nexport type SubscriptionRemoteFileSyncEventsArgs = {\n encoding?: InputMaybe<FileSyncEncoding>;\n localFilesVersion: Scalars['String']['input'];\n};\n\nexport type TeamMember = {\n __typename?: 'TeamMember';\n contributesToApp: Scalars['Boolean']['output'];\n email: Scalars['String']['output'];\n};\n\nexport type TeamResult = {\n __typename?: 'TeamResult';\n availableSeats?: Maybe<Scalars['Int']['output']>;\n costPerSeat?: Maybe<Scalars['String']['output']>;\n teamMembers: Array<TeamMember>;\n};\n\nexport type TypeManifestEntry = {\n __typename?: 'TypeManifestEntry';\n declaration: Scalars['String']['output'];\n path: Scalars['String']['output'];\n};\n\nexport type TypesManifest = {\n __typename?: 'TypesManifest';\n cdn: Array<Scalars['String']['output']>;\n dependenciesHash: Scalars['String']['output'];\n entries: Array<TypeManifestEntry>;\n environmentVersion: Scalars['Int']['output'];\n};\n\nexport type UnregisterWebhooksResult = {\n __typename?: 'UnregisterWebhooksResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type UploadFile = {\n file: Scalars['Upload']['input'];\n path: Scalars['String']['input'];\n};\n\nexport type UploadFilesResult = {\n __typename?: 'UploadFilesResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type User = {\n __typename?: 'User';\n email: Scalars['String']['output'];\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type RemoteFileSyncEventsSubscriptionVariables = Exact<{\n localFilesVersion: Scalars['String']['input'];\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"],"names":["FileSyncEncoding","Base64","Utf8"],"mappings":"AAAA;;;;;;CAMC,cAuGM;UAAKA,gBAAgB;IAAhBA,iBACVC,YAAS;IADCD,iBAEVE,UAAO;GAFGF,qBAAAA"}
@@ -1,10 +1,10 @@
1
1
  import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
2
  import { Args } from "@oclif/core";
3
- import Help from "../utils/help.js";
4
- import { BaseCommand } from "../utils/base-command.js";
3
+ import { BaseCommand } from "../services/base-command.js";
4
+ import Help from "../services/help.js";
5
5
  class HelpCommand extends BaseCommand {
6
6
  async run() {
7
- const { argv } = await this.parse();
7
+ const { argv } = await this.parse();
8
8
  const help = new Help(this.config, {
9
9
  all: true
10
10
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/help.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport Help from \"../utils/help.js\";\nimport { BaseCommand } from \"../utils/base-command.js\";\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 BaseCommand<typeof HelpCommand> {\n static override strict = false;\n\n static override summary = \"Display help for ggt.\";\n\n static override args = {\n command: Args.string({\n required: false,\n description: \"The command to show help for.\",\n }),\n };\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 as string[]);\n }\n}\n"],"names":["Args","Help","BaseCommand","HelpCommand","run","argv","parse","help","config","all","showHelp","strict","summary","args","command","string","required","description"],"mappings":";AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,OAAOC,UAAU,mBAAmB;AACpC,SAASC,WAAW,QAAQ,2BAA2B;AAOxC,MAAMC,oBAAoBD;IAYvC,MAAME,MAAqB;QACzB,MAAM,EAAEC,KAAI,EAAE,GAAG,MAAM,IAAI,CAACC;QAC5B,MAAMC,OAAO,IAAIN,KAAK,IAAI,CAACO,QAAQ;YAAEC,KAAK;QAAK;QAC/C,MAAMF,KAAKG,SAASL;IACtB;AACF;AAhBE,iBADmBF,aACHQ,UAAS;AAEzB,iBAHmBR,aAGHS,WAAU;AAE1B,iBALmBT,aAKHU,QAAO;IACrBC,SAASd,KAAKe,OAAO;QACnBC,UAAU;QACVC,aAAa;IACf;AACF;AAfF;;;;CAIC,GACD,SAAqBd,yBAiBpB"}
1
+ {"version":3,"sources":["../../src/commands/help.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport { BaseCommand } from \"../services/base-command.js\";\nimport Help from \"../services/help.js\";\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 BaseCommand<typeof HelpCommand> {\n static override strict = false;\n\n static override summary = \"Display help for ggt.\";\n\n static override args = {\n command: Args.string({\n required: false,\n description: \"The command to show help for.\",\n }),\n };\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 as string[]);\n }\n}\n"],"names":["Args","BaseCommand","Help","HelpCommand","run","argv","parse","help","config","all","showHelp","strict","summary","args","command","string","required","description"],"mappings":";AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,OAAOC,UAAU,sBAAsB;AAOxB,MAAMC,oBAAoBF;IAYvC,MAAMG,MAAqB;QACzB,MAAM,EAAEC,IAAI,EAAE,GAAG,MAAM,IAAI,CAACC,KAAK;QACjC,MAAMC,OAAO,IAAIL,KAAK,IAAI,CAACM,MAAM,EAAE;YAAEC,KAAK;QAAK;QAC/C,MAAMF,KAAKG,QAAQ,CAACL;IACtB;AACF;AAhBE,iBADmBF,aACHQ,UAAS;AAEzB,iBAHmBR,aAGHS,WAAU;AAE1B,iBALmBT,aAKHU,QAAO;IACrBC,SAASd,KAAKe,MAAM,CAAC;QACnBC,UAAU;QACVC,aAAa;IACf;AACF;AAfF;;;;CAIC,GACD,SAAqBd,yBAiBpB"}
@@ -1,12 +1,12 @@
1
1
  import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
2
  import { ux } from "@oclif/core";
3
- import { dedent } from "ts-dedent";
4
- import { BaseCommand } from "../utils/base-command.js";
5
- import { context } from "../utils/context.js";
6
3
  import chalkTemplate from "chalk-template";
4
+ import { dedent } from "ts-dedent";
5
+ import { BaseCommand } from "../services/base-command.js";
6
+ import { context } from "../services/context.js";
7
7
  class List extends BaseCommand {
8
8
  async run() {
9
- const { flags } = await this.parse(List);
9
+ const { flags } = await this.parse(List);
10
10
  const apps = await context.getAvailableApps();
11
11
  if (!apps.length) {
12
12
  this.log(dedent`
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/list.ts"],"sourcesContent":["import { ux } from \"@oclif/core\";\nimport { dedent } from \"ts-dedent\";\nimport { BaseCommand } from \"../utils/base-command.js\";\nimport type { App } from \"../utils/context.js\";\nimport { context } from \"../utils/context.js\";\nimport chalkTemplate from \"chalk-template\";\n\nexport default class List extends BaseCommand<typeof List> {\n static override summary = \"List the apps available to the currently logged in user.\";\n\n static override usage = \"list\";\n\n static override examples = [\n dedent(chalkTemplate`\n {gray $ ggt list}\n {gray $ ggt list --extended}\n {gray $ ggt list --sort=slug}\n `),\n ];\n\n static override flags = {\n ...ux.table.flags(),\n };\n\n override requireUser = true;\n\n async run(): Promise<void> {\n const { flags } = await this.parse(List);\n\n const apps = await context.getAvailableApps();\n if (!apps.length) {\n this.log(dedent`\n It doesn't look like you have any applications.\n\n Visit https://gadget.new to create one!\n `);\n return;\n }\n\n ux.table<App & Record<string, never>>(\n apps as unknown as (App & Record<string, never>)[],\n {\n id: {\n header: \"ID\",\n extended: true,\n },\n slug: {\n header: \"Slug\",\n },\n primaryDomain: {\n header: \"Domain\",\n },\n },\n {\n printLine: this.log.bind(this),\n ...flags, // parsed flags\n }\n );\n }\n}\n"],"names":["ux","dedent","BaseCommand","context","chalkTemplate","List","run","flags","parse","apps","getAvailableApps","length","log","table","id","header","extended","slug","primaryDomain","printLine","bind","requireUser","summary","usage","examples"],"mappings":";AAAA,SAASA,EAAE,QAAQ,cAAc;AACjC,SAASC,MAAM,QAAQ,YAAY;AACnC,SAASC,WAAW,QAAQ,2BAA2B;AAEvD,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,OAAOC,mBAAmB,iBAAiB;AAE5B,MAAMC,aAAaH;IAmBhC,MAAMI,MAAqB;QACzB,MAAM,EAAEC,MAAK,EAAE,GAAG,MAAM,IAAI,CAACC,MAAMH;QAEnC,MAAMI,OAAO,MAAMN,QAAQO;QAC3B,IAAI,CAACD,KAAKE,QAAQ;YAChB,IAAI,CAACC,IAAIX,MAAM,CAAC;;;;MAIhB,CAAC;YACD;QACF;QAEAD,GAAGa,MACDJ,MACA;YACEK,IAAI;gBACFC,QAAQ;gBACRC,UAAU;YACZ;YACAC,MAAM;gBACJF,QAAQ;YACV;YACAG,eAAe;gBACbH,QAAQ;YACV;QACF,GACA;YACEI,WAAW,IAAI,CAACP,IAAIQ,KAAK,IAAI;YAC7B,GAAGb,KAAK;QACV;IAEJ;;;QAlCA,uBAASc,eAAc;;AAmCzB;AAnDE,iBADmBhB,MACHiB,WAAU;AAE1B,iBAHmBjB,MAGHkB,SAAQ;AAExB,iBALmBlB,MAKHmB,YAAW;IACzBvB,OAAOG,aAAa,CAAC;;;;IAIrB,CAAC;CACF;AAED,iBAbmBC,MAaHE,SAAQ;IACtB,GAAGP,GAAGa,MAAMN,OAAO;AACrB;AAfF,SAAqBF,kBAoDpB"}
1
+ {"version":3,"sources":["../../src/commands/list.ts"],"sourcesContent":["import { ux } from \"@oclif/core\";\nimport chalkTemplate from \"chalk-template\";\nimport { dedent } from \"ts-dedent\";\nimport { BaseCommand } from \"../services/base-command.js\";\nimport type { App } from \"../services/context.js\";\nimport { context } from \"../services/context.js\";\n\nexport default class List extends BaseCommand<typeof List> {\n static override summary = \"List the apps available to the currently logged in user.\";\n\n static override usage = \"list\";\n\n static override examples = [\n dedent(chalkTemplate`\n {gray $ ggt list}\n {gray $ ggt list --extended}\n {gray $ ggt list --sort=slug}\n `),\n ];\n\n static override flags = {\n ...ux.table.flags(),\n };\n\n override requireUser = true;\n\n async run(): Promise<void> {\n const { flags } = await this.parse(List);\n\n const apps = await context.getAvailableApps();\n if (!apps.length) {\n this.log(dedent`\n It doesn't look like you have any applications.\n\n Visit https://gadget.new to create one!\n `);\n return;\n }\n\n ux.table<App & Record<string, never>>(\n apps as unknown as (App & Record<string, never>)[],\n {\n id: {\n header: \"ID\",\n extended: true,\n },\n slug: {\n header: \"Slug\",\n },\n primaryDomain: {\n header: \"Domain\",\n },\n },\n {\n printLine: this.log.bind(this),\n ...flags, // parsed flags\n },\n );\n }\n}\n"],"names":["ux","chalkTemplate","dedent","BaseCommand","context","List","run","flags","parse","apps","getAvailableApps","length","log","table","id","header","extended","slug","primaryDomain","printLine","bind","requireUser","summary","usage","examples"],"mappings":";AAAA,SAASA,EAAE,QAAQ,cAAc;AACjC,OAAOC,mBAAmB,iBAAiB;AAC3C,SAASC,MAAM,QAAQ,YAAY;AACnC,SAASC,WAAW,QAAQ,8BAA8B;AAE1D,SAASC,OAAO,QAAQ,yBAAyB;AAElC,MAAMC,aAAaF;IAmBhC,MAAMG,MAAqB;QACzB,MAAM,EAAEC,KAAK,EAAE,GAAG,MAAM,IAAI,CAACC,KAAK,CAACH;QAEnC,MAAMI,OAAO,MAAML,QAAQM,gBAAgB;QAC3C,IAAI,CAACD,KAAKE,MAAM,EAAE;YAChB,IAAI,CAACC,GAAG,CAACV,MAAM,CAAC;;;;MAIhB,CAAC;YACD;QACF;QAEAF,GAAGa,KAAK,CACNJ,MACA;YACEK,IAAI;gBACFC,QAAQ;gBACRC,UAAU;YACZ;YACAC,MAAM;gBACJF,QAAQ;YACV;YACAG,eAAe;gBACbH,QAAQ;YACV;QACF,GACA;YACEI,WAAW,IAAI,CAACP,GAAG,CAACQ,IAAI,CAAC,IAAI;YAC7B,GAAGb,KAAK;QACV;IAEJ;;;QAlCA,uBAASc,eAAc;;AAmCzB;AAnDE,iBADmBhB,MACHiB,WAAU;AAE1B,iBAHmBjB,MAGHkB,SAAQ;AAExB,iBALmBlB,MAKHmB,YAAW;IACzBtB,OAAOD,aAAa,CAAC;;;;IAIrB,CAAC;CACF;AAED,iBAbmBI,MAaHE,SAAQ;IACtB,GAAGP,GAAGa,KAAK,CAACN,KAAK,EAAE;AACrB;AAfF,SAAqBF,kBAoDpB"}
@@ -1,7 +1,7 @@
1
1
  import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
- import { dedent } from "ts-dedent";
3
- import { BaseCommand } from "../utils/base-command.js";
4
2
  import chalkTemplate from "chalk-template";
3
+ import { dedent } from "ts-dedent";
4
+ import { BaseCommand } from "../services/base-command.js";
5
5
  class Login extends BaseCommand {
6
6
  async run() {
7
7
  await this.login();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/login.ts"],"sourcesContent":["import { dedent } from \"ts-dedent\";\nimport { BaseCommand } from \"../utils/base-command.js\";\nimport chalkTemplate from \"chalk-template\";\n\nexport default class Login extends BaseCommand<typeof Login> {\n static override summary = \"Log in to your account.\";\n\n static override usage = \"login\";\n\n static override examples = [\n dedent(chalkTemplate`\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"],"names":["dedent","BaseCommand","chalkTemplate","Login","run","login","summary","usage","examples"],"mappings":";AAAA,SAASA,MAAM,QAAQ,YAAY;AACnC,SAASC,WAAW,QAAQ,2BAA2B;AACvD,OAAOC,mBAAmB,iBAAiB;AAE5B,MAAMC,cAAcF;IAgBjC,MAAMG,MAAqB;QACzB,MAAM,IAAI,CAACC;IACb;AACF;AAlBE,iBADmBF,OACHG,WAAU;AAE1B,iBAHmBH,OAGHI,SAAQ;AAExB,iBALmBJ,OAKHK,YAAW;IACzBR,OAAOE,aAAa,CAAC;;;;;;;IAOrB,CAAC;CACF;AAdH,SAAqBC,mBAmBpB"}
1
+ {"version":3,"sources":["../../src/commands/login.ts"],"sourcesContent":["import chalkTemplate from \"chalk-template\";\nimport { dedent } from \"ts-dedent\";\nimport { BaseCommand } from \"../services/base-command.js\";\n\nexport default class Login extends BaseCommand<typeof Login> {\n static override summary = \"Log in to your account.\";\n\n static override usage = \"login\";\n\n static override examples = [\n dedent(chalkTemplate`\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"],"names":["chalkTemplate","dedent","BaseCommand","Login","run","login","summary","usage","examples"],"mappings":";AAAA,OAAOA,mBAAmB,iBAAiB;AAC3C,SAASC,MAAM,QAAQ,YAAY;AACnC,SAASC,WAAW,QAAQ,8BAA8B;AAE3C,MAAMC,cAAcD;IAgBjC,MAAME,MAAqB;QACzB,MAAM,IAAI,CAACC,KAAK;IAClB;AACF;AAlBE,iBADmBF,OACHG,WAAU;AAE1B,iBAHmBH,OAGHI,SAAQ;AAExB,iBALmBJ,OAKHK,YAAW;IACzBP,OAAOD,aAAa,CAAC;;;;;;;IAOrB,CAAC;CACF;AAdH,SAAqBG,mBAmBpB"}
@@ -1,8 +1,8 @@
1
1
  import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
2
  import chalkTemplate from "chalk-template";
3
3
  import { dedent } from "ts-dedent";
4
- import { BaseCommand } from "../utils/base-command.js";
5
- import { context } from "../utils/context.js";
4
+ import { BaseCommand } from "../services/base-command.js";
5
+ import { context } from "../services/context.js";
6
6
  class Logout extends BaseCommand {
7
7
  // eslint-disable-next-line @typescript-eslint/require-await
8
8
  async run() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/logout.ts"],"sourcesContent":["import chalkTemplate from \"chalk-template\";\nimport { dedent } from \"ts-dedent\";\nimport { BaseCommand } from \"../utils/base-command.js\";\nimport { context } from \"../utils/context.js\";\n\nexport default class Logout extends BaseCommand<typeof Logout> {\n static override summary = \"Log out of your account.\";\n\n static override usage = \"logout\";\n\n static override examples = [\n dedent(chalkTemplate`\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"],"names":["chalkTemplate","dedent","BaseCommand","context","Logout","run","session","undefined","log","summary","usage","examples"],"mappings":";AAAA,OAAOA,mBAAmB,iBAAiB;AAC3C,SAASC,MAAM,QAAQ,YAAY;AACnC,SAASC,WAAW,QAAQ,2BAA2B;AACvD,SAASC,OAAO,QAAQ,sBAAsB;AAE/B,MAAMC,eAAeF;IAYlC,4DAA4D;IAC5D,MAAMG,MAAqB;QACzB,IAAIF,QAAQG,SAAS;YACnBH,QAAQG,UAAUC;YAClB,IAAI,CAACC,IAAI;QACX,OAAO;YACL,IAAI,CAACA,IAAI;QACX;IACF;AACF;AApBE,iBADmBJ,QACHK,WAAU;AAE1B,iBAHmBL,QAGHM,SAAQ;AAExB,iBALmBN,QAKHO,YAAW;IACzBV,OAAOD,aAAa,CAAC;;;IAGrB,CAAC;CACF;AAVH,SAAqBI,oBAqBpB"}
1
+ {"version":3,"sources":["../../src/commands/logout.ts"],"sourcesContent":["import chalkTemplate from \"chalk-template\";\nimport { dedent } from \"ts-dedent\";\nimport { BaseCommand } from \"../services/base-command.js\";\nimport { context } from \"../services/context.js\";\n\nexport default class Logout extends BaseCommand<typeof Logout> {\n static override summary = \"Log out of your account.\";\n\n static override usage = \"logout\";\n\n static override examples = [\n dedent(chalkTemplate`\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"],"names":["chalkTemplate","dedent","BaseCommand","context","Logout","run","session","undefined","log","summary","usage","examples"],"mappings":";AAAA,OAAOA,mBAAmB,iBAAiB;AAC3C,SAASC,MAAM,QAAQ,YAAY;AACnC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,OAAO,QAAQ,yBAAyB;AAElC,MAAMC,eAAeF;IAYlC,4DAA4D;IAC5D,MAAMG,MAAqB;QACzB,IAAIF,QAAQG,OAAO,EAAE;YACnBH,QAAQG,OAAO,GAAGC;YAClB,IAAI,CAACC,GAAG,CAAC;QACX,OAAO;YACL,IAAI,CAACA,GAAG,CAAC;QACX;IACF;AACF;AApBE,iBADmBJ,QACHK,WAAU;AAE1B,iBAHmBL,QAGHM,SAAQ;AAExB,iBALmBN,QAKHO,YAAW;IACzBV,OAAOD,aAAa,CAAC;;;IAGrB,CAAC;CACF;AAVH,SAAqBI,oBAqBpB"}