Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .dmno/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import { CloudflareWranglerEnvSchema, DmnoWranglerEnvSchema } from '@dmno/cloudflare-platform';
import { DmnoBaseTypes, defineDmnoService, pickFromSchemaObject, switchBy } from 'dmno';

import packageJson from '../package.json' with { type: "json" };

export default defineDmnoService({
isRoot: true,
settings: {
redactSensitiveLogs: true,
interceptSensitiveLeakRequests: true,
preventClientLeaks: true,
},
schema: {
...pickFromSchemaObject(CloudflareWranglerEnvSchema, {
CLOUDFLARE_ACCOUNT_ID: {},
CLOUDFLARE_API_TOKEN: {},
}),

...pickFromSchemaObject(DmnoWranglerEnvSchema, {
WRANGLER_ENV: {},
// WRANGLER_DEV_PROTOCOL: { value: 'http' }, // defaults to http
WRANGLER_DEV_PORT: { value: 1337 },
WRANGLER_DEV_URL: {}, // this is inferred
WRANGLER_LIVE_RELOAD: { value: true },
WRANGLER_INJECT_MODE: { value: 'inline' },
WRANGLER_DEV_ACTIVE: {},
WRANGLER_BUILD_ACTIVE: {},
}),

VSR_VERSION: {
description: 'Current version of vsr, as specified in our package.json',
required: true,
value: () => packageJson.version,
},

REGISTRY_URL: {
required: true,
description: 'URL of this instance of vsr',
// TODO: figure out how URLs will work for deployed instances and adjust accordingly
value: () => DMNO_CONFIG.WRANGLER_DEV_URL,
},
REGISTRY_INSTANCE_DESCRIPTION: {
required: true,
description: 'Description of this instance of vsr, displayed in the docs',
value: () => DMNO_CONFIG.REGISTRY_URL?.includes('localhost') ? 'localhost' : DMNO_CONFIG.REGISTRY_URL,
},

BEARER_TOKEN: {
description: 'bearer token used to connect to the registry',
// sensitive: true, // cannot mark sensitive because it is leaked in the docs UI
required: true,
value: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // should override for a real deployment, can enfore this later
},
BASIC_AUTH_USER: {
value: 'user',
},
BASIC_AUTH_PASSWORD: {
description: 'basic auth pasword used to connect to the registry', // not actually implemented?
// sensitive: true, // cannot mark sensitive because it is leaked in the docs UI
required: true,
value: 'pass', // should override for a real deployment, can enfore this later
},
},
});
7 changes: 7 additions & 0 deletions .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"
]
}
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,17 @@ out
.dev.vars
.wrangler/
local-store

# dmno files ###
# local cache for resolved values
**/.dmno/cache.json
# encryption key used for cache
**/.dmno/cache-key.json
# generated type files
**/.dmno/.typegen
# iconify cache used in generated types
**/.dmno/.icon-cache
# local config overrides
**/.dmno/.env.local
# local ssl certs
**/.dmno/certs
12 changes: 6 additions & 6 deletions bin/vsr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
const { resolve } = require('node:path')
const { scripts } = require('../package.json')
const { execSync } = require('node:child_process')
const cwd = resolve(__dirname, '../')
execSync(scripts.setup, { cwd, stdio: 'inherit' })
execSync(scripts.dist, { cwd, stdio: 'inherit' })
import { resolve, dirname } from 'node:path'
import packageJson from '../package.json' with { type: "json" }
import { execSync } from 'node:child_process'
const cwd = resolve(import.meta.dirname, '../')
execSync(packageJson.scripts['db:setup'], { cwd, stdio: 'inherit' })
execSync(packageJson.scripts['dev:bundled'], { cwd, stdio: 'inherit' })
2 changes: 1 addition & 1 deletion dist/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This folder contains the built output assets for the worker "vsr" generated at 2024-11-11T20:50:35.290Z.
This folder contains the built output assets for the worker "vsr" generated at 2024-12-17T20:11:43.768Z.
Loading