Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sqs committed Dec 25, 2023
1 parent 4843deb commit ebedd68
Show file tree
Hide file tree
Showing 10 changed files with 120 additions and 350 deletions.
1 change: 1 addition & 0 deletions client/web-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@codemirror/lint": "^6.4.2",
"@opencodegraph/client": "workspace:*",
"@opencodegraph/codemirror-extension": "workspace:*",
"@opencodegraph/provider-docs": "workspace:*",
"@opencodegraph/provider-links": "workspace:*",
"@opencodegraph/provider-storybook": "workspace:*",
"@opencodegraph/ui-react": "workspace:*",
Expand Down
8 changes: 6 additions & 2 deletions client/web-playground/src/demo/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { type ProviderSettings } from '@opencodegraph/client'

async function getProviders(): Promise<Record<string, ProviderSettings | boolean>> {
const providerSettings: Record<string, ProviderSettings | boolean> = {
'../../../../provider/hello-world/index.ts': true,
'../../../../provider/hello-world/index.ts': false,
'../../../../provider/docs/src/provider/provider.ts':
{} satisfies import('@opencodegraph/provider-docs').Settings,
'../../../../provider/links/index.ts': {
links: [
{
Expand Down Expand Up @@ -41,7 +43,9 @@ async function getProviders(): Promise<Record<string, ProviderSettings | boolean
} satisfies import('@opencodegraph/provider-storybook').Settings,
}

const providerModules = import.meta.glob('../../../../provider/*/index.ts', { as: 'url' })
const providerModules = import.meta.glob('../../../../provider/{*/index.ts,docs/src/provider/provider.ts}', {
as: 'url',
})
for (const [path, url] of Object.entries(providerModules)) {
const providerUri = new URL(await url(), import.meta.url).toString()
const settings = providerSettings[path] ?? true
Expand Down
205 changes: 7 additions & 198 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions provider/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"directory": "provider/docs"
},
"type": "module",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"main": "dist/src/provider/provider.js",
"types": "dist/src/provider/provider.d.ts",
"files": [
"dist",
"!**/*.test.*",
Expand Down
Loading

0 comments on commit ebedd68

Please sign in to comment.