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

Master upyog npm #972

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .github/workflows/publishAllPackages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Node.js Publish UI Packages

on:
push:
branches: [ 'master-upyog-npm' ]
paths:
- 'frontend/micro-ui/web/micro-ui-internals/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14.20.0
registry-url: https://registry.npmjs.org
- run: cd frontend/micro-ui/web/micro-ui-internals/ && bash ./publish.sh
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
21 changes: 11 additions & 10 deletions frontend/micro-ui/web/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@ FROM upyogio/alpine-node-builder-14:yarn AS build
#FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build
RUN apk update && apk upgrade
RUN apk add --no-cache git>2.30.0
RUN yarn add @egovernments/digit-ui-libraries
RUN yarn add @upyog/digit-ui-libraries
RUN yarn add @upyog/digit-ui-module-pt
RUN yarn add @upyog/digit-ui-module-fsm
RUN yarn add @upyog/digit-ui-module-tl
RUN yarn add @egovernments/digit-ui-module-dss
RUN yarn add @egovernments/digit-ui-module-mcollect
RUN yarn add @egovernments/digit-ui-module-pgr
RUN yarn add @egovernments/digit-ui-module-noc
RUN yarn add @egovernments/digit-ui-module-engagement
RUN yarn add @egovernments/digit-ui-module-hrms
RUN yarn add @egovernments/digit-ui-module-core
RUN yarn add @upyog/digit-ui-module-dss
RUN yarn add @upyog/digit-ui-module-mcollect
RUN yarn add @upyog/digit-ui-module-pgr
RUN yarn add @upyog/digit-ui-module-noc
RUN yarn add @upyog/digit-ui-module-engagement
RUN yarn add @upyog/digit-ui-module-hrms
RUN yarn add @upyog/digit-ui-module-core
RUN yarn add @upyog/digit-ui-module-obps
RUN yarn add @egovernments/digit-ui-module-common
RUN yarn add @upyog/digit-ui-module-common
RUN yarn add @upyog/digit-ui-module-ws
RUN yarn add @egovernments/digit-ui-module-commonpt
RUN yarn add @upyog-niua/upyog-ui-module-ptr
RUN yarn add @upyog/digit-ui-module-commonpt
ARG WORK_DIR
WORKDIR /app
ENV NODE_OPTIONS "--max-old-space-size=4096"
Expand Down
28 changes: 15 additions & 13 deletions frontend/micro-ui/web/micro-ui-internals/example/devpackage.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,21 @@
"start": "react-scripts start"
},
"devDependencies": {
"@egovernments/digit-ui-libraries":"^1.4.0",
"@egovernments/digit-ui-module-common":"^1.4.0",
"@egovernments/digit-ui-module-engagement":"^1.4.0",
"@upyog/digit-ui-module-fsm":"^1.4.0",
"@egovernments/digit-ui-module-mcollect":"^1.4.0",
"@egovernments/digit-ui-module-noc":"^1.4.0",
"@upyog/digit-ui-module-obps":"^1.4.0",
"@egovernments/digit-ui-module-pgr":"^1.4.0",
"@upyog/digit-ui-module-pt":"^1.4.0",
"@egovernments/digit-ui-module-receipts":"^1.4.0",
"@upyog/digit-ui-module-tl":"^1.4.0",
"@upyog/digit-ui-module-ws":"^1.4.0",
"@egovernments/digit-ui-module-commonpt":"^1.4.0",
"microbundle-crl": "^0.13.11",
"@upyog/digit-ui-libraries":"1.7.0-beta.5",
"@upyog/digit-ui-module-common":"1.7.0-beta.5",
"@upyog/digit-ui-module-engagement":"1.7.0-beta.4",
"@upyog/digit-ui-module-fsm":"1.7.0-beta.17",
"@upyog/digit-ui-module-mcollect":"1.7.0-beta.4",
"@upyog/digit-ui-module-noc":"1.7.0-beta.3",
"@upyog/digit-ui-module-obps":"1.7.0-beta.7",
"@upyog/digit-ui-module-pgr":"1.7.0-beta.5",
"@upyog/digit-ui-module-pt":"1.7.0-beta.4",
"@upyog/digit-ui-module-receipts":"1.7.0-beta.3",
"@upyog/digit-ui-module-tl":"1.7.0-beta.7",
"@upyog/digit-ui-module-ws":"^1.7.0-beta.10",
"@upyog-niua/upyog-ui-module-ptr":"1.0.6",
"@upyog/digit-ui-module-commonpt":"1.7.0-beta.4",
"http-proxy-middleware": "^1.0.5",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
32 changes: 17 additions & 15 deletions frontend/micro-ui/web/micro-ui-internals/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@
"start": "react-scripts start"
},
"devDependencies": {
"@egovernments/digit-ui-libraries": "^1.7.0-beta.2",
"@egovernments/digit-ui-module-common": "^1.7.0-beta.2",
"@egovernments/digit-ui-module-engagement": "^1.7.0-beta.2",
"@upyog/digit-ui-module-fsm": "^1.7.0-beta.9",
"@egovernments/digit-ui-module-mcollect": "^1.7.0-beta.2",
"@egovernments/digit-ui-module-noc": "^1.7.0-beta.2",
"@upyog/digit-ui-module-obps": "^1.7.0-beta.2",
"@egovernments/digit-ui-module-pgr": "^1.7.0-beta.2",
"@upyog/digit-ui-module-pt": "^1.7.0-beta.2",
"@egovernments/digit-ui-module-receipts": "^1.7.0-beta.2",
"@upyog/digit-ui-module-tl": "^1.7.0-beta.2",
"@upyog/digit-ui-module-ws": "^1.7.0-beta.2",
"@egovernments/digit-ui-module-bills": "^1.7.0-beta.2",
"@egovernments/digit-ui-module-commonpt": "^1.7.0-beta.3",
"microbundle-crl": "^0.13.11",
"@upyog/digit-ui-libraries": "1.7.0-beta.5",
"@upyog/digit-ui-module-common": "1.7.0-beta.5",
"@upyog/digit-ui-module-engagement": "1.7.0-beta.4",
"@upyog/digit-ui-module-fsm": "1.7.0-beta.17",
"@upyog/digit-ui-module-mcollect": "1.7.0-beta.4",
"@upyog/digit-ui-module-noc": "1.7.0-beta.3",
"@upyog/digit-ui-module-obps": "1.7.0-beta.7",
"@upyog/digit-ui-module-pgr": "1.7.0-beta.5",
"@upyog/digit-ui-module-pt": "1.7.0-beta.4",
"@upyog/digit-ui-module-receipts": "1.7.0-beta.3",
"@upyog/digit-ui-module-tl": "1.7.0-beta.7",
"@upyog/digit-ui-module-ws": "^1.7.0-beta.10",
"@upyog/digit-ui-module-bills": "^1.7.0-beta.3",
"@upyog/digit-ui-module-commonpt": "1.7.0-beta.4",
"@upyog-niua/upyog-ui-module-ptr":"1.0.6",
"http-proxy-middleware": "^1.0.5",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand All @@ -35,4 +37,4 @@
"not dead",
"not op_mini all"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { FormStep } from "@egovernments/digit-ui-react-components";
import { FormStep } from "@upyog/digit-ui-react-components";

const SelectName = ({ config, onSelect, onSkip, t }) => {
return <FormStep config={config} onSelect={onSelect} t={t}></FormStep>;
Expand Down
45 changes: 26 additions & 19 deletions frontend/micro-ui/web/micro-ui-internals/example/src/index.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
import React from "react";
import ReactDOM from "react-dom";

import { initLibraries } from "@egovernments/digit-ui-libraries";
import { PGRReducers } from "@egovernments/digit-ui-module-pgr";
import { initLibraries } from "@upyog/digit-ui-libraries";
import { PGRReducers } from "@upyog/digit-ui-module-pgr";
import { PTModule, PTLinks, PTComponents } from "@upyog/digit-ui-module-pt";
import { MCollectModule, MCollectLinks } from "@egovernments/digit-ui-module-mcollect";
import { MCollectModule, MCollectLinks } from "@upyog/digit-ui-module-mcollect";
// import { TLModule, TLLinks } from "@upyog/digit-ui-module-tl";
import { initFSMComponents } from "@upyog/digit-ui-module-fsm";
import { initPGRComponents } from "@egovernments/digit-ui-module-pgr";
import { initDSSComponents } from "@egovernments/digit-ui-module-dss";
import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms";
import { initReceiptsComponents, ReceiptsModule } from "@egovernments/digit-ui-module-receipts";
import { initPGRComponents } from "@upyog/digit-ui-module-pgr";
import { initDSSComponents } from "@upyog/digit-ui-module-dss";
import { initHRMSComponents } from "@upyog/digit-ui-module-hrms";
import { initReceiptsComponents, ReceiptsModule } from "@upyog/digit-ui-module-receipts";
// import { initReportsComponents } from "@egovernments/digit-ui-module-reports";
import { initMCollectComponents } from "@egovernments/digit-ui-module-mcollect";
import { initMCollectComponents } from "@upyog/digit-ui-module-mcollect";
import { initTLComponents } from "@upyog/digit-ui-module-tl";
import { PaymentModule, PaymentLinks, paymentConfigs } from "@egovernments/digit-ui-module-common";
import { HRMSModule } from "@egovernments/digit-ui-module-hrms";
import { PaymentModule, PaymentLinks, paymentConfigs } from "@upyog/digit-ui-module-common";
import { HRMSModule } from "@upyog/digit-ui-module-hrms";
import { initOBPSComponents } from "@upyog/digit-ui-module-obps";
import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement";
import { initNOCComponents } from "@egovernments/digit-ui-module-noc";
import { initEngagementComponents } from "@upyog/digit-ui-module-engagement";
import { initNOCComponents } from "@upyog/digit-ui-module-noc";
import { initWSComponents } from "@upyog/digit-ui-module-ws";
import { DigitUI } from "@egovernments/digit-ui-module-core";
import { initCommonPTComponents } from "@egovernments/digit-ui-module-commonpt";
import { initBillsComponents, BillsModule } from "@egovernments/digit-ui-module-bills";
import { DigitUI } from "@upyog/digit-ui-module-core";
import { initCommonPTComponents } from "@upyog/digit-ui-module-commonpt";
import { initBillsComponents, BillsModule } from "@upyog/digit-ui-module-bills";

import { PTRModule, PTRLinks, PTRComponents } from "@upyog-niua/upyog-ui-module-ptr";


// import {initCustomisationComponents} from "./customisations";

// import { PGRModule, PGRLinks } from "@egovernments/digit-ui-module-pgr";
// import { Body, TopBar } from "@egovernments/digit-ui-react-components";
// import { Body, TopBar } from "@upyog/digit-ui-react-components";
import "@upyog-niua/upyog-css/example/index.css";
// import * as comps from "@egovernments/digit-ui-react-components";
// import * as comps from "@upyog/digit-ui-react-components";

// import { subFormRegistry } from "@egovernments/digit-ui-libraries";
// import { subFormRegistry } from "@upyog/digit-ui-libraries";

import { pgrCustomizations, pgrComponents } from "./pgr";

Expand Down Expand Up @@ -60,7 +63,8 @@ const enabledModules = [
"BillAmendment",
"FireNoc",
"Birth",
"Death"
"Death",
"PTR"
];

const initTokens = (stateCode) => {
Expand Down Expand Up @@ -104,6 +108,9 @@ const initDigitUI = () => {
HRMSModule,
ReceiptsModule,
BillsModule,
PTRModule,
PTRLinks,
...PTRComponents
// TLModule,
// TLLinks,
});
Expand Down
12 changes: 10 additions & 2 deletions frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const { createProxyMiddleware } = require("http-proxy-middleware");
const createProxy = createProxyMiddleware({
//target: process.env.REACT_APP_PROXY_API || "https://uat.digit.org",
// target: process.env.REACT_APP_PROXY_API || "https://qa.digit.org",
target: process.env.REACT_APP_PROXY_API || "https://qa.digit.org",
target: process.env.REACT_APP_PROXY_API || "https://upyog-test.niua.org",
changeOrigin: true,
});
const assetsProxy = createProxyMiddleware({
target: process.env.REACT_APP_PROXY_ASSETS || "https://qa.digit.org",
target: process.env.REACT_APP_PROXY_ASSETS || "https://upyog-test.niua.org",
changeOrigin: true,
});
module.exports = function (app) {
Expand Down Expand Up @@ -63,6 +63,14 @@ module.exports = function (app) {
"/inbox/v1/elastic/_search",
"/fsm-calculator",
"/service-request",
"/pet-services/pet-registration/_create",
"/pet-services/pet-registration/_search",
"/pet-services/pet-registration/_update",
"/billing-service/bill/v2/_fetchbill",
"/collection-services/payments/pet-services/_search",
"/requester-services-dx"


].forEach((location) => app.use(location, createProxy));
["/pb-egov-assets"].forEach((location) => app.use(location, assetsProxy));
};
14 changes: 8 additions & 6 deletions frontend/micro-ui/web/micro-ui-internals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"packages/react-components",
"packages/modules/common",
"packages/modules/core",
"packages/modules/pgr",
"packages/modules/dss",
"packages/modules/commonPt",
"packages/modules/dss",
"packages/modules/pt",
"packages/modules/mCollect",
"packages/modules/obps"


],
"author": "Abhinav Kushwaha <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -49,19 +49,21 @@
"dev:bills": "cd packages/modules/bills && yarn start",
"dev:reports": "cd packages/modules/reports && yarn start",
"dev:example": "cd example && yarn start",
"dev:ptr": "cd packages/modules/ptr && yarn start",
"build": "run-p build:**",
"build:libraries": "cd packages/libraries && yarn build",
"build:components": "cd packages/react-components && yarn build",
"build:common": "cd packages/modules/common && yarn build",
"build:pt": "cd packages/modules/pt && yarn build",
"build:commonPt": "cd packages/modules/commonPt && yarn build",
"build:core": "cd packages/modules/core && yarn build",
"build:pgr": "cd packages/modules/pgr && yarn build",
"buildD:pgr": "cd packages/modules/pgr && yarn build",
"buildD:fsm": "cd packages/modules/fsm && yarn build",
"build:dss": "cd packages/modules/dss && yarn build",
"build:mcollect": "cd packages/modules/mCollect && yarn build",
"buildD:mcollect": "cd packages/modules/mCollect && yarn build",
"buildD:receipts": "cd packages/modules/receipts && yarn build",
"buildD:tl": "cd packages/modules/tl && yarn build",
"buildD:ptr": "cd packages/modules/ptr && yarn build",
"buildD:hrms": "cd packages/modules/hrms && yarn build",
"build:obps": "cd packages/modules/obps && yarn build",
"buildD:engagement": "cd packages/modules/engagement && yarn build",
Expand Down Expand Up @@ -91,4 +93,4 @@
"**/@babel/preset-env": "7.14.0",
"**/@babel/plugin-transform-modules-commonjs": "7.14.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
PORT: "3000",
PORT: "3001",
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
## Install

```bash
npm install --save @egovernments/digit-ui-libraries
npm install --save @upyog/digit-ui-libraries
```

## Usage

```jsx
import React from "react";
import initLibraries from "@egovernments/digit-ui-libraries";
import initLibraries from "@upyog/digit-ui-libraries";

import defaultConfig from "./config";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-libraries",
"version": "1.7.0-beta.2",
"name": "@upyog/digit-ui-libraries",
"version": "1.7.0-beta.5",
"main": "dist/index.js",
"module": "dist/index.modern.js",
"source": "src/index.js",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { DigiLockerService } from "../../services/elements/DigiLocker";
import { PTService } from "../../services/elements/PT";
import { useMutation } from "react-query";

const createTokenAPI = (type) => {

return useMutation((data) => {
DigiLockerService.token(data)});
}

export default createTokenAPI;
Loading
Loading