Skip to content

Commit

Permalink
refactor dmno server/client, use uws, mtls
Browse files Browse the repository at this point in the history
  • Loading branch information
theoephraim committed Nov 16, 2024
1 parent 15de589 commit 1057bd1
Show file tree
Hide file tree
Showing 54 changed files with 1,724 additions and 1,375 deletions.
9 changes: 9 additions & 0 deletions .changeset/fresh-hairs-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@dmno/astro-integration": patch
"@dmno/remix-integration": patch
"@dmno/vite-integration": patch
"@dmno/configraph": patch
"dmno": patch
---

refactor dmno server, perf improvements
36 changes: 18 additions & 18 deletions example-repo/.dmno/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const OnePassSecretsDev = new OnePasswordDmnoPlugin('1pass', {

const BitwardenPlugin = new BitwardenSecretsManagerDmnoPlugin('bitwarden');

const InfisicalPlugin = new InfisicalDmnoPlugin('infisical', {
environment: 'dev',
});
// const InfisicalPlugin = new InfisicalDmnoPlugin('infisical', {
// environment: 'dev',
// });

const EncryptedVaultSecrets = new EncryptedVaultDmnoPlugin('vault/prod', { name: 'prod', key: inject() });
// const NonProdVault = new EncryptedVaultDmnoPlugin('vault/dev', {
Expand All @@ -46,21 +46,21 @@ export default defineDmnoService({
typeDescription: 'standardized environment flag set by DMNO',
value: (ctx) => ctx.get('NODE_ENV'),
},
INFISICAL_CLIENT_ID: {
extends: InfisicalTypes.clientId,
},
INFISICAL_CLIENT_SECRET: {
extends: InfisicalTypes.clientSecret,
},
INFISICAL_PROJECT_ID: {
extends: InfisicalTypes.projectId,
},
TEST_KEY_ALL_ENVS: {
value: InfisicalPlugin.secret(),
},
DEV_ONLY: {
value: InfisicalPlugin.secret(),
},
// INFISICAL_CLIENT_ID: {
// extends: InfisicalTypes.clientId,
// },
// INFISICAL_CLIENT_SECRET: {
// extends: InfisicalTypes.clientSecret,
// },
// INFISICAL_PROJECT_ID: {
// extends: InfisicalTypes.projectId,
// },
// TEST_KEY_ALL_ENVS: {
// value: InfisicalPlugin.secret(),
// },
// DEV_ONLY: {
// value: InfisicalPlugin.secret(),
// },
REDACT_TEST: {
sensitive: true,
value: 'a a a a b b b b c c c c d d d',
Expand Down
257 changes: 0 additions & 257 deletions example-repo/packages/api/.dmno/config-example.ts

This file was deleted.

1 change: 0 additions & 1 deletion example-repo/packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"chalk": "^5.2.0",
"debug": "^4.3.4",
"dmno": "link:../../../packages/core",
"dotenv": "^16.0.3",
"exit-hook": "^3.2.0",
"glob": "^10.2.2",
"ioredis": "^5.3.1",
Expand Down
1 change: 0 additions & 1 deletion example-repo/packages/astro-web/astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import dmnoAstroIntegration from '@dmno/astro-integration';
import { unredact } from 'dmno';
import { defineConfig } from 'astro/config';
import vue from "@astrojs/vue";
import node from "@astrojs/node";
Expand Down
13 changes: 13 additions & 0 deletions example-repo/packages/vite-dynamic/.dmno/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { DmnoBaseTypes, defineDmnoService } from 'dmno';

export default defineDmnoService({
settings: {
dynamicConfig: 'default_static'
},
schema: {
PUBLIC_STATIC: { value: 'public-static' },
SECRET_STATIC: { value: 'secret-static', sensitive: true },
PUBLIC_DYNAMIC: { value: 'public-dynamic', dynamic: true },
SECRET_DYNAMIC: { value: 'secret-dynamic', dynamic: true, sensitive: true },
},
});
7 changes: 7 additions & 0 deletions example-repo/packages/vite-dynamic/.dmno/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "dmno/tsconfigs/dmno-folder",
"include": [
"./**/*.mts",
"./.typegen/global.d.ts"
]
}
16 changes: 16 additions & 0 deletions example-repo/packages/vite-dynamic/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>

<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>

</html>
24 changes: 24 additions & 0 deletions example-repo/packages/vite-dynamic/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "vite-dynamic",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"build": "vite build",
"boot": "dmno run -- node dist/main.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [ ],
"author": "",
"license": "ISC",
"dependencies": {
"@dmno/vite-integration": "link:../../../packages/integrations/vite",
"dmno": "link:../../../packages/core",
"vite": "^5.4.10",
"vite-node": "^2.1.4"
},
"devDependencies": {
"@types/node": "^20.12.7"
}
}
Loading

0 comments on commit 1057bd1

Please sign in to comment.