@fayz-ai/plugin-menu 0.10.0 → 0.10.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/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/dist/migrations/index.d.ts +1 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -1356,10 +1356,34 @@ CREATE POLICY plg_menu_images_delete ON storage.objects
|
|
|
1356
1356
|
AND (storage.foldername(name))[1] IN (SELECT public.user_tenant_ids()::text)
|
|
1357
1357
|
);
|
|
1358
1358
|
`;
|
|
1359
|
+
var MIGRATION_004_THE_MENU_DECLARES_ITS_SPECIES = `-- ---------------------------------------------------------------------------
|
|
1360
|
+
-- 004_the_menu_declares_its_species.sql \u2014 the card\xE1pio's taxonomy becomes a row
|
|
1361
|
+
-- (#274, ADR 0017).
|
|
1362
|
+
--
|
|
1363
|
+
-- The base owns the FORM of a Category; this plugin owns the species of it that
|
|
1364
|
+
-- a restaurant has. 147 named this case explicitly and left the declaring here,
|
|
1365
|
+
-- which is the rule the registry exists to make enforceable: a species is
|
|
1366
|
+
-- written by a plugin, in a row, with a foreign key behind it \u2014 not chosen as a
|
|
1367
|
+
-- literal and hoped to be unique.
|
|
1368
|
+
-- ---------------------------------------------------------------------------
|
|
1369
|
+
|
|
1370
|
+
DO $$
|
|
1371
|
+
BEGIN
|
|
1372
|
+
IF to_regprocedure('public.register_kind(text, text, text, text[], jsonb, text)') IS NULL THEN
|
|
1373
|
+
RAISE NOTICE 'plugin-menu 004: register_kind missing (spine < 147) \u2014 skipped';
|
|
1374
|
+
RETURN;
|
|
1375
|
+
END IF;
|
|
1376
|
+
|
|
1377
|
+
PERFORM public.register_kind(
|
|
1378
|
+
'category', 'menu_category', 'menu', NULL, NULL,
|
|
1379
|
+
'Uma se\xE7\xE3o do card\xE1pio: entradas, pratos, bebidas, sobremesas.');
|
|
1380
|
+
END $$;
|
|
1381
|
+
`;
|
|
1359
1382
|
var MIGRATIONS = [
|
|
1360
1383
|
{ id: "001_menu_base", sql: MIGRATION_001_MENU_BASE },
|
|
1361
1384
|
{ id: "002_menu_backfill", sql: MIGRATION_002_MENU_BACKFILL },
|
|
1362
|
-
{ id: "003_menu_storage", sql: MIGRATION_003_MENU_STORAGE }
|
|
1385
|
+
{ id: "003_menu_storage", sql: MIGRATION_003_MENU_STORAGE },
|
|
1386
|
+
{ id: "004_the_menu_declares_its_species", sql: MIGRATION_004_THE_MENU_DECLARES_ITS_SPECIES }
|
|
1363
1387
|
];
|
|
1364
1388
|
|
|
1365
1389
|
// src/data/types.ts
|