Skip to content

Commit

Permalink
Apim/custom widgets scaffolder beta2 - templates updated (Azure#22974)
Browse files Browse the repository at this point in the history
### Packages impacted by this PR
@azure/api-management-custom-widgets-scaffolder

### Issues associated with this PR
n/a

### Describe the problem that is addressed by this PR
Updates & synchronizes dependencies used in various templates.
Improves formatting in the templates.
Removes unnecessary duplicated path from fetch requests in templates.

### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
n/a

### Are there test cases added in this PR? _(If not, why?)_
No, there were no changes to the API, only minor improvements to existing templates.

### Provide a list of related PRs _(if any)_
n/a
  • Loading branch information
JMach1 authored Aug 26, 2022
1 parent 5222909 commit 5eb60e2
Show file tree
Hide file tree
Showing 19 changed files with 41 additions and 41 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.2 (2022-08-26)

### Features Added
### Bugs fixed

### Breaking Changes

### Bugs Fixed
- fetch fail on CORS error while fetching data in managed Developer Portals

### Other Changes

- templates dependencies update & synchronization among the frameworks

## 1.0.0-beta.1 (2022-08-03)

- First release of package, see README.md for details.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ body {
padding: 9px 50px;
background-color: rgba(254, 213, 60, 1);
border-radius: 3px;
cursor: pointer;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@
"dependencies": {
"@azure/api-management-custom-widgets-tools": "^1.0.0-beta.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet-async": "^1.3.0"
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.0.15",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.0.0",
"@vitejs/plugin-react": "^2.0.1",
"prettier": "^2.7.1",
"sass": "^1.53.0",
"sass": "^1.54.4",
"typescript": "^4.7.4",
"vite": "^3.0.0"
"vite": "^3.0.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const App = () => {
return
}

request(`/subscriptions/000/resourceGroups/000/providers/Microsoft.ApiManagement/service/000/users/${userId}`)
request(`/users/${userId}`)
.then(e => e.json())
.then(({properties}) => setDefaultEmail(properties.email))
.catch(e => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {defineConfig} from "vite"
import react from '@vitejs/plugin-react'
import react from "@vitejs/plugin-react"

// https://vitejs.dev/config/
export default defineConfig(() => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"@azure/api-management-custom-widgets-tools": "^1.0.0-beta.1"
},
"devDependencies": {
"prettier": "^2.5.1",
"sass": "^1.53.0",
"typescript": "^4.5.4",
"vite": "^2.8.3"
"prettier": "^2.7.1",
"sass": "^1.54.4",
"typescript": "^4.7.4",
"vite": "^3.0.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
const appInstance = new App(secrets)
if (!secrets.userId) return
appInstance.request(`/subscriptions/000/resourceGroups/000/providers/Microsoft.ApiManagement/service/000/users/${secrets.userId}`)
appInstance.request(`/users/${secrets.userId}`)
.then(e => e.json())
.then(({properties}) => {
if (properties.email) document.getElementById("email").value = properties.email
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"module": "ESNext",
"target": "es6",
"useDefineForClassFields": true,
"lib": ["ESNext", "ES6", "DOM.Iterable"],
"lib": ["ESNext", "ES6", "DOM", "DOM.Iterable"],
"moduleResolution": "Node",
"strict": true,
"sourceMap": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"vue": "^3.2.37"
},
"devDependencies": {
"@vitejs/plugin-vue": "^3.0.1",
"@vitejs/plugin-vue": "^3.0.3",
"prettier": "^2.7.1",
"sass": "^1.53.0",
"sass": "^1.54.4",
"typescript": "^4.7.4",
"vite": "^3.0.3"
"vite": "^3.0.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default {
return
}
request(`/subscriptions/000/resourceGroups/000/providers/Microsoft.ApiManagement/service/000/users/${secrets.userId}`)
request(`/users/${secrets.userId}`)
.then(e => e.json())
.then(({properties}) => this.defaultEmail = properties.email)
.catch(e => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ body {
padding: 9px 50px;
background-color: rgba(254, 213, 60, 1);
border-radius: 3px;
cursor: pointer;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@
"dependencies": {
"@azure/api-management-custom-widgets-tools": "^1.0.0-beta.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet-async": "^1.3.0"
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.0.15",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.0.0",
"@vitejs/plugin-react": "^2.0.1",
"prettier": "^2.7.1",
"sass": "^1.53.0",
"sass": "^1.54.4",
"typescript": "^4.7.4",
"vite": "^3.0.0"
"vite": "^3.0.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const App = () => {
return
}

request(`/subscriptions/000/resourceGroups/000/providers/Microsoft.ApiManagement/service/000/users/${userId}`)
request(`/users/${userId}`)
.then(e => e.json())
.then(({properties}) => setDefaultEmail(properties.email))
.catch(e => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {defineConfig} from "vite"
import react from '@vitejs/plugin-react'
import react from "@vitejs/plugin-react"

// https://vitejs.dev/config/
export default defineConfig(() => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"@azure/api-management-custom-widgets-tools": "^1.0.0-beta.1"
},
"devDependencies": {
"prettier": "^2.5.1",
"sass": "^1.53.0",
"typescript": "^4.5.4",
"vite": "^2.8.3"
"prettier": "^2.7.1",
"sass": "^1.54.4",
"typescript": "^4.7.4",
"vite": "^3.0.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
const appInstance = new App(secrets)
if (!secrets.userId) return
appInstance.request(`/subscriptions/000/resourceGroups/000/providers/Microsoft.ApiManagement/service/000/users/${secrets.userId}`)
appInstance.request(`/users/${secrets.userId}`)
.then(e => e.json())
.then(({properties}) => {
if (properties.email) document.getElementById("email").value = properties.email
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"module": "ESNext",
"target": "es6",
"useDefineForClassFields": true,
"lib": ["ESNext", "ES6", "DOM.Iterable"],
"lib": ["ESNext", "ES6", "DOM", "DOM.Iterable"],
"moduleResolution": "Node",
"strict": true,
"sourceMap": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"vue": "^3.2.37"
},
"devDependencies": {
"@vitejs/plugin-vue": "^3.0.1",
"@vitejs/plugin-vue": "^3.0.3",
"prettier": "^2.7.1",
"sass": "^1.53.0",
"sass": "^1.54.4",
"typescript": "^4.7.4",
"vite": "^3.0.3"
"vite": "^3.0.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default {
return
}
request(`/subscriptions/000/resourceGroups/000/providers/Microsoft.ApiManagement/service/000/users/${secrets.userId}`)
request(`/users/${secrets.userId}`)
.then(e => e.json())
.then(({properties}) => this.defaultEmail = properties.email)
.catch(e => {
Expand Down

0 comments on commit 5eb60e2

Please sign in to comment.