create-nyoworks 3.2.1 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config-loader.d.ts +1 -3
- package/dist/config-loader.js +5 -7
- package/dist/init.js +11 -12
- package/package.json +1 -1
package/dist/config-loader.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
export interface AppDefinition {
|
|
2
2
|
id: string;
|
|
3
3
|
name: string;
|
|
4
|
-
name_tr: string;
|
|
5
4
|
description: string;
|
|
6
|
-
description_tr: string;
|
|
7
5
|
platforms: ("web" | "mobile" | "desktop")[];
|
|
8
6
|
features: string[];
|
|
9
7
|
integrations: string[];
|
|
@@ -27,7 +25,7 @@ export interface AppsConfig {
|
|
|
27
25
|
platforms: Record<string, PlatformDefinition>;
|
|
28
26
|
}
|
|
29
27
|
export declare function loadAppsConfig(repoDir: string): Promise<AppsConfig>;
|
|
30
|
-
export declare function appToPromptChoice(app: AppDefinition
|
|
28
|
+
export declare function appToPromptChoice(app: AppDefinition): {
|
|
31
29
|
title: string;
|
|
32
30
|
value: string;
|
|
33
31
|
description: string;
|
package/dist/config-loader.js
CHANGED
|
@@ -15,13 +15,11 @@ export async function loadAppsConfig(repoDir) {
|
|
|
15
15
|
const content = await fs.readFile(configPath, "utf8");
|
|
16
16
|
return parse(content);
|
|
17
17
|
}
|
|
18
|
-
export function appToPromptChoice(app
|
|
19
|
-
const name = lang === "tr" ? app.name_tr : app.name;
|
|
20
|
-
const desc = lang === "tr" ? app.description_tr : app.description;
|
|
18
|
+
export function appToPromptChoice(app) {
|
|
21
19
|
return {
|
|
22
|
-
title: name,
|
|
20
|
+
title: app.name,
|
|
23
21
|
value: app.id,
|
|
24
|
-
description:
|
|
22
|
+
description: app.description,
|
|
25
23
|
};
|
|
26
24
|
}
|
|
27
25
|
export function integrationToPromptChoices(integration, integrationId) {
|
|
@@ -43,8 +41,8 @@ function formatProviderName(provider) {
|
|
|
43
41
|
mollie: "Mollie (iDEAL, Bancontact)",
|
|
44
42
|
adyen: "Adyen",
|
|
45
43
|
stripe: "Stripe",
|
|
46
|
-
resend: "Resend (
|
|
47
|
-
brevo: "Brevo (300/
|
|
44
|
+
resend: "Resend (3k/mo free)",
|
|
45
|
+
brevo: "Brevo (300/day free)",
|
|
48
46
|
twilio: "Twilio",
|
|
49
47
|
plivo: "Plivo",
|
|
50
48
|
postnl: "PostNL",
|
package/dist/init.js
CHANGED
|
@@ -24,9 +24,9 @@ const AVAILABLE_PLATFORMS = [
|
|
|
24
24
|
{ title: "Desktop", value: "desktop", description: "Tauri 2.0" },
|
|
25
25
|
];
|
|
26
26
|
const AVAILABLE_LANGUAGES = [
|
|
27
|
-
{ title: "
|
|
28
|
-
{ title: "
|
|
29
|
-
{ title: "
|
|
27
|
+
{ title: "English", value: "en", description: "Default" },
|
|
28
|
+
{ title: "Dutch", value: "nl", description: "For NL market" },
|
|
29
|
+
{ title: "Turkish", value: "tr", description: "For TR market" },
|
|
30
30
|
];
|
|
31
31
|
const LANGUAGE_RESPONSES = {
|
|
32
32
|
tr: "Turkish",
|
|
@@ -164,16 +164,16 @@ export async function createProject(projectName) {
|
|
|
164
164
|
// Multi-Product Selection
|
|
165
165
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
166
166
|
const appChoices = config.apps.map((app) => ({
|
|
167
|
-
...appToPromptChoice(app
|
|
167
|
+
...appToPromptChoice(app),
|
|
168
168
|
selected: false,
|
|
169
169
|
}));
|
|
170
170
|
const productsResponse = await prompts({
|
|
171
171
|
type: "multiselect",
|
|
172
172
|
name: "appIds",
|
|
173
|
-
message: "
|
|
173
|
+
message: "Select products:",
|
|
174
174
|
choices: appChoices,
|
|
175
175
|
min: 1,
|
|
176
|
-
hint: "
|
|
176
|
+
hint: "Space to select, Enter to confirm",
|
|
177
177
|
instructions: false,
|
|
178
178
|
});
|
|
179
179
|
if (!productsResponse.appIds || productsResponse.appIds.length === 0) {
|
|
@@ -188,7 +188,7 @@ export async function createProject(projectName) {
|
|
|
188
188
|
const productSelections = [];
|
|
189
189
|
for (const app of selectedApps) {
|
|
190
190
|
console.log();
|
|
191
|
-
console.log(pc.cyan(` ${app.
|
|
191
|
+
console.log(pc.cyan(` ${app.name} platforms:`));
|
|
192
192
|
const appPlatforms = getAppPlatforms(app);
|
|
193
193
|
const platformChoices = AVAILABLE_PLATFORMS
|
|
194
194
|
.filter((p) => appPlatforms.includes(p.value))
|
|
@@ -196,10 +196,10 @@ export async function createProject(projectName) {
|
|
|
196
196
|
const platformResponse = await prompts({
|
|
197
197
|
type: "multiselect",
|
|
198
198
|
name: "platforms",
|
|
199
|
-
message: `${app.
|
|
199
|
+
message: `${app.name}:`,
|
|
200
200
|
choices: platformChoices,
|
|
201
201
|
min: 1,
|
|
202
|
-
hint: "
|
|
202
|
+
hint: "Space to select, Enter to confirm",
|
|
203
203
|
instructions: false,
|
|
204
204
|
});
|
|
205
205
|
const platforms = (platformResponse.platforms || ["web"]);
|
|
@@ -250,9 +250,9 @@ export async function createProject(projectName) {
|
|
|
250
250
|
const additionalResponse = await prompts({
|
|
251
251
|
type: "multiselect",
|
|
252
252
|
name: "features",
|
|
253
|
-
message: "
|
|
253
|
+
message: "Additional features (optional):",
|
|
254
254
|
choices: additionalFeaturesNotInApps,
|
|
255
|
-
hint: "
|
|
255
|
+
hint: "Space to select, Enter to confirm",
|
|
256
256
|
instructions: false,
|
|
257
257
|
});
|
|
258
258
|
additionalFeatures = additionalResponse.features || [];
|
|
@@ -559,7 +559,6 @@ See \`docs/bible/data/schema.md\`
|
|
|
559
559
|
function generateAppsConfigYaml(config) {
|
|
560
560
|
const productsYaml = config.products.map((p) => ` ${p.app.id}:
|
|
561
561
|
name: "${p.app.name}"
|
|
562
|
-
name_tr: "${p.app.name_tr || p.app.name}"
|
|
563
562
|
platforms:
|
|
564
563
|
${p.platforms.map((pl) => ` - ${pl}`).join("\n")}
|
|
565
564
|
features:
|