create-flowdular 0.2.1 → 0.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/README.md CHANGED
@@ -26,6 +26,8 @@ pnpm dev
26
26
 
27
27
  Open [localhost:4310](http://localhost:4310). `setup` opens an interactive wizard for a local demo, PostgreSQL settings or a configuration check. It asks before resetting the local demo database.
28
28
 
29
+ The starter enables all nine platform modules: system, authentication, users, profile, agents, automations, workflows, their integration, and sandbox access. Local demo setup grants their declared permissions to demo owners. The example module stays available as a starting point; business modules from Official Modules are optional downloads.
30
+
29
31
  `npm create` launches the generator. The generated application uses **pnpm workspaces**. If pnpm is unavailable during installation, the generator invokes its pinned version through `npm exec`.
30
32
 
31
33
  You can also launch the generator directly:
package/dist/bin.js CHANGED
@@ -244,6 +244,7 @@ function installDependencies(packageManager, directory) {
244
244
  }
245
245
 
246
246
  // src/report.ts
247
+ import { styleText } from "node:util";
247
248
  var DEV_URL = "http://localhost:4310";
248
249
  function runScript(packageManager, script, ...arguments_) {
249
250
  if (arguments_.length === 0) {
@@ -260,14 +261,26 @@ function nextSteps(input) {
260
261
  runScript(input.packageManager, "dev")
261
262
  ];
262
263
  }
263
- function renderNextSteps(input) {
264
+ function renderNextSteps(input, color = false) {
265
+ const paint = (text, format) => color ? styleText(format, text, { validateStream: false }) : text;
266
+ const labels = [
267
+ "Open your project",
268
+ ...input.installed ? [] : ["Install dependencies"],
269
+ "Choose local demo or PostgreSQL",
270
+ "Start your app"
271
+ ];
264
272
  return [
265
273
  "",
266
- "Next:",
267
- "",
268
- ...nextSteps(input).map((step) => ` ${step}`),
274
+ ` ${paint("FLOWDULAR", "bold")} ${paint("Project created", "green")}`,
269
275
  "",
270
- `Then open ${DEV_URL} and follow the setup choice. Local demo uses admin@example.com.`,
276
+ ...nextSteps(input).flatMap((step, index) => [
277
+ ` ${paint(`${index + 1}.`, "cyan")} ${labels[index]}`,
278
+ ` ${paint(step, "bold")}`,
279
+ ""
280
+ ]),
281
+ ` ${paint("Local URL", "dim")} ${paint(DEV_URL, "cyan")}`,
282
+ ` ${paint("Demo login", "dim")} admin@example.com`,
283
+ ` ${paint("Demo account is created only with local demo setup.", "dim")}`,
271
284
  ""
272
285
  ].join("\n");
273
286
  }
@@ -436,6 +449,9 @@ async function scaffold(request) {
436
449
 
437
450
  // src/index.ts
438
451
  var processIo = {
452
+ color: Boolean(
453
+ process.stdout.isTTY && process.stdout.hasColors?.() && !("NO_COLOR" in process.env) && !process.env.CI
454
+ ),
439
455
  cwd: process.cwd(),
440
456
  out: (text) => process.stdout.write(text),
441
457
  err: (text) => process.stderr.write(text)
@@ -508,11 +524,14 @@ async function run(argv, io = processIo) {
508
524
  }
509
525
  const here = relative2(io.cwd, result.directory);
510
526
  io.out(
511
- renderNextSteps({
512
- directory: here.length > 0 ? here : ".",
513
- packageManager,
514
- installed
515
- })
527
+ renderNextSteps(
528
+ {
529
+ directory: here.length > 0 ? here : ".",
530
+ packageManager,
531
+ installed
532
+ },
533
+ io.color
534
+ )
516
535
  );
517
536
  return 0;
518
537
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-flowdular",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "description": "Scaffold a Flowdular application: the platform, one example module and the secrets a fresh install needs.",
6
6
  "license": "MIT",
@@ -8,7 +8,18 @@
8
8
  },
9
9
  "modules": {
10
10
  "roots": ["modules"],
11
- "enabled": ["system.core", "auth.core", "example.core"]
11
+ "enabled": [
12
+ "system.core",
13
+ "auth.core",
14
+ "agents.core",
15
+ "automations.core",
16
+ "workflows.core",
17
+ "automations-workflows.integration",
18
+ "example.core",
19
+ "profile.core",
20
+ "sandbox.core",
21
+ "users.core"
22
+ ]
12
23
  },
13
24
  "locales": ["en", "pl"],
14
25
  "agent": {
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "octane": "0.1.51",
18
18
  "segment-state": "0.2.0",
19
- "@flowdular/sdk": "0.2.1"
19
+ "@flowdular/sdk": "0.2.2"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@tsrx/typescript-plugin": "0.3.120",
@@ -21,6 +21,6 @@
21
21
  "devDependencies": {
22
22
  "@tsrx/prettier-plugin": "0.3.120",
23
23
  "prettier": "3.6.2",
24
- "flowdular": "0.2.1"
24
+ "flowdular": "0.2.2"
25
25
  }
26
26
  }
@@ -14,7 +14,7 @@
14
14
  "@octanejs/vite-plugin": "0.1.51",
15
15
  "octane": "0.1.51",
16
16
  "pg": "8.23.0",
17
- "@flowdular/sdk": "0.2.1"
17
+ "@flowdular/sdk": "0.2.2"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@octanejs/app-core": "0.0.47",
@@ -7,10 +7,26 @@ import type {
7
7
  } from '@flowdular/sdk/client';
8
8
  import { createClientContribution as system_core } from '@flowdular/sdk/modules/system/client';
9
9
  import { createClientContribution as auth_core } from '@flowdular/sdk/modules/auth/client';
10
+ import { createClientContribution as agents_core } from '@flowdular/sdk/modules/agents/client';
11
+ import { createClientContribution as automations_core } from '@flowdular/sdk/modules/automations/client';
12
+ import { createClientContribution as workflows_core } from '@flowdular/sdk/modules/workflows/client';
10
13
  import { createClientContribution as example_core } from '@app/module-example/client';
14
+ import { createClientContribution as profile_core } from '@flowdular/sdk/modules/profile/client';
15
+ import { createClientContribution as sandbox_core } from '@flowdular/sdk/modules/sandbox/client';
16
+ import { createClientContribution as users_core } from '@flowdular/sdk/modules/users/client';
11
17
 
12
18
  export function createModuleClientContributions(
13
19
  context: ModuleClientContext,
14
20
  ): readonly ModuleClientContribution[] {
15
- return [system_core(context), auth_core(context), example_core(context)];
21
+ return [
22
+ system_core(context),
23
+ auth_core(context),
24
+ agents_core(context),
25
+ automations_core(context),
26
+ workflows_core(context),
27
+ example_core(context),
28
+ profile_core(context),
29
+ sandbox_core(context),
30
+ users_core(context),
31
+ ];
16
32
  }
@@ -6,7 +6,14 @@ import type {
6
6
  } from '@flowdular/sdk/modules/auth/server';
7
7
  import type { WebMount } from '@flowdular/sdk/server';
8
8
  import { createServerComposition as system_core } from '@flowdular/sdk/modules/system/platform';
9
+ import { createServerComposition as agents_core } from '@flowdular/sdk/modules/agents/platform';
10
+ import { createServerComposition as automations_core } from '@flowdular/sdk/modules/automations/platform';
11
+ import { createServerComposition as workflows_core } from '@flowdular/sdk/modules/workflows/platform';
12
+ import { createServerComposition as automations_workflows_integration } from '@flowdular/sdk/modules/automations-workflows-integration/platform';
9
13
  import { createServerComposition as example_core } from '@app/module-example/platform';
14
+ import { createServerComposition as profile_core } from '@flowdular/sdk/modules/profile/platform';
15
+ import { createServerComposition as sandbox_core } from '@flowdular/sdk/modules/sandbox/platform';
16
+ import { createServerComposition as users_core } from '@flowdular/sdk/modules/users/platform';
10
17
 
11
18
  export function composeModuleServer(
12
19
  context: PlatformServerContext,
@@ -19,6 +26,37 @@ export function composeModuleServer(
19
26
  }),
20
27
  moduleId: 'system.core',
21
28
  },
29
+ {
30
+ ...agents_core({
31
+ ...context,
32
+ agentDefinitions: context.agentDefinitions.forModule('agents.core'),
33
+ }),
34
+ moduleId: 'agents.core',
35
+ },
36
+ {
37
+ ...automations_core({
38
+ ...context,
39
+ agentDefinitions:
40
+ context.agentDefinitions.forModule('automations.core'),
41
+ }),
42
+ moduleId: 'automations.core',
43
+ },
44
+ {
45
+ ...workflows_core({
46
+ ...context,
47
+ agentDefinitions: context.agentDefinitions.forModule('workflows.core'),
48
+ }),
49
+ moduleId: 'workflows.core',
50
+ },
51
+ {
52
+ ...automations_workflows_integration({
53
+ ...context,
54
+ agentDefinitions: context.agentDefinitions.forModule(
55
+ 'automations-workflows.integration',
56
+ ),
57
+ }),
58
+ moduleId: 'automations-workflows.integration',
59
+ },
22
60
  {
23
61
  ...example_core({
24
62
  ...context,
@@ -26,6 +64,27 @@ export function composeModuleServer(
26
64
  }),
27
65
  moduleId: 'example.core',
28
66
  },
67
+ {
68
+ ...profile_core({
69
+ ...context,
70
+ agentDefinitions: context.agentDefinitions.forModule('profile.core'),
71
+ }),
72
+ moduleId: 'profile.core',
73
+ },
74
+ {
75
+ ...sandbox_core({
76
+ ...context,
77
+ agentDefinitions: context.agentDefinitions.forModule('sandbox.core'),
78
+ }),
79
+ moduleId: 'sandbox.core',
80
+ },
81
+ {
82
+ ...users_core({
83
+ ...context,
84
+ agentDefinitions: context.agentDefinitions.forModule('users.core'),
85
+ }),
86
+ moduleId: 'users.core',
87
+ },
29
88
  ];
30
89
  }
31
90