@mohamed-karawia/library 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/.env +0 -3
- package/.github/workflows/chromatic.yml +0 -26
- package/.storybook/main.js +0 -21
- package/.storybook/middleware.js +0 -28
- package/.storybook/preview.js +0 -9
- package/build-storybook.log +0 -2704
package/package.json
CHANGED
package/.env
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# .github/workflows/chromatic.yml
|
2
|
-
|
3
|
-
# Workflow name
|
4
|
-
name: 'Chromatic'
|
5
|
-
|
6
|
-
# Event for the workflow
|
7
|
-
on: push
|
8
|
-
|
9
|
-
# List of jobs
|
10
|
-
jobs:
|
11
|
-
chromatic-deployment:
|
12
|
-
# Operating System
|
13
|
-
runs-on: ubuntu-latest
|
14
|
-
# Job steps
|
15
|
-
steps:
|
16
|
-
- uses: actions/checkout@v1
|
17
|
-
- name: Install dependencies
|
18
|
-
run: yarn
|
19
|
-
# 👇 Adds Chromatic as a step in the workflow
|
20
|
-
- name: Publish to Chromatic
|
21
|
-
uses: chromaui/action@v1
|
22
|
-
# Chromatic GitHub Action options
|
23
|
-
with:
|
24
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
25
|
-
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
|
26
|
-
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
package/.storybook/main.js
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
module.exports = {
|
2
|
-
"stories": [
|
3
|
-
"../src/**/*.stories.mdx",
|
4
|
-
"../src/**/*.stories.@(js|jsx|ts|tsx)",
|
5
|
-
"../src/****/*.stories.@(js|jsx|ts|tsx)"
|
6
|
-
|
7
|
-
],
|
8
|
-
"addons": [
|
9
|
-
"@storybook/addon-links",
|
10
|
-
"@storybook/addon-essentials",
|
11
|
-
"@storybook/preset-create-react-app",
|
12
|
-
"@storybook/addon-storysource",
|
13
|
-
"storybook-addon-designs",
|
14
|
-
"@geometricpanda/storybook-addon-badges",
|
15
|
-
"@storybook/addon-a11y",
|
16
|
-
"storybook-dark-mode",
|
17
|
-
"@storybook/addon-viewport",
|
18
|
-
"storybook-formik/register",
|
19
|
-
// "storybook-addon-mock/register"
|
20
|
-
]
|
21
|
-
}
|
package/.storybook/middleware.js
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
const express = require('express');
|
2
|
-
const { RtcTokenBuilder, RtcRole } = require('agora-access-token');
|
3
|
-
const expressMiddleWare = (router) => {
|
4
|
-
|
5
|
-
router.use('/static', express.static('./src/static'));
|
6
|
-
router.get('/getToken/:uid', (req, res) => {
|
7
|
-
const uid = req.params.uid;
|
8
|
-
const appID = '3f54ddbde65d4f0ab9a9f5a46baa4310';
|
9
|
-
const appCertificate = '2f534be3f5124289b07c0c88f9c21330';
|
10
|
-
const channelName = 'bcd';
|
11
|
-
const role = RtcRole.PUBLISHER;
|
12
|
-
const expirationTimeInSeconds = 360000;
|
13
|
-
const currentTimestamp = Math.floor(Date.now() / 1000);
|
14
|
-
const privilegeExpiredTs = currentTimestamp + expirationTimeInSeconds;
|
15
|
-
const tokenA = RtcTokenBuilder.buildTokenWithUid(
|
16
|
-
appID,
|
17
|
-
appCertificate,
|
18
|
-
channelName,
|
19
|
-
uid,
|
20
|
-
role,
|
21
|
-
privilegeExpiredTs
|
22
|
-
);
|
23
|
-
res.set('Access-Control-Allow-Headers', '*');
|
24
|
-
res.send({ token: tokenA });
|
25
|
-
res.end();
|
26
|
-
});
|
27
|
-
};
|
28
|
-
module.exports = expressMiddleWare;
|