create-flowdular 0.4.0 → 0.4.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.
@@ -3,7 +3,7 @@
3
3
  "schemaVersion": 1,
4
4
  "id": "catalog.core",
5
5
  "package": "@flowdular/module-catalog",
6
- "version": "0.8.1",
6
+ "version": "0.8.2",
7
7
  "profile": "full",
8
8
  "capabilities": ["api", "database", "client", "translations"],
9
9
  "platform": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowdular/module-catalog",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.ts",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "octane": "0.1.51",
18
18
  "segment-state": "0.2.0",
19
- "@flowdular/sdk": "0.3.2"
19
+ "@flowdular/sdk": "0.4.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@tsrx/typescript-plugin": "0.3.120",
@@ -1,6 +1,6 @@
1
1
  schemaVersion: 1
2
2
  id: catalog.core
3
- specVersion: 0.8.1
3
+ specVersion: 0.8.2
4
4
  status: approved
5
5
  name: Product Catalog Core
6
6
  description: Provides tenant-scoped products and services with stable SKUs, units, prices, currencies, and lifecycle state.
@@ -48,7 +48,7 @@ export function CatalogItemForm(props: CatalogItemFormProps) @{
48
48
  value={name}
49
49
  onInput={(event) => setName(event.currentTarget.value)}
50
50
  minlength={2}
51
- maxlength={160}
51
+ maxLength={160}
52
52
  autoFocus
53
53
  required
54
54
  />
@@ -60,7 +60,7 @@ export function CatalogItemForm(props: CatalogItemFormProps) @{
60
60
  value={sku}
61
61
  onInput={(event) => setSku(event.currentTarget.value)}
62
62
  disabled={props.item !== null}
63
- maxlength={64}
63
+ maxLength={64}
64
64
  required
65
65
  />
66
66
  </FormField>
@@ -85,7 +85,7 @@ export function CatalogItemForm(props: CatalogItemFormProps) @{
85
85
  name="unit"
86
86
  value={unit}
87
87
  onInput={(event) => setUnit(event.currentTarget.value)}
88
- maxlength={24}
88
+ maxLength={24}
89
89
  required
90
90
  />
91
91
  </FormField>
@@ -114,7 +114,7 @@ export function CatalogItemForm(props: CatalogItemFormProps) @{
114
114
  value={currency}
115
115
  onInput={(event) => setCurrency(event.currentTarget.value)}
116
116
  minlength={3}
117
- maxlength={3}
117
+ maxLength={3}
118
118
  required
119
119
  />
120
120
  </FormField>
@@ -2,6 +2,11 @@ import { useEffect, useMemo } from 'octane';
2
2
  import {
3
3
  Alert,
4
4
  Button,
5
+ CellCode,
6
+ CellNumber,
7
+ CellStack,
8
+ CellTag,
9
+ CellTime,
5
10
  ConfirmDialog,
6
11
  Drawer,
7
12
  EmptyState,
@@ -13,7 +18,6 @@ import {
13
18
  SearchField,
14
19
  Select,
15
20
  TableCard,
16
- Tag,
17
21
  ToastHost,
18
22
  toasts,
19
23
  type TableColumn,
@@ -91,63 +95,60 @@ function price(minor: number, currency: string): string {
91
95
  }
92
96
  }
93
97
 
94
- function updatedAt(value: number): string {
95
- return new Intl.DateTimeFormat(activeLocale(), {
96
- dateStyle: 'medium',
97
- timeStyle: 'short',
98
- }).format(new Date(value));
99
- }
100
-
101
98
  function columns(): readonly TableColumn<CatalogItem>[] {
102
99
  return [
103
100
  {
104
101
  key: 'name',
105
102
  header: t('catalog.table.column.name'),
106
- width: '28%',
103
+ width: 'auto',
107
104
  value: (item) => item.name,
108
- cell: (item) => <span class="ui-cell">
109
- <b>{item.name}</b>
110
- <small>{item.unit}</small>
111
- </span>,
105
+ cell: (item) => <CellStack primary={item.name} secondary={item.unit} />,
112
106
  },
113
107
  {
114
108
  key: 'sku',
115
109
  header: t('catalog.table.column.sku'),
116
- width: '16%',
110
+ width: '160px',
111
+ priority: 2,
117
112
  value: (item) => item.sku,
118
- cell: (item) => <span class="ui-mono">{item.sku}</span>,
113
+ cell: (item) => <CellCode value={item.sku} />,
119
114
  },
120
115
  {
121
116
  key: 'kind',
122
117
  header: t('catalog.table.column.kind'),
123
- width: '12%',
118
+ width: '130px',
119
+ priority: 2,
124
120
  cell: (item) =>
125
- <Tag tone={item.kind === 'product' ? 'info' : 'neutral'}>{t(
126
- 'catalog.kind.' + item.kind,
127
- )}</Tag>,
121
+ <CellTag
122
+ tone={item.kind === 'product' ? 'info' : 'neutral'}
123
+ label={t('catalog.kind.' + item.kind)}
124
+ />,
128
125
  },
129
126
  {
130
127
  key: 'price',
131
128
  header: t('catalog.table.column.price'),
132
- width: '14%',
129
+ width: '140px',
133
130
  numeric: true,
134
- cell: (item) => price(item.basePriceMinor, item.currency),
131
+ cell: (item) =>
132
+ <CellNumber value={price(item.basePriceMinor, item.currency)} />,
135
133
  },
136
134
  {
137
135
  key: 'updatedAt',
138
136
  header: t('catalog.table.column.updated'),
139
- width: '18%',
137
+ width: '170px',
138
+ priority: 2,
140
139
  value: (item) => item.updatedAt,
141
- cell: (item) => updatedAt(item.updatedAt),
140
+ cell: (item) => <CellTime value={item.updatedAt} />,
142
141
  },
143
142
  {
144
143
  key: 'status',
145
144
  header: t('catalog.table.column.status'),
146
- width: '12%',
145
+ width: '130px',
147
146
  cell: (item) =>
148
- <Tag tone={item.status === 'active' ? 'success' : 'neutral'} dot>{t(
149
- 'catalog.status.' + item.status,
150
- )}</Tag>,
147
+ <CellTag
148
+ tone={item.status === 'active' ? 'success' : 'neutral'}
149
+ dot
150
+ label={t('catalog.status.' + item.status)}
151
+ />,
151
152
  },
152
153
  ];
153
154
  }
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "id": "catalog.core",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "repository": "Flowdular/official-modules",
5
- "sourceCommit": "6565e2067b029264de98f59cfc9fa7eeb5645b54",
6
- "artifactSha256": "5c32abd8f6df0c1d3ec0f694d270de3b24ef2e62888454bc89564a67f59c7828",
5
+ "sourceCommit": "f38a67718c5a29aba5b5d37c0504430a3c7f565b",
6
+ "artifactSha256": "149808831d620ac0ebc50abb6b0fb2caef6bec66b5d7821c752ec811e5d9219f",
7
7
  "files": {
8
8
  "LICENSE": "155d722071bad9d0d832482e06fd5a47f7034389cb63aabcb39f4282aa3499fc",
9
9
  "migrations/0001_catalog_core.down.sql": "0962a1edf0bde959cd4facccf77bd5b634d6cc25f125a0c79a61770c8871093f",
@@ -17,16 +17,16 @@
17
17
  "migrations/0005_catalog_list_indexes.down.sql": "3dd547d738e75513abef502afc4bf9b51851ec9405b6b719c6134b897c5b1776",
18
18
  "migrations/0005_catalog_list_indexes.up.sql": "dc3ece30b93fba0c91be58f772d1ae421cfbba49439e8c72a06aead6720f5db5",
19
19
  "migrations/README.md": "2a15fd001713c2552a3c82b186246aa5fec136f43143cc2d9aa15bd491a09d41",
20
- "module.json": "a4ac79385b396842f96d6d190b615565d09a9ea7a4f761de589ee3312b0b8639",
21
- "package.json": "716dd452c7eaf14b5eeb80c1dba98e71c6f43ee33bd5fd03a2bf90801571d5f5",
22
- "spec/module.yaml": "6a2cf7d9df6d2cf5cf2ea6517a79faab7bf184fab917485811fbfaad5b31787b",
20
+ "module.json": "d2a98b70d60a433e1b3b6547352781048d562b996e3ee961f519d61ee1b623b9",
21
+ "package.json": "c23a99016f974d183189a05e4cfc4929788a46ae1ad65c623d66513e0880cdbd",
22
+ "spec/module.yaml": "992953d002574e83374c21e1ee7bef1d451c04b0180892856838d7c67404ce66",
23
23
  "src/acl/permissions.ts": "3375521a5a229736ffac5a948140ec347dc7a7e4fba80e778c0baaf9e0622590",
24
24
  "src/agent/tools.ts": "3403db7954906dc2c79227ba0420b5cb4bfb57063b7cfc285e6e556f16be9266",
25
25
  "src/api/endpoints.ts": "205ef36d058f246f99b77336e7246a23aaca611c696a1f6f09758f66e8a93a29",
26
26
  "src/api/list-cursor.ts": "dcb763edc0128a3aac95e9ca3c5158611a7f2c6a4c71484438c89b7f4d79bb0d",
27
27
  "src/client/CatalogHistoryDrawer.tsrx": "6cdba5249be81e70da703cb34c1a2210943ce5e5fb596ee77cf7952e2acf3ee3",
28
- "src/client/CatalogItemForm.tsrx": "7dafa4149975d9e7d5784c8a5391b5b64c2405991aaead713d94b61c41168c2c",
29
- "src/client/CatalogView.tsrx": "bc1e543690e07d52b51626832f36afe3fde87bf2dc45642324507df8384d7303",
28
+ "src/client/CatalogItemForm.tsrx": "d621ac2a513635a5e38ee44726c07926bf035ec5e0dddca487c462cc7913d040",
29
+ "src/client/CatalogView.tsrx": "2c3e49bb1e54b58d636de0ddbb6ece429acf6aeadb6a0515ab52fca3baabec21",
30
30
  "src/client/api.ts": "eaa55af81d26aa0190d19b3102c363c1ee25b2bdc05436446ac95dcde62aea75",
31
31
  "src/client/contribution.tsrx": "6cbf79e6188bdf24b9cec4a06ae621e03efd5d0c76ad72b28828eee9155ab893",
32
32
  "src/client/index.ts": "03eb0664cdafccb66cb25f2e1b07e6959c2dfa9bdbfffc3e7edf9b535ba4949a",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-flowdular",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
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",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "octane": "0.1.51",
18
18
  "segment-state": "0.2.1",
19
- "@flowdular/sdk": "0.4.0"
19
+ "@flowdular/sdk": "0.4.1"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@tsrx/typescript-plugin": "0.3.120",
@@ -25,7 +25,7 @@
25
25
  "devDependencies": {
26
26
  "@tsrx/prettier-plugin": "0.3.120",
27
27
  "prettier": "3.6.2",
28
- "flowdular": "0.4.0",
28
+ "flowdular": "0.4.1",
29
29
  "rulesync": "16.21.0"
30
30
  }
31
31
  }
@@ -15,7 +15,7 @@
15
15
  "@octanejs/vite-plugin": "0.1.51",
16
16
  "octane": "0.1.51",
17
17
  "pg": "8.23.0",
18
- "@flowdular/sdk": "0.4.0"
18
+ "@flowdular/sdk": "0.4.1"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@octanejs/app-core": "0.0.47",
@@ -10,6 +10,14 @@ import {
10
10
  } from '@flowdular/sdk/dev-console';
11
11
 
12
12
  const appRoot = resolve(fileURLToPath(new URL('..', import.meta.url)));
13
+ /* `pnpm dev -- --port 4396 --host 0.0.0.0` overrides vite.config.ts, so a
14
+ second application runs beside the first one. */
15
+ const flag = (name) => {
16
+ const index = process.argv.indexOf(name);
17
+ return index === -1 ? undefined : process.argv[index + 1];
18
+ };
19
+ const port = Number(flag('--port'));
20
+ const host = flag('--host');
13
21
  const verbose =
14
22
  process.argv.includes('--verbose') ||
15
23
  process.argv.includes('-v') ||
@@ -24,6 +32,11 @@ try {
24
32
  configFile: resolve(appRoot, 'vite.config.ts'),
25
33
  customLogger: createOctaneLogger(verbose, color),
26
34
  clearScreen: false,
35
+ ...(Number.isInteger(port) && port > 0
36
+ ? { server: { port, strictPort: true, ...(host ? { host } : {}) } }
37
+ : host
38
+ ? { server: { host } }
39
+ : {}),
27
40
  });
28
41
  await server.listen();
29
42
  } catch (error) {
@@ -37,7 +50,9 @@ printReady({
37
50
  lines: [
38
51
  [
39
52
  'local',
40
- server.resolvedUrls?.local?.[0] ?? 'http://localhost:4310/',
53
+ server.resolvedUrls?.local?.[0] ??
54
+ server.resolvedUrls?.network?.[0] ??
55
+ 'the address vite.config.ts sets',
41
56
  'info',
42
57
  ],
43
58
  ['diagnostics', verbose ? 'verbose' : 'quiet · use --verbose', 'muted'],