Skip to content

Commit

Permalink
0.0.198
Browse files Browse the repository at this point in the history
  • Loading branch information
ivansglazunov committed Jun 26, 2023
1 parent a4d5da7 commit 5e382d5
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
33 changes: 33 additions & 0 deletions migrations/1687790060025-finder.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { generateApolloClient } from '@deep-foundation/hasura/client.js';
import Debug from 'debug';
import { DeepClient } from '../imports/client.js';
import npmPackagerPckg from '@deep-foundation/finder/deep.json' assert { type: 'json'};
import { importPackage, sharePermissions } from './1664940577200-tsx.js';

const debug = Debug('deeplinks:migrations:finder');
const log = debug.extend('log');
const error = debug.extend('error');

const rootClient = generateApolloClient({
path: `${process.env.MIGRATIONS_HASURA_PATH}/v1/graphql`,
ssl: !!+(process.env.MIGRATIONS_HASURA_SSL || 0),
secret: process.env.MIGRATIONS_HASURA_SECRET,
});

const root = new DeepClient({
apolloClient: rootClient,
});

export const up = async () => {
log('up');
const importResult = await importPackage(npmPackagerPckg);
log(importResult);
const packageId = importResult?.packageId;
if (packageId) {
await sharePermissions(await root.id('deep', 'admin'), packageId);
}
};

export const down = async () => {
log('down');
};
15 changes: 13 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deep-foundation/deeplinks",
"version": "0.0.197",
"version": "0.0.198",
"license": "Unlicense",
"type": "module",
"scripts": {
Expand Down Expand Up @@ -34,6 +34,7 @@
"dependencies": {
"@apollo/client": "^3.7.14",
"@deep-foundation/deepcase": "0.0.21",
"@deep-foundation/finder": "^0.0.3",
"@deep-foundation/hasura": "^0.0.45",
"@deep-foundation/materialized-path": "0.0.24",
"@deep-foundation/npm-packager": "0.0.25",
Expand Down

0 comments on commit 5e382d5

Please sign in to comment.