From 909dd3c8770e759d33c1f82e6270dd6aec7327f7 Mon Sep 17 00:00:00 2001 From: Ivan S Glazunov Date: Sun, 22 Sep 2024 20:48:18 +0300 Subject: [PATCH] 0.0.558 --- migrations/1726413155878-jsonschema.ts | 51 ++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/migrations/1726413155878-jsonschema.ts b/migrations/1726413155878-jsonschema.ts index 14b464cd..0236966b 100644 --- a/migrations/1726413155878-jsonschema.ts +++ b/migrations/1726413155878-jsonschema.ts @@ -18,6 +18,9 @@ const root = new DeepClient({ apolloClient: rootClient, }); +const dc = '@deep-foundation/core'; +const du = '@deep-foundation/unsafe'; + export const up = async () => { log('up'); const packageName = '@deep-foundation/jsonschema'; @@ -30,6 +33,54 @@ export const up = async () => { const packageId = await root.id('@deep-foundation/jsonschema'); await sharePermissions(adminId, packageId); await containWithin(adminId, packageId); + await deep.insert({ + containerId: adminId, + type_id: deep.idLocal(dc, 'Rule'), + out: { data: [ + { + type_id: deep.idLocal(dc, 'RuleObject'), + to: { + type_id: deep.idLocal(dc, 'Selector'), + out: { + type_id: deep.idLocal(dc, 'SelectorInclude'), + to_id: await deep.id(packageName), + out: { + type_id: deep.idLocal(dc, 'SelectorTree'), + to_id: deep.idLocal(dc, 'joinTree'), + }, + }, + }, + }, + { + type_id: deep.idLocal(dc, 'RuleSubject'), + to: { + type_id: deep.idLocal(dc, 'Selector'), + out: { + type_id: deep.idLocal(dc, 'SelectorInclude'), + to_id: await deep.id(packageName), + out: { + type_id: deep.idLocal(dc, 'SelectorTree'), + to_id: deep.idLocal(dc, 'joinTree'), + }, + }, + }, + }, + { + type_id: deep.idLocal(dc, 'RuleAction'), + to: { + type_id: deep.idLocal(dc, 'Selector'), + out: { + type_id: deep.idLocal(dc, 'SelectorInclude'), + to_id: await deep.id(du, 'AllowUnsafe'), + out: { + type_id: deep.idLocal(dc, 'SelectorTree'), + to_id: deep.idLocal(dc, 'typesTree'), + }, + }, + }, + }, + ] }, + }); } }; diff --git a/package.json b/package.json index c34ba264..159c80ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@deep-foundation/deeplinks", - "version": "0.0.557", + "version": "0.0.558", "license": "Unlicense", "type": "module", "main": "import.js",