Skip to content

Commit

Permalink
Feat/plugin-types-package (#159)
Browse files Browse the repository at this point in the history
* feat: plugin types package

* feat: using plugin types package

* fix: TS references

* fix: netlify
  • Loading branch information
simonas-notcat authored Sep 26, 2023
1 parent 7b555d3 commit 9f7327c
Show file tree
Hide file tree
Showing 20 changed files with 217 additions and 29 deletions.
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build]
base = "packages/agent-explorer/"
publish = "build/"
base = "./"
publish = "packages/agent-explorer/build/"

[[redirects]]
from = "/*"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"scripts": {
"build": "pnpm -r build",
"test": "pnpm -r test",
"release": "pnpm -r release"
"release": "pnpm -r --workspace-concurrency=1 exec -- npx --no-install semantic-release -e semantic-release-monorepo"
}
}
5 changes: 4 additions & 1 deletion packages/agent-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"main"
],
"ci": true,
"extends": "semantic-release-monorepo",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
Expand Down Expand Up @@ -145,6 +146,7 @@
"@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0",
"@veramo-community/agent-explorer-plugin": "workspace:*",
"@veramo-community/react-components": "^1.5.0",
"@veramo-community/veramo-react": "^1.1.0",
"@veramo/core": "5.5.2-next.4",
Expand Down Expand Up @@ -198,7 +200,8 @@
"react-router": "^6.11.2",
"react-router-dom": "^6.11.2",
"react-scripts": "^5.0.1",
"semantic-release": "^21.0.2",
"semantic-release": "^21.1.2",
"semantic-release-monorepo": "^7.0.5",
"stream": "npm:stream-browserify@^3.0.0",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-explorer/src/context/PluginProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { createContext, useState, useEffect, useContext } from 'react'
import { AgentPlugin, PluginConfig } from '../types'
import { AgentPlugin, PluginConfig } from '@veramo-community/agent-explorer-plugin'
import { getcorePlugins } from '../plugins'

const corePlugins = getcorePlugins()
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-explorer/src/pages/settings/Plugins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { DndContext,
} from '@dnd-kit/core';
import { SortableContext, useSortable, verticalListSortingStrategy, sortableKeyboardCoordinates } from '@dnd-kit/sortable';
import {CSS} from '@dnd-kit/utilities';
import { AgentPlugin } from '../../types'
import { AgentPlugin } from '@veramo-community/agent-explorer-plugin'

const communityPlugins: AgentPlugin[] = [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-explorer/src/plugins/audit-log/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { BarsOutlined } from '@ant-design/icons'
import { IPlugin } from '../../types';
import { IPlugin } from '@veramo-community/agent-explorer-plugin';

import Messages from './Messages';

Expand Down
2 changes: 1 addition & 1 deletion packages/agent-explorer/src/plugins/chats/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { MessageOutlined } from '@ant-design/icons'
import { IPlugin } from '../../types';
import { IPlugin } from '@veramo-community/agent-explorer-plugin';

import Chats from './Chats';

Expand Down
2 changes: 1 addition & 1 deletion packages/agent-explorer/src/plugins/contacts/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { ContactsOutlined } from '@ant-design/icons'
import { IPlugin } from '../../types';
import { IPlugin } from '@veramo-community/agent-explorer-plugin';

import { Contacts } from './Contacts';
import Identifier from './Identifier';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { FileProtectOutlined } from '@ant-design/icons'
import { IPlugin } from '../../types';
import { IPlugin } from '@veramo-community/agent-explorer-plugin';

import CredentialVerifier from './CredentialVerifier';

Expand Down
2 changes: 1 addition & 1 deletion packages/agent-explorer/src/plugins/credentials/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { SafetyOutlined } from '@ant-design/icons'
import { IPlugin } from '../../types';
import { IPlugin } from '@veramo-community/agent-explorer-plugin';

import Credentials from './Credentials';

Expand Down
2 changes: 1 addition & 1 deletion packages/agent-explorer/src/plugins/identifiers/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { UserOutlined } from '@ant-design/icons'
import { IPlugin } from '../../types';
import { IPlugin } from '@veramo-community/agent-explorer-plugin';

import { ManagedIdentifiers } from './ManagedIdentifiers';
import Identifier from './Identifier';
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-explorer/src/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AgentPlugin, IPlugin } from '../types'
import { AgentPlugin, IPlugin } from '@veramo-community/agent-explorer-plugin'
import Identifiers from './identifiers'
import Contacts from './contacts'
import Statistics from './statistics'
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-explorer/src/plugins/requests/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { InteractionOutlined } from '@ant-design/icons'
import { IPlugin } from '../../types';
import { IPlugin } from '@veramo-community/agent-explorer-plugin';

import Requests from './Requests';
import CreateResponse from './CreateResponse';
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-explorer/src/plugins/statistics/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { EyeOutlined } from '@ant-design/icons'
import { IPlugin } from '../../types';
import { IPlugin } from '@veramo-community/agent-explorer-plugin';

import Statistics from './Statistics';

Expand Down
7 changes: 6 additions & 1 deletion packages/agent-explorer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src", "server"]
"include": ["src", "server"],
"references": [
{
"path": "../plugin"
}
]
}
53 changes: 53 additions & 0 deletions packages/plugin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "@veramo-community/agent-explorer-plugin",
"description": "Agent explorer types",
"author": "Simonas Karuzas <simonas.karuzas@mesh.xyz>",
"version": "1.37.0",
"publishConfig": {
"access": "public"
},
"license": "Apache-2.0",
"scripts": {
"build": "tsc"
},
"files": [
"build",
"src"
],
"exports": {
".": "./build/index.js"
},
"types": "./build/index.d.ts",
"devDependencies": {
"@ant-design/pro-components": "^2.6.13",
"@semantic-release/commit-analyzer": "^10.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^9.1.0",
"@semantic-release/npm": "^10.0.4",
"@semantic-release/release-notes-generator": "^11.0.4",
"semantic-release-monorepo": "^7.0.5",
"typescript": "^4.9.5"
},
"release": {
"branches": [
"main"
],
"ci": true,
"extends": "semantic-release-monorepo",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"package.json"
],
"message": "chore(release): :rocket: New version ${nextRelease.version} [skip ci] \n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
}
1 change: 1 addition & 0 deletions packages/plugin/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './types';
File renamed without changes.
21 changes: 21 additions & 0 deletions packages/plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "ESNext", // Target latest ECMAScript version
"module": "ESNext", // Use ESNext module system (for dynamic imports)
"moduleResolution": "node", // Use Node.js-style module resolution
"strict": true, // Enable all strict type-checking options
"esModuleInterop": true, // Enables CommonJS/AMD/UMD module interop
"skipLibCheck": true, // Skip type checking of declaration files
"forceConsistentCasingInFileNames": true, // Disallow inconsistently-cased references to the same file
"outDir": "./build", // Output directory for compiled files
"rootDir": "src",
"declaration": true, // Generate corresponding .d.ts file for each output .js file
"sourceMap": true, // Generate source maps for easier debugging
"jsx": "react-jsx",
"composite": true, // Enable project references
},
"include": [ "src/**/*" ],
"exclude": [
"node_modules" // Exclude node_modules
]
}
Loading

0 comments on commit 9f7327c

Please sign in to comment.