wlmaker 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.mjs +34 -0
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -959,6 +959,7 @@ async function createUseCase(name, tierInput, options) {
959
959
  import * as fs13 from "fs";
960
960
  import * as os from "os";
961
961
  import * as path12 from "path";
962
+ import { execSync } from "child_process";
962
963
  import * as clack from "@clack/prompts";
963
964
  import chalk8 from "chalk";
964
965
 
@@ -2260,6 +2261,39 @@ async function docsInteractiveMode() {
2260
2261
  }
2261
2262
  switch (action) {
2262
2263
  case "serve": {
2264
+ const serveMode = await clack.select({
2265
+ message: "How do you want to view the docs?",
2266
+ options: [
2267
+ { value: "local", label: "Local", hint: "Start Docusaurus dev server locally" },
2268
+ { value: "remote", label: "Remote", hint: "Open the deployed docs in your browser" }
2269
+ ]
2270
+ });
2271
+ if (clack.isCancel(serveMode)) {
2272
+ clack.cancel("Cancelled");
2273
+ return;
2274
+ }
2275
+ if (serveMode === "remote") {
2276
+ const challenge = await clack.text({
2277
+ message: "Pregunta de seguridad: Qu\xE9 dice mechi cuando tiene una duda en el dise\xF1o?",
2278
+ placeholder: "...",
2279
+ validate: (input) => {
2280
+ const normalized = input.trim().toLowerCase().replace(/[áä]/g, "a").replace(/[éë]/g, "e").replace(/[íï]/g, "i").replace(/[óö]/g, "o").replace(/[úü]/g, "u");
2281
+ const expected = "deja le pregunto a cesita";
2282
+ if (normalized !== expected) {
2283
+ return "Respuesta incorrecta. Vuelve cuando sepas el lore.";
2284
+ }
2285
+ }
2286
+ });
2287
+ if (clack.isCancel(challenge)) {
2288
+ clack.cancel("Cancelled");
2289
+ return;
2290
+ }
2291
+ const remoteUrl = "https://dc-wl-docs.web.app/development_workflow/";
2292
+ clack.log.info(`Opening remote docs: ${chalk8.cyan(remoteUrl)}`);
2293
+ execSync(`open "${remoteUrl}"`, { stdio: "ignore" });
2294
+ clack.outro(chalk8.green("Opened remote docs in browser"));
2295
+ return;
2296
+ }
2263
2297
  const bookDir = detectBookDir(process.cwd());
2264
2298
  if (!bookDir) {
2265
2299
  clack.outro(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wlmaker",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Create Flutter BLoCs with Freezed sealed classes from the terminal",
5
5
  "keywords": [
6
6
  "flutter",