@tanstack/cta-engine 0.14.2 → 0.14.3
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/add-ons.js +13 -1
- package/package.json +1 -1
- package/src/add-ons.ts +12 -1
package/dist/add-ons.js
CHANGED
|
@@ -93,7 +93,19 @@ export async function finalizeAddOns(framework, template, chosenAddOnIDs) {
|
|
|
93
93
|
return finalAddOns;
|
|
94
94
|
}
|
|
95
95
|
export async function listAddOns(options, { forcedMode, forcedAddOns = [], }) {
|
|
96
|
-
|
|
96
|
+
let mode = forcedMode;
|
|
97
|
+
if (!mode) {
|
|
98
|
+
if (options.template) {
|
|
99
|
+
mode =
|
|
100
|
+
options.template === 'file-router'
|
|
101
|
+
? 'file-router'
|
|
102
|
+
: 'code-router';
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
mode = 'code-router';
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const addOns = await getAllAddOns(options.framework || DEFAULT_FRAMEWORK, mode);
|
|
97
109
|
for (const addOn of addOns.filter((a) => !forcedAddOns.includes(a.id))) {
|
|
98
110
|
console.log(`${chalk.bold(addOn.id)}: ${addOn.description}`);
|
|
99
111
|
}
|
package/package.json
CHANGED
package/src/add-ons.ts
CHANGED
|
@@ -133,9 +133,20 @@ export async function listAddOns(
|
|
|
133
133
|
forcedAddOns?: Array<string>
|
|
134
134
|
},
|
|
135
135
|
) {
|
|
136
|
+
let mode = forcedMode
|
|
137
|
+
if (!mode) {
|
|
138
|
+
if (options.template) {
|
|
139
|
+
mode =
|
|
140
|
+
options.template === 'file-router'
|
|
141
|
+
? 'file-router'
|
|
142
|
+
: ('code-router' as TemplateOptions)
|
|
143
|
+
} else {
|
|
144
|
+
mode = 'code-router' as TemplateOptions
|
|
145
|
+
}
|
|
146
|
+
}
|
|
136
147
|
const addOns = await getAllAddOns(
|
|
137
148
|
options.framework || DEFAULT_FRAMEWORK,
|
|
138
|
-
|
|
149
|
+
mode,
|
|
139
150
|
)
|
|
140
151
|
for (const addOn of addOns.filter((a) => !forcedAddOns.includes(a.id))) {
|
|
141
152
|
console.log(`${chalk.bold(addOn.id)}: ${addOn.description}`)
|