Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker-compose.yml: open ports 20k-30k for deeplinks container #248

Open
wants to merge 278 commits into
base: main-broken
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
278 commits
Select commit Hold shift + click to select a range
ffeb19e
Merge branch 'main' of https://github.com/deep-foundation/deeplinks
FreePhoenix888 Nov 18, 2023
8539b75
Update test select in handler
FreePhoenix888 Nov 18, 2023
58cde8c
Get deep from handler arg in test
FreePhoenix888 Nov 18, 2023
ea6d95d
Add deep is available without using handler argument
FreePhoenix888 Nov 18, 2023
5b5399c
Fix test name
FreePhoenix888 Nov 18, 2023
fa2f989
Merge branch 'subscribe'
ivansglazunov Nov 26, 2023
8ec2199
nameLocal package
ivansglazunov Nov 26, 2023
857c946
fix ts
ivansglazunov Nov 26, 2023
079c943
hot fix
ivansglazunov Nov 26, 2023
e42be20
await name not use ml
ivansglazunov Nov 26, 2023
531c4d8
merge main
ivansglazunov Dec 3, 2023
a6d9a5f
better for inspector evaluation
ivansglazunov Dec 12, 2023
73a9191
Add action AllowInsertType, object Type, subject guest test
FreePhoenix888 Dec 14, 2023
41a72e7
Add `action AllowInsertType, object Type, subject guest, rule created…
FreePhoenix888 Dec 14, 2023
aca2017
Add warmup script
Konard Dec 14, 2023
cfa5f3f
fix user switch empty screen
ivansglazunov Dec 18, 2023
851f345
Add `admin can insert Type` test
FreePhoenix888 Dec 19, 2023
081d67f
Merge pull request #287 from deep-foundation/tests/permissions/insert…
FreePhoenix888 Dec 19, 2023
042b4c2
Freeze minio version
Konard Dec 23, 2023
1e2a699
0.0.323
Konard Dec 23, 2023
16daede
fix var error in client-handler
ivansglazunov Dec 24, 2023
6cb7756
Update @deep-foundation/hasura
Konard Dec 25, 2023
fe7c26a
Get admin link id and login by using guestDeep
FreePhoenix888 Dec 29, 2023
6307c8b
Merge branch 'main' of https://github.com/deep-foundation/deeplinks
FreePhoenix888 Dec 29, 2023
7d48cc3
fix minilinks subscription
ivansglazunov Jan 2, 2024
609258e
0.0.324
Konard Jan 8, 2024
b2b2da7
Replace founded with found
Konard Jan 10, 2024
3b07300
minilinks strings id support and cyber boilerplayt
ivansglazunov Jan 13, 2024
abef5b1
fix typing from number to Id=number|string
ivansglazunov Jan 13, 2024
62df53f
minilinks strings id support and cyber boilerplayt
ivansglazunov Jan 13, 2024
9ac9732
minilinks strings id support and cyber boilerplayt
ivansglazunov Jan 13, 2024
d3a0678
minilinks strings id support and cyber boilerplait
ivansglazunov Jan 13, 2024
eab652d
minilinks strings id
ivansglazunov Jan 13, 2024
1042cfe
Add signerClient.tsx
suenot Jan 13, 2024
1413b3e
added cyber-js with keplr config
suenot Jan 13, 2024
631359f
Bug fix
suenot Jan 13, 2024
5d68495
Cleanup config
suenot Jan 13, 2024
64df4b2
update gitpod config
TimaxLacs Jan 14, 2024
44f972c
update cyberDeepClient
TimaxLacs Jan 14, 2024
15aaedc
add test cyberClient
TimaxLacs Jan 14, 2024
3df6085
Update DeepClient constructor
Konard Jan 14, 2024
373c510
Add .gitpod.yml
Konard Jan 14, 2024
122b788
Merge branch 'main' into cyber
TimaxLacs Jan 14, 2024
bc26cab
boilerplate ipfs from cyber to deep with love
suenot Jan 14, 2024
2e7448e
Merge branch 'cyber' of https://github.com/deep-foundation/deeplinks …
suenot Jan 14, 2024
f842983
fixes
suenot Jan 14, 2024
2948e31
Fix import paths and add missing type annotations
suenot Jan 14, 2024
eba1623
Enable bandwidth and pocket reducers, and add currentAccount reducer
suenot Jan 14, 2024
2648722
Update import paths in pocket.ts
suenot Jan 14, 2024
ed13841
Remove unused test files
suenot Jan 14, 2024
208da6d
Fix TypeScript errors and update code
suenot Jan 14, 2024
489885e
fixes in ipfs
suenot Jan 14, 2024
a56c2a7
searching errors in workers loader
suenot Jan 14, 2024
656b10e
fix workers
ivansglazunov Jan 15, 2024
b63f05b
js to ts files: bandwith, gol, db
suenot Jan 15, 2024
386f491
+ dexie package
suenot Jan 15, 2024
d10b75c
https://github.com/deep-foundation/npm-packager/issues/72
Konard Jan 22, 2024
398175a
0.0.325
Konard Jan 22, 2024
70c37fc
Update package:release command
Konard Jan 22, 2024
2d7f889
https://github.com/deep-foundation/npm-packager/issues/72
Konard Jan 25, 2024
7256d0c
0.0.326
Konard Jan 25, 2024
8912246
0.0.327
Konard Jan 25, 2024
346da42
Update apollo-server-core and apollo-server-express
Konard Jan 25, 2024
848f85b
0.0.328
Konard Jan 25, 2024
3b69a89
Update apollo-server, apollo-server-core, apollo-server-express
Konard Jan 25, 2024
d945eaf
Add @deep-foundation/npm-packager back
Konard Jan 25, 2024
6f402d6
0.0.329
Konard Jan 25, 2024
14c0772
Add "create a new user, join to admin, insert type" test
FreePhoenix888 Jan 29, 2024
b023ebc
https://github.com/deep-foundation/deeplinks/issues/297
Konard Jan 29, 2024
f144fc6
Fix https://github.com/deep-foundation/deeplinks/issues/297
Konard Jan 29, 2024
427e406
0.0.330
Konard Jan 29, 2024
2aa70ed
Add insert doc
FreePhoenix888 Feb 9, 2024
2ebc589
Add update doc
FreePhoenix888 Feb 9, 2024
ccca433
Update insert doc
FreePhoenix888 Feb 9, 2024
b432efd
Add delete doc
FreePhoenix888 Feb 9, 2024
32f2555
Add serial doc
FreePhoenix888 Feb 9, 2024
d0ad853
Add await doc
FreePhoenix888 Feb 9, 2024
2b19f03
Add id doc
FreePhoenix888 Feb 9, 2024
e8da48b
Remove unused doc
FreePhoenix888 Feb 9, 2024
e5329a0
Add idLocal doc
FreePhoenix888 Feb 9, 2024
378a179
Update whoami doc
FreePhoenix888 Feb 9, 2024
ac31d24
Add login doc
FreePhoenix888 Feb 9, 2024
6a5b362
Add logout doc
FreePhoenix888 Feb 9, 2024
ab1f639
Add can doc
FreePhoenix888 Feb 9, 2024
4662ae2
Add name doc
FreePhoenix888 Feb 9, 2024
b1c8659
Add nameLocal doc
FreePhoenix888 Feb 9, 2024
af620fb
Add select doc
FreePhoenix888 Feb 9, 2024
f5012b5
Update subscribe doc
FreePhoenix888 Feb 10, 2024
09fa165
Add select by id example
FreePhoenix888 Feb 10, 2024
f3b1790
Add select by type_id example
FreePhoenix888 Feb 10, 2024
1e1909b
Add select by from_id example
FreePhoenix888 Feb 10, 2024
a89e1a0
Add select by to_id example
FreePhoenix888 Feb 10, 2024
2e7e7df
Add select by string value example
FreePhoenix888 Feb 10, 2024
8cf8f10
Add select by number example
FreePhoenix888 Feb 10, 2024
198b154
Add select by object value example
FreePhoenix888 Feb 10, 2024
69dea0c
Add `Insert without from and to` example
FreePhoenix888 Feb 10, 2024
9269e58
Add `Insert with from and to` example
FreePhoenix888 Feb 10, 2024
01e4443
Update `Insert without from and to` example
FreePhoenix888 Feb 10, 2024
906ac65
Add `Insert with from and to equal to any` example
FreePhoenix888 Feb 10, 2024
b65d73b
Rename to `Insert Type from Package to User`
FreePhoenix888 Feb 10, 2024
1699816
Rename to `Insert Type`
FreePhoenix888 Feb 10, 2024
5f6b211
Rename to `Insert Type with from Any to Any`
FreePhoenix888 Feb 10, 2024
b633711
Update `Insert Type with from Any to Any` example
FreePhoenix888 Feb 10, 2024
fd96e3e
Update `Insert Type from Package to User` example
FreePhoenix888 Feb 10, 2024
af7a8db
Add `Insert Type with from Package to Any` example
FreePhoenix888 Feb 10, 2024
9e946f2
Add `Insert Type with from Any to Package` example
FreePhoenix888 Feb 10, 2024
9600004
Add `Insert string` example
FreePhoenix888 Feb 10, 2024
723a7f6
Add `Insert number` example
FreePhoenix888 Feb 10, 2024
bed455f
Add `Insert object` example
FreePhoenix888 Feb 10, 2024
e7e0e15
Add `Update from by id` example
FreePhoenix888 Feb 10, 2024
eb5fbd8
Add `Update to by id` example
FreePhoenix888 Feb 10, 2024
03df3bd
Add `Update string value by link id` example
FreePhoenix888 Feb 10, 2024
ca8923e
Update `Update to by id` examle
FreePhoenix888 Feb 10, 2024
4db8340
Update `Update from by id` example
FreePhoenix888 Feb 10, 2024
fb664b1
Add `Update number value by link id` example
FreePhoenix888 Feb 10, 2024
33d71b5
Add `Update object value by link id` example
FreePhoenix888 Feb 10, 2024
391b5da
Add `Delete by id` example
FreePhoenix888 Feb 10, 2024
970b98d
Add `Delete by from_id` example
FreePhoenix888 Feb 10, 2024
9dbe23a
Update `Delete by id` example
FreePhoenix888 Feb 10, 2024
4356977
Add example `Delete by to_id`
FreePhoenix888 Feb 10, 2024
72157f0
Add `Delete by type_id` example
FreePhoenix888 Feb 10, 2024
7e0d58f
Move `Delete by type_id` example after id example
FreePhoenix888 Feb 10, 2024
0b5596e
Add `Delete by string value` example
FreePhoenix888 Feb 10, 2024
70047df
Update `Delete by string value` example
FreePhoenix888 Feb 10, 2024
1359507
Add `Delete by number value` example
FreePhoenix888 Feb 10, 2024
e7b427f
Add `Delete by object value` example
FreePhoenix888 Feb 10, 2024
e20d56a
Add `Delete string value by link id` example
FreePhoenix888 Feb 10, 2024
25159c8
Add `Delete number value by link id` example
FreePhoenix888 Feb 10, 2024
a53170b
Update `Delete string value by link id` example
FreePhoenix888 Feb 10, 2024
63b6fd8
Add `Delete object value by link id` example
FreePhoenix888 Feb 10, 2024
3e3d7e4
Add `Await a promise of npm-packager` example
FreePhoenix888 Feb 10, 2024
1d4fb80
deepclient and minilinsk support nested return
ivansglazunov Feb 13, 2024
86c667e
Add `Get Core Package Link Id` example
FreePhoenix888 Feb 14, 2024
2a01d0a
Add `Get User Type Link Id From Core Package` example
FreePhoenix888 Feb 14, 2024
084bde7
Add `Get the link called "My Nested Link Name" contained in the link …
FreePhoenix888 Feb 14, 2024
9b5bbec
Add `Get Admin Link Id` example
FreePhoenix888 Feb 14, 2024
e961b35
Add `Get Core Package Link Id` example
FreePhoenix888 Feb 14, 2024
e602405
Add `Get Core Package Link Id` example
FreePhoenix888 Feb 14, 2024
7a1929e
Add `Get the link called "My Nested Link Name" contained in the link …
FreePhoenix888 Feb 14, 2024
1fc1e09
Add `Get Admin Link Id` example
FreePhoenix888 Feb 14, 2024
87d8f47
Add example for `whoami`
FreePhoenix888 Feb 14, 2024
1a79392
Add login example
FreePhoenix888 Feb 15, 2024
faf6850
Add `guest` doc
FreePhoenix888 Feb 15, 2024
044c8f1
Update `login` doc
FreePhoenix888 Feb 15, 2024
941f514
Update `guest` doc
FreePhoenix888 Feb 15, 2024
d8516b2
Update doc
FreePhoenix888 Feb 15, 2024
dcdee14
Update `can` doc
FreePhoenix888 Feb 15, 2024
d01a37c
Add `name ` example
FreePhoenix888 Feb 15, 2024
237aa6d
Remove imports from examples
FreePhoenix888 Feb 15, 2024
90d7390
Add `nameLocal` example
FreePhoenix888 Feb 15, 2024
db8337f
Add `import` doc
FreePhoenix888 Feb 15, 2024
64375d2
Add remarks to `import`
FreePhoenix888 Feb 15, 2024
39bd88d
Add `Async handler using import` example
FreePhoenix888 Feb 15, 2024
5675dbb
Add remarks to `update`
FreePhoenix888 Feb 15, 2024
6369faf
ReExport createSerialOperation in clinet from gql
FreePhoenix888 Feb 15, 2024
1edf98e
Fix merge conflict
FreePhoenix888 Feb 15, 2024
aca1b0d
Add `evalClientHandler` doc
FreePhoenix888 Feb 15, 2024
393f355
fix generateCustomArgsAndVariables
ivansglazunov Feb 18, 2024
0a97d69
Revert "ReExport createSerialOperation in clinet from gql"
FreePhoenix888 Feb 21, 2024
828e03b
Merge pull request #307 from deep-foundation/documentation/add_client…
FreePhoenix888 Feb 21, 2024
b6e6c18
Merge pull request #302 from deep-foundation/documentation/client/add…
FreePhoenix888 Feb 21, 2024
ec043ab
0.0.331
FreePhoenix888 Feb 21, 2024
40e2711
test server-build.yaml
suenot Mar 2, 2024
63d47e6
Update server build workflow
suenot Mar 2, 2024
b8922c9
Update server-build.yaml with dependency installation and port allowance
suenot Mar 2, 2024
9feca94
Add production build workflow
suenot Mar 2, 2024
94f5b40
Remove containerd.io and update dependencies
suenot Mar 2, 2024
30bd379
Remove Docker setup and allow ports 3006 and 3007
suenot Mar 2, 2024
235ee25
Update production-build.yaml to remove containerd.io installation and…
suenot Mar 2, 2024
096d6f1
Update dependencies and install git and curl
suenot Mar 2, 2024
faafd5d
Update server-build.yaml and remove production-build.yaml
suenot Mar 2, 2024
2ae6d35
Merge pull request #314 from suenot/main
Konard Mar 2, 2024
8df25d3
minilinks provider
ivansglazunov Mar 2, 2024
10bb4b3
Fix https://github.com/deep-foundation/dev/issues/213
Konard Mar 3, 2024
cda95a7
support minilinks.apply(deep.select result with returning)
ivansglazunov Mar 4, 2024
9cd6989
deep query works fine with cyber
ivansglazunov Mar 5, 2024
d918a37
return fix support
ivansglazunov Mar 5, 2024
a04b6c4
merge main
ivansglazunov Mar 5, 2024
9c0613f
Make error in globalizeIds from packager.ts have more context for the…
Konard Mar 11, 2024
12c0842
Make error message even better.
Konard Mar 11, 2024
15bc570
Make error message even better
Konard Mar 11, 2024
ba5493c
0.0.332
Konard Mar 11, 2024
22a5cd0
Update @deep-foundation/npm-packager to 0.0.43
Konard Mar 11, 2024
69a2717
0.0.333
Konard Mar 11, 2024
cecba90
Update README.md
Konard Mar 11, 2024
7c95023
Update README.md
Konard Mar 11, 2024
0ecfe6d
0.0.334
Konard Mar 11, 2024
708cf5e
fully remote=false local=true worked
ivansglazunov Mar 12, 2024
82e2b25
final fix dual sync
ivansglazunov Mar 13, 2024
07b765a
merge main
ivansglazunov Mar 15, 2024
de962d8
fix query generator
ivansglazunov Mar 17, 2024
8451ea9
Fix https://github.com/deep-foundation/deeplinks/issues/329
Konard Mar 23, 2024
6fc5a8a
Add space to trigger npm-publish github workflow
FreePhoenix888 Mar 25, 2024
58309f8
values
ivansglazunov Apr 4, 2024
a12fc4b
fix
ivansglazunov Apr 4, 2024
68fbc1d
Merge branch 'cyber'
ivansglazunov Apr 14, 2024
9dd4119
0.0.335
ivansglazunov Apr 25, 2024
5e52e89
fix npm ci
ivansglazunov Apr 25, 2024
91b4ea1
0.0.336
ivansglazunov Apr 25, 2024
96ebec9
fix
ivansglazunov Apr 25, 2024
ee738d4
fix error on update when drag in deepcase
ivansglazunov Apr 27, 2024
ddf2481
0.0.338
ivansglazunov May 1, 2024
207bf3a
Refresh
Konard May 2, 2024
d393f99
0.0.339
Konard May 2, 2024
9740a6b
Fix bug
Konard May 2, 2024
4b399f2
Fix bug
Konard May 2, 2024
3629662
0.0.340
Konard May 3, 2024
7e1c136
Fix bug (this script may not work when used from dev/workspaces root)
Konard May 3, 2024
c5f7ddb
Apply gitpod-update-force
Konard May 5, 2024
785d4a3
0.0.341
ivansglazunov May 11, 2024
7b1a148
fix build
ivansglazunov May 11, 2024
eeac0d2
fix useDeepId
ivansglazunov May 11, 2024
8d3b343
0.0.342
ivansglazunov May 11, 2024
77a2e62
0.0.343
ivansglazunov May 11, 2024
7ea2b80
fix remote_schema only admin support, not any handlegql support link …
ivansglazunov May 17, 2024
226486c
support '@deep-foundation/main-port', 'port' for handleRoute/handleGql
ivansglazunov May 19, 2024
4295ccb
fix handleGql
ivansglazunov May 19, 2024
5a70665
faster
ivansglazunov May 19, 2024
aba3680
0.0.346
ivansglazunov May 19, 2024
b52ee2d
0.0.347 fullfixed mainPort
ivansglazunov May 19, 2024
0d5fd6e
fix, file value now trigger update handle events by type and selector
ivansglazunov May 19, 2024
21377ed
0.0.348
ivansglazunov May 19, 2024
de744a1
Fix https://github.com/deep-foundation/deepcase-app/issues/324
Konard Jun 2, 2024
2033882
refresh
Konard Jun 5, 2024
0ff68d1
refresh
Konard Jun 11, 2024
e821d70
refresh
Konard Jun 11, 2024
b6749b6
Use serializeError
Konard Jun 11, 2024
9ad5666
refresh
Konard Jun 21, 2024
da1079e
refresh
Konard Jun 22, 2024
0dd9bd0
Add better output for https://github.com/deep-foundation/dev/issues/237
Konard Jun 23, 2024
d057ee5
Fix https://github.com/deep-foundation/dev/issues/237
Konard Jun 23, 2024
15ca47f
refresh
Konard Jun 23, 2024
5b3e2b5
fix mainPort crash when no gql on route
ivansglazunov Jun 23, 2024
829152c
more information in handler
ivansglazunov Jun 25, 2024
b43c9ee
fix duplicating error remote schema with name
ivansglazunov Jun 25, 2024
59f4b6f
fixes
ivansglazunov Jun 26, 2024
d240193
0.0.349
ivansglazunov Jun 26, 2024
c979366
hasura 0.0.63
ivansglazunov Jun 26, 2024
3ddb198
0.0.350
ivansglazunov Jun 26, 2024
7198019
fix
ivansglazunov Jun 26, 2024
ad62d7d
0.0.351
ivansglazunov Jun 26, 2024
932cdec
hasura up
ivansglazunov Jun 26, 2024
02b5896
0.0.352
ivansglazunov Jun 26, 2024
badf7e3
fix old way minilinks using returning from graphql support
ivansglazunov Jun 26, 2024
b787985
0.0.353
ivansglazunov Jun 26, 2024
4b24ed0
fix old way minilinks using returning from graphql support
ivansglazunov Jun 26, 2024
00fbd70
0.0.354
ivansglazunov Jun 26, 2024
e053eb3
refresh
Konard Jun 29, 2024
fe4f7fc
fix error with requires
suenot Jun 29, 2024
8296e37
fix error with requires
suenot Jun 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .github/workflows/server-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Server build

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Update dependencies
run: |
sudo apt-get update && sudo apt-get upgrade

- name: Install dependencies
run: |
sudo apt install -y git curl

- name: Allow ports 3006 and 3007
run: |
sudo ufw allow 3006
sudo ufw allow 3007

- name: Install Node Version Manager (NVM)
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 18 && nvm use 18 && nvm alias default 18
npm i -g npm@latest

- name: Install and configure @deep-foundation/deeplinks
run: |
npm rm --unsafe-perm -g @deep-foundation/deeplinks
npm install --unsafe-perm -g @deep-foundation/deeplinks@latest

- name: Set environment variables
run: |
export HOST_IP="185.105.118.59"
export DEEPCASE_HOST="$HOST_IP:3007"
export DEEPLINKS_HOST="$HOST_IP:3006"
export HASURA_ADMIN_SECRET=$(node -e "console.log(require('crypto').randomBytes(24).toString('hex'));")
export POSTGRES_PASSWORD=$(node -e "console.log(require('crypto').randomBytes(24).toString('hex'));")
export MINIO_ACCESS_KEY=$(node -e "console.log(require('crypto').randomBytes(24).toString('hex'));")
export MINIO_SECRET_KEY=$(node -e "console.log(require('crypto').randomBytes(24).toString('hex'));")

- name: Create call-options.json
run: |
tee call-options.json << JSON
{
"operation": "run",
"envs": {
"DEEPLINKS_PUBLIC_URL": "http://$DEEPLINKS_HOST",
"NEXT_PUBLIC_DEEPLINKS_URL": "http://$DEEPLINKS_HOST",
"NEXT_PUBLIC_GQL_PATH": "$DEEPLINKS_HOST/gql",
"NEXT_PUBLIC_GQL_SSL": "0",
"NEXT_PUBLIC_DEEPLINKS_SERVER": "http://$DEEPCASE_HOST",
"NEXT_PUBLIC_ENGINES_ROUTE": "0",
"NEXT_PUBLIC_DISABLE_CONNECTOR": "1",
"JWT_SECRET": "'{\"type\":\"HS256\",\"key\":\"$(node -e "console.log(require('crypto').randomBytes(50).toString('base64'));")\"}'",
"DEEPLINKS_HASURA_STORAGE_URL": "http://host.docker.internal:8000/",
"HASURA_GRAPHQL_ADMIN_SECRET": "$HASURA_ADMIN_SECRET",
"MIGRATIONS_HASURA_SECRET": "$HASURA_ADMIN_SECRET",
"DEEPLINKS_HASURA_SECRET": "$HASURA_ADMIN_SECRET",
"POSTGRES_PASSWORD": "$POSTGRES_PASSWORD",
"HASURA_GRAPHQL_DATABASE_URL": "postgres://postgres:$POSTGRES_PASSWORD@postgres:5432/postgres",
"POSTGRES_MIGRATIONS_SOURCE": "postgres://postgres:[email protected]:5432/postgres?sslmode=disable",
"RESTORE_VOLUME_FROM_SNAPSHOT": "0",
"MANUAL_MIGRATIONS": "1",
"MINIO_ROOT_USER": "$MINIO_ACCESS_KEY",
"MINIO_ROOT_PASSWORD": "$MINIO_SECRET_KEY",
"S3_ACCESS_KEY": "$MINIO_ACCESS_KEY",
"S3_SECRET_KEY": "$MINIO_SECRET_KEY"
}
}
JSON

- name: Run deeplinks
run: |
export DEEPLINKS_CALL_OPTIONS=$(cat call-options.json)
export DEBUG="deeplinks:engine:*,deeplinks:migrations:*"
deeplinks
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ projects/app/electron/app
/automation/**/*.js
/automation/**/*.js.map
/automation/**/*.d.ts
!/imports/engine-server.js

# snapshots
/snapshots/[0-9]*
Expand Down
3 changes: 3 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tasks:
- init: npm ci
command: echo "hello"
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,47 @@ Deep.Links is started together with Deep.Case app and other services in GitPod.
4. Press `Enter` to execute that command again, that will finish restart sequence.
![IMG_1493](https://github.com/deep-foundation/deepcase-app/assets/1431904/56f48dad-d751-44c7-8871-164f824f122b)

## Dignostics

### Get all logs:

```sh
docker logs deep-links
```

### Get live logs:

```sh
docker logs -f deep-links
```

### Enter the sh from inside the docker container:

```sh
docker exec -it deep-links sh
```

## Library
See [Documentation] for examples and API

[Documentation]: https://deep-foundation.github.io/deeplinks/

## Maintenance

### Refresh package-lock.json

This command deletes `node_modules`, `package-lock.json` and runs `npm i`. So everything is refreshed.

```bash
npm run package:refresh
```

### Release a new version

```bash
npm run package:release
```

After that it might be required to release new versions of:
1. https://github.com/deep-foundation/deepcase
2. https://github.com/deep-foundation/deepcase-app
38 changes: 20 additions & 18 deletions automation/remove-build-files.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import glob from "glob";
import fs from "fs-extra";
export {}

const options = {
ignore: "**/node_modules/**",
nodir: true,
};
// import glob from "glob";
// import fs from "fs-extra";

glob("./**/*.{d.ts,js,js.map}", options, (err, files) => {
if (err) {
console.log(err);
return;
}
// const options = {
// ignore: "**/node_modules/**",
// nodir: true,
// };

files.forEach((file) => {
fs.remove(file, (err) => {
if (err) console.error(`Failed to remove ${file}:`, err);
else console.log(`Successfully removed ${file}`);
});
});
});
// glob("./**/*.{d.ts,js,js.map}", options, (err, files) => {
// if (err) {
// console.log(err);
// return;
// }

// files.forEach((file) => {
// fs.remove(file, (err) => {
// if (err) console.error(`Failed to remove ${file}:`, err);
// else console.log(`Successfully removed ${file}`);
// });
// });
// });
40 changes: 20 additions & 20 deletions benchmarks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,53 +23,53 @@ const deep = new DeepClient({ apolloClient });
var suite = new Suite();
const admin = await deep.jwt({ linkId: await deep.id('deep', 'admin') });
const deepAdmin = new DeepClient({ deep: deep, token: admin.token, linkId: admin.linkId });
const Query = await deep.id('@deep-foundation/core', 'Query');
const Query = deep.idLocal('@deep-foundation/core', 'Query');
const guest = await deep.guest({});
const deepGuest = new DeepClient({ deep: deepAdmin, ...guest });

await deepAdmin.insert({
type_id: await deep.id('@deep-foundation/core', 'Rule'),
type_id: deep.idLocal('@deep-foundation/core', 'Rule'),
out: { data: [
{
type_id: await deep.id('@deep-foundation/core', 'RuleSubject'),
type_id: deep.idLocal('@deep-foundation/core', 'RuleSubject'),
to: { data: {
type_id: await deep.id('@deep-foundation/core', 'Selector'),
type_id: deep.idLocal('@deep-foundation/core', 'Selector'),
out: { data: [
{
type_id: await deep.id('@deep-foundation/core', 'SelectorInclude'),
type_id: deep.idLocal('@deep-foundation/core', 'SelectorInclude'),
to_id: guest.linkId,
out: { data: {
type_id: await deep.id('@deep-foundation/core', 'SelectorTree'),
to_id: await deep.id('@deep-foundation/core', 'containTree'),
type_id: deep.idLocal('@deep-foundation/core', 'SelectorTree'),
to_id: deep.idLocal('@deep-foundation/core', 'containTree'),
} },
},
] }
} }
},
{
type_id: await deep.id('@deep-foundation/core', 'RuleObject'),
type_id: deep.idLocal('@deep-foundation/core', 'RuleObject'),
to: { data: {
type_id: await deep.id('@deep-foundation/core', 'Selector'),
type_id: deep.idLocal('@deep-foundation/core', 'Selector'),
out: { data: {
type_id: await deep.id('@deep-foundation/core', 'SelectorInclude'),
to_id: await deep.id('@deep-foundation/core'),
type_id: deep.idLocal('@deep-foundation/core', 'SelectorInclude'),
to_id: deep.idLocal('@deep-foundation/core'),
out: { data: {
type_id: await deep.id('@deep-foundation/core', 'SelectorTree'),
to_id: await deep.id('@deep-foundation/core', 'containTree'),
type_id: deep.idLocal('@deep-foundation/core', 'SelectorTree'),
to_id: deep.idLocal('@deep-foundation/core', 'containTree'),
} },
} }
} }
},
{
type_id: await deep.id('@deep-foundation/core', 'RuleAction'),
type_id: deep.idLocal('@deep-foundation/core', 'RuleAction'),
to: { data: {
type_id: await deep.id('@deep-foundation/core', 'Selector'),
type_id: deep.idLocal('@deep-foundation/core', 'Selector'),
out: { data: {
type_id: await deep.id('@deep-foundation/core', 'SelectorInclude'),
to_id: await deep.id('@deep-foundation/core', 'AllowInsertType'),
type_id: deep.idLocal('@deep-foundation/core', 'SelectorInclude'),
to_id: deep.idLocal('@deep-foundation/core', 'AllowInsertType'),
out: { data: {
type_id: await deep.id('@deep-foundation/core', 'SelectorTree'),
to_id: await deep.id('@deep-foundation/core', 'containTree'),
type_id: deep.idLocal('@deep-foundation/core', 'SelectorTree'),
to_id: deep.idLocal('@deep-foundation/core', 'containTree'),
} },
} }
} }
Expand All @@ -83,7 +83,7 @@ const deep = new DeepClient({ apolloClient });
deferred.resolve();
} });
suite.add('by deepRoot.id', { defer: true, fn: async function(deferred) {
await deep.id('@deep-foundation/core', 'Promise');
deep.idLocal('@deep-foundation/core', 'Promise');
deferred.resolve();
} });
// suite.add('by deepGuest.id', { defer: true, fn: async function(deferred) {
Expand Down
3 changes: 1 addition & 2 deletions call.cjs → call.mjs
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env node

const { call } = require('./imports/engine-server.cjs');
import { call } from './imports/engine-server.js';

const DEEPLINKS_CALL_OPTIONS = process.env.DEEPLINKS_CALL_OPTIONS || '{ "operation": "run" }';

Expand Down
2 changes: 1 addition & 1 deletion docker-prod/deep/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ services:
max-file: "3"
minio:
container_name: deep-minio
image: minio/minio
image: minio/minio:RELEASE.2023-09-30T07-02-29Z
restart: always
volumes:
- 'minio-data:/export'
Expand Down
9 changes: 6 additions & 3 deletions imports/bool_exp_to_sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { generateApolloClient } from '@deep-foundation/hasura/client.js';
import { HasuraApi } from '@deep-foundation/hasura/api.js';
import { generateMutation, generateSerial } from './gql/index.js';
import { DeepClient } from './client.js';
import { Id } from './minilinks.js';
import { serializeError } from 'serialize-error';

const debug = Debug('deeplinks:bool_exp');
const log = debug.extend('log');
Expand Down Expand Up @@ -30,11 +32,11 @@ export const userReplaceSymbol = 777777777778;
export const itemPublicSymbol = 'X-Deep-Item-Id';
export const userPublicSymbol = 'X-Deep-User-Id';

export const applyBoolExpToLink = (sql: string, linkId: number) => {
export const applyBoolExpToLink = (sql: string, linkId: Id) => {
return sql.replace(`${itemReplaceSymbol}`, `${linkId}`);
};

export const boolExpToSQL = async (boolExpId: number, boolExpValue: any) => {
export const boolExpToSQL = async (boolExpId: Id, boolExpValue: any) => {
log('boolExpToSQL', boolExpId, boolExpValue);
let gql, explained, sql;
try {
Expand Down Expand Up @@ -66,7 +68,8 @@ export const boolExpToSQL = async (boolExpId: number, boolExpValue: any) => {
}
}
} catch (e) {
error(e);
const serializedError = serializeError(e);
error(JSON.stringify(serializedError, null, 2));
error('error', gql, explained, sql);
}
};
24 changes: 15 additions & 9 deletions imports/client-handler.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
import { DeepClient } from './client.js';
import { gql } from '@apollo/client/index.js';

export async function evalClientHandler({
value,
deep,
input = {},
}: {
/**
* Evaluates a client handler
* @returns A promise that resolves to an object with either an error property that contains error or data property that contains result of the handler.
*/
export async function evalClientHandler(options: {
value: string;
deep: DeepClient;
input?: any;
}): Promise<{
error?: any;
data?: any;
}> {
const {
value,
deep,
input = {},
} = options;
try {
console.log('evalClientHandler', 'value', value);
// const evalResult = (new Function(`return ${value}`))();
// console.log('evalClientHandler', 'evalResult', evalResult);
const evalResult = eval(value);
console.log('evalClientHandler', 'evalResult', evalResult);
if (typeof evalResult === 'function') {
return {
data: await evalResult({ deep, gql, ...input }),
Expand All @@ -39,10 +45,10 @@ export async function evalClientHandler({
// isolation_provider_id,
// execution_provider_id,
// }: {
// linkId: number;
// linkId: Id;
// deep: DeepClient;
// isolation_provider_id: number;
// execution_provider_id: number;
// isolation_provider_id: Id;
// execution_provider_id: Id;
// }): Promise<{
// error?: any;
// data?: any;
Expand Down
Loading
Loading