Skip to content

Commit

Permalink
0.0.467
Browse files Browse the repository at this point in the history
  • Loading branch information
ivansglazunov committed Sep 9, 2024
1 parent fe600a2 commit 5c39c09
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 12 deletions.
12 changes: 5 additions & 7 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ vscode:

tasks:
- init: |
./ensure-node-version.sh
. ~/.nvm/nvm.sh && nvm use
./prebuild.sh | tee gitpod-prebuild.log.txt
- command: |
./ensure-node-version.sh
. ~/.nvm/nvm.sh && nvm use
./wait-for-prebuild.sh && (npm run gitpod-start | tee gitpod-start.log.txt);
npm ci
# - command: |
# ./ensure-node-version.sh
# . ~/.nvm/nvm.sh && nvm use
# ./wait-for-prebuild.sh && (npm run gitpod-start | tee gitpod-start.log.txt);
8 changes: 4 additions & 4 deletions call.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ if (options.generate) {
const generated = {
"operation": "run",
"envs": {
"DEEPLINKS_PUBLIC_URL": isGitpod ? gitpodUrl(3006) : `${deeplinks}`,
"NEXT_PUBLIC_DEEPLINKS_URL": isGitpod ? gitpodUrl(3006) : `${deeplinks}`,
"NEXT_PUBLIC_GQL_PATH": isGitpod ? gitpodUrl(3006)+'/gql' : `${deeplinks}/gql`,
"DEEPLINKS_PUBLIC_URL": isGitpod ? await gitpodUrl(3006) : `${deeplinks}`,
"NEXT_PUBLIC_DEEPLINKS_URL": isGitpod ? await gitpodUrl(3006) : `${deeplinks}`,
"NEXT_PUBLIC_GQL_PATH": isGitpod ? await gitpodUrl(3006)+'/gql' : `${deeplinks}/gql`,
"NEXT_PUBLIC_GQL_SSL": "0",
"NEXT_PUBLIC_DEEPLINKS_SERVER": isGitpod ? gitpodUrl(3007) : `${deepcase}`,
"NEXT_PUBLIC_DEEPLINKS_SERVER": isGitpod ? await gitpodUrl(3007) : `${deepcase}`,
"NEXT_PUBLIC_ENGINES_ROUTE": "0",
"NEXT_PUBLIC_DISABLE_CONNECTOR": "1",
"JWT_SECRET": jwtSecret,
Expand Down
36 changes: 36 additions & 0 deletions migrations/1725810498602-perception.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { generateApolloClient } from '@deep-foundation/hasura/client.js';
import Debug from 'debug';
import { DeepClient } from '../imports/client.js';
import { installPackage } from './1678940577209-deepcase.js';
import { packageExists, sharePermissions } from './1664940577200-tsx.js';

const debug = Debug('deeplinks:migrations:perception');
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 packageName = '@deep-foundation/perception';
if (!await packageExists(packageName)) {
const adminId = await root.id('deep', 'admin');
const admin = await root.login({ linkId: adminId });
const deep = new DeepClient({ deep: root, ...admin });

const packageId = await installPackage(deep, '@deep-foundation/perception');
await sharePermissions(adminId, packageId);
}
};

export const down = async () => {
log('down');
};
36 changes: 36 additions & 0 deletions migrations/1725810521004-perception.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { generateApolloClient } from '@deep-foundation/hasura/client.js';
import Debug from 'debug';
import { DeepClient } from '../imports/client.js';
import { installPackage } from './1678940577209-deepcase.js';
import { packageExists, sharePermissions } from './1664940577200-tsx.js';

const debug = Debug('deeplinks:migrations:perception');
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 packageName = '@deep-foundation/perception';
if (!await packageExists(packageName)) {
const adminId = await root.id('deep', 'admin');
const admin = await root.login({ linkId: adminId });
const deep = new DeepClient({ deep: root, ...admin });

const packageId = await installPackage(deep, '@deep-foundation/perception');
await sharePermissions(adminId, packageId);
}
};

export const down = async () => {
log('down');
};
2 changes: 1 addition & 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.466",
"version": "0.0.467",
"license": "Unlicense",
"type": "module",
"scripts": {
Expand Down

0 comments on commit 5c39c09

Please sign in to comment.