Compare commits

..

14 Commits

Author SHA1 Message Date
nolash
db36ba997d Handle single dict input to tx list, add tx list ext task to tasker 2021-03-02 16:50:48 +01:00
Louis Holbrook
ae1502a651 Merge branch 'lash/refactor-syncer' into 'master'
Syncer refactor

See merge request grassrootseconomics/cic-internal-integration!40
2021-03-01 20:15:17 +00:00
Louis Holbrook
5001113267 Syncer refactor 2021-03-01 20:15:17 +00:00
451079d004 Update ci_templates/.cic-template.yml 2021-03-01 14:35:53 +00:00
ba8a0b1953 Update ci_templates/.cic-template.yml 2021-03-01 14:29:08 +00:00
bbc948757f Update ci_templates/.cic-template.yml 2021-03-01 14:24:38 +00:00
ca8c1b1f27 Update ci_templates/.cic-template.yml 2021-03-01 14:22:46 +00:00
854753f120 Merge branch 'revert-f37fa1db' into 'master'
Revert "Update ci_templates/.cic-template.yml"

See merge request grassrootseconomics/cic-internal-integration!44
2021-02-28 18:32:41 +00:00
daadbc27e9 Revert "Update ci_templates/.cic-template.yml"
This reverts commit f37fa1dbcf
2021-02-28 18:23:01 +00:00
f37fa1dbcf Update ci_templates/.cic-template.yml 2021-02-28 17:54:13 +00:00
Spencer Ofwiti
ac264314c0 Merge branch 'spencer/cic-meta-exports' into 'master'
Add exports to interface with CICADA.

See merge request grassrootseconomics/cic-internal-integration!43
2021-02-25 09:58:43 +00:00
Spencer Ofwiti
84c1d11b48 Add exports to interface with CICADA. 2021-02-25 09:58:43 +00:00
Spencer Ofwiti
6fe87652ce Merge branch 'spencer/update-cic-meta' into 'master'
Add changes from stand-alone cic-meta repo.

See merge request grassrootseconomics/cic-internal-integration!41
2021-02-24 12:29:41 +00:00
Spencer Ofwiti
8f65be16b1 Add changes from stand-alone cic-meta repo. 2021-02-24 15:14:17 +03:00
9 changed files with 30 additions and 11 deletions

View File

@@ -490,7 +490,7 @@ class Api:
queue=self.queue,
)
if self.callback_param != None:
s_brief.link(self.callback_success).on_error(self.callback_error)
s_assemble.link(self.callback_success).on_error(self.callback_error)
t = None
if external_task != None:
@@ -515,8 +515,7 @@ class Api:
c = celery.chain(s_external_get, s_external_process)
t = celery.chord([s_local, c])(s_brief)
else:
s_local.link(s_brief)
t = s_local.apply_async()
t = s_local.apply_sync()
return t

View File

@@ -40,8 +40,6 @@ from cic_eth.callbacks import redis
from cic_eth.db.models.base import SessionBase
from cic_eth.db.models.otx import Otx
from cic_eth.db import dsn_from_config
from cic_eth.ext import tx
from cic_eth.ext import address
logging.basicConfig(level=logging.WARNING)
logg = logging.getLogger()

View File

@@ -1,5 +1,6 @@
node_modules
dist
dist-web
dist-server
scratch
tests

View File

@@ -1,6 +1,7 @@
* 0.0.7-pending
- Add immutable content
- Add db lock on server
- Add ArgPair and KeyStore to src exports
* 0.0.6
- Add server build
* 0.0.5

View File

@@ -1,6 +1,6 @@
{
"name": "cic-client-meta",
"version": "0.0.7-alpha.2",
"version": "0.0.7-alpha.3",
"description": "Signed CRDT metadata graphs for the CIC network",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -32,6 +32,12 @@
"webpack-cli": "^4.2.0"
},
"author": "Louis Holbrook <dev@holbrook.no>",
"contributors": [
{
"name": "Spencer Ofwiti",
"email": "maxspencer56@gmail.com"
}
],
"license": "GPL-3.0-or-later",
"engines": {
"node": "~15.3.0"

View File

@@ -101,6 +101,18 @@ function parseDigest(url) {
async function processRequest(req, res) {
let digest = undefined;
const headers = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "OPTIONS, POST, GET, PUT",
"Access-Control-Max-Age": 2592000, // 30 days
"Access-Control-Allow-Headers": 'Access-Control-Allow-Origin, Content-Type, x-cic-automerge'
};
if (req.method === "OPTIONS") {
res.writeHead(200, headers);
res.end();
return;
}
if (!['PUT', 'GET', 'POST'].includes(req.method)) {
res.writeHead(405, {"Content-Type": "text/plain"});
@@ -201,6 +213,7 @@ async function processRequest(req, res) {
const responseContentLength = (new TextEncoder().encode(content)).length;
res.writeHead(200, {
"Access-Control-Allow-Origin": "*",
"Content-Type": contentType,
"Content-Length": responseContentLength,
});

View File

@@ -1,5 +1,5 @@
export { PGPSigner, PGPKeyStore } from './auth';
export { Envelope, Syncable } from './sync';
export { PGPSigner, PGPKeyStore, Signer, KeyStore } from './auth';
export { ArgPair,  Envelope, Syncable } from './sync';
export { User } from './assets/user';
export { Phone } from './assets/phone';
export { Config } from './config';

View File

@@ -93,7 +93,7 @@ function orderDict(src) {
return dst;
}
class Syncable implements JSONSerializable, Authoritative {
class Syncable implements JSONSerializable, Authoritative, Signable {
id: string
timestamp: number

View File

@@ -40,11 +40,12 @@ before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" $CI_REGISTRY --password-stdin
variables:
CI_DEBUG_TRACE: "true"
IMAGE_TAG: $CI_REGISTRY_IMAGE/$APP_NAME:$CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA
IMAGE_TAG_BASE: $CI_REGISTRY_IMAGE/$APP_NAME:$CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA
LATEST_TAG: $CI_REGISTRY_IMAGE/$APP_NAME:latest
script:
- export IMAGE_TAG="$IMAGE_TAG_BASE-$(date +%F.%H%M%S)"
- docker build -t $IMAGE_TAG -f $DOCKERFILE_PATH .
- docker push $IMAGE_TAG
- docker push "$IMAGE_TAG
- docker tag $IMAGE_TAG $LATEST_TAG
- docker push $LATEST_TAG
rules: