Skip to content

Commit

Permalink
feat: setup worker workspace, update deps and CLI min node version
Browse files Browse the repository at this point in the history
  • Loading branch information
dallen4 committed Aug 27, 2024
1 parent 10f49ba commit 8043793
Show file tree
Hide file tree
Showing 12 changed files with 4,262 additions and 3,105 deletions.
2 changes: 1 addition & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

In order to run the CLI, you need the following:

- `node`: `>=18`
- `node`: `>=20`
- `npm`: `>=9` OR `yarn`: `^1`

## Installation
Expand Down
12 changes: 7 additions & 5 deletions cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cli",
"description": "deadrop CLI",
"version": "0.2.0",
"version": "0.2.4",
"main": "dist/deadrop.js",
"bin": {
"deadrop": "./dist/deadrop.js"
Expand All @@ -13,24 +13,26 @@
"license": "GPL-3.0-only",
"private": true,
"scripts": {
"prebuild": "rimraf dist/",
"prebuild": "sh ./scripts/prebuild.sh",
"build": "node ./scripts/esbuild.js",
"prepackage": "cpx \"../node_modules/figlet/fonts/*.flf\" ./fonts",
"package": "nexe ./dist/deadrop.js --output \"./dist/deadrop\" --resource \"./fonts/Standard.flf\" --build",
"postpackage": "rimraf fonts/",
"compile": "yarn build && yarn package",
"postversion": "bash ./scripts/postversion.sh",
"prepublishOnly": "bash ./scripts/prepublish.sh",
"postpublish": "bash ./scripts/postpublish.sh",
"postversion": "sh ./scripts/postversion.sh",
"prepublishOnly": "sh ./scripts/prepublish.sh",
"postpublish": "sh ./scripts/postpublish.sh",
"release": "yarn build && npm publish"
},
"dependencies": {
"@inquirer/prompts": "^5.3.8",
"@libsql/client": "^0.9.0",
"@roamhq/wrtc": "^0.8.0",
"chalk": "^5.2.0",
"change-case": "^5.4.4",
"commander": "^9.4.1",
"cosmiconfig": "^9.0.0",
"envfile": "^7.1.0",
"figlet": "^1.5.2",
"mime-type": "^4.0.0",
"ora": "^6.1.2",
Expand Down
117 changes: 59 additions & 58 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,61 @@
{
"name": "deadrop",
"version": "0.1.2",
"description": "e2e encrypted secret sharing",
"main": "index.js",
"author": "Nieky Allen <[email protected]>",
"license": "GPL-3.0-only",
"repository": {
"url": "https://github.com/dallen4/deadrop.git"
},
"private": true,
"workspaces": [
"web",
"cli",
"shared"
],
"scripts": {
"web": "yarn workspace web",
"cli": "yarn workspace cli",
"shared": "yarn workspace shared",
"start": "yarn web start",
"build": "yarn web build",
"start:prod": "yarn web start:prod",
"test:e2e": "yarn web test:e2e",
"cli:build": "yarn cli build",
"cli:release": "cd cli && yarn install --frozen-lockfile && yarn release",
"analyze:dup": "npx jscpd shared cli web --format \"typescript\"",
"postversion": "git push --tags"
},
"dependencies": {
"@libsql/client": "^0.9.0",
"@xstate/react": "^3.0.1",
"drizzle-kit": "^0.24.0",
"drizzle-orm": "^0.33.0",
"nanoid": "^5.0.1",
"nanoid-dictionary": "^4.3.0",
"peerjs": "^1.4.7",
"qrcode": "^1.5.3",
"ws": "^8.11.0",
"xstate": "^4.38.2"
},
"devDependencies": {
"@types/nanoid-dictionary": "^4.2.3",
"@types/node": "^20",
"eslint": "^8.31.0",
"prettier": "^2.8.2",
"ts-node": "^10.7.0",
"typescript": "^4.0.3"
},
"browser": {
"tls": false,
"net": false,
"bufferutil": false,
"utf-8-validate": false
},
"engines": {
"node": ">=18",
"yarn": "1"
}
"name": "deadrop",
"version": "0.1.2",
"description": "e2e encrypted secret sharing",
"main": "index.js",
"author": "Nieky Allen <[email protected]>",
"license": "GPL-3.0-only",
"repository": {
"url": "https://github.com/dallen4/deadrop.git"
},
"private": true,
"workspaces": [
"web",
"cli",
"worker",
"shared"
],
"scripts": {
"web": "yarn workspace web",
"cli": "yarn workspace cli",
"shared": "yarn workspace shared",
"start": "yarn web start",
"build": "yarn web build",
"start:prod": "yarn web start:prod",
"test:e2e": "yarn web test:e2e",
"cli:build": "yarn cli build",
"cli:release": "cd cli && yarn install --frozen-lockfile && yarn release",
"analyze:dup": "npx jscpd shared cli web --format \"typescript\"",
"postversion": "git push --tags"
},
"dependencies": {
"@libsql/client": "^0.9.0",
"@xstate/react": "^3.0.1",
"drizzle-kit": "^0.24.0",
"drizzle-orm": "^0.33.0",
"nanoid": "^5.0.1",
"nanoid-dictionary": "^4.3.0",
"peerjs": "^1.4.7",
"qrcode": "^1.5.3",
"ws": "^8.11.0",
"xstate": "^4.38.2"
},
"devDependencies": {
"@types/nanoid-dictionary": "^4.2.3",
"@types/node": "^20",
"eslint": "^8.31.0",
"prettier": "^2.8.2",
"ts-node": "^10.7.0",
"typescript": "^4.0.3"
},
"browser": {
"tls": false,
"net": false,
"bufferutil": false,
"utf-8-validate": false
},
"engines": {
"node": ">=20",
"yarn": "1"
}
}
2 changes: 1 addition & 1 deletion web/pages/docs/tools/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

In order to run the CLI, you need the following:

- `node`: `>=18`
- `node`: `>=20`
- `npm`: `>=9` OR `yarn`: `^1`

## Installation
Expand Down
172 changes: 172 additions & 0 deletions worker/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Logs

logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)

report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Runtime data

pids
_.pid
_.seed
\*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

lib-cov

# Coverage directory used by tools like istanbul

coverage
\*.lcov

# nyc test coverage

.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)

.grunt

# Bower dependency directory (https://bower.io/)

bower_components

# node-waf configuration

.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)

build/Release

# Dependency directories

node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)

web_modules/

# TypeScript cache

\*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# Microbundle cache

.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history

.node_repl_history

# Output of 'npm pack'

\*.tgz

# Yarn Integrity file

.yarn-integrity

# dotenv environment variable files

.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)

.cache
.parcel-cache

# Next.js build output

.next
out

# Nuxt.js build / generate output

.nuxt
dist

# Gatsby files

.cache/

# Comment in the public line in if your project uses Gatsby and not Next.js

# https://nextjs.org/blog/next-9-1#public-directory-support

# public

# vuepress build output

.vuepress/dist

# vuepress v2.x temp and cache directory

.temp
.cache

# Docusaurus cache and generated files

.docusaurus

# Serverless directories

.serverless/

# FuseBox cache

.fusebox/

# DynamoDB Local files

.dynamodb/

# TernJS port file

.tern-port

# Stores VSCode versions used for testing VSCode extensions

.vscode-test

# yarn v2

.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.\*

# wrangler project

.dev.vars
.wrangler/
36 changes: 36 additions & 0 deletions worker/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Prettier Config: This fill overrides all possible options (even those with
* defaults which match our own in the event that prettier overwrites them in
* future release). for more information and additional config
*
* visit: https://prettier.io/docs/en/options.html
*/
module.exports = {
// Number of characters allowed before formatter wraps code.
printWidth: 70,

// Number of spaces in a tab.
tabWidth: 2,

// Add Semicolons at the end of all statements.
semi: true,

// NOTE: Quotes in JSX will always be double and ignore this setting.
// The rest will use single quotes when possible.
singleQuote: true,

// Where to add trailing commas, es5 option supports adding anywhere
// possible that is still ES5 valid
trailingComma: 'all',

// Add spacing between bracket destructuring (e.g., { varName } )
bracketSpacing: true,

// Whether to add the '>' on a separate line or same on on multi-line JSX
// components.
jsxBracketSameLine: false,

// Whether to force the use of parens when using arrow functions:
// params => {} vs (params) => {}
arrowParens: 'always',
};
Loading

0 comments on commit 8043793

Please sign in to comment.