Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Npm package #28

Merged
merged 23 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d180b87
npm package
sivaramakrishnan-techconative Sep 29, 2023
3b09288
latest build
sivaramakrishnan-techconative Oct 6, 2023
9034886
latest build
sivaramakrishnan-techconative Oct 6, 2023
78b036b
made changes w.r.t get the request in ng wavemaker
sivaramakrishnan-techconative Oct 11, 2023
bc834c0
updated with latest build
sivaramakrishnan-techconative Oct 11, 2023
fa0c8b6
Oauth Changes
sivaramakrishnan-techconative Oct 17, 2023
6465f64
changes w.r.t response headers
sivaramakrishnan-techconative Oct 23, 2023
62b3eb3
latest build
sivaramakrishnan-techconative Oct 25, 2023
bb84679
made some changes w.r.t wavemaker studio app
sivaramakrishnan-techconative Nov 5, 2023
2bd75ee
Made changes w.r.t OAuth config sending from
sivaramakrishnan-techconative Nov 6, 2023
71ec262
made changes w.r.t accept query parameters
sivaramakrishnan-techconative Nov 7, 2023
bb8a114
bug fixed where query params is not resetted
sivaramakrishnan-techconative Nov 8, 2023
d12907c
Made some changes w.r.t passing body params
sivaramakrishnan-techconative Nov 8, 2023
ff023cd
Made changes w.r.t construct types for params
sivaramakrishnan-techconative Nov 10, 2023
13424ee
test changes
sivaramakrishnan-techconative Nov 20, 2023
c219825
test changes
sivaramakrishnan-techconative Nov 20, 2023
ad9a469
Test Changes
sivaramakrishnan-techconative Nov 20, 2023
4ba27a6
New version
sivaramakrishnan-techconative Nov 20, 2023
b43c89a
updated npm_package
sivaramakrishnan-techconative Nov 20, 2023
4327d69
New version
sivaramakrishnan-techconative Nov 20, 2023
1a8e2cf
bug fixes
sivaramakrishnan-techconative Nov 20, 2023
3219986
Merge branch 'npm_package' of https://github.com/wavemaker/rest-clien…
sivaramakrishnan-techconative Nov 20, 2023
085fb5a
New version
sivaramakrishnan-techconative Nov 20, 2023
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
13 changes: 13 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*
*/
!README.md
!NOTICE
!package.json
!dist/config-import-bundle.js
!dist/config-import-bundle.js.LICENSE.txt
!dist/config-import-bundle.js.map
!dist/rest-import-bundle.css
!dist/rest-import-bundle.css.map
!dist/rest-import-bundle.js
!dist/rest-import-bundle.js.LICENSE.txt
!dist/rest-import-bundle.js.map
1 change: 1 addition & 0 deletions config-import-bundle.js
66 changes: 33 additions & 33 deletions dist/config-import-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/config-import-bundle.js.map

Large diffs are not rendered by default.

66 changes: 33 additions & 33 deletions dist/log.bundle-sizes.rest-import-ui.txt
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
@mui/icons-material: 5.93 MB (53.7%)
@mui/icons-material: 5.93 MB (53.6%)
@mui/material: 1.28 MB (11.6%)
@mui/base: 387.29 KB (3.42%)
lodash: 239.44 KB (2.12%)
lodash: 239.44 KB (2.11%)
core-js-pure: 166.41 KB (1.47%)
@mui/system: 162.12 KB (1.43%)
immutable: 139.01 KB (1.23%)
react-dom: 129.98 KB (1.15%)
js-yaml: 105.01 KB (0.928%)
react-redux: 90.92 KB (0.803%)
axios: 87.01 KB (0.769%)
@reduxjs/toolkit: 84.36 KB (0.745%)
i18next: 82.68 KB (0.731%)
@popperjs/core: 68.84 KB (0.608%)
buffer: 56.99 KB (0.504%)
react-transition-group: 55.52 KB (0.491%)
@emotion/cache: 40.02 KB (0.354%)
js-yaml: 105.01 KB (0.926%)
react-redux: 90.92 KB (0.802%)
axios: 87.01 KB (0.768%)
@reduxjs/toolkit: 84.36 KB (0.744%)
i18next: 82.68 KB (0.729%)
@popperjs/core: 68.84 KB (0.607%)
buffer: 56.99 KB (0.503%)
react-transition-group: 55.52 KB (0.490%)
@emotion/cache: 40.02 KB (0.353%)
@mui/utils: 34.3 KB (0.303%)
redux: 28.94 KB (0.256%)
redux: 28.94 KB (0.255%)
react-i18next: 25.61 KB (0.226%)
stylis: 23.54 KB (0.208%)
@emotion/react: 23.27 KB (0.206%)
@emotion/react: 23.27 KB (0.205%)
@emotion/styled: 19 KB (0.168%)
sha.js: 18.57 KB (0.164%)
immer: 17.99 KB (0.159%)
url-parse: 16.23 KB (0.143%)
@emotion/serialize: 13.35 KB (0.118%)
js-base64: 10.11 KB (0.0893%)
react-hot-toast: 9.31 KB (0.0822%)
reselect: 8.85 KB (0.0782%)
react: 7.98 KB (0.0706%)
redux-immutable: 5.43 KB (0.0480%)
process: 5.29 KB (0.0468%)
@emotion/sheet: 4.66 KB (0.0412%)
scheduler: 4.33 KB (0.0383%)
js-base64: 10.11 KB (0.0892%)
react-hot-toast: 9.31 KB (0.0821%)
reselect: 8.85 KB (0.0781%)
react: 7.98 KB (0.0704%)
redux-immutable: 5.43 KB (0.0479%)
process: 5.29 KB (0.0467%)
@emotion/sheet: 4.66 KB (0.0411%)
scheduler: 4.33 KB (0.0382%)
@emotion/is-prop-valid: 4.33 KB (0.0382%)
deep-extend: 4.19 KB (0.0370%)
@babel/runtime-corejs3: 3.99 KB (0.0352%)
@babel/runtime: 3.93 KB (0.0347%)
base64-js: 3.84 KB (0.0339%)
@mui/styled-engine: 3.55 KB (0.0314%)
@mui/private-theming: 3.5 KB (0.0310%)
@mui/styled-engine: 3.55 KB (0.0313%)
@mui/private-theming: 3.5 KB (0.0309%)
css.escape: 3.08 KB (0.0272%)
serialize-error: 2.93 KB (0.0259%)
hoist-non-react-statics: 2.68 KB (0.0237%)
prop-types: 2.6 KB (0.0230%)
serialize-error: 2.93 KB (0.0258%)
hoist-non-react-statics: 2.68 KB (0.0236%)
prop-types: 2.6 KB (0.0229%)
use-sync-external-store: 2.59 KB (0.0229%)
querystringify: 2.5 KB (0.0221%)
react-is: 2.4 KB (0.0212%)
Expand All @@ -57,13 +57,13 @@ clipboard-copy: 1.61 KB (0.0142%)
dom-helpers: 1.57 KB (0.0139%)
randombytes: 1.54 KB (0.0136%)
@braintree/sanitize-url: 1.38 KB (0.0122%)
redux-thunk: 1.27 KB (0.0113%)
@emotion/unitless: 924 B (0.00797%)
inherits: 753 B (0.00650%)
requires-port: 753 B (0.00650%)
redux-thunk: 1.27 KB (0.0112%)
@emotion/unitless: 924 B (0.00796%)
inherits: 753 B (0.00649%)
requires-port: 753 B (0.00649%)
@emotion/use-insertion-effect-with-fallbacks: 472 B (0.00407%)
@emotion/weak-memoize: 379 B (0.00327%)
clsx: 374 B (0.00323%)
void-elements: 338 B (0.00292%)
clsx: 374 B (0.00322%)
void-elements: 338 B (0.00291%)
@emotion/memoize: 202 B (0.00174%)
<self>: 1.65 MB (14.9%)
<self>: 1.67 MB (15.1%)
66 changes: 33 additions & 33 deletions dist/rest-import-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/rest-import-bundle.js.map

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion examples/react-app/public/assets/config-import-bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion examples/react-app/public/assets/rest-import-bundle.css

This file was deleted.

1 change: 0 additions & 1 deletion examples/react-app/public/assets/rest-import-bundle.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/react-app/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function App() {
useEffect(() => {
if (fullScreenView) {
window.RestImport({
dom_id: "#full-screen",
dom_id: "#full-",
language: "en",
config: {
proxy_conf: {
Expand Down
2 changes: 1 addition & 1 deletion examples/react-app/src/components/RestModelDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function RestModal({ handleOpen, handleClose, defaultData }) {
if (handleOpen && !defaultData) {
setTimeout(() => {
window.RestImport({
dom_id: "#reactImport",
dom_id: "#testing",
language: "en",
config: {
url: "https://jsonplaceholder.typicode.com/posts/{id}?test=true",
Expand Down
53 changes: 51 additions & 2 deletions package-lock.json

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

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "rest-import-wavemaker",
"version": "0.1.0",
"private": true,
"version": "0.1.64",
"private": false,
"main": "./dist/core/components/RestImport.js",
"release": {
"branches": [
"main",
Expand Down Expand Up @@ -47,15 +48,16 @@
"redux": "^4.1.2",
"redux-immutable": "^4.0.0",
"reselect": "^4.1.8",
"rest-import-wavemaker": "^0.1.30",
"serialize-error": "^8.1.0",
"sha.js": "^2.4.11",
"url-parse": "^1.5.10"
},
"scripts": {
"start": "react-scripts start",
"dev": "npx tsc --jsx preserve -t es2020 --outDir src/jsx --noEmit false && webpack serve --config webpack/dev.babel.js",
"dev": "npx tsc --jsx preerve -t es2020 --outDir src/jsx --noEmit false && webpack serve --config webpack/dev.babel.js",
"build": "npx tsc --jsx preserve -t es2020 --outDir src/jsx --noEmit false && webpack --color --config webpack/stylesheets.babel.js && webpack --color --config webpack/bundle.babel.js && webpack --color --config webpack/bundle.config.babel.js && bash dist-to-examples.sh",
"build-windows": "npx tsc --jsx preserve -t es2020 --outDir src/jsx --noEmit false && webpack --color --config webpack/stylesheets.babel.js && webpack --color --config webpack/bundle.babel.js && webpack --color --config webpack/bundle.config.babel.js && @powershell -NoProfile -ExecutionPolicy Unrestricted -Command ./dist-to-examples.ps1",
"build-windows": "npx tsc --jsx preserve -t es2020 --outDir src/jsx --noEmit false && webpack --color --config webpack/stylesheets.babel.js && webpack --color --config webpack/bundle.babel.js && webpack --color --config webpack/bundle.config.babel.js",
"test": "jest"
},
"eslintConfig": {
Expand Down
1 change: 1 addition & 0 deletions rest-import-bundle.css
1 change: 1 addition & 0 deletions rest-import-bundle.js
53 changes: 40 additions & 13 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,67 @@ import RestImport from './core/components/RestImport'
import { restImportConfigI } from './core/components/RestImport'
import { Provider } from 'react-redux'
import appStore from './core/components/appStore/Store';
import { AxiosResponse } from 'axios';
import { AxiosRequestConfig, AxiosResponse } from 'axios';

export default function App() {
const config: restImportConfigI = {
proxy_conf: {
base_path: "http://localhost:4000",
proxy_path: "/restimport",
list_provider: "/get-default-provider",
getprovider: "/getprovider",
addprovider: "/addprovider",
authorizationUrl: "/authorizationUrl",
base_path: "http://localhost:4000/",
proxy_path: "restimport",
list_provider: "get-default-provider",
getprovider: "getprovider",
addprovider: "addprovider",
authorizationUrl: "authorizationUrl",
},
useProxy: true,
url: "https://www.googleapis.com/oauth2/v1/userinfo",
projectId: "WMPRJ2c91808889a96400018a26070b7b2e68",
loggenInUserId: "fe",
appEnvVariables: [{ key: 'we', value: 'ew' }],
loggenInUserName: 'vew',
httpAuth: {
type: 'OAUTH2',
providerId: "google"
},
headerParams: [{
name: "new",
type: "DATE",
value: "vew"
}],
queryParams: [{
name: "jh",
type: "TIME",
value: "vew"
}],
state_val: "eyJtb2RlIjoiZGVzaWduVGltZSIsInByb2plY3RJZCI6IldNUFJKMmM5MTgwODg4OWE5NjQwMDAxOGExYzE0YjBhNzI4YTQifQ==",
default_proxy_state: "ON", // Execute the proxy configuration if the value of default_proxy_state is set to "ON"; otherwise, execute the OAuth configuration.
oAuthConfig: {
base_path: "https://www.wavemakeronline.com/studio/services",
project_id: "",
proxy_path: '', // /projects/{projectID}/restservices/invoke?optimizeResponse=true
list_provider: "/oauth2/providers/default",
list_provider: "oauth2/providers/default",
getprovider: "", // /projects/{projectID}/oauth2/providers
addprovider: "", // /projects/{projectID}/oauth2/providers
authorizationUrl: "", // /projects/{projectID}/oauth2/{providerId}/authorizationUrl,
authorizationUrl: "studio/services/projects/WMPRJ2c9180868bb704a7018bb82b602a00cd/oauth2/:providerID/authorizationUrl", // /projects/{projectID}/oauth2/{providerId}/authorizationUrl
},
setResponse: {
testing: false,
},
error: {
errorFunction: (msg: string, response?: AxiosResponse) => {
alert(msg)
},
errorMethod: "customFunction",
errorMethod: "toast",
errorMessageTimeout: 5000
},
handleResponse: (response?: AxiosResponse) => {
handleResponse: (request: AxiosRequestConfig, response?: AxiosResponse) => {
console.log(request, response)
},
hideMonacoEditor: (value: boolean) => {
}
hideMonacoEditor: (value: boolean) => { },
getServiceName(value: string) { },
setServiceName: '',
viewMode: false,
setResponseHeaders: { kingkong: "test" },
}

return (
Expand Down
Loading