Skip to content

Commit

Permalink
add staging env
Browse files Browse the repository at this point in the history
  • Loading branch information
NickJ202 committed Aug 20, 2024
1 parent 569eef8 commit c4facee
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 19 deletions.
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@
"author": "",
"license": "ISC",
"scripts": {
"start": "NODE_ENV=development webpack serve --port 3001",
"start:development": "NODE_ENV=development webpack serve --port 3001",
"start:production": "NODE_ENV=production webpack serve --port 3001",
"format": "eslint --fix . && npx prettier --write .",
"test": "npm test",
"test:verbose": "npm test -- --verbose",
"test:coverage": "CI=true npm test -- --env=jsdom --coverage",
"prepare": "husky install",
"build": "NODE_ENV=production webpack",
"deploy-main": "npm run build && permaweb-deploy --ant-process Y_0sEnzlPZGmbhknubMBhFmkK9AAylOnx4Tl3Mz_uQM"
"build:staging": "NODE_ENV=development webpack",
"build:production": "NODE_ENV=production webpack",
"deploy:main": "npm run build:production && permaweb-deploy --ant-process Y_0sEnzlPZGmbhknubMBhFmkK9AAylOnx4Tl3Mz_uQM",
"deploy:staging": "npm run build:staging && permaweb-deploy --ant-process Y_0sEnzlPZGmbhknubMBhFmkK9AAylOnx4Tl3Mz_uQM --undername staging",
"prepare": "husky install"
},
"dependencies": {
"@irys/sdk": "^0.1.0-a1",
Expand Down Expand Up @@ -69,7 +72,7 @@
"npm-force-resolutions": "^0.0.10",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"permaweb-deploy": "1.1.5",
"permaweb-deploy": "1.1.7",
"prettier": "^2.8.3",
"process": "^0.11.10",
"raw-loader": "^4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/AssetsTable/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const EmptyContainer = styled.div`
justify-content: center;
gap: 25px;
padding: 30px 20px;
margin: 0 0 20px 0;
margin: 40px 0 20px 0;
p {
color: ${(props) => props.theme.colors.font.primary};
font-weight: ${(props) => props.theme.typography.weight.bold};
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/CollectionsTable/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export const EmptyContainer = styled.div`
justify-content: center;
gap: 25px;
padding: 30px 20px;
margin: 0 0 20px 0;
margin: 40px 0 20px 0;
p {
color: ${(props) => props.theme.colors.font.primary};
font-weight: ${(props) => props.theme.typography.weight.bold};
Expand Down
2 changes: 0 additions & 2 deletions src/components/organisms/ProfileManage/ProfileManage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ export default function ProfileManage(props: IProps) {
const avatarSize = avatar ? (avatar.length * 3) / 4 : 0;
const bannerSize = banner ? (banner.length * 3) / 4 : 0;

console.log(avatarSize);

if (avatarSize > MAX_IMAGE_SIZE || bannerSize > MAX_IMAGE_SIZE)
return <span>One or more images exceeds max size of 100KB</span>;
return null;
Expand Down
20 changes: 10 additions & 10 deletions src/helpers/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ export const APP = {
};

export const AO = {
module: 'Pq2Zftrqut0hdisH_MC2pDOT6S4eQFoxGsFUzR6r350',
scheduler: '_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA',
assetSrc: 'Fmtgzy1Chs-5ZuUwHpQjQrQ7H7v1fjsP0Bi8jVaDIKA',
defaultToken: 'xU9zFkq3X2ZQ6olwNVvr1vUWIjc3kXTWr7xKQD6dh10',
ucm: 'U3TjJAZWJjlWBB4KAXSHKzuky81jtyh0zqH8rUL4Wd0',
pixl: 'DM3FoZUq_yebASPhgd8pEIRIzDW6muXEhxz5-JwbZwo',
collectionsRegistry: 'TFWDmf8a3_nw43GCm_CuYlYoylHAjCcFGbgHfDaGcsg',
collectionSrc: '2ZDuM2VUCN8WHoAKOOjiH4_7Apq0ZHKnTWdLppxCdGY',
profileRegistry: 'SNy4m-DrqxWl01YqGM4sxI8qCni-58re8uuJLvZPypY',
profileSrc: '_R2XYWDPUXVvQrQKFaQRvDTDcDwnQNbqlTd_qvCRSpQ',
module: process.env.MODULE,
scheduler: process.env.SCHEDULER,
assetSrc: process.env.ASSET_SRC,
defaultToken: process.env.DEFAULT_TOKEN,
ucm: process.env.UCM,
pixl: process.env.PIXL,
collectionsRegistry: process.env.COLLECTIONS_REGISTRY,
collectionSrc: process.env.COLLECTION_SRC,
profileRegistry: process.env.PROFILE_REGISTRY,
profileSrc: process.env.PROFILE_SRC,
};

export const ASSETS = {
Expand Down
52 changes: 52 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,58 @@ module.exports = {
'global.setImmediate': [require.resolve('timers'), 'setImmediate'],
}),
new webpack.NoEmitOnErrorsPlugin(),
new webpack.DefinePlugin({
'process.env.MODULE': JSON.stringify(
process.env.NODE_ENV === 'production'
? 'yTyqRSfbD6BuiDra9jDNjq8TLe7rhneDcmQ64CkmkdU'
: 'yTyqRSfbD6BuiDra9jDNjq8TLe7rhneDcmQ64CkmkdU'
),
'process.env.SCHEDULER': JSON.stringify(
process.env.NODE_ENV === 'production'
? '_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA'
: '_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA'
),
'process.env.ASSET_SRC': JSON.stringify(
process.env.NODE_ENV === 'production'
? 'Fmtgzy1Chs-5ZuUwHpQjQrQ7H7v1fjsP0Bi8jVaDIKA'
: 'Fmtgzy1Chs-5ZuUwHpQjQrQ7H7v1fjsP0Bi8jVaDIKA'
),
'process.env.DEFAULT_TOKEN': JSON.stringify(
process.env.NODE_ENV === 'production'
? 'xU9zFkq3X2ZQ6olwNVvr1vUWIjc3kXTWr7xKQD6dh10'
: 'xU9zFkq3X2ZQ6olwNVvr1vUWIjc3kXTWr7xKQD6dh10'
),
'process.env.UCM': JSON.stringify(
process.env.NODE_ENV === 'production'
? 'U3TjJAZWJjlWBB4KAXSHKzuky81jtyh0zqH8rUL4Wd0'
: 'qtDwylCwyhhsGPKIYAi2Ao342mdhvFUPqdbDOudzaiM'
),
'process.env.PIXL': JSON.stringify(
process.env.NODE_ENV === 'production'
? 'DM3FoZUq_yebASPhgd8pEIRIzDW6muXEhxz5-JwbZwo'
: 'DM3FoZUq_yebASPhgd8pEIRIzDW6muXEhxz5-JwbZwo'
),
'process.env.PROFILE_REGISTRY': JSON.stringify(
process.env.NODE_ENV === 'production'
? 'SNy4m-DrqxWl01YqGM4sxI8qCni-58re8uuJLvZPypY'
: 'jndJ0phxOaJJU6CHZVX7zo2Wl5vI2KQ1z4i3VnV4DrM'
),
'process.env.PROFILE_SRC': JSON.stringify(
process.env.NODE_ENV === 'production'
? '_R2XYWDPUXVvQrQKFaQRvDTDcDwnQNbqlTd_qvCRSpQ'
: '9Tpz5_ZT4RRkF-6JUTdaaTMg0ARfkNuuM5zahXyCqZ4'
),
'process.env.COLLECTIONS_REGISTRY': JSON.stringify(
process.env.NODE_ENV === 'production'
? 'TFWDmf8a3_nw43GCm_CuYlYoylHAjCcFGbgHfDaGcsg'
: 'q0QVp2rPXOuqIj6mbRObaC-HMweexSv1Y_Nm9_t1brc'
),
'process.env.COLLECTION_SRC': JSON.stringify(
process.env.NODE_ENV === 'production'
? '2ZDuM2VUCN8WHoAKOOjiH4_7Apq0ZHKnTWdLppxCdGY'
: '2ZDuM2VUCN8WHoAKOOjiH4_7Apq0ZHKnTWdLppxCdGY'
),
}),
],
resolve: {
extensions: ['.tsx', '.ts', '.jsx', '.js'],
Expand Down

0 comments on commit c4facee

Please sign in to comment.