@fluid-app/fluid-cli-themes 0.1.30 → 0.1.32
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/dist/index.mjs +2 -1
- package/package.json +34 -6
- package/src/generated/index.ts +1 -4
- package/src/generated/primary.ts +29 -99
- package/src/generated/region-rules.ts +12 -30
- package/src/generated/resources.ts +7 -29
- package/src/generated/root-themes.ts +10 -18
- package/src/generated/templates.ts +49 -177
- package/.turbo/turbo-build.log +0 -18
- package/.turbo/turbo-typecheck.log +0 -4
- package/dist/index.d.mts +0 -7
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -357,12 +357,13 @@ function registerTemplates(parent, ctx) {
|
|
|
357
357
|
//#region src/generated/root-themes.ts
|
|
358
358
|
function registerRootThemes(parent, ctx) {
|
|
359
359
|
const resource = parent.command("root-themes").description("root-themes");
|
|
360
|
-
resource.command("list").description("List root themes").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of records per page").option("--status <value>", "Filter themes by status of their versions (draft, publishing, rejected, published)").action(async (opts) => {
|
|
360
|
+
resource.command("list").description("List root themes").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of records per page").option("--status <value>", "Filter themes by status of their versions (draft, publishing, rejected, published)").option("--search-query <value>", "Search themes by name").action(async (opts) => {
|
|
361
361
|
const client = await ctx.getClient();
|
|
362
362
|
const params = {};
|
|
363
363
|
if (opts.page !== void 0) params["page"] = Number(opts.page);
|
|
364
364
|
if (opts.perPage !== void 0) params["per_page"] = Number(opts.perPage);
|
|
365
365
|
if (opts.status !== void 0) params["status"] = opts.status;
|
|
366
|
+
if (opts.searchQuery !== void 0) params["search_query"] = opts.searchQuery;
|
|
366
367
|
if (ctx.verbose) process.stderr.write("GET /api/root_themes\n");
|
|
367
368
|
const result = await client.get(`/api/root_themes`, params);
|
|
368
369
|
ctx.output(result);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-app/fluid-cli-themes",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"description": "Fluid CLI commands for theme management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -17,20 +17,48 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"@fluid-app/fluid-cli": "0.1.30",
|
|
21
|
+
"commander": "^12.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
+
"@fluid-app/api-client-scripts": "0.0.0",
|
|
25
|
+
"@fluid-app/typescript-config": "0.0.0",
|
|
24
26
|
"@types/node": "24.10.12",
|
|
25
27
|
"tsdown": "^0.21.0",
|
|
26
28
|
"tsx": "^4.21.0",
|
|
27
|
-
"typescript": "^5"
|
|
28
|
-
"@fluid-app/api-client-scripts": "0.0.0",
|
|
29
|
-
"@fluid-app/typescript-config": "0.0.0"
|
|
29
|
+
"typescript": "^5"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=18.0.0"
|
|
33
33
|
},
|
|
34
|
+
"nx": {
|
|
35
|
+
"implicitDependencies": [
|
|
36
|
+
"@fluid-app/fluid-cli-specs"
|
|
37
|
+
],
|
|
38
|
+
"targets": {
|
|
39
|
+
"typecheck": {
|
|
40
|
+
"dependsOn": [
|
|
41
|
+
{
|
|
42
|
+
"target": "build",
|
|
43
|
+
"projects": [
|
|
44
|
+
"@fluid-app/fluid-cli"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"build": {
|
|
50
|
+
"dependsOn": [
|
|
51
|
+
"typecheck",
|
|
52
|
+
{
|
|
53
|
+
"target": "build",
|
|
54
|
+
"projects": [
|
|
55
|
+
"@fluid-app/fluid-cli"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
34
62
|
"scripts": {
|
|
35
63
|
"build": "tsdown",
|
|
36
64
|
"dev": "tsdown --watch",
|
package/src/generated/index.ts
CHANGED
|
@@ -8,10 +8,7 @@ import { registerTemplates } from "./templates.js";
|
|
|
8
8
|
import { registerRootThemes } from "./root-themes.js";
|
|
9
9
|
import { registerRegionRules } from "./region-rules.js";
|
|
10
10
|
|
|
11
|
-
export function registerAllCommands(
|
|
12
|
-
parent: Command,
|
|
13
|
-
ctx: CommandContext,
|
|
14
|
-
): void {
|
|
11
|
+
export function registerAllCommands(parent: Command, ctx: CommandContext): void {
|
|
15
12
|
registerPrimary(parent, ctx);
|
|
16
13
|
registerResources(parent, ctx);
|
|
17
14
|
registerTemplates(parent, ctx);
|
package/src/generated/primary.ts
CHANGED
|
@@ -10,36 +10,22 @@ function parseBooleanOption(value: string, flag: string): boolean {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
13
|
+
|
|
13
14
|
parent
|
|
14
15
|
.command("list")
|
|
15
16
|
.description("List application themes")
|
|
16
17
|
.option("--page <value>", "Page number for pagination")
|
|
17
18
|
.option("--per-page <value>", "Number of records per page")
|
|
18
|
-
.option(
|
|
19
|
-
|
|
20
|
-
"If true, returns root themes instead of company-specific themes",
|
|
21
|
-
)
|
|
22
|
-
.option(
|
|
23
|
-
"--include-default-home-template <value>",
|
|
24
|
-
"If true, includes each theme's default home page template ID in the response",
|
|
25
|
-
)
|
|
19
|
+
.option("--root-themes <value>", "If true, returns root themes instead of company-specific themes")
|
|
20
|
+
.option("--include-default-home-template <value>", "If true, includes each theme's default home page template ID in the response")
|
|
26
21
|
.action(async (opts) => {
|
|
27
22
|
const client = await ctx.getClient();
|
|
28
23
|
const params: Record<string, unknown> = {};
|
|
29
24
|
if (opts.page !== undefined) params["page"] = Number(opts.page);
|
|
30
25
|
if (opts.perPage !== undefined) params["per_page"] = Number(opts.perPage);
|
|
31
|
-
if (opts.rootThemes !== undefined)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"--root-themes",
|
|
35
|
-
);
|
|
36
|
-
if (opts.includeDefaultHomeTemplate !== undefined)
|
|
37
|
-
params["include_default_home_template"] = parseBooleanOption(
|
|
38
|
-
opts.includeDefaultHomeTemplate,
|
|
39
|
-
"--include-default-home-template",
|
|
40
|
-
);
|
|
41
|
-
if (ctx.verbose)
|
|
42
|
-
process.stderr.write("GET " + `/api/application_themes` + "\n");
|
|
26
|
+
if (opts.rootThemes !== undefined) params["root_themes"] = parseBooleanOption(opts.rootThemes, "--root-themes");
|
|
27
|
+
if (opts.includeDefaultHomeTemplate !== undefined) params["include_default_home_template"] = parseBooleanOption(opts.includeDefaultHomeTemplate, "--include-default-home-template");
|
|
28
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_themes` + "\n");
|
|
43
29
|
const result = await client.get(`/api/application_themes`, params);
|
|
44
30
|
ctx.output(result);
|
|
45
31
|
});
|
|
@@ -58,8 +44,7 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
58
44
|
} else if (opts.body) {
|
|
59
45
|
body = ctx.parseBody(opts.body);
|
|
60
46
|
}
|
|
61
|
-
if (ctx.verbose)
|
|
62
|
-
process.stderr.write("POST " + `/api/application_themes` + "\n");
|
|
47
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/application_themes` + "\n");
|
|
63
48
|
const result = await client.post(`/api/application_themes`, body);
|
|
64
49
|
ctx.output(result);
|
|
65
50
|
});
|
|
@@ -72,8 +57,7 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
72
57
|
const client = await ctx.getClient();
|
|
73
58
|
const params: Record<string, unknown> = {};
|
|
74
59
|
if (opts.version !== undefined) params["version"] = Number(opts.version);
|
|
75
|
-
if (ctx.verbose)
|
|
76
|
-
process.stderr.write("GET " + `/api/application_themes/${id}` + "\n");
|
|
60
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_themes/${id}` + "\n");
|
|
77
61
|
const result = await client.get(`/api/application_themes/${id}`, params);
|
|
78
62
|
ctx.output(result);
|
|
79
63
|
});
|
|
@@ -92,8 +76,7 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
92
76
|
} else if (opts.body) {
|
|
93
77
|
body = ctx.parseBody(opts.body);
|
|
94
78
|
}
|
|
95
|
-
if (ctx.verbose)
|
|
96
|
-
process.stderr.write("PATCH " + `/api/application_themes/${id}` + "\n");
|
|
79
|
+
if (ctx.verbose) process.stderr.write("PATCH " + `/api/application_themes/${id}` + "\n");
|
|
97
80
|
const result = await client.patch(`/api/application_themes/${id}`, body);
|
|
98
81
|
ctx.output(result);
|
|
99
82
|
});
|
|
@@ -103,10 +86,7 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
103
86
|
.description("Delete an application theme")
|
|
104
87
|
.action(async (id) => {
|
|
105
88
|
const client = await ctx.getClient();
|
|
106
|
-
if (ctx.verbose)
|
|
107
|
-
process.stderr.write(
|
|
108
|
-
"DELETE " + `/api/application_themes/${id}` + "\n",
|
|
109
|
-
);
|
|
89
|
+
if (ctx.verbose) process.stderr.write("DELETE " + `/api/application_themes/${id}` + "\n");
|
|
110
90
|
const result = await client.delete(`/api/application_themes/${id}`);
|
|
111
91
|
ctx.output(result);
|
|
112
92
|
});
|
|
@@ -116,10 +96,7 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
116
96
|
.description("Clone an application theme")
|
|
117
97
|
.action(async (id) => {
|
|
118
98
|
const client = await ctx.getClient();
|
|
119
|
-
if (ctx.verbose)
|
|
120
|
-
process.stderr.write(
|
|
121
|
-
"POST " + `/api/application_themes/${id}/clone` + "\n",
|
|
122
|
-
);
|
|
99
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/application_themes/${id}/clone` + "\n");
|
|
123
100
|
const result = await client.post(`/api/application_themes/${id}/clone`);
|
|
124
101
|
ctx.output(result);
|
|
125
102
|
});
|
|
@@ -129,13 +106,8 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
129
106
|
.description("Get theme assets")
|
|
130
107
|
.action(async (id) => {
|
|
131
108
|
const client = await ctx.getClient();
|
|
132
|
-
if (ctx.verbose)
|
|
133
|
-
|
|
134
|
-
"GET " + `/api/application_themes/${id}/theme_assets` + "\n",
|
|
135
|
-
);
|
|
136
|
-
const result = await client.get(
|
|
137
|
-
`/api/application_themes/${id}/theme_assets`,
|
|
138
|
-
);
|
|
109
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_themes/${id}/theme_assets` + "\n");
|
|
110
|
+
const result = await client.get(`/api/application_themes/${id}/theme_assets`);
|
|
139
111
|
ctx.output(result);
|
|
140
112
|
});
|
|
141
113
|
|
|
@@ -144,8 +116,7 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
144
116
|
.description("Get current active application theme")
|
|
145
117
|
.action(async () => {
|
|
146
118
|
const client = await ctx.getClient();
|
|
147
|
-
if (ctx.verbose)
|
|
148
|
-
process.stderr.write("GET " + `/api/application_themes/active` + "\n");
|
|
119
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_themes/active` + "\n");
|
|
149
120
|
const result = await client.get(`/api/application_themes/active`);
|
|
150
121
|
ctx.output(result);
|
|
151
122
|
});
|
|
@@ -155,10 +126,7 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
155
126
|
.description("Import an application theme")
|
|
156
127
|
.action(async (id) => {
|
|
157
128
|
const client = await ctx.getClient();
|
|
158
|
-
if (ctx.verbose)
|
|
159
|
-
process.stderr.write(
|
|
160
|
-
"POST " + `/api/application_themes/${id}/import` + "\n",
|
|
161
|
-
);
|
|
129
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/application_themes/${id}/import` + "\n");
|
|
162
130
|
const result = await client.post(`/api/application_themes/${id}/import`);
|
|
163
131
|
ctx.output(result);
|
|
164
132
|
});
|
|
@@ -168,10 +136,7 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
168
136
|
.description("Export an application theme")
|
|
169
137
|
.action(async (id) => {
|
|
170
138
|
const client = await ctx.getClient();
|
|
171
|
-
if (ctx.verbose)
|
|
172
|
-
process.stderr.write(
|
|
173
|
-
"GET " + `/api/application_themes/${id}/export` + "\n",
|
|
174
|
-
);
|
|
139
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_themes/${id}/export` + "\n");
|
|
175
140
|
const result = await client.get(`/api/application_themes/${id}/export`);
|
|
176
141
|
ctx.output(result);
|
|
177
142
|
});
|
|
@@ -190,14 +155,8 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
190
155
|
} else if (opts.body) {
|
|
191
156
|
body = ctx.parseBody(opts.body);
|
|
192
157
|
}
|
|
193
|
-
if (ctx.verbose)
|
|
194
|
-
|
|
195
|
-
"POST " + `/api/application_themes/import_zip` + "\n",
|
|
196
|
-
);
|
|
197
|
-
const result = await client.post(
|
|
198
|
-
`/api/application_themes/import_zip`,
|
|
199
|
-
body,
|
|
200
|
-
);
|
|
158
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/application_themes/import_zip` + "\n");
|
|
159
|
+
const result = await client.post(`/api/application_themes/import_zip`, body);
|
|
201
160
|
ctx.output(result);
|
|
202
161
|
});
|
|
203
162
|
|
|
@@ -209,37 +168,21 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
209
168
|
const client = await ctx.getClient();
|
|
210
169
|
const params: Record<string, unknown> = {};
|
|
211
170
|
if (opts.version !== undefined) params["version"] = Number(opts.version);
|
|
212
|
-
if (ctx.verbose)
|
|
213
|
-
|
|
214
|
-
"GET " + `/api/application_themes/${id}/version_diff` + "\n",
|
|
215
|
-
);
|
|
216
|
-
const result = await client.get(
|
|
217
|
-
`/api/application_themes/${id}/version_diff`,
|
|
218
|
-
params,
|
|
219
|
-
);
|
|
171
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_themes/${id}/version_diff` + "\n");
|
|
172
|
+
const result = await client.get(`/api/application_themes/${id}/version_diff`, params);
|
|
220
173
|
ctx.output(result);
|
|
221
174
|
});
|
|
222
175
|
|
|
223
176
|
parent
|
|
224
177
|
.command("publish <id>")
|
|
225
178
|
.description("Publishes the theme")
|
|
226
|
-
.option(
|
|
227
|
-
"--version <value>",
|
|
228
|
-
"Version of the theme template to publish. If not specified, the latest version will be published.",
|
|
229
|
-
)
|
|
179
|
+
.option("--version <value>", "Version of the theme template to publish. If not specified, the latest version will be published.")
|
|
230
180
|
.action(async (id, opts) => {
|
|
231
181
|
const client = await ctx.getClient();
|
|
232
182
|
const params: Record<string, unknown> = {};
|
|
233
183
|
if (opts.version !== undefined) params["version"] = opts.version;
|
|
234
|
-
if (ctx.verbose)
|
|
235
|
-
|
|
236
|
-
"POST " + `/api/application_themes/${id}/publish` + "\n",
|
|
237
|
-
);
|
|
238
|
-
const result = await client.post(
|
|
239
|
-
`/api/application_themes/${id}/publish`,
|
|
240
|
-
undefined,
|
|
241
|
-
{ params },
|
|
242
|
-
);
|
|
184
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/application_themes/${id}/publish` + "\n");
|
|
185
|
+
const result = await client.post(`/api/application_themes/${id}/publish`, undefined, { params });
|
|
243
186
|
ctx.output(result);
|
|
244
187
|
});
|
|
245
188
|
|
|
@@ -248,23 +191,15 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
248
191
|
.description("Upgrade an application theme")
|
|
249
192
|
.action(async (id) => {
|
|
250
193
|
const client = await ctx.getClient();
|
|
251
|
-
if (ctx.verbose)
|
|
252
|
-
process.stderr.write(
|
|
253
|
-
"POST " + `/api/application_themes/${id}/upgrade` + "\n",
|
|
254
|
-
);
|
|
194
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/application_themes/${id}/upgrade` + "\n");
|
|
255
195
|
const result = await client.post(`/api/application_themes/${id}/upgrade`);
|
|
256
196
|
ctx.output(result);
|
|
257
197
|
});
|
|
258
198
|
|
|
259
199
|
parent
|
|
260
200
|
.command("available-themeables <id>")
|
|
261
|
-
.description(
|
|
262
|
-
|
|
263
|
-
)
|
|
264
|
-
.option(
|
|
265
|
-
"--themeable <value>",
|
|
266
|
-
"The themeable type to list (e.g. product, medium, page)",
|
|
267
|
-
)
|
|
201
|
+
.description("Returns available themeables for a given type scoped to the theme's company")
|
|
202
|
+
.option("--themeable <value>", "The themeable type to list (e.g. product, medium, page)")
|
|
268
203
|
.option("--search <value>", "Filter themeables by title")
|
|
269
204
|
.option("--page <value>", "Page number for pagination")
|
|
270
205
|
.option("--per-page <value>", "Number of items per page")
|
|
@@ -275,14 +210,9 @@ export function registerPrimary(parent: Command, ctx: CommandContext): void {
|
|
|
275
210
|
if (opts.search !== undefined) params["search"] = opts.search;
|
|
276
211
|
if (opts.page !== undefined) params["page"] = Number(opts.page);
|
|
277
212
|
if (opts.perPage !== undefined) params["per_page"] = Number(opts.perPage);
|
|
278
|
-
if (ctx.verbose)
|
|
279
|
-
|
|
280
|
-
"GET " + `/api/application_themes/${id}/available_themeables` + "\n",
|
|
281
|
-
);
|
|
282
|
-
const result = await client.get(
|
|
283
|
-
`/api/application_themes/${id}/available_themeables`,
|
|
284
|
-
params,
|
|
285
|
-
);
|
|
213
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_themes/${id}/available_themeables` + "\n");
|
|
214
|
+
const result = await client.get(`/api/application_themes/${id}/available_themeables`, params);
|
|
286
215
|
ctx.output(result);
|
|
287
216
|
});
|
|
217
|
+
|
|
288
218
|
}
|
|
@@ -9,20 +9,14 @@ function parseBooleanOption(value: string, flag: string): boolean {
|
|
|
9
9
|
throw new Error(`Invalid value for ${flag}: ${value}. Expected true/false.`);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export function registerRegionRules(
|
|
13
|
-
parent: Command,
|
|
14
|
-
ctx: CommandContext,
|
|
15
|
-
): void {
|
|
12
|
+
export function registerRegionRules(parent: Command, ctx: CommandContext): void {
|
|
16
13
|
const resource = parent.command("region-rules").description("region-rules");
|
|
17
14
|
|
|
18
15
|
resource
|
|
19
16
|
.command("list")
|
|
20
17
|
.description("List theme region rules")
|
|
21
18
|
.option("--company-id <value>", "Filter by company ID")
|
|
22
|
-
.option(
|
|
23
|
-
"--application-theme-template-id <value>",
|
|
24
|
-
"Filter by application theme template ID",
|
|
25
|
-
)
|
|
19
|
+
.option("--application-theme-template-id <value>", "Filter by application theme template ID")
|
|
26
20
|
.option("--route-path <value>", "Filter by route path")
|
|
27
21
|
.option("--region-code <value>", "Filter by region code")
|
|
28
22
|
.option("--active <value>", "Filter by active status")
|
|
@@ -31,21 +25,14 @@ export function registerRegionRules(
|
|
|
31
25
|
.action(async (opts) => {
|
|
32
26
|
const client = await ctx.getClient();
|
|
33
27
|
const params: Record<string, unknown> = {};
|
|
34
|
-
if (opts.companyId !== undefined)
|
|
35
|
-
|
|
36
|
-
if (opts.applicationThemeTemplateId !== undefined)
|
|
37
|
-
params["application_theme_template_id"] = Number(
|
|
38
|
-
opts.applicationThemeTemplateId,
|
|
39
|
-
);
|
|
28
|
+
if (opts.companyId !== undefined) params["company_id"] = Number(opts.companyId);
|
|
29
|
+
if (opts.applicationThemeTemplateId !== undefined) params["application_theme_template_id"] = Number(opts.applicationThemeTemplateId);
|
|
40
30
|
if (opts.routePath !== undefined) params["route_path"] = opts.routePath;
|
|
41
|
-
if (opts.regionCode !== undefined)
|
|
42
|
-
|
|
43
|
-
if (opts.active !== undefined)
|
|
44
|
-
params["active"] = parseBooleanOption(opts.active, "--active");
|
|
31
|
+
if (opts.regionCode !== undefined) params["region_code"] = opts.regionCode;
|
|
32
|
+
if (opts.active !== undefined) params["active"] = parseBooleanOption(opts.active, "--active");
|
|
45
33
|
if (opts.page !== undefined) params["page"] = Number(opts.page);
|
|
46
34
|
if (opts.perPage !== undefined) params["per_page"] = Number(opts.perPage);
|
|
47
|
-
if (ctx.verbose)
|
|
48
|
-
process.stderr.write("GET " + `/api/theme_region_rules` + "\n");
|
|
35
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/theme_region_rules` + "\n");
|
|
49
36
|
const result = await client.get(`/api/theme_region_rules`, params);
|
|
50
37
|
ctx.output(result);
|
|
51
38
|
});
|
|
@@ -64,8 +51,7 @@ export function registerRegionRules(
|
|
|
64
51
|
} else if (opts.body) {
|
|
65
52
|
body = ctx.parseBody(opts.body);
|
|
66
53
|
}
|
|
67
|
-
if (ctx.verbose)
|
|
68
|
-
process.stderr.write("POST " + `/api/theme_region_rules` + "\n");
|
|
54
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/theme_region_rules` + "\n");
|
|
69
55
|
const result = await client.post(`/api/theme_region_rules`, body);
|
|
70
56
|
ctx.output(result);
|
|
71
57
|
});
|
|
@@ -75,8 +61,7 @@ export function registerRegionRules(
|
|
|
75
61
|
.description("Show theme region rule")
|
|
76
62
|
.action(async (id) => {
|
|
77
63
|
const client = await ctx.getClient();
|
|
78
|
-
if (ctx.verbose)
|
|
79
|
-
process.stderr.write("GET " + `/api/theme_region_rules/${id}` + "\n");
|
|
64
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/theme_region_rules/${id}` + "\n");
|
|
80
65
|
const result = await client.get(`/api/theme_region_rules/${id}`);
|
|
81
66
|
ctx.output(result);
|
|
82
67
|
});
|
|
@@ -95,8 +80,7 @@ export function registerRegionRules(
|
|
|
95
80
|
} else if (opts.body) {
|
|
96
81
|
body = ctx.parseBody(opts.body);
|
|
97
82
|
}
|
|
98
|
-
if (ctx.verbose)
|
|
99
|
-
process.stderr.write("PATCH " + `/api/theme_region_rules/${id}` + "\n");
|
|
83
|
+
if (ctx.verbose) process.stderr.write("PATCH " + `/api/theme_region_rules/${id}` + "\n");
|
|
100
84
|
const result = await client.patch(`/api/theme_region_rules/${id}`, body);
|
|
101
85
|
ctx.output(result);
|
|
102
86
|
});
|
|
@@ -106,11 +90,9 @@ export function registerRegionRules(
|
|
|
106
90
|
.description("Delete theme region rule")
|
|
107
91
|
.action(async (id) => {
|
|
108
92
|
const client = await ctx.getClient();
|
|
109
|
-
if (ctx.verbose)
|
|
110
|
-
process.stderr.write(
|
|
111
|
-
"DELETE " + `/api/theme_region_rules/${id}` + "\n",
|
|
112
|
-
);
|
|
93
|
+
if (ctx.verbose) process.stderr.write("DELETE " + `/api/theme_region_rules/${id}` + "\n");
|
|
113
94
|
const result = await client.delete(`/api/theme_region_rules/${id}`);
|
|
114
95
|
ctx.output(result);
|
|
115
96
|
});
|
|
97
|
+
|
|
116
98
|
}
|
|
@@ -10,15 +10,8 @@ export function registerResources(parent: Command, ctx: CommandContext): void {
|
|
|
10
10
|
.description("Lists all theme resources")
|
|
11
11
|
.action(async (applicationThemeId) => {
|
|
12
12
|
const client = await ctx.getClient();
|
|
13
|
-
if (ctx.verbose)
|
|
14
|
-
|
|
15
|
-
"GET " +
|
|
16
|
-
`/api/application_themes/${applicationThemeId}/resources` +
|
|
17
|
-
"\n",
|
|
18
|
-
);
|
|
19
|
-
const result = await client.get(
|
|
20
|
-
`/api/application_themes/${applicationThemeId}/resources`,
|
|
21
|
-
);
|
|
13
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_themes/${applicationThemeId}/resources` + "\n");
|
|
14
|
+
const result = await client.get(`/api/application_themes/${applicationThemeId}/resources`);
|
|
22
15
|
ctx.output(result);
|
|
23
16
|
});
|
|
24
17
|
|
|
@@ -36,16 +29,8 @@ export function registerResources(parent: Command, ctx: CommandContext): void {
|
|
|
36
29
|
} else if (opts.body) {
|
|
37
30
|
body = ctx.parseBody(opts.body);
|
|
38
31
|
}
|
|
39
|
-
if (ctx.verbose)
|
|
40
|
-
|
|
41
|
-
"PUT " +
|
|
42
|
-
`/api/application_themes/${applicationThemeId}/resources` +
|
|
43
|
-
"\n",
|
|
44
|
-
);
|
|
45
|
-
const result = await client.put(
|
|
46
|
-
`/api/application_themes/${applicationThemeId}/resources`,
|
|
47
|
-
body,
|
|
48
|
-
);
|
|
32
|
+
if (ctx.verbose) process.stderr.write("PUT " + `/api/application_themes/${applicationThemeId}/resources` + "\n");
|
|
33
|
+
const result = await client.put(`/api/application_themes/${applicationThemeId}/resources`, body);
|
|
49
34
|
ctx.output(result);
|
|
50
35
|
});
|
|
51
36
|
|
|
@@ -63,16 +48,9 @@ export function registerResources(parent: Command, ctx: CommandContext): void {
|
|
|
63
48
|
} else if (opts.body) {
|
|
64
49
|
body = ctx.parseBody(opts.body);
|
|
65
50
|
}
|
|
66
|
-
if (ctx.verbose)
|
|
67
|
-
|
|
68
|
-
"DELETE " +
|
|
69
|
-
`/api/application_themes/${applicationThemeId}/resources` +
|
|
70
|
-
"\n",
|
|
71
|
-
);
|
|
72
|
-
const result = await client.delete(
|
|
73
|
-
`/api/application_themes/${applicationThemeId}/resources`,
|
|
74
|
-
{ body },
|
|
75
|
-
);
|
|
51
|
+
if (ctx.verbose) process.stderr.write("DELETE " + `/api/application_themes/${applicationThemeId}/resources` + "\n");
|
|
52
|
+
const result = await client.delete(`/api/application_themes/${applicationThemeId}/resources`, { body });
|
|
76
53
|
ctx.output(result);
|
|
77
54
|
});
|
|
55
|
+
|
|
78
56
|
}
|
|
@@ -10,16 +10,15 @@ export function registerRootThemes(parent: Command, ctx: CommandContext): void {
|
|
|
10
10
|
.description("List root themes")
|
|
11
11
|
.option("--page <value>", "Page number for pagination")
|
|
12
12
|
.option("--per-page <value>", "Number of records per page")
|
|
13
|
-
.option(
|
|
14
|
-
|
|
15
|
-
"Filter themes by status of their versions (draft, publishing, rejected, published)",
|
|
16
|
-
)
|
|
13
|
+
.option("--status <value>", "Filter themes by status of their versions (draft, publishing, rejected, published)")
|
|
14
|
+
.option("--search-query <value>", "Search themes by name")
|
|
17
15
|
.action(async (opts) => {
|
|
18
16
|
const client = await ctx.getClient();
|
|
19
17
|
const params: Record<string, unknown> = {};
|
|
20
18
|
if (opts.page !== undefined) params["page"] = Number(opts.page);
|
|
21
19
|
if (opts.perPage !== undefined) params["per_page"] = Number(opts.perPage);
|
|
22
20
|
if (opts.status !== undefined) params["status"] = opts.status;
|
|
21
|
+
if (opts.searchQuery !== undefined) params["search_query"] = opts.searchQuery;
|
|
23
22
|
if (ctx.verbose) process.stderr.write("GET " + `/api/root_themes` + "\n");
|
|
24
23
|
const result = await client.get(`/api/root_themes`, params);
|
|
25
24
|
ctx.output(result);
|
|
@@ -39,8 +38,7 @@ export function registerRootThemes(parent: Command, ctx: CommandContext): void {
|
|
|
39
38
|
} else if (opts.body) {
|
|
40
39
|
body = ctx.parseBody(opts.body);
|
|
41
40
|
}
|
|
42
|
-
if (ctx.verbose)
|
|
43
|
-
process.stderr.write("POST " + `/api/root_themes` + "\n");
|
|
41
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/root_themes` + "\n");
|
|
44
42
|
const result = await client.post(`/api/root_themes`, body);
|
|
45
43
|
ctx.output(result);
|
|
46
44
|
});
|
|
@@ -50,18 +48,14 @@ export function registerRootThemes(parent: Command, ctx: CommandContext): void {
|
|
|
50
48
|
.description("List company root themes")
|
|
51
49
|
.option("--page <value>", "Page number for pagination")
|
|
52
50
|
.option("--per-page <value>", "Number of records per page")
|
|
53
|
-
.option(
|
|
54
|
-
"--status <value>",
|
|
55
|
-
"Filter themes by status of their versions (draft, publishing, rejected, published, active)",
|
|
56
|
-
)
|
|
51
|
+
.option("--status <value>", "Filter themes by status of their versions (draft, publishing, rejected, published, active)")
|
|
57
52
|
.action(async (opts) => {
|
|
58
53
|
const client = await ctx.getClient();
|
|
59
54
|
const params: Record<string, unknown> = {};
|
|
60
55
|
if (opts.page !== undefined) params["page"] = Number(opts.page);
|
|
61
56
|
if (opts.perPage !== undefined) params["per_page"] = Number(opts.perPage);
|
|
62
57
|
if (opts.status !== undefined) params["status"] = opts.status;
|
|
63
|
-
if (ctx.verbose)
|
|
64
|
-
process.stderr.write("GET " + `/api/root_themes/my` + "\n");
|
|
58
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/root_themes/my` + "\n");
|
|
65
59
|
const result = await client.get(`/api/root_themes/my`, params);
|
|
66
60
|
ctx.output(result);
|
|
67
61
|
});
|
|
@@ -80,8 +74,7 @@ export function registerRootThemes(parent: Command, ctx: CommandContext): void {
|
|
|
80
74
|
} else if (opts.body) {
|
|
81
75
|
body = ctx.parseBody(opts.body);
|
|
82
76
|
}
|
|
83
|
-
if (ctx.verbose)
|
|
84
|
-
process.stderr.write("PATCH " + `/api/root_themes/${id}` + "\n");
|
|
77
|
+
if (ctx.verbose) process.stderr.write("PATCH " + `/api/root_themes/${id}` + "\n");
|
|
85
78
|
const result = await client.patch(`/api/root_themes/${id}`, body);
|
|
86
79
|
ctx.output(result);
|
|
87
80
|
});
|
|
@@ -91,8 +84,7 @@ export function registerRootThemes(parent: Command, ctx: CommandContext): void {
|
|
|
91
84
|
.description("Delete a root theme")
|
|
92
85
|
.action(async (id) => {
|
|
93
86
|
const client = await ctx.getClient();
|
|
94
|
-
if (ctx.verbose)
|
|
95
|
-
process.stderr.write("DELETE " + `/api/root_themes/${id}` + "\n");
|
|
87
|
+
if (ctx.verbose) process.stderr.write("DELETE " + `/api/root_themes/${id}` + "\n");
|
|
96
88
|
const result = await client.delete(`/api/root_themes/${id}`);
|
|
97
89
|
ctx.output(result);
|
|
98
90
|
});
|
|
@@ -111,9 +103,9 @@ export function registerRootThemes(parent: Command, ctx: CommandContext): void {
|
|
|
111
103
|
} else if (opts.body) {
|
|
112
104
|
body = ctx.parseBody(opts.body);
|
|
113
105
|
}
|
|
114
|
-
if (ctx.verbose)
|
|
115
|
-
process.stderr.write("POST " + `/api/root_themes/${id}/status` + "\n");
|
|
106
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/root_themes/${id}/status` + "\n");
|
|
116
107
|
const result = await client.post(`/api/root_themes/${id}/status`, body);
|
|
117
108
|
ctx.output(result);
|
|
118
109
|
});
|
|
110
|
+
|
|
119
111
|
}
|
|
@@ -21,20 +21,11 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
21
21
|
.action(async (opts) => {
|
|
22
22
|
const client = await ctx.getClient();
|
|
23
23
|
const params: Record<string, unknown> = {};
|
|
24
|
-
if (opts.applicationThemeId !== undefined)
|
|
25
|
-
|
|
26
|
-
if (opts.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
params["published"] = parseBooleanOption(opts.published, "--published");
|
|
30
|
-
if (ctx.verbose)
|
|
31
|
-
process.stderr.write(
|
|
32
|
-
"GET " + `/api/application_theme_templates` + "\n",
|
|
33
|
-
);
|
|
34
|
-
const result = await client.get(
|
|
35
|
-
`/api/application_theme_templates`,
|
|
36
|
-
params,
|
|
37
|
-
);
|
|
24
|
+
if (opts.applicationThemeId !== undefined) params["application_theme_id"] = opts.applicationThemeId;
|
|
25
|
+
if (opts.themeableType !== undefined) params["themeable_type"] = opts.themeableType;
|
|
26
|
+
if (opts.published !== undefined) params["published"] = parseBooleanOption(opts.published, "--published");
|
|
27
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_theme_templates` + "\n");
|
|
28
|
+
const result = await client.get(`/api/application_theme_templates`, params);
|
|
38
29
|
ctx.output(result);
|
|
39
30
|
});
|
|
40
31
|
|
|
@@ -49,12 +40,9 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
49
40
|
.action(async (opts) => {
|
|
50
41
|
const client = await ctx.getClient();
|
|
51
42
|
const params: Record<string, unknown> = {};
|
|
52
|
-
if (opts.applicationThemeId !== undefined)
|
|
53
|
-
|
|
54
|
-
if (opts.
|
|
55
|
-
params["themeable_type"] = opts.themeableType;
|
|
56
|
-
if (opts.published !== undefined)
|
|
57
|
-
params["published"] = parseBooleanOption(opts.published, "--published");
|
|
43
|
+
if (opts.applicationThemeId !== undefined) params["application_theme_id"] = opts.applicationThemeId;
|
|
44
|
+
if (opts.themeableType !== undefined) params["themeable_type"] = opts.themeableType;
|
|
45
|
+
if (opts.published !== undefined) params["published"] = parseBooleanOption(opts.published, "--published");
|
|
58
46
|
let body: unknown;
|
|
59
47
|
if (opts.bodyFile) {
|
|
60
48
|
const { readFileSync } = await import("fs");
|
|
@@ -62,15 +50,8 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
62
50
|
} else if (opts.body) {
|
|
63
51
|
body = ctx.parseBody(opts.body);
|
|
64
52
|
}
|
|
65
|
-
if (ctx.verbose)
|
|
66
|
-
|
|
67
|
-
"POST " + `/api/application_theme_templates` + "\n",
|
|
68
|
-
);
|
|
69
|
-
const result = await client.post(
|
|
70
|
-
`/api/application_theme_templates`,
|
|
71
|
-
body,
|
|
72
|
-
{ params },
|
|
73
|
-
);
|
|
53
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/application_theme_templates` + "\n");
|
|
54
|
+
const result = await client.post(`/api/application_theme_templates`, body, { params });
|
|
74
55
|
ctx.output(result);
|
|
75
56
|
});
|
|
76
57
|
|
|
@@ -78,24 +59,14 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
78
59
|
.command("get <id>")
|
|
79
60
|
.description("Retrieves a theme template")
|
|
80
61
|
.option("--version <value>", "Version of the theme template to retrieve")
|
|
81
|
-
.option(
|
|
82
|
-
"--published <value>",
|
|
83
|
-
"Retrieve the published version of the theme template",
|
|
84
|
-
)
|
|
62
|
+
.option("--published <value>", "Retrieve the published version of the theme template")
|
|
85
63
|
.action(async (id, opts) => {
|
|
86
64
|
const client = await ctx.getClient();
|
|
87
65
|
const params: Record<string, unknown> = {};
|
|
88
66
|
if (opts.version !== undefined) params["version"] = opts.version;
|
|
89
|
-
if (opts.published !== undefined)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
process.stderr.write(
|
|
93
|
-
"GET " + `/api/application_theme_templates/${id}` + "\n",
|
|
94
|
-
);
|
|
95
|
-
const result = await client.get(
|
|
96
|
-
`/api/application_theme_templates/${id}`,
|
|
97
|
-
params,
|
|
98
|
-
);
|
|
67
|
+
if (opts.published !== undefined) params["published"] = parseBooleanOption(opts.published, "--published");
|
|
68
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_theme_templates/${id}` + "\n");
|
|
69
|
+
const result = await client.get(`/api/application_theme_templates/${id}`, params);
|
|
99
70
|
ctx.output(result);
|
|
100
71
|
});
|
|
101
72
|
|
|
@@ -103,18 +74,14 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
103
74
|
.command("update <id>")
|
|
104
75
|
.description("Updates a theme template")
|
|
105
76
|
.option("--version <value>", "Version of the theme template to retrieve")
|
|
106
|
-
.option(
|
|
107
|
-
"--published <value>",
|
|
108
|
-
"Retrieve the published version of the theme template",
|
|
109
|
-
)
|
|
77
|
+
.option("--published <value>", "Retrieve the published version of the theme template")
|
|
110
78
|
.option("--body <json>", "Request body as JSON string")
|
|
111
79
|
.option("--body-file <path>", "Read request body from file")
|
|
112
80
|
.action(async (id, opts) => {
|
|
113
81
|
const client = await ctx.getClient();
|
|
114
82
|
const params: Record<string, unknown> = {};
|
|
115
83
|
if (opts.version !== undefined) params["version"] = opts.version;
|
|
116
|
-
if (opts.published !== undefined)
|
|
117
|
-
params["published"] = parseBooleanOption(opts.published, "--published");
|
|
84
|
+
if (opts.published !== undefined) params["published"] = parseBooleanOption(opts.published, "--published");
|
|
118
85
|
let body: unknown;
|
|
119
86
|
if (opts.bodyFile) {
|
|
120
87
|
const { readFileSync } = await import("fs");
|
|
@@ -122,15 +89,8 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
122
89
|
} else if (opts.body) {
|
|
123
90
|
body = ctx.parseBody(opts.body);
|
|
124
91
|
}
|
|
125
|
-
if (ctx.verbose)
|
|
126
|
-
|
|
127
|
-
"PATCH " + `/api/application_theme_templates/${id}` + "\n",
|
|
128
|
-
);
|
|
129
|
-
const result = await client.patch(
|
|
130
|
-
`/api/application_theme_templates/${id}`,
|
|
131
|
-
body,
|
|
132
|
-
{ params },
|
|
133
|
-
);
|
|
92
|
+
if (ctx.verbose) process.stderr.write("PATCH " + `/api/application_theme_templates/${id}` + "\n");
|
|
93
|
+
const result = await client.patch(`/api/application_theme_templates/${id}`, body, { params });
|
|
134
94
|
ctx.output(result);
|
|
135
95
|
});
|
|
136
96
|
|
|
@@ -138,24 +98,14 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
138
98
|
.command("delete <id>")
|
|
139
99
|
.description("Deletes a theme template")
|
|
140
100
|
.option("--version <value>", "Version of the theme template to retrieve")
|
|
141
|
-
.option(
|
|
142
|
-
"--published <value>",
|
|
143
|
-
"Retrieve the published version of the theme template",
|
|
144
|
-
)
|
|
101
|
+
.option("--published <value>", "Retrieve the published version of the theme template")
|
|
145
102
|
.action(async (id, opts) => {
|
|
146
103
|
const client = await ctx.getClient();
|
|
147
104
|
const params: Record<string, unknown> = {};
|
|
148
105
|
if (opts.version !== undefined) params["version"] = opts.version;
|
|
149
|
-
if (opts.published !== undefined)
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
process.stderr.write(
|
|
153
|
-
"DELETE " + `/api/application_theme_templates/${id}` + "\n",
|
|
154
|
-
);
|
|
155
|
-
const result = await client.delete(
|
|
156
|
-
`/api/application_theme_templates/${id}`,
|
|
157
|
-
{ params },
|
|
158
|
-
);
|
|
106
|
+
if (opts.published !== undefined) params["published"] = parseBooleanOption(opts.published, "--published");
|
|
107
|
+
if (ctx.verbose) process.stderr.write("DELETE " + `/api/application_theme_templates/${id}` + "\n");
|
|
108
|
+
const result = await client.delete(`/api/application_theme_templates/${id}`, { params });
|
|
159
109
|
ctx.output(result);
|
|
160
110
|
});
|
|
161
111
|
|
|
@@ -164,13 +114,8 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
164
114
|
.description("Clones a theme template")
|
|
165
115
|
.action(async (id) => {
|
|
166
116
|
const client = await ctx.getClient();
|
|
167
|
-
if (ctx.verbose)
|
|
168
|
-
|
|
169
|
-
"POST " + `/api/application_theme_templates/${id}/clone` + "\n",
|
|
170
|
-
);
|
|
171
|
-
const result = await client.post(
|
|
172
|
-
`/api/application_theme_templates/${id}/clone`,
|
|
173
|
-
);
|
|
117
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/application_theme_templates/${id}/clone` + "\n");
|
|
118
|
+
const result = await client.post(`/api/application_theme_templates/${id}/clone`);
|
|
174
119
|
ctx.output(result);
|
|
175
120
|
});
|
|
176
121
|
|
|
@@ -179,13 +124,8 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
179
124
|
.description("Sets a theme template as default")
|
|
180
125
|
.action(async (id) => {
|
|
181
126
|
const client = await ctx.getClient();
|
|
182
|
-
if (ctx.verbose)
|
|
183
|
-
|
|
184
|
-
"POST " + `/api/application_theme_templates/${id}/set_default` + "\n",
|
|
185
|
-
);
|
|
186
|
-
const result = await client.post(
|
|
187
|
-
`/api/application_theme_templates/${id}/set_default`,
|
|
188
|
-
);
|
|
127
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/application_theme_templates/${id}/set_default` + "\n");
|
|
128
|
+
const result = await client.post(`/api/application_theme_templates/${id}/set_default`);
|
|
189
129
|
ctx.output(result);
|
|
190
130
|
});
|
|
191
131
|
|
|
@@ -197,14 +137,8 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
197
137
|
const client = await ctx.getClient();
|
|
198
138
|
const params: Record<string, unknown> = {};
|
|
199
139
|
if (opts.version !== undefined) params["version"] = Number(opts.version);
|
|
200
|
-
if (ctx.verbose)
|
|
201
|
-
|
|
202
|
-
"GET " + `/api/application_theme_templates/${id}/version_diff` + "\n",
|
|
203
|
-
);
|
|
204
|
-
const result = await client.get(
|
|
205
|
-
`/api/application_theme_templates/${id}/version_diff`,
|
|
206
|
-
params,
|
|
207
|
-
);
|
|
140
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_theme_templates/${id}/version_diff` + "\n");
|
|
141
|
+
const result = await client.get(`/api/application_theme_templates/${id}/version_diff`, params);
|
|
208
142
|
ctx.output(result);
|
|
209
143
|
});
|
|
210
144
|
|
|
@@ -225,15 +159,8 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
225
159
|
} else if (opts.body) {
|
|
226
160
|
body = ctx.parseBody(opts.body);
|
|
227
161
|
}
|
|
228
|
-
if (ctx.verbose)
|
|
229
|
-
|
|
230
|
-
"POST " + `/api/application_theme_templates/${id}/render_page` + "\n",
|
|
231
|
-
);
|
|
232
|
-
const result = await client.post(
|
|
233
|
-
`/api/application_theme_templates/${id}/render_page`,
|
|
234
|
-
body,
|
|
235
|
-
{ params },
|
|
236
|
-
);
|
|
162
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/application_theme_templates/${id}/render_page` + "\n");
|
|
163
|
+
const result = await client.post(`/api/application_theme_templates/${id}/render_page`, body, { params });
|
|
237
164
|
ctx.output(result);
|
|
238
165
|
});
|
|
239
166
|
|
|
@@ -242,15 +169,8 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
242
169
|
.description("Renders a section template")
|
|
243
170
|
.action(async (id) => {
|
|
244
171
|
const client = await ctx.getClient();
|
|
245
|
-
if (ctx.verbose)
|
|
246
|
-
|
|
247
|
-
"POST " +
|
|
248
|
-
`/api/application_theme_templates/${id}/render_section` +
|
|
249
|
-
"\n",
|
|
250
|
-
);
|
|
251
|
-
const result = await client.post(
|
|
252
|
-
`/api/application_theme_templates/${id}/render_section`,
|
|
253
|
-
);
|
|
172
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/application_theme_templates/${id}/render_section` + "\n");
|
|
173
|
+
const result = await client.post(`/api/application_theme_templates/${id}/render_section`);
|
|
254
174
|
ctx.output(result);
|
|
255
175
|
});
|
|
256
176
|
|
|
@@ -259,93 +179,49 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
259
179
|
.description("Get available variables for a theme template")
|
|
260
180
|
.action(async (id) => {
|
|
261
181
|
const client = await ctx.getClient();
|
|
262
|
-
if (ctx.verbose)
|
|
263
|
-
|
|
264
|
-
"GET " +
|
|
265
|
-
`/api/application_theme_templates/${id}/available_variables` +
|
|
266
|
-
"\n",
|
|
267
|
-
);
|
|
268
|
-
const result = await client.get(
|
|
269
|
-
`/api/application_theme_templates/${id}/available_variables`,
|
|
270
|
-
);
|
|
182
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_theme_templates/${id}/available_variables` + "\n");
|
|
183
|
+
const result = await client.get(`/api/application_theme_templates/${id}/available_variables`);
|
|
271
184
|
ctx.output(result);
|
|
272
185
|
});
|
|
273
186
|
|
|
274
187
|
resource
|
|
275
188
|
.command("publish <id>")
|
|
276
189
|
.description("Publishes the template")
|
|
277
|
-
.option(
|
|
278
|
-
"--version <value>",
|
|
279
|
-
"Version of the theme template to publish. If not specified, the latest version will be published.",
|
|
280
|
-
)
|
|
190
|
+
.option("--version <value>", "Version of the theme template to publish. If not specified, the latest version will be published.")
|
|
281
191
|
.action(async (id, opts) => {
|
|
282
192
|
const client = await ctx.getClient();
|
|
283
193
|
const params: Record<string, unknown> = {};
|
|
284
194
|
if (opts.version !== undefined) params["version"] = opts.version;
|
|
285
|
-
if (ctx.verbose)
|
|
286
|
-
|
|
287
|
-
"POST " + `/api/application_theme_templates/${id}/publish` + "\n",
|
|
288
|
-
);
|
|
289
|
-
const result = await client.post(
|
|
290
|
-
`/api/application_theme_templates/${id}/publish`,
|
|
291
|
-
undefined,
|
|
292
|
-
{ params },
|
|
293
|
-
);
|
|
195
|
+
if (ctx.verbose) process.stderr.write("POST " + `/api/application_theme_templates/${id}/publish` + "\n");
|
|
196
|
+
const result = await client.post(`/api/application_theme_templates/${id}/publish`, undefined, { params });
|
|
294
197
|
ctx.output(result);
|
|
295
198
|
});
|
|
296
199
|
|
|
297
200
|
resource
|
|
298
201
|
.command("available-themeables <id>")
|
|
299
202
|
.description("Returns all available themeables for theme template")
|
|
300
|
-
.option(
|
|
301
|
-
|
|
302
|
-
"Filter themeables that are already assigned to this template",
|
|
303
|
-
)
|
|
304
|
-
.option(
|
|
305
|
-
"--status <value>",
|
|
306
|
-
"Filter themeables by status (active, draft, archived)",
|
|
307
|
-
)
|
|
203
|
+
.option("--selected <value>", "Filter themeables that are already assigned to this template")
|
|
204
|
+
.option("--status <value>", "Filter themeables by status (active, draft, archived)")
|
|
308
205
|
.action(async (id, opts) => {
|
|
309
206
|
const client = await ctx.getClient();
|
|
310
207
|
const params: Record<string, unknown> = {};
|
|
311
|
-
if (opts.selected !== undefined)
|
|
312
|
-
params["selected"] = parseBooleanOption(opts.selected, "--selected");
|
|
208
|
+
if (opts.selected !== undefined) params["selected"] = parseBooleanOption(opts.selected, "--selected");
|
|
313
209
|
if (opts.status !== undefined) params["status"] = opts.status;
|
|
314
|
-
if (ctx.verbose)
|
|
315
|
-
|
|
316
|
-
"GET " +
|
|
317
|
-
`/api/application_theme_templates/${id}/available_themeables` +
|
|
318
|
-
"\n",
|
|
319
|
-
);
|
|
320
|
-
const result = await client.get(
|
|
321
|
-
`/api/application_theme_templates/${id}/available_themeables`,
|
|
322
|
-
params,
|
|
323
|
-
);
|
|
210
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_theme_templates/${id}/available_themeables` + "\n");
|
|
211
|
+
const result = await client.get(`/api/application_theme_templates/${id}/available_themeables`, params);
|
|
324
212
|
ctx.output(result);
|
|
325
213
|
});
|
|
326
214
|
|
|
327
215
|
resource
|
|
328
216
|
.command("themeables-update <id>")
|
|
329
|
-
.description(
|
|
330
|
-
"Updates themeable records to be used by the specified template",
|
|
331
|
-
)
|
|
217
|
+
.description("Updates themeable records to be used by the specified template")
|
|
332
218
|
.option("--query-params <value>", "query_params")
|
|
333
219
|
.action(async (id, opts) => {
|
|
334
220
|
const client = await ctx.getClient();
|
|
335
221
|
const params: Record<string, unknown> = {};
|
|
336
|
-
if (opts.queryParams !== undefined)
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
process.stderr.write(
|
|
340
|
-
"PUT " +
|
|
341
|
-
`/api/application_theme_templates/${id}/themeables_update` +
|
|
342
|
-
"\n",
|
|
343
|
-
);
|
|
344
|
-
const result = await client.put(
|
|
345
|
-
`/api/application_theme_templates/${id}/themeables_update`,
|
|
346
|
-
undefined,
|
|
347
|
-
{ params },
|
|
348
|
-
);
|
|
222
|
+
if (opts.queryParams !== undefined) params["query_params"] = opts.queryParams;
|
|
223
|
+
if (ctx.verbose) process.stderr.write("PUT " + `/api/application_theme_templates/${id}/themeables_update` + "\n");
|
|
224
|
+
const result = await client.put(`/api/application_theme_templates/${id}/themeables_update`, undefined, { params });
|
|
349
225
|
ctx.output(result);
|
|
350
226
|
});
|
|
351
227
|
|
|
@@ -354,13 +230,9 @@ export function registerTemplates(parent: Command, ctx: CommandContext): void {
|
|
|
354
230
|
.description("List all mysite themes")
|
|
355
231
|
.action(async () => {
|
|
356
232
|
const client = await ctx.getClient();
|
|
357
|
-
if (ctx.verbose)
|
|
358
|
-
|
|
359
|
-
"GET " + `/api/application_theme_templates/mysite_themes` + "\n",
|
|
360
|
-
);
|
|
361
|
-
const result = await client.get(
|
|
362
|
-
`/api/application_theme_templates/mysite_themes`,
|
|
363
|
-
);
|
|
233
|
+
if (ctx.verbose) process.stderr.write("GET " + `/api/application_theme_templates/mysite_themes` + "\n");
|
|
234
|
+
const result = await client.get(`/api/application_theme_templates/mysite_themes`);
|
|
364
235
|
ctx.output(result);
|
|
365
236
|
});
|
|
237
|
+
|
|
366
238
|
}
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @fluid-app/fluid-cli-themes@0.1.30 build /home/runner/_work/fluid-mono/fluid-mono/packages/cli/themes
|
|
3
|
-
> tsdown
|
|
4
|
-
|
|
5
|
-
[34mℹ[39m tsdown [2mv0.21.0[22m powered by rolldown [2mv1.0.0-rc.7[22m
|
|
6
|
-
[34mℹ[39m config file: [4m/home/runner/_work/fluid-mono/fluid-mono/packages/cli/themes/tsdown.config.ts[24m
|
|
7
|
-
[34mℹ[39m entry: [34msrc/index.ts[39m
|
|
8
|
-
[34mℹ[39m target: [34mnode24[39m
|
|
9
|
-
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
10
|
-
[34mℹ[39m Build start
|
|
11
|
-
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [2m28.67 kB[22m [2m│ gzip: 3.14 kB[22m
|
|
12
|
-
[34mℹ[39m [2mdist/[22mindex.mjs.map [2m55.53 kB[22m [2m│ gzip: 5.82 kB[22m
|
|
13
|
-
[34mℹ[39m [2mdist/[22mindex.d.mts.map [2m 0.11 kB[22m [2m│ gzip: 0.12 kB[22m
|
|
14
|
-
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [2m 0.19 kB[22m [2m│ gzip: 0.16 kB[22m
|
|
15
|
-
[34mℹ[39m 4 files, total: 84.50 kB
|
|
16
|
-
[33m[PLUGIN_TIMINGS] Warning:[0m Your build spent significant time in plugin `rolldown-plugin-dts:generate`. See https://rolldown.rs/options/checks#plugintimings for more details.
|
|
17
|
-
|
|
18
|
-
[32m✔[39m Build complete in [32m6514ms[39m
|
package/dist/index.d.mts
DELETED
package/dist/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;cAKM,MAAA,EAAQ,WAAA"}
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["parseBooleanOption","parseBooleanOption"],"sources":["../src/generated/primary.ts","../src/generated/resources.ts","../src/generated/templates.ts","../src/generated/root-themes.ts","../src/generated/region-rules.ts","../src/generated/index.ts","../src/index.ts"],"sourcesContent":["// primary.ts — AUTO-GENERATED, DO NOT EDIT\nimport { Command } from \"commander\";\nimport type { CommandContext } from \"@fluid-app/fluid-cli\";\n\nfunction parseBooleanOption(value: string, flag: string): boolean {\n const normalized = value.trim().toLowerCase();\n if ([\"true\", \"1\", \"yes\", \"on\"].includes(normalized)) return true;\n if ([\"false\", \"0\", \"no\", \"off\"].includes(normalized)) return false;\n throw new Error(`Invalid value for ${flag}: ${value}. Expected true/false.`);\n}\n\nexport function registerPrimary(parent: Command, ctx: CommandContext): void {\n parent\n .command(\"list\")\n .description(\"List application themes\")\n .option(\"--page <value>\", \"Page number for pagination\")\n .option(\"--per-page <value>\", \"Number of records per page\")\n .option(\n \"--root-themes <value>\",\n \"If true, returns root themes instead of company-specific themes\",\n )\n .option(\n \"--include-default-home-template <value>\",\n \"If true, includes each theme's default home page template ID in the response\",\n )\n .action(async (opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.page !== undefined) params[\"page\"] = Number(opts.page);\n if (opts.perPage !== undefined) params[\"per_page\"] = Number(opts.perPage);\n if (opts.rootThemes !== undefined)\n params[\"root_themes\"] = parseBooleanOption(\n opts.rootThemes,\n \"--root-themes\",\n );\n if (opts.includeDefaultHomeTemplate !== undefined)\n params[\"include_default_home_template\"] = parseBooleanOption(\n opts.includeDefaultHomeTemplate,\n \"--include-default-home-template\",\n );\n if (ctx.verbose)\n process.stderr.write(\"GET \" + `/api/application_themes` + \"\\n\");\n const result = await client.get(`/api/application_themes`, params);\n ctx.output(result);\n });\n\n parent\n .command(\"create\")\n .description(\"Create an application theme\")\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (opts) => {\n const client = await ctx.getClient();\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\"POST \" + `/api/application_themes` + \"\\n\");\n const result = await client.post(`/api/application_themes`, body);\n ctx.output(result);\n });\n\n parent\n .command(\"get <id>\")\n .description(\"Get an application theme\")\n .option(\"--version <value>\", \"Version of the theme to retrieve\")\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.version !== undefined) params[\"version\"] = Number(opts.version);\n if (ctx.verbose)\n process.stderr.write(\"GET \" + `/api/application_themes/${id}` + \"\\n\");\n const result = await client.get(`/api/application_themes/${id}`, params);\n ctx.output(result);\n });\n\n parent\n .command(\"update <id>\")\n .description(\"Update an application theme\")\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\"PATCH \" + `/api/application_themes/${id}` + \"\\n\");\n const result = await client.patch(`/api/application_themes/${id}`, body);\n ctx.output(result);\n });\n\n parent\n .command(\"delete <id>\")\n .description(\"Delete an application theme\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"DELETE \" + `/api/application_themes/${id}` + \"\\n\",\n );\n const result = await client.delete(`/api/application_themes/${id}`);\n ctx.output(result);\n });\n\n parent\n .command(\"clone <id>\")\n .description(\"Clone an application theme\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"POST \" + `/api/application_themes/${id}/clone` + \"\\n\",\n );\n const result = await client.post(`/api/application_themes/${id}/clone`);\n ctx.output(result);\n });\n\n parent\n .command(\"get-theme-assets <id>\")\n .description(\"Get theme assets\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"GET \" + `/api/application_themes/${id}/theme_assets` + \"\\n\",\n );\n const result = await client.get(\n `/api/application_themes/${id}/theme_assets`,\n );\n ctx.output(result);\n });\n\n parent\n .command(\"get-active\")\n .description(\"Get current active application theme\")\n .action(async () => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\"GET \" + `/api/application_themes/active` + \"\\n\");\n const result = await client.get(`/api/application_themes/active`);\n ctx.output(result);\n });\n\n parent\n .command(\"import <id>\")\n .description(\"Import an application theme\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"POST \" + `/api/application_themes/${id}/import` + \"\\n\",\n );\n const result = await client.post(`/api/application_themes/${id}/import`);\n ctx.output(result);\n });\n\n parent\n .command(\"export <id>\")\n .description(\"Export an application theme\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"GET \" + `/api/application_themes/${id}/export` + \"\\n\",\n );\n const result = await client.get(`/api/application_themes/${id}/export`);\n ctx.output(result);\n });\n\n parent\n .command(\"import-from-zip\")\n .description(\"Import an application theme from zip file\")\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (opts) => {\n const client = await ctx.getClient();\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\n \"POST \" + `/api/application_themes/import_zip` + \"\\n\",\n );\n const result = await client.post(\n `/api/application_themes/import_zip`,\n body,\n );\n ctx.output(result);\n });\n\n parent\n .command(\"version-diff <id>\")\n .description(\"Gets version diff information\")\n .option(\"--version <value>\", \"Version number to compare with\")\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.version !== undefined) params[\"version\"] = Number(opts.version);\n if (ctx.verbose)\n process.stderr.write(\n \"GET \" + `/api/application_themes/${id}/version_diff` + \"\\n\",\n );\n const result = await client.get(\n `/api/application_themes/${id}/version_diff`,\n params,\n );\n ctx.output(result);\n });\n\n parent\n .command(\"publish <id>\")\n .description(\"Publishes the theme\")\n .option(\n \"--version <value>\",\n \"Version of the theme template to publish. If not specified, the latest version will be published.\",\n )\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.version !== undefined) params[\"version\"] = opts.version;\n if (ctx.verbose)\n process.stderr.write(\n \"POST \" + `/api/application_themes/${id}/publish` + \"\\n\",\n );\n const result = await client.post(\n `/api/application_themes/${id}/publish`,\n undefined,\n { params },\n );\n ctx.output(result);\n });\n\n parent\n .command(\"upgrade <id>\")\n .description(\"Upgrade an application theme\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"POST \" + `/api/application_themes/${id}/upgrade` + \"\\n\",\n );\n const result = await client.post(`/api/application_themes/${id}/upgrade`);\n ctx.output(result);\n });\n\n parent\n .command(\"available-themeables <id>\")\n .description(\n \"Returns available themeables for a given type scoped to the theme's company\",\n )\n .option(\n \"--themeable <value>\",\n \"The themeable type to list (e.g. product, medium, page)\",\n )\n .option(\"--search <value>\", \"Filter themeables by title\")\n .option(\"--page <value>\", \"Page number for pagination\")\n .option(\"--per-page <value>\", \"Number of items per page\")\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.themeable !== undefined) params[\"themeable\"] = opts.themeable;\n if (opts.search !== undefined) params[\"search\"] = opts.search;\n if (opts.page !== undefined) params[\"page\"] = Number(opts.page);\n if (opts.perPage !== undefined) params[\"per_page\"] = Number(opts.perPage);\n if (ctx.verbose)\n process.stderr.write(\n \"GET \" + `/api/application_themes/${id}/available_themeables` + \"\\n\",\n );\n const result = await client.get(\n `/api/application_themes/${id}/available_themeables`,\n params,\n );\n ctx.output(result);\n });\n}\n","// resources.ts — AUTO-GENERATED, DO NOT EDIT\nimport { Command } from \"commander\";\nimport type { CommandContext } from \"@fluid-app/fluid-cli\";\n\nexport function registerResources(parent: Command, ctx: CommandContext): void {\n const resource = parent.command(\"resources\").description(\"resources\");\n\n resource\n .command(\"get <application-theme-id>\")\n .description(\"Lists all theme resources\")\n .action(async (applicationThemeId) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"GET \" +\n `/api/application_themes/${applicationThemeId}/resources` +\n \"\\n\",\n );\n const result = await client.get(\n `/api/application_themes/${applicationThemeId}/resources`,\n );\n ctx.output(result);\n });\n\n resource\n .command(\"update <application-theme-id>\")\n .description(\"Updates a theme resource\")\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (applicationThemeId, opts) => {\n const client = await ctx.getClient();\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\n \"PUT \" +\n `/api/application_themes/${applicationThemeId}/resources` +\n \"\\n\",\n );\n const result = await client.put(\n `/api/application_themes/${applicationThemeId}/resources`,\n body,\n );\n ctx.output(result);\n });\n\n resource\n .command(\"delete <application-theme-id>\")\n .description(\"Deletes a theme resource\")\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (applicationThemeId, opts) => {\n const client = await ctx.getClient();\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\n \"DELETE \" +\n `/api/application_themes/${applicationThemeId}/resources` +\n \"\\n\",\n );\n const result = await client.delete(\n `/api/application_themes/${applicationThemeId}/resources`,\n { body },\n );\n ctx.output(result);\n });\n}\n","// templates.ts — AUTO-GENERATED, DO NOT EDIT\nimport { Command } from \"commander\";\nimport type { CommandContext } from \"@fluid-app/fluid-cli\";\n\nfunction parseBooleanOption(value: string, flag: string): boolean {\n const normalized = value.trim().toLowerCase();\n if ([\"true\", \"1\", \"yes\", \"on\"].includes(normalized)) return true;\n if ([\"false\", \"0\", \"no\", \"off\"].includes(normalized)) return false;\n throw new Error(`Invalid value for ${flag}: ${value}. Expected true/false.`);\n}\n\nexport function registerTemplates(parent: Command, ctx: CommandContext): void {\n const resource = parent.command(\"templates\").description(\"templates\");\n\n resource\n .command(\"list\")\n .description(\"Lists all theme templates\")\n .option(\"--application-theme-id <value>\", \"ID of the application theme\")\n .option(\"--themeable-type <value>\", \"Filter templates by themeable type\")\n .option(\"--published <value>\", \"return published versions\")\n .action(async (opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.applicationThemeId !== undefined)\n params[\"application_theme_id\"] = opts.applicationThemeId;\n if (opts.themeableType !== undefined)\n params[\"themeable_type\"] = opts.themeableType;\n if (opts.published !== undefined)\n params[\"published\"] = parseBooleanOption(opts.published, \"--published\");\n if (ctx.verbose)\n process.stderr.write(\n \"GET \" + `/api/application_theme_templates` + \"\\n\",\n );\n const result = await client.get(\n `/api/application_theme_templates`,\n params,\n );\n ctx.output(result);\n });\n\n resource\n .command(\"create\")\n .description(\"Creates a theme template\")\n .option(\"--application-theme-id <value>\", \"ID of the application theme\")\n .option(\"--themeable-type <value>\", \"Filter templates by themeable type\")\n .option(\"--published <value>\", \"return published versions\")\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.applicationThemeId !== undefined)\n params[\"application_theme_id\"] = opts.applicationThemeId;\n if (opts.themeableType !== undefined)\n params[\"themeable_type\"] = opts.themeableType;\n if (opts.published !== undefined)\n params[\"published\"] = parseBooleanOption(opts.published, \"--published\");\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\n \"POST \" + `/api/application_theme_templates` + \"\\n\",\n );\n const result = await client.post(\n `/api/application_theme_templates`,\n body,\n { params },\n );\n ctx.output(result);\n });\n\n resource\n .command(\"get <id>\")\n .description(\"Retrieves a theme template\")\n .option(\"--version <value>\", \"Version of the theme template to retrieve\")\n .option(\n \"--published <value>\",\n \"Retrieve the published version of the theme template\",\n )\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.version !== undefined) params[\"version\"] = opts.version;\n if (opts.published !== undefined)\n params[\"published\"] = parseBooleanOption(opts.published, \"--published\");\n if (ctx.verbose)\n process.stderr.write(\n \"GET \" + `/api/application_theme_templates/${id}` + \"\\n\",\n );\n const result = await client.get(\n `/api/application_theme_templates/${id}`,\n params,\n );\n ctx.output(result);\n });\n\n resource\n .command(\"update <id>\")\n .description(\"Updates a theme template\")\n .option(\"--version <value>\", \"Version of the theme template to retrieve\")\n .option(\n \"--published <value>\",\n \"Retrieve the published version of the theme template\",\n )\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.version !== undefined) params[\"version\"] = opts.version;\n if (opts.published !== undefined)\n params[\"published\"] = parseBooleanOption(opts.published, \"--published\");\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\n \"PATCH \" + `/api/application_theme_templates/${id}` + \"\\n\",\n );\n const result = await client.patch(\n `/api/application_theme_templates/${id}`,\n body,\n { params },\n );\n ctx.output(result);\n });\n\n resource\n .command(\"delete <id>\")\n .description(\"Deletes a theme template\")\n .option(\"--version <value>\", \"Version of the theme template to retrieve\")\n .option(\n \"--published <value>\",\n \"Retrieve the published version of the theme template\",\n )\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.version !== undefined) params[\"version\"] = opts.version;\n if (opts.published !== undefined)\n params[\"published\"] = parseBooleanOption(opts.published, \"--published\");\n if (ctx.verbose)\n process.stderr.write(\n \"DELETE \" + `/api/application_theme_templates/${id}` + \"\\n\",\n );\n const result = await client.delete(\n `/api/application_theme_templates/${id}`,\n { params },\n );\n ctx.output(result);\n });\n\n resource\n .command(\"clone <id>\")\n .description(\"Clones a theme template\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"POST \" + `/api/application_theme_templates/${id}/clone` + \"\\n\",\n );\n const result = await client.post(\n `/api/application_theme_templates/${id}/clone`,\n );\n ctx.output(result);\n });\n\n resource\n .command(\"set-default <id>\")\n .description(\"Sets a theme template as default\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"POST \" + `/api/application_theme_templates/${id}/set_default` + \"\\n\",\n );\n const result = await client.post(\n `/api/application_theme_templates/${id}/set_default`,\n );\n ctx.output(result);\n });\n\n resource\n .command(\"version-diff <id>\")\n .description(\"Gets version diff information\")\n .option(\"--version <value>\", \"Version number to compare with\")\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.version !== undefined) params[\"version\"] = Number(opts.version);\n if (ctx.verbose)\n process.stderr.write(\n \"GET \" + `/api/application_theme_templates/${id}/version_diff` + \"\\n\",\n );\n const result = await client.get(\n `/api/application_theme_templates/${id}/version_diff`,\n params,\n );\n ctx.output(result);\n });\n\n resource\n .command(\"render-page <id>\")\n .description(\"Renders a page for a theme template\")\n .option(\"--version <value>\", \"Version of the theme template to retrieve\")\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.version !== undefined) params[\"version\"] = opts.version;\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\n \"POST \" + `/api/application_theme_templates/${id}/render_page` + \"\\n\",\n );\n const result = await client.post(\n `/api/application_theme_templates/${id}/render_page`,\n body,\n { params },\n );\n ctx.output(result);\n });\n\n resource\n .command(\"render-section <id>\")\n .description(\"Renders a section template\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"POST \" +\n `/api/application_theme_templates/${id}/render_section` +\n \"\\n\",\n );\n const result = await client.post(\n `/api/application_theme_templates/${id}/render_section`,\n );\n ctx.output(result);\n });\n\n resource\n .command(\"get-theme-template-available-variables-api <id>\")\n .description(\"Get available variables for a theme template\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"GET \" +\n `/api/application_theme_templates/${id}/available_variables` +\n \"\\n\",\n );\n const result = await client.get(\n `/api/application_theme_templates/${id}/available_variables`,\n );\n ctx.output(result);\n });\n\n resource\n .command(\"publish <id>\")\n .description(\"Publishes the template\")\n .option(\n \"--version <value>\",\n \"Version of the theme template to publish. If not specified, the latest version will be published.\",\n )\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.version !== undefined) params[\"version\"] = opts.version;\n if (ctx.verbose)\n process.stderr.write(\n \"POST \" + `/api/application_theme_templates/${id}/publish` + \"\\n\",\n );\n const result = await client.post(\n `/api/application_theme_templates/${id}/publish`,\n undefined,\n { params },\n );\n ctx.output(result);\n });\n\n resource\n .command(\"available-themeables <id>\")\n .description(\"Returns all available themeables for theme template\")\n .option(\n \"--selected <value>\",\n \"Filter themeables that are already assigned to this template\",\n )\n .option(\n \"--status <value>\",\n \"Filter themeables by status (active, draft, archived)\",\n )\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.selected !== undefined)\n params[\"selected\"] = parseBooleanOption(opts.selected, \"--selected\");\n if (opts.status !== undefined) params[\"status\"] = opts.status;\n if (ctx.verbose)\n process.stderr.write(\n \"GET \" +\n `/api/application_theme_templates/${id}/available_themeables` +\n \"\\n\",\n );\n const result = await client.get(\n `/api/application_theme_templates/${id}/available_themeables`,\n params,\n );\n ctx.output(result);\n });\n\n resource\n .command(\"themeables-update <id>\")\n .description(\n \"Updates themeable records to be used by the specified template\",\n )\n .option(\"--query-params <value>\", \"query_params\")\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.queryParams !== undefined)\n params[\"query_params\"] = opts.queryParams;\n if (ctx.verbose)\n process.stderr.write(\n \"PUT \" +\n `/api/application_theme_templates/${id}/themeables_update` +\n \"\\n\",\n );\n const result = await client.put(\n `/api/application_theme_templates/${id}/themeables_update`,\n undefined,\n { params },\n );\n ctx.output(result);\n });\n\n resource\n .command(\"get-mysite-themes\")\n .description(\"List all mysite themes\")\n .action(async () => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"GET \" + `/api/application_theme_templates/mysite_themes` + \"\\n\",\n );\n const result = await client.get(\n `/api/application_theme_templates/mysite_themes`,\n );\n ctx.output(result);\n });\n}\n","// root-themes.ts — AUTO-GENERATED, DO NOT EDIT\nimport { Command } from \"commander\";\nimport type { CommandContext } from \"@fluid-app/fluid-cli\";\n\nexport function registerRootThemes(parent: Command, ctx: CommandContext): void {\n const resource = parent.command(\"root-themes\").description(\"root-themes\");\n\n resource\n .command(\"list\")\n .description(\"List root themes\")\n .option(\"--page <value>\", \"Page number for pagination\")\n .option(\"--per-page <value>\", \"Number of records per page\")\n .option(\n \"--status <value>\",\n \"Filter themes by status of their versions (draft, publishing, rejected, published)\",\n )\n .action(async (opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.page !== undefined) params[\"page\"] = Number(opts.page);\n if (opts.perPage !== undefined) params[\"per_page\"] = Number(opts.perPage);\n if (opts.status !== undefined) params[\"status\"] = opts.status;\n if (ctx.verbose) process.stderr.write(\"GET \" + `/api/root_themes` + \"\\n\");\n const result = await client.get(`/api/root_themes`, params);\n ctx.output(result);\n });\n\n resource\n .command(\"create\")\n .description(\"Create a root theme\")\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (opts) => {\n const client = await ctx.getClient();\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\"POST \" + `/api/root_themes` + \"\\n\");\n const result = await client.post(`/api/root_themes`, body);\n ctx.output(result);\n });\n\n resource\n .command(\"list-company\")\n .description(\"List company root themes\")\n .option(\"--page <value>\", \"Page number for pagination\")\n .option(\"--per-page <value>\", \"Number of records per page\")\n .option(\n \"--status <value>\",\n \"Filter themes by status of their versions (draft, publishing, rejected, published, active)\",\n )\n .action(async (opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.page !== undefined) params[\"page\"] = Number(opts.page);\n if (opts.perPage !== undefined) params[\"per_page\"] = Number(opts.perPage);\n if (opts.status !== undefined) params[\"status\"] = opts.status;\n if (ctx.verbose)\n process.stderr.write(\"GET \" + `/api/root_themes/my` + \"\\n\");\n const result = await client.get(`/api/root_themes/my`, params);\n ctx.output(result);\n });\n\n resource\n .command(\"update <id>\")\n .description(\"Update a root theme\")\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\"PATCH \" + `/api/root_themes/${id}` + \"\\n\");\n const result = await client.patch(`/api/root_themes/${id}`, body);\n ctx.output(result);\n });\n\n resource\n .command(\"delete <id>\")\n .description(\"Delete a root theme\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\"DELETE \" + `/api/root_themes/${id}` + \"\\n\");\n const result = await client.delete(`/api/root_themes/${id}`);\n ctx.output(result);\n });\n\n resource\n .command(\"update-status <id>\")\n .description(\"Update a root theme status\")\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\"POST \" + `/api/root_themes/${id}/status` + \"\\n\");\n const result = await client.post(`/api/root_themes/${id}/status`, body);\n ctx.output(result);\n });\n}\n","// region-rules.ts — AUTO-GENERATED, DO NOT EDIT\nimport { Command } from \"commander\";\nimport type { CommandContext } from \"@fluid-app/fluid-cli\";\n\nfunction parseBooleanOption(value: string, flag: string): boolean {\n const normalized = value.trim().toLowerCase();\n if ([\"true\", \"1\", \"yes\", \"on\"].includes(normalized)) return true;\n if ([\"false\", \"0\", \"no\", \"off\"].includes(normalized)) return false;\n throw new Error(`Invalid value for ${flag}: ${value}. Expected true/false.`);\n}\n\nexport function registerRegionRules(\n parent: Command,\n ctx: CommandContext,\n): void {\n const resource = parent.command(\"region-rules\").description(\"region-rules\");\n\n resource\n .command(\"list\")\n .description(\"List theme region rules\")\n .option(\"--company-id <value>\", \"Filter by company ID\")\n .option(\n \"--application-theme-template-id <value>\",\n \"Filter by application theme template ID\",\n )\n .option(\"--route-path <value>\", \"Filter by route path\")\n .option(\"--region-code <value>\", \"Filter by region code\")\n .option(\"--active <value>\", \"Filter by active status\")\n .option(\"--page <value>\", \"Page number for pagination\")\n .option(\"--per-page <value>\", \"Number of items per page\")\n .action(async (opts) => {\n const client = await ctx.getClient();\n const params: Record<string, unknown> = {};\n if (opts.companyId !== undefined)\n params[\"company_id\"] = Number(opts.companyId);\n if (opts.applicationThemeTemplateId !== undefined)\n params[\"application_theme_template_id\"] = Number(\n opts.applicationThemeTemplateId,\n );\n if (opts.routePath !== undefined) params[\"route_path\"] = opts.routePath;\n if (opts.regionCode !== undefined)\n params[\"region_code\"] = opts.regionCode;\n if (opts.active !== undefined)\n params[\"active\"] = parseBooleanOption(opts.active, \"--active\");\n if (opts.page !== undefined) params[\"page\"] = Number(opts.page);\n if (opts.perPage !== undefined) params[\"per_page\"] = Number(opts.perPage);\n if (ctx.verbose)\n process.stderr.write(\"GET \" + `/api/theme_region_rules` + \"\\n\");\n const result = await client.get(`/api/theme_region_rules`, params);\n ctx.output(result);\n });\n\n resource\n .command(\"create\")\n .description(\"Create theme region rule\")\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (opts) => {\n const client = await ctx.getClient();\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\"POST \" + `/api/theme_region_rules` + \"\\n\");\n const result = await client.post(`/api/theme_region_rules`, body);\n ctx.output(result);\n });\n\n resource\n .command(\"get <id>\")\n .description(\"Show theme region rule\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\"GET \" + `/api/theme_region_rules/${id}` + \"\\n\");\n const result = await client.get(`/api/theme_region_rules/${id}`);\n ctx.output(result);\n });\n\n resource\n .command(\"update <id>\")\n .description(\"Update theme region rule\")\n .option(\"--body <json>\", \"Request body as JSON string\")\n .option(\"--body-file <path>\", \"Read request body from file\")\n .action(async (id, opts) => {\n const client = await ctx.getClient();\n let body: unknown;\n if (opts.bodyFile) {\n const { readFileSync } = await import(\"fs\");\n body = ctx.parseBody(readFileSync(opts.bodyFile, \"utf-8\"));\n } else if (opts.body) {\n body = ctx.parseBody(opts.body);\n }\n if (ctx.verbose)\n process.stderr.write(\"PATCH \" + `/api/theme_region_rules/${id}` + \"\\n\");\n const result = await client.patch(`/api/theme_region_rules/${id}`, body);\n ctx.output(result);\n });\n\n resource\n .command(\"delete <id>\")\n .description(\"Delete theme region rule\")\n .action(async (id) => {\n const client = await ctx.getClient();\n if (ctx.verbose)\n process.stderr.write(\n \"DELETE \" + `/api/theme_region_rules/${id}` + \"\\n\",\n );\n const result = await client.delete(`/api/theme_region_rules/${id}`);\n ctx.output(result);\n });\n}\n","// index.ts — AUTO-GENERATED, DO NOT EDIT\nimport { Command } from \"commander\";\nimport type { CommandContext } from \"@fluid-app/fluid-cli\";\n\nimport { registerPrimary } from \"./primary.js\";\nimport { registerResources } from \"./resources.js\";\nimport { registerTemplates } from \"./templates.js\";\nimport { registerRootThemes } from \"./root-themes.js\";\nimport { registerRegionRules } from \"./region-rules.js\";\n\nexport function registerAllCommands(\n parent: Command,\n ctx: CommandContext,\n): void {\n registerPrimary(parent, ctx);\n registerResources(parent, ctx);\n registerTemplates(parent, ctx);\n registerRootThemes(parent, ctx);\n registerRegionRules(parent, ctx);\n}\n","import type { FluidPlugin } from \"@fluid-app/fluid-cli\";\nimport { createDomainCommand } from \"@fluid-app/fluid-cli\";\n\nimport { registerAllCommands } from \"./generated/index.js\";\n\nconst plugin: FluidPlugin = {\n name: \"@fluid-app/fluid-cli-themes\",\n version: \"0.1.0\",\n register(ctx) {\n ctx.program.addCommand(\n createDomainCommand(\n \"themes\",\n \"Manage Fluid application themes and templates\",\n registerAllCommands,\n ),\n );\n },\n};\n\nexport default plugin;\n"],"mappings":";;;AAIA,SAASA,qBAAmB,OAAe,MAAuB;CAChE,MA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