├── tails-cli ├── src │ ├── vorpal │ │ └── index.ts │ ├── index.js │ ├── cli.ts │ ├── util │ │ └── index.ts │ └── yargs │ │ ├── physicalNamespace.ts │ │ ├── config.ts │ │ └── physicalProject.ts ├── .babelrc.json ├── tsconfig.json └── package.json ├── tails-web ├── .browserslistrc ├── src │ ├── global.css │ ├── components │ │ ├── Footer.jsx │ │ ├── ProjectsList.jsx │ │ ├── Project.jsx │ │ └── Header.jsx │ ├── pages │ │ ├── Settings.jsx │ │ └── Projects.jsx │ ├── index.html │ ├── main.js │ └── App.jsx ├── .babelrc.json ├── readme.md ├── tsconfig.json ├── postcss.config.js ├── webpack.dev.js ├── package.json ├── webpack.prod.js └── webpack.common.js ├── pnpm-workspace.yaml ├── tails-fs ├── src │ ├── __tests__ │ │ ├── fixtures │ │ │ ├── write-test │ │ │ │ ├── README.md │ │ │ │ ├── project-third │ │ │ │ │ └── Makefile │ │ │ │ ├── _project-collection │ │ │ │ │ └── project-gamma │ │ │ │ │ │ └── main.py │ │ │ │ └── project-second │ │ │ │ │ └── index.js │ │ │ ├── write-test-copy │ │ │ │ ├── README.md │ │ │ │ ├── project-third │ │ │ │ │ └── Makefile │ │ │ │ ├── _project-collection │ │ │ │ │ └── project-gamma │ │ │ │ │ │ └── main.py │ │ │ │ └── project-second │ │ │ │ │ └── index.js │ │ │ └── read-test │ │ │ │ ├── README.md │ │ │ │ ├── project-three │ │ │ │ └── .gitkeep │ │ │ │ ├── project-two │ │ │ │ ├── .gitignore │ │ │ │ └── main.py │ │ │ │ ├── _project-grouping │ │ │ │ ├── project-alfa │ │ │ │ │ └── index.js │ │ │ │ ├── project-bravo │ │ │ │ │ └── index.js │ │ │ │ └── project-charlie │ │ │ │ │ └── index.js │ │ │ │ └── project-one │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ ├── tails.json │ │ ├── testUtils.ts │ │ ├── testConstants.ts │ │ ├── project.test.ts │ │ └── namespace.test.ts │ ├── util │ │ ├── constants.ts │ │ └── index.ts │ ├── bootstrap.js │ ├── core │ │ └── init.ts │ ├── index.ts │ ├── __mocks__ │ │ └── config.helper.ts │ ├── namespace.helper.ts │ ├── config.helper.ts │ ├── project.helper.ts │ ├── namespace.ts │ ├── errors.ts │ ├── config.ts │ └── project.ts ├── typedoc.json ├── jest.config.mjs ├── .babelrc.json ├── tsconfig.json ├── readme.md └── package.json ├── .eslintignore ├── .prettierrc.json ├── eslint-config-tails ├── src │ └── index.ts ├── jest.config.js ├── tsconfig.json ├── readme.md ├── rollup.config.js ├── test │ └── validate.test.ts ├── package.json └── .eslintrc.json ├── tails.png ├── .huskyrc.json ├── .gitmodules ├── tails-server-old ├── src │ ├── server.js │ ├── app.js │ └── schema │ │ └── index.js ├── tsconfig.json └── package.json ├── .lintstagedrc.json ├── tails-server ├── readme.md ├── src │ ├── server.ts │ ├── util │ │ ├── Application.ts │ │ └── read.ts │ ├── app.ts │ ├── assets │ │ ├── graphql.html │ │ ├── prism.css │ │ └── prism.js │ └── controllers │ │ └── rootControllers.ts ├── velociraptor.yaml ├── denon.json └── map.json ├── Makefile ├── lerna.json ├── .editorconfig ├── .gitignore ├── .prettierignore ├── .eslintrc.json ├── protobufs ├── coordinator │ └── project_api.proto ├── paws │ ├── config_api.proto │ ├── physical_project_api.proto │ └── namespace_api.proto └── prototool.yaml ├── tsconfig.base.json ├── package.json ├── .vscode └── settings.json ├── tails-plugins └── readme.md ├── docker-compose.yml ├── readme.md └── license /tails-cli/src/vorpal/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tails-web/.browserslistrc: -------------------------------------------------------------------------------- 1 | last 2 versions 2 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | workspaces: 2 | - '*tails*' 3 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/write-test/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/write-test-copy/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/read-test/README.md: -------------------------------------------------------------------------------- 1 | # read-test 2 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/read-test/project-three/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/write-test/project-third/Makefile: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | projects/ 2 | node_modules/ 3 | web_modules/ 4 | dist/ 5 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/write-test-copy/project-third/Makefile: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": false 4 | } 5 | -------------------------------------------------------------------------------- /eslint-config-tails/src/index.ts: -------------------------------------------------------------------------------- 1 | export default require('../.eslintrc.json') 2 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/read-test/project-two/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/read-test/project-two/main.py: -------------------------------------------------------------------------------- 1 | print('name') 2 | -------------------------------------------------------------------------------- /tails-fs/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "minimal", 3 | "out": "docs" 4 | } 5 | -------------------------------------------------------------------------------- /tails.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperupcall-archive/tails/HEAD/tails.png -------------------------------------------------------------------------------- /tails-cli/.babelrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/env", "@babel/typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/write-test/_project-collection/project-gamma/main.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/write-test/project-second/index.js: -------------------------------------------------------------------------------- 1 | console.log('') 2 | -------------------------------------------------------------------------------- /.huskyrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "hooks": { 3 | "pre-commit": "yarn lint:staged" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/write-test-copy/_project-collection/project-gamma/main.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/write-test-copy/project-second/index.js: -------------------------------------------------------------------------------- 1 | console.log('') 2 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/tails.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "this file does not do anything" 3 | } 4 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "projects"] 2 | path = projects 3 | url = git@github.com:eankeen/tails-projects 4 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/read-test/_project-grouping/project-alfa/index.js: -------------------------------------------------------------------------------- 1 | console.log('alfa') 2 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/read-test/_project-grouping/project-bravo/index.js: -------------------------------------------------------------------------------- 1 | console.log('bravo') 2 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/read-test/_project-grouping/project-charlie/index.js: -------------------------------------------------------------------------------- 1 | console.log('charlie') 2 | -------------------------------------------------------------------------------- /tails-fs/src/util/constants.ts: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | 3 | export const $ = path.join(__dirname, '../../') 4 | -------------------------------------------------------------------------------- /tails-server-old/src/server.js: -------------------------------------------------------------------------------- 1 | import { app } from './app' 2 | 3 | app.listen(9020, () => console.log('start')) 4 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/read-test/project-one/index.js: -------------------------------------------------------------------------------- 1 | console.table({ 2 | a: 'alfa', 3 | b: 'bravo', 4 | }) 5 | -------------------------------------------------------------------------------- /eslint-config-tails/jest.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | preset: 'ts-jest', 3 | setupFilesAfterEnv: ['jest-extended'], 4 | } 5 | -------------------------------------------------------------------------------- /tails-web/src/global.css: -------------------------------------------------------------------------------- 1 | *, 2 | *::before, 3 | *::after { 4 | margin: 0; 5 | padding: 0; 6 | box-sizing: border-box; 7 | } 8 | -------------------------------------------------------------------------------- /tails-fs/src/bootstrap.js: -------------------------------------------------------------------------------- 1 | require('@babel/register')({ 2 | extensions: ['.mjs', '.js', '.ts'], 3 | }) 4 | 5 | require('./index.ts') 6 | -------------------------------------------------------------------------------- /.lintstagedrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "**/*.{json,yaml,yml,vue,css,md,mdx,toml}": ["yarn lint:misc:fix"], 3 | "**/*.{js,ts}": ["yarn lint:js:fix"] 4 | } 5 | -------------------------------------------------------------------------------- /tails-web/src/components/Footer.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | 3 | export default function Footer() { 4 | return <>Tails 5 | } 6 | -------------------------------------------------------------------------------- /tails-fs/jest.config.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | testRegex: '(/__tests__/|tests).*.test.(j|t)s$', 5 | } 6 | -------------------------------------------------------------------------------- /tails-server/readme.md: -------------------------------------------------------------------------------- 1 | # tails-storage 2 | 3 | `tails-fs` wasn't build correcly - and it's inconsistent. this is a much more bare bones implementation in deno 4 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: start, lint 2 | 3 | start: 4 | docker-compose up nats dashboard-mpa editor operator deubg 5 | 6 | lint: 7 | cd protobufs && prototool lint . 8 | -------------------------------------------------------------------------------- /tails-web/.babelrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["react-hot-loader/babel", "@babel/proposal-class-properties"], 3 | "presets": ["@babel/env", "@babel/react"] 4 | } 5 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "useWorkspaces": true, 3 | "npmClient": "yarn", 4 | "packages": ["eslint-config-tails", "tails-*"], 5 | "version": "0.0.0", 6 | "bootstrap": {} 7 | } 8 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/fixtures/read-test/project-one/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "project-1", 3 | "version": "0.0.0", 4 | "main": "index.js", 5 | "license": "UNLICENSED" 6 | } 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | insert_final_newline = true 8 | 9 | [Makefile] 10 | indent_style = tab 11 | -------------------------------------------------------------------------------- /tails-server/src/server.ts: -------------------------------------------------------------------------------- 1 | import { app } from "./app.ts"; 2 | 3 | const port = Number(Deno.env.get("PORT")) || 9020; 4 | 5 | await app.listen(port, () => console.log(`listening on port ${port}`)); 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build 2 | dist/ 3 | 4 | # docs 5 | tails-fs/docs 6 | 7 | # misc 8 | tails-quick/ 9 | 10 | # modules 11 | node_modules/ 12 | web_modules/ 13 | 14 | # misc 15 | *.log 16 | .env 17 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # build 2 | dist/ 3 | 4 | # docs 5 | tails-fs/docs 6 | 7 | # projects 8 | projects/ 9 | 10 | # modules 11 | node_modules/ 12 | web_modules/ 13 | 14 | # misc 15 | *.hbs 16 | 17 | -------------------------------------------------------------------------------- /eslint-config-tails/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "build" 6 | }, 7 | "include": ["src/**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /tails-web/src/pages/Settings.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { PageHeader } from "antd"; 3 | 4 | export default function Settings() { 5 | return ( 6 | 7 | ); 8 | } 9 | -------------------------------------------------------------------------------- /tails-fs/.babelrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/env", 5 | { 6 | "targets": { 7 | "node": "current" 8 | } 9 | } 10 | ], 11 | "@babel/typescript" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /tails-web/readme.md: -------------------------------------------------------------------------------- 1 | # tails-web 2 | 3 | main interface to browse projects and leverages the plugin runtime component. for the runtime is built in, but in the future they'll probably be abstracted away into renderless web components or something 4 | -------------------------------------------------------------------------------- /eslint-config-tails/readme.md: -------------------------------------------------------------------------------- 1 | # eslint-config-tails 2 | 3 | contains project-wide eslint config 4 | 5 | ## usage 6 | 7 | ```sh 8 | yarn add -D eslint-config-tails 9 | ``` 10 | 11 | ```json 12 | { 13 | "extends": ["tails"] 14 | } 15 | ``` 16 | -------------------------------------------------------------------------------- /tails-web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src" 5 | }, 6 | "include": ["src/**/*"], 7 | "references": [ 8 | { 9 | "path": "../tails-fs" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /tails-server/velociraptor.yaml: -------------------------------------------------------------------------------- 1 | scripts: 2 | serve: denon serve 3 | start: 4 | cmd: deno run --unstable src/server.ts 5 | imap: map.json 6 | test: 7 | cmd: deno test 8 | imap: map.json 9 | allow: 10 | - env 11 | - net 12 | - read 13 | -------------------------------------------------------------------------------- /tails-fs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "build" 6 | }, 7 | "include": ["src/**/*"], 8 | "references": [ 9 | { 10 | "path": "../eslint-config-tails" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /tails-server-old/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "build" 6 | }, 7 | "include": ["src/**/*"], 8 | "references": [ 9 | { 10 | "path": "../tails-fs" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parserOptions": { 4 | "parser": "babel-eslint", 5 | "ecmaVersion": 2020, 6 | "sourceType": "module", 7 | "ecmaFeatures": { 8 | "impliedStrict": true, 9 | "modules": true 10 | } 11 | }, 12 | "extends": ["tails"] 13 | } 14 | -------------------------------------------------------------------------------- /tails-web/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Tails Web 7 | 8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /tails-server/denon.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://deno.land/x/denon/schema.json", 3 | "scripts": { 4 | "serve": { 5 | "cmd": "deno run --importmap=map.json src/server.ts", 6 | "allow": [ 7 | "env", 8 | "net", 9 | "read" 10 | ], 11 | "unstable": true 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tails-cli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "outDir": "build" 6 | }, 7 | "include": ["src/**/*"], 8 | "references": [ 9 | { 10 | "path": "../eslint-config-tails" 11 | }, 12 | { 13 | "path": "../tails-fs" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /tails-server/map.json: -------------------------------------------------------------------------------- 1 | { 2 | "imports": { 3 | "std/http/": "https://deno.land/std@v0.54.0/http/", 4 | "std/fs/": "https://deno.land/std@v0.54.0/fs/", 5 | "std/path/": "https://deno.land/std@v0.54.0/path/", 6 | "std/testing/": "https://deno.land/std@v0.54.0/testing/", 7 | "pkg/oak/": "https://deno.land/x/oak@v5.0.0/" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tails-web/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | syntax: require('postcss-scss') 3 | plugins: { 4 | require('postcss-import') 5 | } 6 | // plugins: { 7 | // 'postcss-import': {}, 8 | // autoprefixer: {}, 9 | // 'postcss-preset-env': { 10 | // stage: 1, 11 | // autoprefixer: { 12 | // grid: false, 13 | // }, 14 | // }, 15 | // }, 16 | } 17 | -------------------------------------------------------------------------------- /tails-fs/src/core/init.ts: -------------------------------------------------------------------------------- 1 | process.on('uncaughtException', (err) => { 2 | console.error('uncaught exception', err) 3 | process.exitCode = 1 4 | }) 5 | 6 | process.on('unhandledRejection', (err) => { 7 | console.error('unhandled rejection', err) 8 | process.exitCode = 1 9 | }) 10 | 11 | process.on('SIGTERM', (err) => { 12 | console.error('got sigterm', err) 13 | process.exitCode = 1 14 | }) 15 | -------------------------------------------------------------------------------- /tails-cli/src/index.js: -------------------------------------------------------------------------------- 1 | // node 13/14 doesn't play well with 2 | // es6 importing .ts files 3 | // import register from '@babel/register' 4 | 5 | require('@babel/register')({ 6 | extensions: ['.mjs', '.js', '.ts'], 7 | }) 8 | 9 | require('./cli.ts') 10 | // import('./cli.ts') 11 | // .then(({ startCli }) => { 12 | // startCli() 13 | // }) 14 | // .catch(err => { 15 | // console.error(err) 16 | // }) 17 | -------------------------------------------------------------------------------- /tails-server/src/util/Application.ts: -------------------------------------------------------------------------------- 1 | import * as http from "std/http/mod.ts"; 2 | 3 | export class Application { 4 | #app: any; 5 | 6 | constructor(app: any) { 7 | this.#app = app; 8 | } 9 | 10 | public async listen(port: any, cb: () => void): Promise { 11 | const server = http.serve({ port }); 12 | cb(); 13 | for await (const req of server) { 14 | this.#app(req); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /protobufs/coordinator/project_api.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tails.coordinator.v1; 3 | 4 | service ProjectAPI { 5 | // rpc ListProjects() returns (Projects) {} 6 | 7 | rpc ShowProject(ShowProjectRequest) returns (ShowProjectResponse) {} 8 | } 9 | 10 | message ShowProjectRequest { 11 | string name = 1; 12 | // required int32 id = 2; 13 | } 14 | 15 | message ShowProjectResponse { 16 | string name = 1; 17 | string prop = 2; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /eslint-config-tails/rollup.config.js: -------------------------------------------------------------------------------- 1 | import json from '@rollup/plugin-json' 2 | import cleaner from 'rollup-plugin-cleaner' 3 | import { terser } from 'rollup-plugin-terser' 4 | 5 | export default { 6 | input: 'src/index.ts', 7 | output: [ 8 | { 9 | file: 'dist/index.cjs', 10 | format: 'cjs', 11 | }, 12 | ], 13 | plugins: [ 14 | json(), 15 | terser(), 16 | cleaner({ 17 | targets: ['dist'], 18 | }), 19 | ], 20 | } 21 | -------------------------------------------------------------------------------- /tails-fs/src/index.ts: -------------------------------------------------------------------------------- 1 | import './core/init' 2 | import * as TAILS_ERROR from './errors' 3 | 4 | // export { PhysicalNamespace } from './namespace' 5 | export * as PhysicalNamespace from './namespace' 6 | export * as Namespace from './namespace' 7 | export * as PhysicalProject from './project' 8 | export * as Project from './project' 9 | export { Config, TAILS_CONFIG_FILE } from './config' 10 | // export * as TAILS_ERROR from './errors' // linting errors 11 | export { TAILS_ERROR } 12 | -------------------------------------------------------------------------------- /tails-fs/readme.md: -------------------------------------------------------------------------------- 1 | # Filesystemd 2 | 3 | `filesystem` contains code for the `tails-fs` package, which edits files on the local file system. 4 | 5 | more specifically, it is responsible for doing the following on the local filesystem 6 | 7 | - querying information about projects 8 | - creating / modifying projects 9 | - for any project, it may also do 10 | - scaffolding 11 | - bootstrapping 12 | - boilerplate configuration 13 | 14 | ## Scripts 15 | 16 | all scripts in `package.json` 17 | -------------------------------------------------------------------------------- /tails-web/src/components/ProjectsList.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { Row } from 'antd' 3 | 4 | import Project from '@/components/Project' 5 | 6 | export default function ProjectsList({ projects }) { 7 | return ( 8 | 9 | {projects.map((project) => { 10 | const key = project.namespace + '-' + project.name 11 | return ( 12 | 13 | ); 14 | })} 15 | 16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /tails-cli/src/cli.ts: -------------------------------------------------------------------------------- 1 | import yargs from 'yargs' 2 | 3 | // export function startCli() { 4 | // @ts-ignore 5 | yargs 6 | // @ts-ignore 7 | .scriptName('tails') 8 | .usage('$0 [args]') 9 | .example('$0 project list', 'list all projects') 10 | .example( 11 | '$0 project show projectName', 12 | 'show information about a particular project' 13 | ) 14 | 15 | // @ts-ignore 16 | yargs.commandDir('yargs') 17 | 18 | // @ts-ignore 19 | yargs.demandCommand().wrap(100).strict().help().argv 20 | // } 21 | -------------------------------------------------------------------------------- /protobufs/paws/config_api.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tails.paws.v1; 3 | 4 | service ConfigAPI { 5 | rpc GetConfig(GetConfigRequest) returns (GetConfigResponse) {} 6 | rpc SetConfig(SetConfigRequest) returns (SetConfigResponse) {} 7 | } 8 | 9 | message GetConfigRequest { 10 | string key = 1; 11 | } 12 | 13 | message GetConfigResponse { 14 | string value = 1; 15 | } 16 | 17 | message SetConfigRequest { 18 | string key = 1; 19 | string value = 2; 20 | } 21 | 22 | message SetConfigResponse { 23 | string status = 1; 24 | } 25 | -------------------------------------------------------------------------------- /tails-web/src/main.js: -------------------------------------------------------------------------------- 1 | // import Vue from 'vue' 2 | // import App from './App' 3 | // import Vuetify from 'vuetify' 4 | // import 'vuetify/dist/vuetify.min.css' 5 | 6 | // Vue.config.productionTip = false 7 | 8 | // Vue.use(Vuetify) 9 | 10 | // new Vue({ 11 | // el: '#app', 12 | // mode: 'history', 13 | // render: (h) => h(App), 14 | // }) 15 | 16 | import React from 'react' 17 | import ReactDOM from 'react-dom' 18 | import 'antd/dist/antd.css'; 19 | 20 | import App from './App' 21 | 22 | ReactDOM.render(, document.getElementById('app')) 23 | -------------------------------------------------------------------------------- /tails-fs/src/__tests__/testUtils.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs-extra' 2 | 3 | import * as TC from './testConstants' 4 | import { Config } from '../config' 5 | 6 | export async function setConfig(config: { [key: string]: string }) { 7 | await Config.create() 8 | for (let property in config) { 9 | await Config.set(property, config[property]) 10 | } 11 | } 12 | 13 | export async function fixNamespaceFixtures() { 14 | const src = TC.TEST_TAILS_ROOT_DIR_WRITE_BACKUP 15 | const dest = TC.TEST_TAILS_ROOT_DIR_WRITE 16 | await fs.emptyDir(dest) 17 | await fs.copy(src, dest) 18 | } 19 | -------------------------------------------------------------------------------- /tails-web/src/components/Project.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { Card, Col, Button } from "antd"; 3 | 4 | export default function Project({ project }) { 5 | function openInVsCode(ev) { 6 | console.log(project.name) 7 | } 8 | 9 | return ( 10 | 18 | More}> 19 | 20 | 21 | 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /tails-fs/src/__mocks__/config.helper.ts: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | 3 | export const TAILS_CONFIG_FILE = resolveTailsConfigFile() 4 | 5 | let store: any = null 6 | 7 | function resolveTailsConfigFile() { 8 | return path.join(__dirname, '../__tests__/tails.json') 9 | } 10 | 11 | export async function createStore() { 12 | store = {} 13 | } 14 | 15 | export async function deleteStore() { 16 | store = null 17 | } 18 | 19 | export async function readStore() { 20 | return store 21 | } 22 | 23 | export async function writeStore(obj: object) { 24 | store = obj 25 | } 26 | 27 | export async function storeExists() { 28 | return store !== null 29 | } 30 | -------------------------------------------------------------------------------- /tails-server-old/src/app.js: -------------------------------------------------------------------------------- 1 | import Koa from 'koa' 2 | import helmet from 'koa-helmet' 3 | import mount from 'koa-mount' 4 | import cors from '@koa/cors' 5 | import graphqlHTTP from 'koa-graphql' 6 | 7 | import { rootSchema } from './schema' 8 | 9 | const isDev = process.env.NODE_ENV === 'development' 10 | 11 | let app = new Koa() 12 | 13 | app.use(cors()) 14 | app.use(helmet()) 15 | 16 | app.use( 17 | mount( 18 | '/graphql', 19 | graphqlHTTP({ 20 | schema: rootSchema, 21 | graphiql: isDev, 22 | pretty: true, 23 | }) 24 | ) 25 | ) 26 | 27 | app.use((ctx) => { 28 | ctx.body = 'hello world' 29 | }) 30 | 31 | export { app } 32 | -------------------------------------------------------------------------------- /tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": true, 3 | "compilerOptions": { 4 | "sourceMap": true, 5 | "target": "ES2017", 6 | "module": "commonjs", 7 | "esModuleInterop": true, 8 | "moduleResolution": "node", 9 | "strict": true, 10 | "noImplicitAny": false, 11 | "noImplicitReturns": true, 12 | "noImplicitThis": true, 13 | "forceConsistentCasingInFileNames": true, 14 | "typeRoots": ["./node_modules/@types", "./@types"], 15 | "types": ["node", "jest"], 16 | "lib": ["ESNext"], 17 | "composite": true, 18 | // ensure this is on for composite and project references 19 | "declaration": true, 20 | "declarationMap": true, 21 | "incremental": true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tails-fs/src/util/index.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs-extra' 2 | import path from 'path' 3 | 4 | export function getNamespaceFolder(tailsRootDir: string, namespace: string) { 5 | return path.join(tailsRootDir, `_${namespace}`) 6 | } 7 | 8 | export async function doesNamespaceExist( 9 | tailsRootDir: string, 10 | namespace: string 11 | ) { 12 | const namespaceFolder = path.join(tailsRootDir, `_${namespace}`) 13 | 14 | try { 15 | await fs.promises.stat(namespaceFolder) 16 | } catch { 17 | return false 18 | } 19 | return true 20 | } 21 | 22 | export function readDirRaw(tailsRootDir: string) { 23 | return fs.promises.readdir(tailsRootDir, { 24 | encoding: 'utf8', 25 | withFileTypes: true, 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /tails-fs/src/namespace.helper.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs-extra' 2 | 3 | import { getNamespaceFolder } from './util' 4 | 5 | export function createPhysicalNamespaceRaw( 6 | tailsRootDir: string, 7 | namespace: string 8 | ) { 9 | const namespaceFolder = getNamespaceFolder(tailsRootDir, namespace) 10 | return fs.promises.mkdir(namespaceFolder, { 11 | mode: 0o755, 12 | }) 13 | } 14 | 15 | export async function deletePhysicalNamespaceRaw( 16 | tailsRootDir: string, 17 | namespace: string 18 | ) { 19 | // we include the stat because fs.remove from fs-extra does not 20 | // error if the folder does not exist. fs.promises.stat does 21 | const namespaceFolder = getNamespaceFolder(tailsRootDir, namespace) 22 | await fs.promises.stat(namespaceFolder) 23 | await fs.remove(namespaceFolder) 24 | } 25 | -------------------------------------------------------------------------------- /eslint-config-tails/test/validate.test.ts: -------------------------------------------------------------------------------- 1 | import eslint from 'eslint' 2 | 3 | import config from '../src/index' 4 | 5 | test('config has basic properties', () => { 6 | expect(config).toBeObject() 7 | expect(config.parserOptions).toBeObject() 8 | expect(config.env).toBeObject() 9 | expect(config.env).toContainKey('node') 10 | expect(config.plugins).toBeArray() 11 | expect(config.extends).toBeArray() 12 | expect(config.rules).toBeObject() 13 | }) 14 | 15 | test('eslint engine evaluates config file', () => { 16 | let CLIEngine = eslint.CLIEngine 17 | 18 | let cli = new CLIEngine({ 19 | useEslintrc: false, 20 | configFile: '.eslintrc.json', 21 | }) 22 | 23 | const code = 'let foo = 1\nlet bar = function () {}\nbar(foo)\n' 24 | 25 | expect(cli.executeOnText(code).errorCount).toBe(0) 26 | }) 27 | -------------------------------------------------------------------------------- /tails-cli/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tails-cli", 3 | "version": "0.0.0", 4 | "main": "src/index.js", 5 | "type": "commonjs", 6 | "license": "GPL-3.0", 7 | "scripts": { 8 | "serve": "cross-env NODE_ENV=development nodemon src/index.js", 9 | "start": "cross-env NODE_ENV=production node dist/index.js", 10 | "types": "tsc src/**/*.ts --noEmit", 11 | "lint:js": "eslint .", 12 | "lint:js:fix": "eslint . --fix" 13 | }, 14 | "dependencies": { 15 | "ansi-colors": "^4.1.1", 16 | "tails-fs": "^0.1.0", 17 | "yargs": "^15.3.0" 18 | }, 19 | "devDependencies": { 20 | "@babel/core": "^7.9.0", 21 | "@babel/preset-typescript": "^7.9.0", 22 | "@babel/register": "^7.9.0", 23 | "eslint": "^6.8.0", 24 | "eslint-config-tails": "^0.2.0", 25 | "typescript": "^3.8.3" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tails-server-old/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tails-server", 3 | "version": "0.0.0", 4 | "main": "src/server.js", 5 | "license": "GPL-3.0", 6 | "scripts": { 7 | "serve": "cross-env NODE_ENV=development nodemon -r esm src/server", 8 | "start": "node -r esm src/server", 9 | "lint:js": "eslint .", 10 | "lint:js:fix": "eslint . --fix" 11 | }, 12 | "engines": { 13 | "node": ">= 12.10.0" 14 | }, 15 | "dependencies": { 16 | "@koa/cors": "2", 17 | "esm": "^3.2.25", 18 | "graphql": "^15.0.0", 19 | "koa": "^2.11.0", 20 | "koa-graphql": "^0.8.0", 21 | "koa-helmet": "^5.2.0", 22 | "koa-mount": "^4.0.0", 23 | "tails-fs": "^0.1.0" 24 | }, 25 | "devDependencies": { 26 | "cross-env": "^7.0.2", 27 | "eslint": "^6.8.0", 28 | "eslint-config-tails": "^0.2.0", 29 | "nodemon": "^2.0.2" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tails", 3 | "version": "0.0.0", 4 | "private": true, 5 | "license": "GPL-3.0", 6 | "scripts": { 7 | "lint": "run-s lint:js lint:misc", 8 | "lint:fix": "run-s lint:js:fix lint:misc:fix", 9 | "lint:js": "lerna run lint:js", 10 | "lint:js:fix": "lerna run lint:js:fix", 11 | "lint:misc": "prettier --check .", 12 | "lint:misc:fix": "prettier --write .", 13 | "lint:staged": "lint-staged" 14 | }, 15 | "workspaces": [ 16 | "dashboard-mpa", 17 | "eslint-config-tails", 18 | "tails-*" 19 | ], 20 | "devDependencies": { 21 | "eslint": "^6.8.0", 22 | "eslint-config-tails": "^0.2.0", 23 | "husky": "^4.2.3", 24 | "lerna": "^3.20.2", 25 | "lint-staged": "^10.2.0", 26 | "npm-run-all": "^4.1.5", 27 | "prettier": "^2.0.2", 28 | "prettier-plugin-toml": "^0.3.1" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /protobufs/paws/physical_project_api.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tails.paws.v1; 3 | 4 | service PhysicalProjectAPI { 5 | rpc ListPhysicalProject(ListPhysicalProjectRequest) 6 | returns (ListPhysicalProjectResponse); 7 | rpc ShowPhysicalProject(ShowPhysicalProjectRequest) 8 | returns (ShowPhysicalProjectResponse); 9 | } 10 | 11 | message ListPhysicalProjectRequest {} 12 | 13 | message PhysicalProject { 14 | string name = 1; 15 | bool is_directory = 2; 16 | bool is_file = 3; 17 | bool is_symbolic_link = 4; 18 | } 19 | 20 | message ListPhysicalProjectResponse { 21 | repeated PhysicalProject physical_project_list = 1; 22 | } 23 | 24 | message ShowPhysicalProjectRequest { 25 | string name = 1; 26 | bool simple = 2; 27 | } 28 | 29 | message ShowPhysicalProjectResponse { 30 | string name = 1; 31 | bool is_directory = 2; 32 | bool is_file = 3; 33 | bool is_symbolic_link = 4; 34 | } 35 | -------------------------------------------------------------------------------- /protobufs/prototool.yaml: -------------------------------------------------------------------------------- 1 | protoc: 2 | version: 3.8.0 3 | 4 | lint: 5 | group: uber2 6 | rules: 7 | remove: 8 | - FILE_OPTIONS_REQUIRE_CSHARP_NAMESPACE 9 | - FILE_OPTIONS_REQUIRE_PHP_NAMESPACE 10 | - FILE_OPTIONS_REQUIRE_OBJC_CLASS_PREFIX 11 | - FILE_OPTIONS_REQUIRE_GO_PACKAGE 12 | - FILE_OPTIONS_REQUIRE_JAVA_MULTIPLE_FILES 13 | - FILE_OPTIONS_REQUIRE_JAVA_OUTER_CLASSNAME 14 | - FILE_OPTIONS_REQUIRE_JAVA_PACKAGE 15 | - ENUMS_HAVE_COMMENTS 16 | - MESSAGES_HAVE_COMMENTS 17 | - MESSAGES_HAVE_COMMENTS_EXCEPT_REQUEST_RESPONSE_TYPES 18 | - RPCS_HAVE_COMMENTS 19 | - SERVICES_HAVE_COMMENTS 20 | - ENUMS_HAVE_SENTENCE_COMMENTS 21 | - SERVICES_HAVE_SENTENCE_COMMENTS 22 | - RPCS_HAVE_SENTENCE_COMMENTS 23 | - MESSAGES_HAVE_SENTENCE_COMMENTS_EXCEPT_REQUEST_RESPONSE_TYPES 24 | - MESSAGE_FIELDS_HAVE_SENTENCE_COMMENTS 25 | - ENUM_FIELDS_HAVE_SENTENCE_COMMENTS 26 | - ENUMS_HAVE_SENTENCE_COMMENTS 27 | -------------------------------------------------------------------------------- /tails-web/src/App.jsx: -------------------------------------------------------------------------------- 1 | import { hot } from 'react-hot-loader/root'; 2 | import * as React from 'react'; 3 | import { Layout } from 'antd'; 4 | import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; 5 | import Header from '@/components/Header' 6 | import Footer from '@/components/Footer' 7 | import Projects from '@/pages/Projects' 8 | import Settings from '@/pages/Settings' 9 | 10 | function App() { 11 | return ( 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |