@tuturuuu/utils 0.17.0 → 0.19.0
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/CHANGELOG.md +19 -0
- package/biome.json +1 -1
- package/package.json +12 -12
- package/src/__tests__/app-url.test.ts +2 -0
- package/src/common/metadata.test.ts +1 -1
- package/src/internal-domains.ts +24 -0
- package/src/launchable-apps.test.ts +6 -0
- package/src/launchable-apps.ts +26 -0
- package/src/permissions.tsx +92 -0
- package/src/platform-release.test.ts +1 -1
- package/src/platform-release.ts +1 -1
- package/src/portless.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.19.0](https://github.com/tutur3u/platform/compare/utils-v0.18.0...utils-v0.19.0) (2026-07-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **ai:** add workspace AI Studio and legal coverage ([6de4e39](https://github.com/tutur3u/platform/commit/6de4e395cc5568f4943604ac667e3cebf324be13))
|
|
9
|
+
|
|
10
|
+
## [0.18.0](https://github.com/tutur3u/platform/compare/utils-v0.17.0...utils-v0.18.0) (2026-07-25)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **apps:** unify and redesign app catalog ([b679068](https://github.com/tutur3u/platform/commit/b679068339143a83b38610f363bec7f53ddc3706))
|
|
16
|
+
* **forms:** merge satellite migration ([e739f1b](https://github.com/tutur3u/platform/commit/e739f1bead568905458a42373ae24d13cd778907))
|
|
17
|
+
* **forms:** migrate product to satellite app ([51b9392](https://github.com/tutur3u/platform/commit/51b93928f1a12ebd4f4c753595fb33902ebfa66c))
|
|
18
|
+
* **inventory:** secure Square POS event checkout ([532b463](https://github.com/tutur3u/platform/commit/532b46372116ee0bebfd83ba2af762cc9f668c3c))
|
|
19
|
+
* **offline:** own service worker runtime and refresh dependencies ([ae44477](https://github.com/tutur3u/platform/commit/ae44477603c39f0513244514771653287338a89f))
|
|
20
|
+
* **reports:** add periodic reporting automation ([ec7bd5e](https://github.com/tutur3u/platform/commit/ec7bd5e10abb137e217d1dcf143624530276392f))
|
|
21
|
+
|
|
3
22
|
## [0.17.0](https://github.com/tutur3u/platform/compare/utils-v0.16.0...utils-v0.17.0) (2026-07-21)
|
|
4
23
|
|
|
5
24
|
|
package/biome.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuturuuu/utils",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.19.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/tutur3u/platform",
|
|
@@ -19,25 +19,25 @@
|
|
|
19
19
|
"@dnd-kit/core": "^6.3.1",
|
|
20
20
|
"@noble/ciphers": "^2.2.0",
|
|
21
21
|
"@noble/hashes": "^2.2.0",
|
|
22
|
-
"@tanstack/react-query": "^5.101.
|
|
22
|
+
"@tanstack/react-query": "^5.101.4",
|
|
23
23
|
"@tiptap/core": "3.28.0",
|
|
24
24
|
"@tiptap/react": "3.28.0",
|
|
25
|
-
"@tuturuuu/google": "0.0
|
|
26
|
-
"@tuturuuu/icons": "0.0
|
|
27
|
-
"@tuturuuu/internal-api": "0.
|
|
28
|
-
"@tuturuuu/supabase": "0.
|
|
25
|
+
"@tuturuuu/google": "0.1.0",
|
|
26
|
+
"@tuturuuu/icons": "0.1.0",
|
|
27
|
+
"@tuturuuu/internal-api": "0.23.0",
|
|
28
|
+
"@tuturuuu/supabase": "0.5.0",
|
|
29
29
|
"@upstash/ratelimit": "^2.0.8",
|
|
30
30
|
"@upstash/redis": "^1.38.0",
|
|
31
31
|
"clsx": "^2.1.1",
|
|
32
32
|
"date-fns": "^4.4.0",
|
|
33
|
-
"dayjs": "^1.11.
|
|
33
|
+
"dayjs": "^1.11.21",
|
|
34
34
|
"diff": "^9.0.0",
|
|
35
35
|
"effect": "^3.22.0",
|
|
36
36
|
"moment": "^2.30.1",
|
|
37
|
-
"next": "^16.3.0-preview.
|
|
37
|
+
"next": "^16.3.0-preview.9",
|
|
38
38
|
"prosemirror-model": "^1.25.11",
|
|
39
|
-
"react": "^19.2.
|
|
40
|
-
"react-dom": "^19.2.
|
|
39
|
+
"react": "^19.2.8",
|
|
40
|
+
"react-dom": "^19.2.8",
|
|
41
41
|
"tailwind-merge": "^3.6.0",
|
|
42
42
|
"uuid": "^14.0.1",
|
|
43
43
|
"y-prosemirror": "^1.3.7",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"zod": "^4.4.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@tuturuuu/types": "0.
|
|
48
|
+
"@tuturuuu/types": "0.22.0",
|
|
49
49
|
"@tuturuuu/typescript-config": "0.1.1",
|
|
50
50
|
"@types/diff": "^8.0.0",
|
|
51
51
|
"@types/node": "^26.1.1",
|
|
52
52
|
"@types/react": "^19.2.17",
|
|
53
|
-
"@vitejs/plugin-react": "^6.0.
|
|
53
|
+
"@vitejs/plugin-react": "^6.0.4",
|
|
54
54
|
"typescript": "7.0.2",
|
|
55
55
|
"vite": "^8.1.5",
|
|
56
56
|
"vitest": "^4.1.10"
|
|
@@ -287,6 +287,7 @@ describe('Portless app origin registry', () => {
|
|
|
287
287
|
'*.tuturuuu.localhost',
|
|
288
288
|
]);
|
|
289
289
|
expect(Object.values(TUTURUUU_PORTLESS_APP_ORIGINS)).toEqual([
|
|
290
|
+
'https://ai.tuturuuu.localhost',
|
|
290
291
|
'https://apps.tuturuuu.localhost',
|
|
291
292
|
'https://calendar.tuturuuu.localhost',
|
|
292
293
|
'https://chat.tuturuuu.localhost',
|
|
@@ -296,6 +297,7 @@ describe('Portless app origin registry', () => {
|
|
|
296
297
|
'https://drive.tuturuuu.localhost',
|
|
297
298
|
'https://external.tuturuuu.localhost',
|
|
298
299
|
'https://finance.tuturuuu.localhost',
|
|
300
|
+
'https://forms.tuturuuu.localhost',
|
|
299
301
|
'https://hive.tuturuuu.localhost',
|
|
300
302
|
'https://realtime.hive.tuturuuu.localhost',
|
|
301
303
|
'https://infra.tuturuuu.localhost',
|
|
@@ -326,7 +326,7 @@ describe('application metadata coverage', () => {
|
|
|
326
326
|
)
|
|
327
327
|
.map((entry) => resolve(entry.parentPath, entry.name));
|
|
328
328
|
|
|
329
|
-
expect(marketingLayouts).toHaveLength(
|
|
329
|
+
expect(marketingLayouts).toHaveLength(37);
|
|
330
330
|
for (const layoutPath of marketingLayouts) {
|
|
331
331
|
expect(readFileSync(layoutPath, 'utf8')).toMatch(/pathname:\s*['`]/);
|
|
332
332
|
}
|
package/src/internal-domains.ts
CHANGED
|
@@ -4,6 +4,10 @@ import {
|
|
|
4
4
|
} from './portless';
|
|
5
5
|
|
|
6
6
|
export const PRODUCTION_INTERNAL_APP_DOMAINS = [
|
|
7
|
+
{
|
|
8
|
+
name: 'ai',
|
|
9
|
+
url: 'https://ai.tuturuuu.com',
|
|
10
|
+
},
|
|
7
11
|
{
|
|
8
12
|
name: 'apps',
|
|
9
13
|
url: 'https://apps.tuturuuu.com',
|
|
@@ -108,6 +112,10 @@ export const PRODUCTION_INTERNAL_APP_DOMAINS = [
|
|
|
108
112
|
name: 'contacts',
|
|
109
113
|
url: 'https://contacts.tuturuuu.com',
|
|
110
114
|
},
|
|
115
|
+
{
|
|
116
|
+
name: 'forms',
|
|
117
|
+
url: 'https://forms.tuturuuu.com',
|
|
118
|
+
},
|
|
111
119
|
{
|
|
112
120
|
name: 'hive',
|
|
113
121
|
url: 'https://hive.tuturuuu.com',
|
|
@@ -119,6 +127,10 @@ export const PRODUCTION_INTERNAL_APP_DOMAINS = [
|
|
|
119
127
|
] as const;
|
|
120
128
|
|
|
121
129
|
export const PORTLESS_INTERNAL_APP_DOMAINS = [
|
|
130
|
+
{
|
|
131
|
+
name: 'ai',
|
|
132
|
+
url: getTuturuuuPortlessAppOrigin('ai'),
|
|
133
|
+
},
|
|
122
134
|
{
|
|
123
135
|
name: 'apps',
|
|
124
136
|
url: getTuturuuuPortlessAppOrigin('apps'),
|
|
@@ -215,6 +227,10 @@ export const PORTLESS_INTERNAL_APP_DOMAINS = [
|
|
|
215
227
|
name: 'contacts',
|
|
216
228
|
url: getTuturuuuPortlessAppOrigin('contacts'),
|
|
217
229
|
},
|
|
230
|
+
{
|
|
231
|
+
name: 'forms',
|
|
232
|
+
url: getTuturuuuPortlessAppOrigin('forms'),
|
|
233
|
+
},
|
|
218
234
|
{
|
|
219
235
|
name: 'hive',
|
|
220
236
|
url: getTuturuuuPortlessAppOrigin('hive'),
|
|
@@ -226,6 +242,10 @@ export const PORTLESS_INTERNAL_APP_DOMAINS = [
|
|
|
226
242
|
] as const;
|
|
227
243
|
|
|
228
244
|
export const LOCALHOST_INTERNAL_APP_DOMAINS = [
|
|
245
|
+
{
|
|
246
|
+
name: 'ai',
|
|
247
|
+
url: 'http://localhost:7829',
|
|
248
|
+
},
|
|
229
249
|
{
|
|
230
250
|
name: 'apps',
|
|
231
251
|
url: 'http://localhost:7818',
|
|
@@ -318,6 +338,10 @@ export const LOCALHOST_INTERNAL_APP_DOMAINS = [
|
|
|
318
338
|
name: 'contacts',
|
|
319
339
|
url: 'http://localhost:7827',
|
|
320
340
|
},
|
|
341
|
+
{
|
|
342
|
+
name: 'forms',
|
|
343
|
+
url: 'http://localhost:7828',
|
|
344
|
+
},
|
|
321
345
|
{
|
|
322
346
|
name: 'hive',
|
|
323
347
|
url: 'http://localhost:7814',
|
|
@@ -25,7 +25,13 @@ const teamWorkspace: LaunchableWorkspace = {
|
|
|
25
25
|
describe('launchable apps', () => {
|
|
26
26
|
it('resolves apps by slug, title, and aliases', () => {
|
|
27
27
|
expect(getLaunchableApp('calendar')?.title).toBe('Calendar');
|
|
28
|
+
expect(getLaunchableApp('forms')).toMatchObject({
|
|
29
|
+
appRoot: 'apps/forms',
|
|
30
|
+
productionUrl: 'https://forms.tuturuuu.com',
|
|
31
|
+
title: 'Forms',
|
|
32
|
+
});
|
|
28
33
|
expect(getLaunchableAppByTitle('Tuturuuu')?.slug).toBe('platform');
|
|
34
|
+
expect(getLaunchableAppByTitle('questionnaires')?.slug).toBe('forms');
|
|
29
35
|
expect(getLaunchableAppByTitle('apps gateway')?.slug).toBe('apps');
|
|
30
36
|
});
|
|
31
37
|
|
package/src/launchable-apps.ts
CHANGED
|
@@ -237,6 +237,19 @@ export const LAUNCHABLE_APPS = [
|
|
|
237
237
|
title: 'Mind',
|
|
238
238
|
workspacePathResolver: workspaceRootPath,
|
|
239
239
|
},
|
|
240
|
+
{
|
|
241
|
+
aliases: ['AI Studio', 'API', 'Models', 'Agents', 'Evaluations'],
|
|
242
|
+
appRoot: 'apps/ai',
|
|
243
|
+
category: 'ai',
|
|
244
|
+
defaultPath: '/playground',
|
|
245
|
+
localhostOrigin: 'http://localhost:7829',
|
|
246
|
+
packageName: '@tuturuuu/ai-studio',
|
|
247
|
+
portlessApp: 'ai',
|
|
248
|
+
productionUrl: 'https://ai.tuturuuu.com',
|
|
249
|
+
slug: 'ai',
|
|
250
|
+
title: 'AI Studio',
|
|
251
|
+
workspacePathResolver: workspaceRootPath,
|
|
252
|
+
},
|
|
240
253
|
{
|
|
241
254
|
aliases: ['Prompt', 'Challenges'],
|
|
242
255
|
appRoot: 'apps/nova',
|
|
@@ -336,6 +349,19 @@ export const LAUNCHABLE_APPS = [
|
|
|
336
349
|
title: 'Contacts',
|
|
337
350
|
workspacePathResolver: workspaceRootPath,
|
|
338
351
|
},
|
|
352
|
+
{
|
|
353
|
+
aliases: ['Surveys', 'Questionnaires', 'Responses', 'Form Builder'],
|
|
354
|
+
appRoot: 'apps/forms',
|
|
355
|
+
category: 'operations',
|
|
356
|
+
defaultPath: '/personal',
|
|
357
|
+
localhostOrigin: 'http://localhost:7828',
|
|
358
|
+
packageName: '@tuturuuu/forms',
|
|
359
|
+
portlessApp: 'forms',
|
|
360
|
+
productionUrl: 'https://forms.tuturuuu.com',
|
|
361
|
+
slug: 'forms',
|
|
362
|
+
title: 'Forms',
|
|
363
|
+
workspacePathResolver: workspaceRootPath,
|
|
364
|
+
},
|
|
339
365
|
{
|
|
340
366
|
aliases: ['Time Tracking', 'Timer'],
|
|
341
367
|
appRoot: 'apps/track',
|
package/src/permissions.tsx
CHANGED
|
@@ -315,6 +315,70 @@ export const permissionGroups = ({
|
|
|
315
315
|
disableOnProduction: false,
|
|
316
316
|
disabled: false,
|
|
317
317
|
},
|
|
318
|
+
{
|
|
319
|
+
id: 'use_ai_studio',
|
|
320
|
+
icon: <Sparkles />,
|
|
321
|
+
title: t('ws-roles.use_ai_studio'),
|
|
322
|
+
description: t('ws-roles.use_ai_studio_description'),
|
|
323
|
+
disableOnProduction: false,
|
|
324
|
+
disabled: false,
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
id: 'manage_ai_keys',
|
|
328
|
+
icon: <KeyRound />,
|
|
329
|
+
title: t('ws-roles.manage_ai_keys'),
|
|
330
|
+
description: t('ws-roles.manage_ai_keys_description'),
|
|
331
|
+
disableOnProduction: false,
|
|
332
|
+
disabled: false,
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
id: 'manage_ai_policy',
|
|
336
|
+
icon: <Settings2 />,
|
|
337
|
+
title: t('ws-roles.manage_ai_policy'),
|
|
338
|
+
description: t('ws-roles.manage_ai_policy_description'),
|
|
339
|
+
disableOnProduction: false,
|
|
340
|
+
disabled: false,
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
id: 'manage_ai_prompts',
|
|
344
|
+
icon: <FileText />,
|
|
345
|
+
title: t('ws-roles.manage_ai_prompts'),
|
|
346
|
+
description: t('ws-roles.manage_ai_prompts_description'),
|
|
347
|
+
disableOnProduction: false,
|
|
348
|
+
disabled: false,
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
id: 'manage_ai_agents',
|
|
352
|
+
icon: <CircuitBoard />,
|
|
353
|
+
title: t('ws-roles.manage_ai_agents'),
|
|
354
|
+
description: t('ws-roles.manage_ai_agents_description'),
|
|
355
|
+
disableOnProduction: false,
|
|
356
|
+
disabled: false,
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
id: 'manage_ai_evaluations',
|
|
360
|
+
icon: <FlaskConical />,
|
|
361
|
+
title: t('ws-roles.manage_ai_evaluations'),
|
|
362
|
+
description: t('ws-roles.manage_ai_evaluations_description'),
|
|
363
|
+
disableOnProduction: false,
|
|
364
|
+
disabled: false,
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
id: 'view_ai_usage',
|
|
368
|
+
icon: <ChartBar />,
|
|
369
|
+
title: t('ws-roles.view_ai_usage'),
|
|
370
|
+
description: t('ws-roles.view_ai_usage_description'),
|
|
371
|
+
disableOnProduction: false,
|
|
372
|
+
disabled: false,
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
id: 'view_ai_logs',
|
|
376
|
+
icon: <ScrollText />,
|
|
377
|
+
title: t('ws-roles.view_ai_logs'),
|
|
378
|
+
description: t('ws-roles.view_ai_logs_description'),
|
|
379
|
+
disableOnProduction: false,
|
|
380
|
+
disabled: false,
|
|
381
|
+
},
|
|
318
382
|
],
|
|
319
383
|
},
|
|
320
384
|
{
|
|
@@ -719,6 +783,26 @@ export const permissionGroups = ({
|
|
|
719
783
|
disableOnProduction: false,
|
|
720
784
|
disabled: false,
|
|
721
785
|
},
|
|
786
|
+
{
|
|
787
|
+
id: 'manage_user_report_automation',
|
|
788
|
+
icon: <Settings2 />,
|
|
789
|
+
title: t('ws-roles.manage_user_report_automation'),
|
|
790
|
+
description: t(
|
|
791
|
+
'ws-roles.manage_user_report_automation_description'
|
|
792
|
+
),
|
|
793
|
+
disableOnProduction: false,
|
|
794
|
+
disabled: false,
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
id: 'send_user_group_report_emails',
|
|
798
|
+
icon: <Send />,
|
|
799
|
+
title: t('ws-roles.send_user_group_report_emails'),
|
|
800
|
+
description: t(
|
|
801
|
+
'ws-roles.send_user_group_report_emails_description'
|
|
802
|
+
),
|
|
803
|
+
disableOnProduction: false,
|
|
804
|
+
disabled: false,
|
|
805
|
+
},
|
|
722
806
|
{
|
|
723
807
|
id: 'approve_reports',
|
|
724
808
|
icon: <ShieldCheck />,
|
|
@@ -877,6 +961,14 @@ export const permissionGroups = ({
|
|
|
877
961
|
disableOnProduction: false,
|
|
878
962
|
disabled: false,
|
|
879
963
|
},
|
|
964
|
+
{
|
|
965
|
+
id: 'initiate_pos_checkout',
|
|
966
|
+
icon: <CreditCard />,
|
|
967
|
+
title: t('ws-roles.initiate_pos_checkout'),
|
|
968
|
+
description: t('ws-roles.initiate_pos_checkout_description'),
|
|
969
|
+
disableOnProduction: false,
|
|
970
|
+
disabled: false,
|
|
971
|
+
},
|
|
880
972
|
{
|
|
881
973
|
id: 'view_inventory_analytics',
|
|
882
974
|
icon: <ChartBar />,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
|
|
8
8
|
describe('platform release metadata', () => {
|
|
9
9
|
it('uses the centralized shared browser app version', () => {
|
|
10
|
-
expect(TUTURUUU_PLATFORM_VERSION).toBe('0.
|
|
10
|
+
expect(TUTURUUU_PLATFORM_VERSION).toBe('0.28.0'); // x-release-please-version
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
it('preserves the source timestamp in builtAt and derives a short hash', () => {
|
package/src/platform-release.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PLATFORM_BUILD_METADATA } from './generated/platform-build-metadata';
|
|
2
2
|
|
|
3
|
-
export const TUTURUUU_PLATFORM_VERSION = '0.
|
|
3
|
+
export const TUTURUUU_PLATFORM_VERSION = '0.28.0'; // x-release-please-version
|
|
4
4
|
|
|
5
5
|
export type PlatformBuildMetadataInput = {
|
|
6
6
|
/** ISO timestamp of the source commit used for the build, not deployment time. */
|
package/src/portless.ts
CHANGED
|
@@ -6,6 +6,7 @@ export const TUTURUUU_PORTLESS_ALLOWED_DEV_ORIGINS = [
|
|
|
6
6
|
] as const;
|
|
7
7
|
|
|
8
8
|
export const TUTURUUU_PORTLESS_APP_ORIGINS = {
|
|
9
|
+
ai: `https://ai.${TUTURUUU_PORTLESS_ROOT_HOST}`,
|
|
9
10
|
apps: `https://apps.${TUTURUUU_PORTLESS_ROOT_HOST}`,
|
|
10
11
|
calendar: `https://calendar.${TUTURUUU_PORTLESS_ROOT_HOST}`,
|
|
11
12
|
chat: `https://chat.${TUTURUUU_PORTLESS_ROOT_HOST}`,
|
|
@@ -15,6 +16,7 @@ export const TUTURUUU_PORTLESS_APP_ORIGINS = {
|
|
|
15
16
|
drive: `https://drive.${TUTURUUU_PORTLESS_ROOT_HOST}`,
|
|
16
17
|
external: `https://external.${TUTURUUU_PORTLESS_ROOT_HOST}`,
|
|
17
18
|
finance: `https://finance.${TUTURUUU_PORTLESS_ROOT_HOST}`,
|
|
19
|
+
forms: `https://forms.${TUTURUUU_PORTLESS_ROOT_HOST}`,
|
|
18
20
|
hive: `https://hive.${TUTURUUU_PORTLESS_ROOT_HOST}`,
|
|
19
21
|
'hive-realtime': `https://realtime.hive.${TUTURUUU_PORTLESS_ROOT_HOST}`,
|
|
20
22
|
infra: `https://infra.${TUTURUUU_PORTLESS_ROOT_HOST}`,
|