Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Commit e8124bb

Browse files
author
Evandro Carrenho
authored
fix: npm publishing
2 parents 848d009 + 4f8f21c commit e8124bb

File tree

166 files changed

+7249
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+7249
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ target/
88
#integration-fe
99
/integration-fe/node_modules/
1010

11+
# NPM
12+
integration-commons/src/main/webapp/node_modules
13+

.gitignore.swp

12 KB
Binary file not shown.

.travis.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@ language: java
2424

2525
install: true
2626
script:
27-
- "if [[ \"$TRAVIS_PULL_REQUEST\" = \"false\" && $TRAVIS_BRANCH =~ dev ]]; then mvn clean deploy --settings settings.xml ; fi"
27+
# Validate npmjs licenses
28+
- "if [[ \"$TRAVIS_PULL_REQUEST\" = \"false\" && $TRAVIS_BRANCH =~ dev ]]; then pushd src/main/webapp ; npm run license-check ; popd ; fi"
29+
# Deploy to oss.sonatype.org
30+
- "if [[ \"$TRAVIS_PULL_REQUEST\" = \"false\" && $TRAVIS_BRANCH =~ dev ]]; then mvn clean deploy -Pversioneye --settings settings.xml ; fi"
2831
- "if [[ \"$TRAVIS_PULL_REQUEST\" != \"false\" ]]; then mvn clean install ; fi"
2932

33+
# Deploy to npmjs.org using semantic-release; make sure that NPM_TOKEN and GH_TOKEN are set on Travis settings
34+
after_success: "if [[ \"$TRAVIS_PULL_REQUEST\" = \"false\" && $TRAVIS_BRANCH =~ dev ]]; then pushd src/main/webapp ; npm run semantic-release ; popd ; fi"
35+
3036
jdk:
3137
- oraclejdk8
32-
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015", "react", "stage-0"]
3+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module.exports = {
2+
"extends": "airbnb",
3+
"globals": {
4+
"window": true,
5+
"document": true,
6+
"SYMPHONY": true,
7+
},
8+
"plugins": [
9+
"react",
10+
"jsx-a11y",
11+
"import"
12+
],
13+
"rules": {
14+
"jsx-quotes": 0,
15+
"no-param-reassign": ["error", { "props": false }],
16+
"jsx-a11y/href-no-hash": 0,
17+
"class-methods-use-this": 0,
18+
"one-var": 0,
19+
"no-underscore-dangle": 0,
20+
"no-restricted-syntax": 0,
21+
"no-shadow": 0,
22+
"quotes": [2, "single"],
23+
"import/no-named-as-default": "warn",
24+
"array-callback-return": "warn",
25+
"import/prefer-default-export": "warn",
26+
},
27+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015", "react", "stage-0"]
3+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module.exports = {
2+
"extends": "airbnb",
3+
"globals": {
4+
"window": true,
5+
"document": true,
6+
"SYMPHONY": true,
7+
},
8+
"plugins": [
9+
"react",
10+
"jsx-a11y",
11+
"import"
12+
],
13+
"rules": {
14+
"jsx-quotes": 0,
15+
"no-param-reassign": ["error", { "props": false }],
16+
"jsx-a11y/href-no-hash": 0,
17+
"class-methods-use-this": 0,
18+
"one-var": 0,
19+
"no-underscore-dangle": 0,
20+
"no-restricted-syntax": 0,
21+
"no-shadow": 0,
22+
"quotes": [2, "single"],
23+
"import/no-named-as-default": "warn",
24+
"array-callback-return": "warn",
25+
"import/prefer-default-export": "warn",
26+
},
27+
};
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/* eslint-disable no-unused-vars */
2+
/* eslint-disable no-debugger */
3+
// import Config from '../js/Config.service';
4+
import Config from '../js/config.service';
5+
6+
// Custom actions from boilerplate
7+
export const INTEGRATION_LOGO = Config.getParams.appLogo;
8+
export const INTEGRATION_TITLE = Config.getParams.appTitle;
9+
export const INTEGRATION_SUBTITLE = Config.getParams.appSubTitle;
10+
export const INTEGRATION_NAME = Config.getParams.appName;
11+
export const INTEGRATION_IM_SHORTHAND = Config.getParams.appIMShortHand;
12+
export const INTEGRATION_TOGGLE_SETUP_INSTRUCTIONS = Config.getParams.appToggleSetupInstructions;
13+
14+
// General actions
15+
export const ADD_MEMBER_SHIP_FAILED = 'ADD_MEMBER_SHIP_FAILED';
16+
export const ADD_STREAM_TO_INSTANCE = 'ADD_STREAM_TO_INSTANCE';
17+
export const CALL_SAVE_INSTANCE = 'CALL_SAVE_INSTANCE';
18+
export const CHANGE_INSTANCE_NAME = 'CHANGE_INSTANCE_NAME';
19+
export const CHANGE_STREAM_TYPE = 'CHANGE_STREAM_TYPE';
20+
export const CREATE_IM_FAILED = 'CREATE_IM_FAILED';
21+
export const EDIT_INSTANCE = 'EDIT_INSTANCE';
22+
export const GET_APP_PARAMS = 'GET_APP_PARAMS';
23+
export const GET_APP_INSTRUCTIONS = 'GET_APP_INSTRUCTIONS';
24+
export const HIDE_REQUIRE_NAME = 'HIDE_REQUIRE_NAME';
25+
export const HIDE_REQUIRE_ROOMS = 'HIDE_REQUIRE_ROOMS';
26+
export const FAILED_OPERATION = 'FAILED_OPERATION';
27+
export const FETCH_FAILED = 'FETCH_FAILED';
28+
export const FETCH_INSTANCE_LIST = 'FETCH_INSTANCE_LIST';
29+
export const FETCH_INSTANCE_LIST_SUCCESS = 'FETCH_INSTANCE_LIST_SUCCESS';
30+
export const FETCH_ROOMS_SUCCESS = 'FETCH_ROOMS_SUCCESS';
31+
export const FETCH_USER_ID_SUCCESS = 'FETCH_USER_ID_SUCCESS';
32+
export const GET_ACTIVE_INSTANCE_RESETED = 'GET_ACTIVE_INSTANCE_RESETED';
33+
export const GET_INSTANCE_INFO = 'GET_INSTANCE_INFO';
34+
export const MESSAGE_ERROR = 'MESSAGE_ERROR';
35+
export const REQUIRED_NAME = 'REQUIRED_NAME';
36+
export const REQUIRED_ROOMS = 'REQUIRED_ROOMS';
37+
export const REMOVE_INSTANCE = 'REMOVE_INSTANCE';
38+
export const REMOVE_STREAM_FROM_INSTANCE = 'REMOVE_STREAM_FROM_INSTANCE';
39+
export const RESET_MESSAGE = 'RESET_MESSAGE';
40+
export const RESET_POSTING_LOCATION_ROOMS = 'RESET_POSTING_LOCATION_ROOMS';
41+
export const SAVE_INSTANCE = 'SAVE_INSTANCE';
42+
export const SAVE_INSTANCE_FAILED = 'SAVE_INSTANCE_FAILED';
43+
export const SET_APP_NAME = 'SET_APP_NAME';
44+
export const SUBMIT_DONE = 'SUBMIT_DONE';
45+
export const SUCCESSFULLY_CREATED = 'SUCCESSFULLY_CREATED';
46+
export const SUCCESSFULLY_REMOVED = 'SUCCESSFULLY_REMOVED';
47+
export const SUCCESSFULLY_UPDATED = 'SUCCESSFULLY_UPDATED';
48+
49+
// Message Actions
50+
export const FAILED_OPERATION_MESSAGE = 'An error has ocurred and the operation could not be completed. Please try again later.';
51+
export const NAME_IS_REQUIRED = 'Name is required!';
52+
export const ROOMS_IS_REQUIRED = 'Posting Location is required!';
53+
export const SUCCESSFULLY_CREATED_MESSAGE = 'You have successfully Configured a new #INTEGRATION_NAME integration. Register your Configured integration on #INTEGRATION_NAME to complete setup.';
54+
export const SUCCESSFULLY_REMOVED_MESSAGE = 'Instance removed from Symphony. You can now remove the webhook from #INTEGRATION_NAME';
55+
export const SUCCESSFULLY_UPDATED_MESSAGE = 'You have successfully updated your #INTEGRATION_NAME integration.';
56+
57+
// Other constants
58+
export const operations = {
59+
CREATE: 'CREATE',
60+
UPDATE: 'UPDATE',
61+
REMOVE: 'REMOVE',
62+
};
63+
64+
// Actions creators
65+
export const changeInstanceName = name => ({
66+
type: CHANGE_INSTANCE_NAME,
67+
name,
68+
});
69+
70+
export const changeStreamType = streamType => ({
71+
type: CHANGE_STREAM_TYPE,
72+
streamType,
73+
});
74+
75+
export const addStreamToInstance = room => ({
76+
type: ADD_STREAM_TO_INSTANCE,
77+
room,
78+
});
79+
80+
export const removeStreamFromInstance = room => ({
81+
type: REMOVE_STREAM_FROM_INSTANCE,
82+
room,
83+
});
84+
85+
export const saveInstance = () => ({
86+
type: SAVE_INSTANCE,
87+
});
88+
89+
export const editInstance = instance => ({
90+
type: EDIT_INSTANCE,
91+
instance,
92+
});
93+
94+
export const removeInstance = instance => ({
95+
type: REMOVE_INSTANCE,
96+
instance,
97+
});
98+
99+
export const getInstanceInfo = instance => ({
100+
type: GET_INSTANCE_INFO,
101+
instance,
102+
});
103+
104+
export const resetPostingLocationRooms = () => ({
105+
type: RESET_POSTING_LOCATION_ROOMS,
106+
});
107+
108+
export const submitDone = () => ({
109+
type: SUBMIT_DONE,
110+
});
111+
112+
export const getInstanceList = () => ({
113+
type: FETCH_INSTANCE_LIST,
114+
});
115+
116+
export const showRequireName = state => ({
117+
type: REQUIRED_NAME,
118+
});
119+
120+
export const hideRequireName = state => ({
121+
type: HIDE_REQUIRE_NAME,
122+
});
123+
124+
export const hideRequireRooms = state => ({
125+
type: HIDE_REQUIRE_ROOMS,
126+
});
127+
128+
export const showRequireRooms = () => ({
129+
type: REQUIRED_ROOMS,
130+
});
131+
132+
export const resetMessage = () => ({
133+
type: RESET_MESSAGE,
134+
});
135+
136+
export const getAppParams = () => ({
137+
type: GET_APP_PARAMS,
138+
});
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { connect } from 'react-redux';
2+
import React, { PropTypes } from 'react';
3+
import { hashHistory } from 'react-router';
4+
import {
5+
resetMessage as callResetMessage,
6+
} from '../../actions';
7+
import './styles/styles.less';
8+
9+
const onConfigureNew = (resetMessage) => {
10+
resetMessage();
11+
hashHistory.push('/create-view');
12+
};
13+
14+
const ConfigureNew = ({ resetMessage }) => (
15+
<div className='wrapper configure-new'>
16+
<header>
17+
<h2>Configured Integrations</h2>
18+
</header>
19+
<button onClick={() => { onConfigureNew(resetMessage); }} className='button'>
20+
Configure New
21+
</button>
22+
</div>
23+
);
24+
25+
ConfigureNew.propTypes = {
26+
resetMessage: PropTypes.func.isRequired,
27+
};
28+
29+
const mapDispatchToProps = dispatch => ({
30+
resetMessage: () => { dispatch(callResetMessage()); },
31+
});
32+
33+
export default connect(
34+
null,
35+
mapDispatchToProps,
36+
)(ConfigureNew);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.configure-new {
2+
display: flex;
3+
flex-direction: row;
4+
justify-content: flex-start;
5+
align-items: center;
6+
7+
header {
8+
margin-right: 1.25rem;
9+
}
10+
11+
}

0 commit comments

Comments
 (0)