Skip to content

Commit

Permalink
Merge branch 'master' into gsoc
Browse files Browse the repository at this point in the history
  • Loading branch information
asyncapi-bot authored Nov 19, 2024
2 parents e5b2984 + 936c431 commit 8fd1f4c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/update-maintainers-trigger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

name: Trigger MAINTAINERS.yaml file update

on:
push:
branches: [ master ]
paths:
# Check all valid CODEOWNERS locations:
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-location
- 'CODEOWNERS'
- '.github/CODEOWNERS'
- '.docs/CODEOWNERS'

jobs:
trigger-maintainers-update:
name: Trigger updating MAINTAINERS.yaml because of CODEOWNERS change
runs-on: ubuntu-latest

steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # https://github.com/peter-evans/repository-dispatch/releases/tag/v3.0.0
with:
# The PAT with the 'public_repo' scope is required
token: ${{ secrets.GH_TOKEN }}
repository: ${{ github.repository_owner }}/community
event-type: trigger-maintainers-update
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "asyncapi-preview",
"displayName": "asyncapi-preview",
"description": "Preview AsyncAPI documents inside VSCode.",
"version": "0.6.3",
"version": "0.6.4",
"icon": "asyncapi-logo.png",
"galleryBanner": {
"color": "#4a4a4a",
Expand Down
9 changes: 5 additions & 4 deletions src/PreviewWebPanel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as vscode from 'vscode';
import * as path from 'path';
import * as fs from 'fs';

let position : {x:0,y:0} = {
x: 0,
Expand Down Expand Up @@ -105,6 +106,8 @@ function getWebviewContent(context: vscode.ExtensionContext, webview: vscode.Web
);
const asyncapiWebviewUri = webview.asWebviewUri(asyncapiFile);
const asyncapiBasePath = asyncapiWebviewUri.toString().replace('%2B', '+'); // this is loaded by a different library so it requires unescaping the + character
const asyncapiContent = fs.readFileSync(asyncapiFile.fsPath, 'utf-8');

const html = `
<!DOCTYPE html>
<html>
Expand All @@ -131,11 +134,9 @@ function getWebviewContent(context: vscode.ExtensionContext, webview: vscode.Web
<script src="${asyncapiComponentJs}"></script>
<script>
const vscode = acquireVsCodeApi();
const schema = ${JSON.stringify(asyncapiContent)};
AsyncApiStandalone.render({
schema: {
url: '${asyncapiWebviewUri}',
options: { method: "GET", mode: "cors" },
},
schema: schema,
config: {
show: {
sidebar: true,
Expand Down

0 comments on commit 8fd1f4c

Please sign in to comment.