create-ilorb 0.2.0 → 0.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.
- package/README.md +93 -74
- package/assets/dev-local.mjs +2 -2
- package/dist/args.js +1 -1
- package/dist/generate.js +6 -4
- package/dist/i18n/en.js +77 -31
- package/dist/i18n/es.js +77 -31
- package/dist/i18n/pt.js +77 -31
- package/dist/main.js +79 -14
- package/dist/products.js +79 -41
- package/dist/readme.js +43 -43
- package/dist/steps.js +13 -6
- package/dist/theme/preview.js +28 -0
- package/dist/theme/vendor/color.js +1 -1
- package/dist/theme/vendor/tokens.js +1 -1
- package/dist/theme/vendor/validate.js +219 -0
- package/dist/update.js +349 -0
- package/package.json +1 -2
- package/LICENSE-API.md +0 -108
package/dist/products.js
CHANGED
|
@@ -19,10 +19,20 @@ export const OPERA_VENDOR_TEMPLATES = [`${OPERA_VENDOR}/packages`, `${OPERA_VEND
|
|
|
19
19
|
/** The Ilorb SDK as bundled in the Ilorb Code templates (vendor/make-ilorb-sdk.sh; imported as @ilorb/*). Chat, Consultas and Widgets use it (with the chat scope in the token since 1d00db17). */
|
|
20
20
|
export const ILORB_SDK = 'vendor/ilorb-sdk';
|
|
21
21
|
export const ILORB_SDK_TEMPLATES = [`${ILORB_SDK}/packages`, `${ILORB_SDK}/tsconfig.base.json`];
|
|
22
|
+
/**
|
|
23
|
+
* Template files copied WHEN the template folder has them (a download older than 14.14 may not): the template's buyer docs,
|
|
24
|
+
* `overture-<id>/DOCS.md` (install, architecture, configuration, updating, FAQ). Not in `templates` on purpose: a missing one is
|
|
25
|
+
* never a `templates_missing` error. Used by the install copy and by the `update` scanner (so updates bring new docs too).
|
|
26
|
+
*/
|
|
27
|
+
export function optionalTemplates(product) {
|
|
28
|
+
return [`${product.api.dir.split('/')[0]}/DOCS.md`];
|
|
29
|
+
}
|
|
22
30
|
/** paths forbidden in the generated project (copyTemplates refuses them and the test checks) */
|
|
23
31
|
export const FORBIDDEN_TEMPLATE_RE = /^vendor\/[^/]+\/apps(\/|$)|(^|\/)apps\/chat(\/|$)/;
|
|
24
32
|
/** CLOUD Opera chat (the buyer uses a TEST app of their own in local mode and the production app in the cloud) */
|
|
25
33
|
export const OPERA_CLOUD = { chat: 'https://chat-signal.ilorb.app', rooms: 'https://api-signal.ilorb.app' };
|
|
34
|
+
/** the deep-link scheme the installer writes into the app's app.json (`expo.scheme`) — the slug, always a valid URI scheme */
|
|
35
|
+
export const appScheme = (a) => a.slug;
|
|
26
36
|
const b64 = (n) => randomBytes(n).toString('base64');
|
|
27
37
|
const b64url = (n) => randomBytes(n).toString('base64url');
|
|
28
38
|
/** the Opera keys go along when the buyer provided them (otherwise: via the panel) */
|
|
@@ -33,7 +43,7 @@ const operaSecrets = (s) => ({
|
|
|
33
43
|
export const PRODUCTS = {
|
|
34
44
|
chat: {
|
|
35
45
|
id: 'chat',
|
|
36
|
-
name: '
|
|
46
|
+
name: 'Ilorb Chat',
|
|
37
47
|
templates: [
|
|
38
48
|
'overture-core/api/workers',
|
|
39
49
|
'overture-core/web/react',
|
|
@@ -50,8 +60,9 @@ export const PRODUCTS = {
|
|
|
50
60
|
{ key: 'identity', suffix: 'identity', dir: 'overture-core/api/workers', migrations: 'migrations' },
|
|
51
61
|
{ key: 'chat', suffix: 'chat', dir: 'overture-chat/api/workers', migrations: 'migrations' },
|
|
52
62
|
],
|
|
53
|
-
// R2
|
|
54
|
-
|
|
63
|
+
// NO product R2: photos and voice messages go to Ilorb Signal (uploadMedia); the Chat Worker binds no bucket. Older installs
|
|
64
|
+
// created an unused `<slug>-media` — it stays in their state/account untouched (never deleted), nothing reads it.
|
|
65
|
+
r2: [],
|
|
55
66
|
queues: [],
|
|
56
67
|
api: { suffix: 'chat', dir: 'overture-chat/api/workers', d1Key: 'chat', health: '/v1/config' },
|
|
57
68
|
pages: [{ key: 'admin', suffix: 'admin', dir: 'overture-core/web/react' }],
|
|
@@ -95,7 +106,7 @@ export const PRODUCTS = {
|
|
|
95
106
|
// and media stay in Opera). The Worker embeds the compiled widget (web/js/build.mjs → src/generated/assets.ts).
|
|
96
107
|
widgets: {
|
|
97
108
|
id: 'widgets',
|
|
98
|
-
name: '
|
|
109
|
+
name: 'Ilorb Widgets',
|
|
99
110
|
templates: [
|
|
100
111
|
'overture-core/api/workers',
|
|
101
112
|
'overture-core/web/react',
|
|
@@ -176,7 +187,7 @@ export const PRODUCTS = {
|
|
|
176
187
|
// local: the e-mail only goes to the Worker log
|
|
177
188
|
EMAIL_MODE: 'log',
|
|
178
189
|
}),
|
|
179
|
-
core: { name: () => '
|
|
190
|
+
core: { name: () => 'Ilorb Widgets', platforms: ['web'] },
|
|
180
191
|
opera: true,
|
|
181
192
|
customDomain: false,
|
|
182
193
|
localPorts: ['auth', 'api', 'admin', 'site'],
|
|
@@ -188,7 +199,7 @@ export const PRODUCTS = {
|
|
|
188
199
|
// the professional; pages in the Core panel. No R2 (the room and chat belong to Opera).
|
|
189
200
|
consultas: {
|
|
190
201
|
id: 'consultas',
|
|
191
|
-
name: '
|
|
202
|
+
name: 'Ilorb Consultas',
|
|
192
203
|
templates: [
|
|
193
204
|
'overture-core/api/workers',
|
|
194
205
|
'overture-core/web/react',
|
|
@@ -237,6 +248,8 @@ export const PRODUCTS = {
|
|
|
237
248
|
// Opera callback URL and the payment return when there is no web app
|
|
238
249
|
PUBLIC_URL: urls.api,
|
|
239
250
|
...(urls.app ? { APP_URL: urls.app } : {}),
|
|
251
|
+
// the phone payment return opens <APP_SCHEME>://booking/<id>: the same scheme written into app.json
|
|
252
|
+
APP_SCHEME: appScheme(a),
|
|
240
253
|
OPERA_APP_ID: a.opera.appId ?? '',
|
|
241
254
|
OPERA_CHAT_URL: urls.opera,
|
|
242
255
|
OPERA_ROOMS_URL: urls.rooms,
|
|
@@ -254,6 +267,7 @@ export const PRODUCTS = {
|
|
|
254
267
|
PAYMENTS_CALLBACK_SECRET: s.PAYMENTS_CALLBACK_SECRET,
|
|
255
268
|
PUBLIC_URL: urls.api,
|
|
256
269
|
...(urls.app ? { APP_URL: urls.app } : {}),
|
|
270
|
+
APP_SCHEME: appScheme(a),
|
|
257
271
|
OPERA_APP_ID: a.opera.appId ?? '',
|
|
258
272
|
OPERA_APP_SECRET: s.OPERA_APP_SECRET ?? '',
|
|
259
273
|
...(s.OPERA_CALLBACK_SECRET ? { OPERA_CALLBACK_SECRET: s.OPERA_CALLBACK_SECRET } : {}),
|
|
@@ -264,6 +278,8 @@ export const PRODUCTS = {
|
|
|
264
278
|
NOTIFY_MODE: 'log',
|
|
265
279
|
CORS_ORIGINS: [urls.admin, urls.app].filter(Boolean).join(','),
|
|
266
280
|
}),
|
|
281
|
+
// 1: APP_SCHEME (payment return deep link) — old installs get it on --resume
|
|
282
|
+
configRev: 1,
|
|
267
283
|
core: { name: (a) => a.appName, platforms: ['ios', 'android', 'web'] },
|
|
268
284
|
opera: true,
|
|
269
285
|
customDomain: false,
|
|
@@ -276,7 +292,7 @@ export const PRODUCTS = {
|
|
|
276
292
|
// (wrangler.jsonc → assets.directory = overture-core/app/react-native/packages/theme/assets/fonts, by path).
|
|
277
293
|
status: {
|
|
278
294
|
id: 'status',
|
|
279
|
-
name: '
|
|
295
|
+
name: 'Ilorb Status',
|
|
280
296
|
templates: [
|
|
281
297
|
'overture-core/api/workers',
|
|
282
298
|
'overture-core/web/react',
|
|
@@ -332,7 +348,7 @@ export const PRODUCTS = {
|
|
|
332
348
|
ENVIRONMENT: 'dev',
|
|
333
349
|
CORS_ORIGINS: urls.admin,
|
|
334
350
|
}),
|
|
335
|
-
core: { name: () => '
|
|
351
|
+
core: { name: () => 'Ilorb Status', platforms: ['web'] },
|
|
336
352
|
opera: false,
|
|
337
353
|
customDomain: true,
|
|
338
354
|
localPorts: ['auth', 'api', 'admin'],
|
|
@@ -346,7 +362,7 @@ export const PRODUCTS = {
|
|
|
346
362
|
// 'site' locally) and the Expo app (app/react-native, EXPO_PUBLIC_AGENDA_API_URL).
|
|
347
363
|
agenda: {
|
|
348
364
|
id: 'agenda',
|
|
349
|
-
name: '
|
|
365
|
+
name: 'Ilorb Agenda',
|
|
350
366
|
templates: [
|
|
351
367
|
'overture-core/api/workers',
|
|
352
368
|
'overture-core/web/react',
|
|
@@ -397,23 +413,28 @@ export const PRODUCTS = {
|
|
|
397
413
|
PUBLIC_URL: urls.api,
|
|
398
414
|
// links in e-mails and the payment return: the public booking page
|
|
399
415
|
...(urls.site ? { APP_URL: urls.site } : {}),
|
|
416
|
+
// the phone payment return opens <APP_SCHEME>://booking/<id>: the same scheme written into app.json
|
|
417
|
+
APP_SCHEME: appScheme(a),
|
|
400
418
|
NOTIFY_MODE: local ? 'log' : 'live',
|
|
401
419
|
ENVIRONMENT: local ? 'dev' : 'production',
|
|
402
420
|
// the panel, the booking page (and its iframe on the buyer's site) and the local web app
|
|
403
421
|
CORS_ORIGINS: [urls.admin, urls.site, urls.app].filter(Boolean).join(','),
|
|
404
422
|
...(a.email.from ? { EMAIL_FROM: a.email.from } : {}),
|
|
405
423
|
}),
|
|
406
|
-
localDevVars: (
|
|
424
|
+
localDevVars: (a, s, urls) => ({
|
|
407
425
|
CORE_URL: urls.auth,
|
|
408
426
|
CORE_SERVICE_TOKEN: s.PRODUCT_SERVICE_TOKEN,
|
|
409
427
|
PAYMENTS_TOKEN: s.PAYMENTS_TOKEN,
|
|
410
428
|
PAYMENTS_CALLBACK_SECRET: s.PAYMENTS_CALLBACK_SECRET,
|
|
411
429
|
PUBLIC_URL: urls.api,
|
|
412
430
|
...(urls.site ? { APP_URL: urls.site } : {}),
|
|
431
|
+
APP_SCHEME: appScheme(a),
|
|
413
432
|
NOTIFY_MODE: 'log',
|
|
414
433
|
ENVIRONMENT: 'dev',
|
|
415
434
|
CORS_ORIGINS: [urls.admin, urls.site, urls.app].filter(Boolean).join(','),
|
|
416
435
|
}),
|
|
436
|
+
// 1: APP_SCHEME (payment return deep link) — old installs get it on --resume
|
|
437
|
+
configRev: 1,
|
|
417
438
|
// the client books via the app (iOS/Android) and via the public page / widget (web)
|
|
418
439
|
core: { name: (a) => a.appName, platforms: ['ios', 'android', 'web'] },
|
|
419
440
|
opera: false,
|
|
@@ -427,7 +448,7 @@ export const PRODUCTS = {
|
|
|
427
448
|
// SERVICE_TOKEN. The server imports the Core theme by relative path (packages/theme/src/tokens.ts).
|
|
428
449
|
sites: {
|
|
429
450
|
id: 'sites',
|
|
430
|
-
name: '
|
|
451
|
+
name: 'Ilorb Sites',
|
|
431
452
|
templates: [
|
|
432
453
|
'overture-core/api/workers',
|
|
433
454
|
'overture-core/web/react',
|
|
@@ -495,7 +516,7 @@ export const PRODUCTS = {
|
|
|
495
516
|
// Optional Ilorb team chat (one group per org) + support chat (org owner/admins ↔ the SaaS team): ILORB_* only with the key.
|
|
496
517
|
starter: {
|
|
497
518
|
id: 'starter',
|
|
498
|
-
name: '
|
|
519
|
+
name: 'Ilorb Starter',
|
|
499
520
|
templates: [
|
|
500
521
|
'overture-core/api/workers',
|
|
501
522
|
'overture-core/web/react',
|
|
@@ -581,7 +602,7 @@ export const PRODUCTS = {
|
|
|
581
602
|
// the buyer's project: nothing to rewrite). Hourly cron (17 min): daily salt for uniques and retention.
|
|
582
603
|
link: {
|
|
583
604
|
id: 'link',
|
|
584
|
-
name: '
|
|
605
|
+
name: 'Ilorb Link',
|
|
585
606
|
templates: [
|
|
586
607
|
'overture-core/api/workers',
|
|
587
608
|
'overture-core/web/react',
|
|
@@ -652,7 +673,7 @@ export const PRODUCTS = {
|
|
|
652
673
|
// <CORE_URL>/v1/fonts/fonts.css (the Worker does not bundle .ttf). Hourly cron (17 min). Optional Ilorb chat with the agent.
|
|
653
674
|
imoveis: {
|
|
654
675
|
id: 'imoveis',
|
|
655
|
-
name: '
|
|
676
|
+
name: 'Ilorb Imóveis',
|
|
656
677
|
templates: [
|
|
657
678
|
'overture-core/api/workers',
|
|
658
679
|
'overture-core/web/react',
|
|
@@ -678,7 +699,12 @@ export const PRODUCTS = {
|
|
|
678
699
|
r2: [{ key: 'media', suffix: 'imoveis-media', binding: 'MEDIA' }],
|
|
679
700
|
queues: [],
|
|
680
701
|
api: { suffix: 'imoveis', dir: 'overture-imoveis/api/workers', d1Key: 'imoveis', health: '/v1/health' },
|
|
681
|
-
pages: [
|
|
702
|
+
pages: [
|
|
703
|
+
{ key: 'admin', suffix: 'admin', dir: 'overture-core/web/react' },
|
|
704
|
+
// the advertiser web app (expo export) on Pages `<app>-app`: its URL is the Worker's APP_URL in the cloud too (lead and
|
|
705
|
+
// invite e-mail links, payment return, the site's "advertise" and chat buttons) — without it they were relative/empty
|
|
706
|
+
{ key: 'app', suffix: 'app', dir: 'overture-imoveis/app/react-native' },
|
|
707
|
+
],
|
|
682
708
|
app: { dir: 'overture-imoveis/app/react-native', apiEnv: 'EXPO_PUBLIC_IMOVEIS_API_URL' },
|
|
683
709
|
prebuild: null,
|
|
684
710
|
generatedSecrets: {
|
|
@@ -701,7 +727,7 @@ export const PRODUCTS = {
|
|
|
701
727
|
...(a.opera.appId ? { ILORB_APP_ID: a.opera.appId, ILORB_CHAT_URL: urls.opera } : {}),
|
|
702
728
|
// the site (canonical, sitemap, links)
|
|
703
729
|
PUBLIC_URL: urls.api,
|
|
704
|
-
// the advertiser app's web (links in e-mails, payment return
|
|
730
|
+
// the advertiser app's web (links in e-mails, payment return, the site's chat button): cloud = Pages `<app>-app`, local = the port
|
|
705
731
|
...(urls.app ? { APP_URL: urls.app } : {}),
|
|
706
732
|
NOTIFY_MODE: local ? 'log' : 'live',
|
|
707
733
|
ENVIRONMENT: local ? 'dev' : 'production',
|
|
@@ -735,7 +761,7 @@ export const PRODUCTS = {
|
|
|
735
761
|
// (MEDIA). Hourly cron. Record: overture-quiz/INSTALADOR.md. Optional sample questions.
|
|
736
762
|
quiz: {
|
|
737
763
|
id: 'quiz',
|
|
738
|
-
name: '
|
|
764
|
+
name: 'Ilorb Quiz',
|
|
739
765
|
templates: [
|
|
740
766
|
'overture-core/api/workers',
|
|
741
767
|
'overture-core/web/react',
|
|
@@ -806,7 +832,7 @@ export const PRODUCTS = {
|
|
|
806
832
|
// Optional Ilorb live chat on a ticket (requester ↔ assigned agent): ILORB_* only with the key; the bundled SDK ships.
|
|
807
833
|
helpcenter: {
|
|
808
834
|
id: 'helpcenter',
|
|
809
|
-
name: '
|
|
835
|
+
name: 'Ilorb Help Center',
|
|
810
836
|
templates: [
|
|
811
837
|
'overture-core/api/workers',
|
|
812
838
|
'overture-core/web/react',
|
|
@@ -849,8 +875,10 @@ export const PRODUCTS = {
|
|
|
849
875
|
coreSecrets: [],
|
|
850
876
|
// SLA (about to expire/expired) and e-mails that failed: every minute
|
|
851
877
|
cron: '* * * * *',
|
|
852
|
-
// Turnstile for the public form (optional)
|
|
878
|
+
// Turnstile for the public form (optional): the secret from the environment, the PUBLIC site key from
|
|
879
|
+
// --turnstile-site-key / TURNSTILE_SITE_KEY. The server only enforces the captcha when BOTH are set.
|
|
853
880
|
envSecrets: ['TURNSTILE_SECRET'],
|
|
881
|
+
publicVars: [{ name: 'TURNSTILE_SITE_KEY', flag: 'turnstile-site-key', pairedSecret: 'TURNSTILE_SECRET' }],
|
|
854
882
|
workerSecrets: (s) => ({
|
|
855
883
|
CORE_SERVICE_TOKEN: s.PRODUCT_SERVICE_TOKEN,
|
|
856
884
|
SIGNING_KEY: s.HELPCENTER_SIGNING_KEY,
|
|
@@ -870,6 +898,8 @@ export const PRODUCTS = {
|
|
|
870
898
|
// CORS only for the PANEL routes; the public ones (widget/center) accept any site by design
|
|
871
899
|
CORS_ORIGINS: urls.admin,
|
|
872
900
|
...(a.email.from ? { EMAIL_FROM: a.email.from } : {}),
|
|
901
|
+
// the public Turnstile site key (the widget on /help/new); a plain var — it is public
|
|
902
|
+
...(a.vars?.TURNSTILE_SITE_KEY ? { TURNSTILE_SITE_KEY: a.vars.TURNSTILE_SITE_KEY } : {}),
|
|
873
903
|
}),
|
|
874
904
|
localDevVars: (a, s, urls) => ({
|
|
875
905
|
CORE_URL: urls.auth,
|
|
@@ -879,12 +909,13 @@ export const PRODUCTS = {
|
|
|
879
909
|
NOTIFY_MODE: 'log',
|
|
880
910
|
CORS_ORIGINS: urls.admin,
|
|
881
911
|
...(s.TURNSTILE_SECRET ? { TURNSTILE_SECRET: s.TURNSTILE_SECRET } : {}),
|
|
912
|
+
...(a.vars?.TURNSTILE_SITE_KEY ? { TURNSTILE_SITE_KEY: a.vars.TURNSTILE_SITE_KEY } : {}),
|
|
882
913
|
// live chat: the Ilorb key (ilorb.env of the download, or --opera-app-id + OPERA_APP_SECRET) — only both
|
|
883
914
|
...(a.opera.appId && s.OPERA_APP_SECRET
|
|
884
915
|
? { ILORB_APP_ID: a.opera.appId, ILORB_APP_SECRET: s.OPERA_APP_SECRET, ILORB_CHAT_URL: urls.opera, ILORB_TOKEN_TTL: '600' }
|
|
885
916
|
: {}),
|
|
886
917
|
}),
|
|
887
|
-
core: { name: () => '
|
|
918
|
+
core: { name: () => 'Ilorb Help Center', platforms: ['web'] },
|
|
888
919
|
opera: false,
|
|
889
920
|
ilorbOptional: true,
|
|
890
921
|
customDomain: false,
|
|
@@ -898,7 +929,7 @@ export const PRODUCTS = {
|
|
|
898
929
|
// Record: overture-classificados/INSTALADOR.md (with the post-install steps and the checks).
|
|
899
930
|
classificados: {
|
|
900
931
|
id: 'classificados',
|
|
901
|
-
name: '
|
|
932
|
+
name: 'Ilorb Classificados',
|
|
902
933
|
templates: [
|
|
903
934
|
'overture-core/api/workers',
|
|
904
935
|
'overture-core/web/react',
|
|
@@ -1000,7 +1031,7 @@ export const PRODUCTS = {
|
|
|
1000
1031
|
// Optional Ilorb order chat (customer, store, courier after accepting the ride): ILORB_* only with the key.
|
|
1001
1032
|
delivery: {
|
|
1002
1033
|
id: 'delivery',
|
|
1003
|
-
name: '
|
|
1034
|
+
name: 'Ilorb Delivery',
|
|
1004
1035
|
templates: [
|
|
1005
1036
|
'overture-core/api/workers',
|
|
1006
1037
|
'overture-core/web/react',
|
|
@@ -1080,9 +1111,9 @@ overture-delivery/app/react-native o app do cliente e do entregador (Expo: iOS,
|
|
|
1080
1111
|
overture-delivery/web/react páginas no painel (pedidos, cardápio, loja · lojas, entregadores, repasses, ajustes)
|
|
1081
1112
|
scripts/dev-local.mjs pnpm dev`,
|
|
1082
1113
|
run: {
|
|
1083
|
-
pt: '`pnpm dev` sobe o login (Core Auth, com PAGAMENTOS simulados), o Worker do Delivery (o cron dos pagamentos vencidos é chamado a cada minuto), o painel com as páginas do Delivery e o app web do cliente e do entregador. Sem
|
|
1084
|
-
es: '`pnpm dev` levanta el acceso (Core Auth, con PAGOS simulados), el Worker de Delivery (el cron de los pagos vencidos se llama cada minuto), el panel con las páginas de Delivery y la app web del cliente y del repartidor. Sin
|
|
1085
|
-
en: '`pnpm dev` starts the login (Core Auth, with SIMULATED payments), the Delivery Worker (the expired-payment cron is called every minute), the panel with the Delivery pages and the customer/courier web app. No
|
|
1114
|
+
pt: '`pnpm dev` sobe o login (Core Auth, com PAGAMENTOS simulados), o Worker do Delivery (o cron dos pagamentos vencidos é chamado a cada minuto), o painel com as páginas do Delivery e o app web do cliente e do entregador. Sem Ilorb Signal. Só funciona numa instalação feita com `--target local`.',
|
|
1115
|
+
es: '`pnpm dev` levanta el acceso (Core Auth, con PAGOS simulados), el Worker de Delivery (el cron de los pagos vencidos se llama cada minuto), el panel con las páginas de Delivery y la app web del cliente y del repartidor. Sin Ilorb Signal. Solo funciona en una instalación hecha con `--target local`.',
|
|
1116
|
+
en: '`pnpm dev` starts the login (Core Auth, with SIMULATED payments), the Delivery Worker (the expired-payment cron is called every minute), the panel with the Delivery pages and the customer/courier web app. No Ilorb Signal. Only for an installation made with `--target local`.',
|
|
1086
1117
|
},
|
|
1087
1118
|
},
|
|
1088
1119
|
finalNext: ['final.next.delivery'],
|
|
@@ -1095,7 +1126,7 @@ scripts/dev-local.mjs pnpm dev`,
|
|
|
1095
1126
|
// Core; CORE_SERVICE_TOKEN = the Cardápio token (staff by e-mail and the moderator role inside the product itself).
|
|
1096
1127
|
cardapio: {
|
|
1097
1128
|
id: 'cardapio',
|
|
1098
|
-
name: '
|
|
1129
|
+
name: 'Ilorb Cardápio',
|
|
1099
1130
|
templates: [
|
|
1100
1131
|
'overture-core/api/workers',
|
|
1101
1132
|
'overture-core/web/react',
|
|
@@ -1176,9 +1207,9 @@ overture-cardapio/web/mesa a página da mesa (compilada para dentro do Wor
|
|
|
1176
1207
|
overture-cardapio/web/react páginas no painel (salão ao vivo, cardápio, mesas e QR, restaurante, restaurantes e planos)
|
|
1177
1208
|
scripts/dev-local.mjs pnpm dev`,
|
|
1178
1209
|
run: {
|
|
1179
|
-
pt: '`pnpm dev` sobe o login (Core Auth, com PAGAMENTOS simulados), o Worker do Cardápio (a página da mesa em `http://localhost:<porta da api>/m/…`, as fotos no R2 local, o salão ao vivo no Durable Object local, o cron chamado a cada minuto) e o painel com as páginas do Cardápio. Sem app e sem
|
|
1180
|
-
es: '`pnpm dev` levanta el acceso (Core Auth, con PAGOS simulados), el Worker del Menú (la página de la mesa en `http://localhost:<puerto de la api>/m/…`, las fotos en el R2 local, el salón en vivo en el Durable Object local, el cron llamado cada minuto) y el panel con las páginas del Menú. Sin app y sin
|
|
1181
|
-
en: '`pnpm dev` starts the login (Core Auth, with SIMULATED payments), the Menu Worker (the table page at `http://localhost:<api port>/m/…`, photos in the local R2, the live floor in the local Durable Object, the cron called every minute) and the panel with the Menu pages. No app and no
|
|
1210
|
+
pt: '`pnpm dev` sobe o login (Core Auth, com PAGAMENTOS simulados), o Worker do Cardápio (a página da mesa em `http://localhost:<porta da api>/m/…`, as fotos no R2 local, o salão ao vivo no Durable Object local, o cron chamado a cada minuto) e o painel com as páginas do Cardápio. Sem app e sem Ilorb Signal. Os QRs apontam para o endereço do Worker (`PUBLIC_URL`): na nuvem, troque o endereço ANTES de imprimir — trocar depois invalida os QRs. Só funciona numa instalação feita com `--target local`.',
|
|
1211
|
+
es: '`pnpm dev` levanta el acceso (Core Auth, con PAGOS simulados), el Worker del Menú (la página de la mesa en `http://localhost:<puerto de la api>/m/…`, las fotos en el R2 local, el salón en vivo en el Durable Object local, el cron llamado cada minuto) y el panel con las páginas del Menú. Sin app y sin Ilorb Signal. Los QR apuntan a la dirección del Worker (`PUBLIC_URL`): en la nube, cambia la dirección ANTES de imprimir — cambiarla después invalida los QR. Solo funciona en una instalación hecha con `--target local`.',
|
|
1212
|
+
en: '`pnpm dev` starts the login (Core Auth, with SIMULATED payments), the Menu Worker (the table page at `http://localhost:<api port>/m/…`, photos in the local R2, the live floor in the local Durable Object, the cron called every minute) and the panel with the Menu pages. No app and no Ilorb Signal. The QR codes point to the Worker address (`PUBLIC_URL`): in the cloud, change the address BEFORE printing — changing it later invalidates the QR codes. Only for an installation made with `--target local`.',
|
|
1182
1213
|
},
|
|
1183
1214
|
},
|
|
1184
1215
|
finalNext: ['final.next.cardapio', 'final.next.cardapioQr'],
|
|
@@ -1190,7 +1221,7 @@ scripts/dev-local.mjs pnpm dev`,
|
|
|
1190
1221
|
// (/v1/auth/start and /verify): both URLs go into the Core's settings.corsOrigins (coreCorsApi). No fonts step.
|
|
1191
1222
|
shop: {
|
|
1192
1223
|
id: 'shop',
|
|
1193
|
-
name: '
|
|
1224
|
+
name: 'Ilorb Shop',
|
|
1194
1225
|
templates: [
|
|
1195
1226
|
'overture-core/api/workers',
|
|
1196
1227
|
'overture-core/web/react',
|
|
@@ -1276,9 +1307,9 @@ overture-shop/app/react-native o app do cliente (Expo: iOS, Android e web → P
|
|
|
1276
1307
|
overture-shop/web/react páginas no painel (visão, pedidos, produtos, clientes, cupons, frete, avaliações, planilhas, configurações)
|
|
1277
1308
|
scripts/dev-local.mjs pnpm dev`,
|
|
1278
1309
|
run: {
|
|
1279
|
-
pt: '`pnpm dev` sobe o login (Core Auth, com PAGAMENTOS simulados), o Worker da Loja (a vitrine em `http://localhost:<porta da api>/`, as fotos no R2 local, o cron chamado a cada minuto), o painel com as páginas da Loja e o app web do cliente. Os e-mails dos pedidos ficam gravados (NOTIFY_MODE=log). Sem
|
|
1280
|
-
es: '`pnpm dev` levanta el acceso (Core Auth, con PAGOS simulados), el Worker de la Tienda (la vitrina en `http://localhost:<puerto de la api>/`, las fotos en el R2 local, el cron llamado cada minuto), el panel con las páginas de la Tienda y la app web del cliente. Los e-mails de los pedidos quedan grabados (NOTIFY_MODE=log). Sin
|
|
1281
|
-
en: '`pnpm dev` starts the login (Core Auth, with SIMULATED payments), the Shop Worker (the storefront at `http://localhost:<api port>/`, photos in the local R2, the cron called every minute), the panel with the Shop pages and the customer web app. Order e-mails are only recorded (NOTIFY_MODE=log). No
|
|
1310
|
+
pt: '`pnpm dev` sobe o login (Core Auth, com PAGAMENTOS simulados), o Worker da Loja (a vitrine em `http://localhost:<porta da api>/`, as fotos no R2 local, o cron chamado a cada minuto), o painel com as páginas da Loja e o app web do cliente. Os e-mails dos pedidos ficam gravados (NOTIFY_MODE=log). Sem Ilorb Signal. Na nuvem: R2 `{media}`, o app web no Pages `{app}`, e a vitrine e o app web entram nas origens do Core (o checkout entra pelo navegador). Só funciona numa instalação feita com `--target local`.',
|
|
1311
|
+
es: '`pnpm dev` levanta el acceso (Core Auth, con PAGOS simulados), el Worker de la Tienda (la vitrina en `http://localhost:<puerto de la api>/`, las fotos en el R2 local, el cron llamado cada minuto), el panel con las páginas de la Tienda y la app web del cliente. Los e-mails de los pedidos quedan grabados (NOTIFY_MODE=log). Sin Ilorb Signal. En la nube: R2 `{media}`, la app web en el Pages `{app}`, y la vitrina y la app web entran en los orígenes del Core (el checkout entra por el navegador). Solo funciona en una instalación hecha con `--target local`.',
|
|
1312
|
+
en: '`pnpm dev` starts the login (Core Auth, with SIMULATED payments), the Shop Worker (the storefront at `http://localhost:<api port>/`, photos in the local R2, the cron called every minute), the panel with the Shop pages and the customer web app. Order e-mails are only recorded (NOTIFY_MODE=log). No Ilorb Signal. In the cloud: R2 `{media}`, the web app on the `{app}` Pages, and the storefront and the web app join the Core origins (checkout signs in from the browser). Only for an installation made with `--target local`.',
|
|
1282
1313
|
},
|
|
1283
1314
|
},
|
|
1284
1315
|
finalNext: ['final.next.shop'],
|
|
@@ -1290,7 +1321,7 @@ scripts/dev-local.mjs pnpm dev`,
|
|
|
1290
1321
|
// equal). No CORE_SERVICE_TOKEN (does not find people in the Core) and never the ADMIN_TOKEN. Expo app for the business.
|
|
1291
1322
|
faturas: {
|
|
1292
1323
|
id: 'faturas',
|
|
1293
|
-
name: '
|
|
1324
|
+
name: 'Ilorb Faturas',
|
|
1294
1325
|
templates: [
|
|
1295
1326
|
'overture-core/api/workers',
|
|
1296
1327
|
'overture-core/web/react',
|
|
@@ -1364,9 +1395,9 @@ scripts/dev-local.mjs pnpm dev
|
|
|
1364
1395
|
|
|
1365
1396
|
O Faturas faz orçamentos, faturas e cobranças; ele NÃO emite nota fiscal oficial (NF-e/NFS-e ou equivalente do país).`,
|
|
1366
1397
|
run: {
|
|
1367
|
-
pt: '`pnpm dev` sobe o login (Core Auth, com PAGAMENTOS simulados), o Worker do Faturas (os links públicos em `http://localhost:<porta da api>/…`, os PDFs no R2 local, o cron de hora em hora em `/__scheduled`), o painel com as páginas do Faturas e o app web da empresa. Os e-mails ficam gravados (NOTIFY_MODE=log). Sem
|
|
1368
|
-
es: '`pnpm dev` levanta el acceso (Core Auth, con PAGOS simulados), el Worker de Facturas (los enlaces públicos en `http://localhost:<puerto de la api>/…`, los PDF en el R2 local, el cron de cada hora en `/__scheduled`), el panel con las páginas de Facturas y la app web de la empresa. Los e-mails quedan grabados (NOTIFY_MODE=log). Sin
|
|
1369
|
-
en: '`pnpm dev` starts the login (Core Auth, with SIMULATED payments), the Invoices Worker (public links at `http://localhost:<api port>/…`, PDFs in the local R2, the hourly cron at `/__scheduled`), the panel with the Invoices pages and the company web app. E-mails are only recorded (NOTIFY_MODE=log). No
|
|
1398
|
+
pt: '`pnpm dev` sobe o login (Core Auth, com PAGAMENTOS simulados), o Worker do Faturas (os links públicos em `http://localhost:<porta da api>/…`, os PDFs no R2 local, o cron de hora em hora em `/__scheduled`), o painel com as páginas do Faturas e o app web da empresa. Os e-mails ficam gravados (NOTIFY_MODE=log). Sem Ilorb Signal. Só funciona numa instalação feita com `--target local`.',
|
|
1399
|
+
es: '`pnpm dev` levanta el acceso (Core Auth, con PAGOS simulados), el Worker de Facturas (los enlaces públicos en `http://localhost:<puerto de la api>/…`, los PDF en el R2 local, el cron de cada hora en `/__scheduled`), el panel con las páginas de Facturas y la app web de la empresa. Los e-mails quedan grabados (NOTIFY_MODE=log). Sin Ilorb Signal. Solo funciona en una instalación hecha con `--target local`.',
|
|
1400
|
+
en: '`pnpm dev` starts the login (Core Auth, with SIMULATED payments), the Invoices Worker (public links at `http://localhost:<api port>/…`, PDFs in the local R2, the hourly cron at `/__scheduled`), the panel with the Invoices pages and the company web app. E-mails are only recorded (NOTIFY_MODE=log). No Ilorb Signal. Only for an installation made with `--target local`.',
|
|
1370
1401
|
},
|
|
1371
1402
|
},
|
|
1372
1403
|
finalNext: ['final.next.faturas', 'final.next.faturasNoFiscal'],
|
|
@@ -1379,7 +1410,7 @@ O Faturas faz orçamentos, faturas e cobranças; ele NÃO emite nota fiscal ofic
|
|
|
1379
1410
|
// Optional Ilorb class chat (one invite-only group per live course; teacher + students with access): ILORB_* only with the key.
|
|
1380
1411
|
cursos: {
|
|
1381
1412
|
id: 'cursos',
|
|
1382
|
-
name: '
|
|
1413
|
+
name: 'Ilorb Cursos',
|
|
1383
1414
|
templates: [
|
|
1384
1415
|
'overture-core/api/workers',
|
|
1385
1416
|
'overture-core/web/react',
|
|
@@ -1436,6 +1467,8 @@ O Faturas faz orçamentos, faturas e cobranças; ele NÃO emite nota fiscal ofic
|
|
|
1436
1467
|
PUBLIC_URL: urls.api,
|
|
1437
1468
|
// the web app: payment return on the web
|
|
1438
1469
|
...(urls.app ? { APP_URL: urls.app } : {}),
|
|
1470
|
+
// the phone payment return opens <APP_SCHEME>://checkout: the same scheme written into app.json
|
|
1471
|
+
APP_SCHEME: appScheme(a),
|
|
1439
1472
|
VIDEO_URL_TTL: '7200',
|
|
1440
1473
|
CORS_ORIGINS: [urls.admin, urls.app].filter(Boolean).join(','),
|
|
1441
1474
|
}),
|
|
@@ -1446,6 +1479,7 @@ O Faturas faz orçamentos, faturas e cobranças; ele NÃO emite nota fiscal ofic
|
|
|
1446
1479
|
VIDEO_SIGNING_KEY: s.VIDEO_SIGNING_KEY,
|
|
1447
1480
|
PUBLIC_URL: urls.api,
|
|
1448
1481
|
...(urls.app ? { APP_URL: urls.app } : {}),
|
|
1482
|
+
APP_SCHEME: appScheme(a),
|
|
1449
1483
|
VIDEO_URL_TTL: '7200',
|
|
1450
1484
|
CORS_ORIGINS: [urls.admin, urls.app].filter(Boolean).join(','),
|
|
1451
1485
|
// class chat: the Ilorb key (ilorb.env of the download, or --opera-app-id + OPERA_APP_SECRET) — only both
|
|
@@ -1453,6 +1487,8 @@ O Faturas faz orçamentos, faturas e cobranças; ele NÃO emite nota fiscal ofic
|
|
|
1453
1487
|
? { ILORB_APP_ID: a.opera.appId, ILORB_APP_SECRET: s.OPERA_APP_SECRET, ILORB_CHAT_URL: urls.opera, ILORB_TOKEN_TTL: '600' }
|
|
1454
1488
|
: {}),
|
|
1455
1489
|
}),
|
|
1490
|
+
// 1: APP_SCHEME (payment return deep link) — old installs get it on --resume
|
|
1491
|
+
configRev: 1,
|
|
1456
1492
|
core: { name: (a) => a.appName, platforms: ['ios', 'android', 'web'] },
|
|
1457
1493
|
opera: false,
|
|
1458
1494
|
ilorbOptional: true,
|
|
@@ -1468,9 +1504,9 @@ overture-cursos/app/react-native o app do aluno e do professor (Expo: iOS, Andr
|
|
|
1468
1504
|
overture-cursos/web/react páginas no painel (visão, cursos, matrículas, certificados, professores, cupons, ajustes)
|
|
1469
1505
|
scripts/dev-local.mjs pnpm dev`,
|
|
1470
1506
|
run: {
|
|
1471
|
-
pt: '`pnpm dev` sobe o login (Core Auth, com PAGAMENTOS simulados), o Worker dos Cursos (vídeos e PDFs no R2 local, o cron de hora em hora em `/__scheduled`), o painel com as páginas dos Cursos e o app web do aluno. Sem
|
|
1472
|
-
es: '`pnpm dev` levanta el acceso (Core Auth, con PAGOS simulados), el Worker de Cursos (videos y PDF en el R2 local, el cron de cada hora en `/__scheduled`), el panel con las páginas de Cursos y la app web del alumno. Sin
|
|
1473
|
-
en: '`pnpm dev` starts the login (Core Auth, with SIMULATED payments), the Courses Worker (videos and PDFs in the local R2, the hourly cron at `/__scheduled`), the panel with the Courses pages and the student web app. No
|
|
1507
|
+
pt: '`pnpm dev` sobe o login (Core Auth, com PAGAMENTOS simulados), o Worker dos Cursos (vídeos e PDFs no R2 local, o cron de hora em hora em `/__scheduled`), o painel com as páginas dos Cursos e o app web do aluno. Sem Ilorb Signal. Na nuvem: R2 `{files}` (o vídeo mora lá — ativar o R2 pede forma de pagamento mesmo na faixa grátis) e o app web no Pages `{app}`. A proteção do vídeo é link assinado + marca d\'água, não DRM. Só funciona numa instalação feita com `--target local`.',
|
|
1508
|
+
es: '`pnpm dev` levanta el acceso (Core Auth, con PAGOS simulados), el Worker de Cursos (videos y PDF en el R2 local, el cron de cada hora en `/__scheduled`), el panel con las páginas de Cursos y la app web del alumno. Sin Ilorb Signal. En la nube: R2 `{files}` (el video vive ahí — activar el R2 pide forma de pago incluso en la capa gratis) y la app web en el Pages `{app}`. La protección del video es enlace firmado + marca de agua, no DRM. Solo funciona en una instalación hecha con `--target local`.',
|
|
1509
|
+
en: '`pnpm dev` starts the login (Core Auth, with SIMULATED payments), the Courses Worker (videos and PDFs in the local R2, the hourly cron at `/__scheduled`), the panel with the Courses pages and the student web app. No Ilorb Signal. In the cloud: R2 `{files}` (the video lives there — enabling R2 asks for a payment method even on the free tier) and the web app on the `{app}` Pages. Video protection is a signed link + watermark, not DRM. Only for an installation made with `--target local`.',
|
|
1474
1510
|
},
|
|
1475
1511
|
},
|
|
1476
1512
|
finalNext: ['final.next.cursos'],
|
|
@@ -1526,3 +1562,5 @@ export function suggestBundleId(ownerEmail, slug) {
|
|
|
1526
1562
|
export const BUNDLE_RE = /^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$/;
|
|
1527
1563
|
export const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;
|
|
1528
1564
|
export const HEX_RE = /^#?[0-9a-fA-F]{6}$/;
|
|
1565
|
+
/** a public product value (ProductSpec.publicVars: a Turnstile site key `0x4AAA…`) — safe inside wrangler.jsonc and HTML */
|
|
1566
|
+
export const PUBLIC_VAR_RE = /^[A-Za-z0-9_-]{4,200}$/;
|