This commit is contained in:
parent
f4b6af771c
commit
5afd06dfe8
8 changed files with 78 additions and 25 deletions
18
.woodpecker.yml
Normal file
18
.woodpecker.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
pipeline:
|
||||||
|
build:
|
||||||
|
image: nixos/nix
|
||||||
|
commands:
|
||||||
|
- mdbook
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- apk add rsync openssh
|
||||||
|
- echo "$${SSH_SECRET_KEY}" > SSH_SECRET_KEY
|
||||||
|
- chmod 600 SSH_SECRET_KEY
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- echo "mzhang.io ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzBZ+QmM4EO3Fwc1ZcvWV2IY9VF04T0H9brorGj9Udp" >> ~/.ssh/known_hosts
|
||||||
|
- rsync -azvrP -e "ssh -i SSH_SECRET_KEY" docs/book/ sourcehutBuilds@mzhang.io:/mnt/storage/svcdata/blog-public/panorama
|
||||||
|
secrets: [SSH_SECRET_KEY]
|
||||||
|
when:
|
||||||
|
branch: master
|
2
Makefile
2
Makefile
|
@ -9,7 +9,7 @@ doc-dependencies: docs/src/generated/spec/index.md
|
||||||
|
|
||||||
generated/spec/meta.schema.json: spec/meta.schema.yml
|
generated/spec/meta.schema.json: spec/meta.schema.yml
|
||||||
mkdir -p generated/spec
|
mkdir -p generated/spec
|
||||||
yq -o json . $< > $@
|
yq -o=json . $< > $@
|
||||||
|
|
||||||
docs/src/generated/spec/index.md: generated/spec/meta.schema.json
|
docs/src/generated/spec/index.md: generated/spec/meta.schema.json
|
||||||
mkdir -p docs/src/generated/spec
|
mkdir -p docs/src/generated/spec
|
||||||
|
|
4
ci/build-docs.sh
Executable file
4
ci/build-docs.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -i bash -p mdbook
|
||||||
|
|
||||||
|
mdbook build docs
|
28
design.md
28
design.md
|
@ -37,6 +37,16 @@
|
||||||
- The privileged namespace is for keeping track of database state, for
|
- The privileged namespace is for keeping track of database state, for
|
||||||
example which scripts are trusted
|
example which scripts are trusted
|
||||||
|
|
||||||
|
- Hooks:
|
||||||
|
|
||||||
|
- Hooks consist of a (pattern, type, callback). The pattern is a metadata
|
||||||
|
matcher, that determines if the node should be executed upon. The
|
||||||
|
callback is Javascript code executed in the app's execution context.
|
||||||
|
|
||||||
|
- Type determines what kind of callback to call.
|
||||||
|
- Ensures callbacks: these make sure that a node has
|
||||||
|
-
|
||||||
|
|
||||||
- Database service:
|
- Database service:
|
||||||
|
|
||||||
- IFTTT Events
|
- IFTTT Events
|
||||||
|
@ -60,9 +70,25 @@
|
||||||
|
|
||||||
- Sample apps
|
- Sample apps
|
||||||
|
|
||||||
|
- Todos app
|
||||||
|
|
||||||
|
- Metadata keys (these are somewhat based on Taskwarrior)
|
||||||
|
|
||||||
|
- `status`: Enum{Pending | Deleted | Completed | Waiting | Recurring}
|
||||||
|
- Task status
|
||||||
|
- `description`: String
|
||||||
|
- Description
|
||||||
|
- `start`: DateTime
|
||||||
|
- `due`: DateTime{.due >= .start}
|
||||||
|
- `depends`: NodeRef
|
||||||
|
|
||||||
|
- Interfaces:
|
||||||
|
|
||||||
|
-
|
||||||
|
|
||||||
- Content / blob storage
|
- Content / blob storage
|
||||||
|
|
||||||
- Exposed interfaces
|
- Interfaces:
|
||||||
|
|
||||||
- `Content`
|
- `Content`
|
||||||
- `upload() -> Writer`
|
- `upload() -> Writer`
|
||||||
|
|
|
@ -8,5 +8,5 @@ title = "mznotes documentation"
|
||||||
[output.html]
|
[output.html]
|
||||||
additional-css = ["custom.css"]
|
additional-css = ["custom.css"]
|
||||||
|
|
||||||
[preprocessor.tera]
|
# [preprocessor.tera]
|
||||||
command = "docs/make-then-tera.sh"
|
# command = "docs/make-then-tera.sh"
|
||||||
|
|
43
flake.nix
43
flake.nix
|
@ -32,29 +32,34 @@
|
||||||
in rec {
|
in rec {
|
||||||
packages = flake-utils.lib.flattenTree flakePkgs;
|
packages = flake-utils.lib.flattenTree flakePkgs;
|
||||||
|
|
||||||
devShell = pkgs.mkShell ({
|
devShells = {
|
||||||
packages = with pkgs; [
|
default = pkgs.mkShell ({
|
||||||
cargo-deny
|
packages = with pkgs; [
|
||||||
cargo-edit
|
cargo-deny
|
||||||
cargo-expand
|
cargo-edit
|
||||||
cargo-flamegraph
|
cargo-expand
|
||||||
cargo-watch
|
cargo-flamegraph
|
||||||
|
cargo-watch
|
||||||
|
|
||||||
deno
|
deno
|
||||||
openssl
|
openssl
|
||||||
yq
|
yq
|
||||||
|
|
||||||
mdbook
|
mdbook
|
||||||
flakePkgs.mdbook-tera
|
flakePkgs.mdbook-tera
|
||||||
|
|
||||||
(python310.withPackages (p: with p; [ ipython numpy scipy sympy ]))
|
(python310.withPackages
|
||||||
|
(p: with p; [ ipython numpy scipy sympy ]))
|
||||||
|
|
||||||
pkgs.fenix.minimal.cargo
|
pkgs.fenix.minimal.cargo
|
||||||
pkgs.fenix.minimal.rustc
|
pkgs.fenix.minimal.rustc
|
||||||
|
|
||||||
# Get the nightly version of rustfmt so we can wrap comments
|
# Get the nightly version of rustfmt so we can wrap comments
|
||||||
pkgs.fenix.default.rustfmt
|
pkgs.fenix.default.rustfmt
|
||||||
];
|
];
|
||||||
} // prisma-env);
|
} // prisma-env);
|
||||||
|
|
||||||
|
ci = pkgs.mkShell { packages = with pkgs; [ bash mdbook nodejs ]; };
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ model Edge {
|
||||||
|
|
||||||
model NodeMeta {
|
model NodeMeta {
|
||||||
nodeId String
|
nodeId String
|
||||||
toNode Node @relation(fields: [nodeId], references: [id])
|
node Node @relation(fields: [nodeId], references: [id])
|
||||||
|
|
||||||
appId String
|
appId String
|
||||||
app App @relation(fields: [appId], references: [id])
|
app App @relation(fields: [appId], references: [id])
|
||||||
|
|
|
@ -3,6 +3,7 @@ $schema: "http://json-schema.org/draft-07/schema"
|
||||||
title: Application
|
title: Application
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
required: ['title']
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
$schema:
|
$schema:
|
||||||
|
@ -11,7 +12,6 @@ properties:
|
||||||
|
|
||||||
title:
|
title:
|
||||||
type: string
|
type: string
|
||||||
required: true
|
|
||||||
title: Name of the application
|
title: Name of the application
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
|
|
Loading…
Reference in a new issue