@effect-app/cli 1.29.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @effect-app/cli
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 7e9e02b: Update to Effect v4
8
+
9
+ ## 1.29.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 5880020: bootstrap
14
+
3
15
  ## 1.29.1
4
16
 
5
17
  ### Patch Changes
package/dist/extract.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { type Error as PlatformError, FileSystem, Path } from "@effect/platform";
2
- import { Effect } from "effect";
1
+ import { Effect, FileSystem, Path, type PlatformError } from "effect";
3
2
  /**
4
3
  * Generates package.json exports mappings for TypeScript modules
5
4
  * This function finds all .ts files in src/ (excluding test files) and generates
@@ -1 +1 @@
1
- {"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../src/extract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,IAAI,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAwB,MAAM,EAAe,MAAM,QAAQ,CAAA;AAElE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,qIAuDrC,CAAA"}
1
+ {"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../src/extract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,MAAM,EAAE,UAAU,EAAS,IAAI,EAAQ,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAA;AAExG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,qIAuDrC,CAAA"}
package/dist/extract.js CHANGED
@@ -1,5 +1,4 @@
1
- import { FileSystem, Path } from "@effect/platform";
2
- import { Array as EffectArray, Effect, Order, pipe } from "effect";
1
+ import { Array as EffectArray, Effect, FileSystem, Order, Path, pipe } from "effect";
3
2
  /**
4
3
  * Generates package.json exports mappings for TypeScript modules
5
4
  * This function finds all .ts files in src/ (excluding test files) and generates
@@ -46,8 +45,8 @@ export const ExtractExportMappingsService = Effect.fn("effa-cli.extractExportMap
46
45
  const typesPath = `./dist/${relativePath.replace(/\.ts$/, ".d.ts")}`;
47
46
  return `"${exportKey}": { "types": "${typesPath}", "default": "${distPath}" }`;
48
47
  });
49
- const sortedMappings = pipe(exportMappings, EffectArray.sort(Order.string), EffectArray.join(",\n"));
48
+ const sortedMappings = pipe(exportMappings, EffectArray.sort(Order.String), EffectArray.join(",\n"));
50
49
  return sortedMappings;
51
50
  });
52
51
  })();
53
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0cmFjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9leHRyYWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBK0IsVUFBVSxFQUFFLElBQUksRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ2hGLE9BQU8sRUFBRSxLQUFLLElBQUksV0FBVyxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBRWxFOzs7Ozs7Ozs7O0dBVUc7QUFDSCxNQUFNLENBQUMsTUFBTSw0QkFBNEIsR0FBRyxNQUFNLENBQUMsRUFBRSxDQUFDLGdDQUFnQyxDQUFDLENBQUMsUUFBUSxDQUFDO0lBQy9GLE1BQU0sRUFBRSxHQUFHLEtBQUssQ0FBQyxDQUFDLFVBQVUsQ0FBQyxVQUFVLENBQUE7SUFDdkMsTUFBTSxJQUFJLEdBQUcsS0FBSyxDQUFDLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQTtJQUU3QixPQUFPLE1BQU0sQ0FBQyxFQUFFLENBQUMsd0NBQXdDLENBQUMsQ0FBQyxRQUFRLENBQ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n0=
package/dist/gist.d.ts CHANGED
@@ -1,63 +1,39 @@
1
- import { FileSystem, Path } from "@effect/platform";
2
- import { Effect, ParseResult, Schema } from "effect";
1
+ import { Config, Effect, FileSystem, Layer, Path, Schema, ServiceMap } from "effect";
3
2
  import { RunCommandService } from "./os-command.js";
4
- declare const GistError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
3
+ declare const GistError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").MatchRecord<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }, void, { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
5
4
  readonly _tag: "GistError";
6
5
  } & Readonly<A>;
7
6
  export declare class GistError extends GistError_base<{
8
7
  message: string;
9
8
  }> {
10
9
  }
11
- declare const GistEntry_base: Schema.Class<GistEntry, {
12
- description: typeof Schema.String;
13
- public: typeof Schema.Boolean;
14
- company: typeof Schema.String;
15
- files: Schema.Array$<typeof Schema.String>;
16
- }, Schema.Struct.Encoded<{
17
- description: typeof Schema.String;
18
- public: typeof Schema.Boolean;
19
- company: typeof Schema.String;
20
- files: Schema.Array$<typeof Schema.String>;
21
- }>, never, {
22
- readonly description: string;
23
- } & {
24
- readonly public: boolean;
25
- } & {
26
- readonly company: string;
27
- } & {
28
- readonly files: readonly string[];
29
- }, {}, {}>;
10
+ declare const GistEntry_base: Schema.ExtendableClass<GistEntry, Schema.Struct<{
11
+ readonly description: Schema.String;
12
+ readonly public: Schema.Boolean;
13
+ readonly company: Schema.String;
14
+ readonly files: Schema.$Array<Schema.String>;
15
+ }>, {}>;
30
16
  export declare class GistEntry extends GistEntry_base {
31
17
  }
32
- declare const GistEntryDecoded_base: Schema.Class<GistEntryDecoded, {
33
- description: typeof Schema.String;
34
- public: typeof Schema.Boolean;
35
- company: typeof Schema.String;
36
- files: Schema.Array$<typeof Schema.String>;
37
- } & {
38
- files_with_name: Schema.Array$<Schema.Struct<{
39
- path: typeof Schema.String;
40
- name: typeof Schema.String;
18
+ declare const GistEntryDecoded_base: Schema.Opaque<GistEntryDecoded, Schema.decodeTo<Schema.Struct<{
19
+ readonly description: Schema.String;
20
+ readonly public: Schema.Boolean;
21
+ readonly company: Schema.String;
22
+ readonly files: Schema.$Array<Schema.String>;
23
+ readonly files_with_name: Schema.$Array<Schema.Struct<{
24
+ readonly path: Schema.String;
25
+ readonly name: Schema.String;
41
26
  }>>;
42
- }, Schema.Struct.Encoded<{
43
- description: typeof Schema.String;
44
- public: typeof Schema.Boolean;
45
- company: typeof Schema.String;
46
- files: Schema.Array$<typeof Schema.String>;
47
- }>, never, {
48
- readonly description: string;
49
- } & {
50
- readonly public: boolean;
51
- } & {
52
- readonly company: string;
53
- } & {
54
- readonly files: readonly string[];
55
- } & {
56
- readonly files_with_name: readonly {
57
- readonly name: string;
58
- readonly path: string;
59
- }[];
60
- }, GistEntry, {}>;
27
+ }>, typeof GistEntry, never, never>, {}> & Omit<Schema.decodeTo<Schema.Struct<{
28
+ readonly description: Schema.String;
29
+ readonly public: Schema.Boolean;
30
+ readonly company: Schema.String;
31
+ readonly files: Schema.$Array<Schema.String>;
32
+ readonly files_with_name: Schema.$Array<Schema.Struct<{
33
+ readonly path: Schema.String;
34
+ readonly name: Schema.String;
35
+ }>>;
36
+ }>, typeof GistEntry, never, never>, "Type">;
61
37
  /**
62
38
  * Extended gist entry that validates file_name uniqueness and extracts base filenames.
63
39
  *
@@ -81,56 +57,26 @@ declare const GistEntryDecoded_base: Schema.Class<GistEntryDecoded, {
81
57
  */
82
58
  export declare class GistEntryDecoded extends GistEntryDecoded_base {
83
59
  }
84
- declare const GistYAML_base: Schema.Class<GistYAML, {
85
- gists: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof GistEntryDecoded>, {
86
- default: () => {};
87
- nullable: true;
88
- exact: true;
89
- }>;
90
- settings: Schema.Struct<{
91
- token_env: typeof Schema.String;
92
- base_directory: typeof Schema.String;
93
- }>;
94
- }, Schema.Struct.Encoded<{
95
- gists: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof GistEntryDecoded>, {
96
- default: () => {};
97
- nullable: true;
98
- exact: true;
60
+ declare const GistYAML_base: Schema.ExtendableClass<GistYAML, Schema.Struct<{
61
+ readonly gists: Schema.optional<Schema.NullOr<Schema.$Record<Schema.String, typeof GistEntryDecoded>>>;
62
+ readonly settings: Schema.Struct<{
63
+ readonly token_env: Schema.String;
64
+ readonly base_directory: Schema.String;
99
65
  }>;
100
- settings: Schema.Struct<{
101
- token_env: typeof Schema.String;
102
- base_directory: typeof Schema.String;
103
- }>;
104
- }>, never, {
105
- readonly gists?: {
106
- readonly [x: string]: GistEntryDecoded;
107
- };
108
- } & {
109
- readonly settings: {
110
- readonly token_env: string;
111
- readonly base_directory: string;
112
- };
113
- }, {}, {}>;
66
+ }>, {}>;
114
67
  export declare class GistYAML extends GistYAML_base {
115
68
  }
116
- declare const GistCacheEntry_base: Schema.Class<GistCacheEntry, {
117
- name: typeof Schema.String;
118
- id: typeof Schema.String;
119
- }, Schema.Struct.Encoded<{
120
- name: typeof Schema.String;
121
- id: typeof Schema.String;
122
- }>, never, {
123
- readonly name: string;
124
- } & {
125
- readonly id: string;
126
- }, {}, {}>;
69
+ declare const GistCacheEntry_base: Schema.ExtendableClass<GistCacheEntry, Schema.Struct<{
70
+ readonly name: Schema.String;
71
+ readonly id: Schema.String;
72
+ }>, {}>;
127
73
  /**
128
74
  * Cache entry representing a gist mapping.
129
75
  * Each entry contains the gist's human-readable name and GitHub ID.
130
76
  */
131
77
  export declare class GistCacheEntry extends GistCacheEntry_base {
132
78
  }
133
- export declare const GistCacheEntries: Schema.Array$<typeof GistCacheEntry>;
79
+ export declare const GistCacheEntries: Schema.$Array<typeof GistCacheEntry>;
134
80
  export interface GistCacheEntries extends Schema.Schema.Type<typeof GistCacheEntries> {
135
81
  }
136
82
  /**
@@ -157,7 +103,7 @@ export declare class GistCache {
157
103
  company: string;
158
104
  });
159
105
  }
160
- declare const GistCacheOfCompanyNotFound_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
106
+ declare const GistCacheOfCompanyNotFound_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").MatchRecord<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }, void, { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
161
107
  readonly _tag: "GistCacheOfCompanyNotFound";
162
108
  } & Readonly<A>;
163
109
  declare class GistCacheOfCompanyNotFound extends GistCacheOfCompanyNotFound_base<{
@@ -165,16 +111,141 @@ declare class GistCacheOfCompanyNotFound extends GistCacheOfCompanyNotFound_base
165
111
  readonly cache_gist_id: string;
166
112
  }> {
167
113
  }
168
- declare const GistYAMLError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
114
+ declare const GistYAMLError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").MatchRecord<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }, void, { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
169
115
  readonly _tag: "GistYAMLError";
170
116
  } & Readonly<A>;
171
117
  declare class GistYAMLError extends GistYAMLError_base<{
172
118
  readonly message: string;
173
119
  }> {
174
120
  }
175
- declare const GHGistService_base: Effect.Service.Class<GHGistService, "GHGistService", {
176
- readonly dependencies: readonly [import("effect/Layer").Layer<RunCommandService, never, import("@effect/platform/CommandExecutor").CommandExecutor>];
177
- readonly effect: Effect.Effect<{
121
+ declare const GHGistService_base: ServiceMap.ServiceClass<GHGistService, "GHGistService", {
122
+ /** Logs into GitHub using the GitHub CLI.
123
+ * This is a prerequisite for other gist operations.
124
+ * @param token - The GitHub personal access token with gist permissions
125
+ *
126
+ * @returns An Effect that succeeds when login is successful
127
+ */
128
+ login: (token: string) => Effect.Effect<undefined, GistError, never>;
129
+ /**
130
+ * Loads the gist cache from GitHub, containing mappings of YAML configuration names to gist IDs.
131
+ * If no cache exists, creates a new empty cache gist.
132
+ *
133
+ * @returns An Effect that yields a GistCache containing the loaded cache entries and cache gist ID
134
+ */
135
+ loadGistCache: (company: string, rec?: {
136
+ recCache?: boolean;
137
+ recCacheCompany?: boolean;
138
+ }) => Effect.Effect<GistCache, GistCacheOfCompanyNotFound, never>;
139
+ /**
140
+ * Saves the current gist cache state to the GitHub cache gist.
141
+ * Updates the existing cache gist with the current mappings of names to gist IDs.
142
+ *
143
+ * @param cache - The GistCache instance to save
144
+ * @returns An Effect that succeeds when the cache is successfully saved
145
+ */
146
+ saveGistCache: (cache: GistCache) => Effect.Effect<void, never, never>;
147
+ /**
148
+ * Creates a new GitHub gist with the specified files and renames them with environment prefixes.
149
+ * Generates a GitHub CLI command to create the gist, extracts the resulting gist ID,
150
+ * and renames all files with environment prefixes for multi-environment support.
151
+ *
152
+ * @param gist_name - The human-readable name for this gist (used in cache mapping)
153
+ * @param description - The description for the GitHub gist
154
+ * @param files - Array of file objects with path and name properties to include in the gist
155
+ * @param is_public - Whether the gist should be public or private
156
+ * @param env - Environment prefix to prepend to file names (e.g., "local-dev", "prod")
157
+ * @returns An Effect that yields a gist entry object with name and id properties
158
+ */
159
+ createGistWithFiles: (args_0: {
160
+ gist_name: string;
161
+ description: string;
162
+ files: {
163
+ path: string;
164
+ name: string;
165
+ }[];
166
+ is_public: boolean;
167
+ env: string;
168
+ }) => Effect.Effect<{
169
+ name: string;
170
+ id: string;
171
+ }, never, never>;
172
+ /**
173
+ * Retrieves file names from a GitHub gist, filtered by environment prefix.
174
+ * Fetches the list of files contained in the specified gist and returns only
175
+ * those that match the current environment, with the environment prefix removed.
176
+ *
177
+ * @param gist_id - The GitHub gist ID to retrieve file names from
178
+ * @param gist_name - The human-readable name of the gist (for logging purposes)
179
+ * @param env - Environment prefix to filter files by (e.g., "local-dev", "prod")
180
+ * @returns An Effect that yields an array of file names with environment prefix removed
181
+ */
182
+ getGistFileNames: (args_0: {
183
+ gist_id: string;
184
+ gist_name: string;
185
+ env: string;
186
+ }) => Effect.Effect<string[], never, never>;
187
+ /**
188
+ * Removes a file from a specified GitHub gist.
189
+ * The file name is automatically prefixed with the environment when removing.
190
+ * @param gist_id - The ID of the gist to modify
191
+ * @param gist_name - The human-readable name of the gist (for logging purposes)
192
+ * @param file_name - The base name of the file to remove (without environment prefix)
193
+ * @param env - Environment prefix that was used when the file was added
194
+ * @returns An Effect that succeeds when the file is removed
195
+ */
196
+ removeFileFromGist: (args_0: {
197
+ gist_id: string;
198
+ gist_name: string;
199
+ file_name: string;
200
+ env: string;
201
+ }) => Effect.Effect<void, never, never>;
202
+ /**
203
+ * Updates a file in a specified GitHub gist.
204
+ * The file name is automatically prefixed with the environment when updating.
205
+ * @param gist_id - The ID of the gist to modify
206
+ * @param gist_name - The human-readable name of the gist (for logging purposes)
207
+ * @param file_name - The base name of the file to update (without environment prefix)
208
+ * @param file_path - The local path of the file to update in the gist
209
+ * @param env - Environment prefix that was used when the file was added
210
+ * @returns An Effect that succeeds when the file is updated
211
+ */
212
+ updateFileOfGist: (args_0: {
213
+ gist_id: string;
214
+ gist_name: string;
215
+ file_name: string;
216
+ file_path: string;
217
+ env: string;
218
+ }) => Effect.Effect<void, never, never>;
219
+ /**
220
+ * Adds a new file to a specified GitHub gist.
221
+ * The file is automatically renamed with an environment prefix for multi-environment support.
222
+ * @param gist_id - The ID of the gist to modify
223
+ * @param gist_name - The human-readable name of the gist (for logging purposes)
224
+ * @param file - The file object containing path and name properties
225
+ * @param env - Environment prefix to prepend to the file name
226
+ * @returns An Effect that succeeds when the file is added and renamed
227
+ */
228
+ addFileToGist: (args_0: {
229
+ gist_id: string;
230
+ gist_name: string;
231
+ file: {
232
+ path: string;
233
+ name: string;
234
+ };
235
+ env: string;
236
+ }) => Effect.Effect<void, never, never>;
237
+ /**
238
+ * Deletes a specified GitHub gist by its ID.
239
+ * @param gist_id - The ID of the gist to delete
240
+ * @param gist_name - The human-readable name of the gist (for logging purposes)
241
+ * @returns An Effect that succeeds when the gist is deleted
242
+ */
243
+ deleteGist: (args_0: {
244
+ gist_id: string;
245
+ gist_name: string;
246
+ }) => Effect.Effect<void, never, never>;
247
+ }> & {
248
+ readonly make: Effect.Effect<{
178
249
  /** Logs into GitHub using the GitHub CLI.
179
250
  * This is a prerequisite for other gist operations.
180
251
  * @param token - The GitHub personal access token with gist permissions
@@ -301,19 +372,25 @@ declare const GHGistService_base: Effect.Service.Class<GHGistService, "GHGistSer
301
372
  gist_name: string;
302
373
  }) => Effect.Effect<void, never, never>;
303
374
  }, never, RunCommandService>;
304
- }>;
375
+ };
305
376
  declare class GHGistService extends GHGistService_base {
377
+ static DefaultWithoutDependencies: Layer.Layer<GHGistService, never, RunCommandService>;
378
+ static Default: Layer.Layer<GHGistService, never, import("effect/unstable/process/ChildProcessSpawner").ChildProcessSpawner>;
306
379
  }
307
- declare const GistHandler_base: Effect.Service.Class<GistHandler, "GistHandler", {
308
- readonly accessors: true;
309
- readonly dependencies: readonly [import("effect/Layer").Layer<GHGistService, never, import("@effect/platform/CommandExecutor").CommandExecutor>];
310
- readonly effect: Effect.Effect<{
380
+ declare const GistHandler_base: ServiceMap.ServiceClass<GistHandler, "GistHandler", {
381
+ handler: (args_0: {
382
+ YAMLPath: string;
383
+ }) => Effect.Effect<undefined, import("effect/PlatformError").PlatformError | GistError | GistCacheOfCompanyNotFound | GistYAMLError | Schema.SchemaError | Config.ConfigError, never>;
384
+ }> & {
385
+ readonly make: Effect.Effect<{
311
386
  handler: (args_0: {
312
387
  YAMLPath: string;
313
- }) => Effect.Effect<undefined, import("@effect/platform/Error").PlatformError | GistError | GistCacheOfCompanyNotFound | GistYAMLError | ParseResult.ParseError | import("effect/ConfigError").ConfigError, never>;
388
+ }) => Effect.Effect<undefined, import("effect/PlatformError").PlatformError | GistError | GistCacheOfCompanyNotFound | GistYAMLError | Schema.SchemaError | Config.ConfigError, never>;
314
389
  }, never, Path.Path | FileSystem.FileSystem | GHGistService>;
315
- }>;
390
+ };
316
391
  export declare class GistHandler extends GistHandler_base {
392
+ static DefaultWithoutDependencies: Layer.Layer<GistHandler, never, Path.Path | FileSystem.FileSystem | GHGistService>;
393
+ static Default: Layer.Layer<GistHandler, never, Path.Path | FileSystem.FileSystem | import("effect/unstable/process/ChildProcessSpawner").ChildProcessSpawner>;
317
394
  }
318
395
  export {};
319
396
  //# sourceMappingURL=gist.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gist.d.ts","sourceRoot":"","sources":["../src/gist.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAuB,MAAM,EAAU,WAAW,EAAkB,MAAM,EAAmB,MAAM,QAAQ,CAAA;AAIlH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;;;;AAEnD,qBAAa,SAAU,SAAQ,eAA8B;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;CAAG;;;;;;;;;;;;;;;;;;;;AAOpF,qBAAa,SAAU,SAAQ,cAK7B;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,gBAAiB,SAAQ,qBAoDpC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL,qBAAa,QAAS,SAAQ,aAe5B;CAAG;;;;;;;;;;;;AAEL;;;GAGG;AACH,qBAAa,cAAe,SAAQ,mBAGlC;CAAG;AAEL,eAAO,MAAM,gBAAgB,sCAA+B,CAAA;AAC5D,MAAM,WAAW,gBAAiB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAA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