Compare commits
	
		
			1 Commits
		
	
	
		
			dependabot
			...
			AUT-657
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					98274c3d71 | 
							
								
								
									
										1
									
								
								packages/backend/src/apps/airbrake/assets/favicon.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								packages/backend/src/apps/airbrake/assets/favicon.svg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
<svg height="255" preserveAspectRatio="xMidYMid" viewBox="0 0 256 255" width="256" xmlns="http://www.w3.org/2000/svg"><path d="m128.636514 155.746615v-155.23361889h-3.522242v.06873152l-124.60824865 64.03287157v60.8642488h.00597665v3.234366h-.00597665v60.868233l124.60824865 64.747082h3.842989v-98.581914z" fill="#ff8e4a"/><path d="m129.941416 254.328529 125.568498-64.747082v-124.9668478l-125.887253-64.10160309h-2.243237v253.81055289h2.243237" fill="#f48746"/><path d="m109.097837 87.2551595h36.19561v59.2077195h-36.19561z" fill="#ff8e4a"/><path d="m66.1735097 188.397074h14.8639378c9.4102412 0 12.6087471-2.238257 15.6189883-9.988981l8.2796572-21.353587h45.159596l8.280653 21.353587c3.011238 7.750724 6.396016 9.988981 15.805261 9.988981h14.677665v-19.114335h-3.011237c-3.19751 0-4.704622-.689307-5.831222-3.790194l-39.516638-99.3658524h-25.779299l-39.703907 99.3658524c-1.1285915 3.100887-2.632716 3.790194-5.833214 3.790194h-3.0102413zm44.4075333-49.939922 11.478163-30.655253c2.445448-6.714771 5.269417-18.2556889 5.269417-18.2556889h.375533s2.822972 11.5409179 5.269416 18.2556889l11.478163 30.655253z" fill="#fff"/><path d="m231.204856 150.082739v-51.8086223c.235082 4.5233303 2.970397 16.8432063 24.305058 27.8512063v11.653479zm0-53.1623343v1.353712c-.029883-.5926848-.01793-1.0479066 0-1.353712zm.041837-.4392841s-.022911.1534008-.041837.4392841v-.4392841z" fill="#d4763c"/><path d="m231.155051 94.3016342c-.013946.9931207.05877 1.8945993.049805 2.0460078-.01793.2480312-2.220327 16.094132 24.305058 29.777681v-60.863253c-23.325883 12.0349884-24.449494 25.7414475-24.354863 29.0395642" fill="#ff8e4a"/></svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 1.6 KiB  | 
							
								
								
									
										44
									
								
								packages/backend/src/apps/airbrake/auth/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								packages/backend/src/apps/airbrake/auth/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
import verifyCredentials from './verify-credentials.js';
 | 
			
		||||
import isStillVerified from './is-still-verified.js';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  fields: [
 | 
			
		||||
    {
 | 
			
		||||
      key: 'screenName',
 | 
			
		||||
      label: 'Screen Name',
 | 
			
		||||
      type: 'string',
 | 
			
		||||
      required: true,
 | 
			
		||||
      readOnly: false,
 | 
			
		||||
      value: null,
 | 
			
		||||
      placeholder: null,
 | 
			
		||||
      description:
 | 
			
		||||
        'Screen name of your connection to be used on Automatisch UI.',
 | 
			
		||||
      clickToCopy: false,
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      key: 'instanceUrl',
 | 
			
		||||
      label: 'Instance URL',
 | 
			
		||||
      type: 'string',
 | 
			
		||||
      required: true,
 | 
			
		||||
      readOnly: false,
 | 
			
		||||
      value: null,
 | 
			
		||||
      placeholder: null,
 | 
			
		||||
      description: 'Your subdomain as https://{yoursubdomain}.airbrake.io',
 | 
			
		||||
      clickToCopy: false,
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      key: 'authToken',
 | 
			
		||||
      label: 'Auth Token',
 | 
			
		||||
      type: 'string',
 | 
			
		||||
      required: true,
 | 
			
		||||
      readOnly: false,
 | 
			
		||||
      value: null,
 | 
			
		||||
      placeholder: null,
 | 
			
		||||
      description: 'Airbrake Auth Token of your account.',
 | 
			
		||||
      clickToCopy: false,
 | 
			
		||||
    },
 | 
			
		||||
  ],
 | 
			
		||||
 | 
			
		||||
  verifyCredentials,
 | 
			
		||||
  isStillVerified,
 | 
			
		||||
};
 | 
			
		||||
@@ -0,0 +1,8 @@
 | 
			
		||||
import verifyCredentials from './verify-credentials.js';
 | 
			
		||||
 | 
			
		||||
const isStillVerified = async ($) => {
 | 
			
		||||
  await verifyCredentials($);
 | 
			
		||||
  return true;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default isStillVerified;
 | 
			
		||||
@@ -0,0 +1,14 @@
 | 
			
		||||
const verifyCredentials = async ($) => {
 | 
			
		||||
  await $.http.get(`/api/v4/projects?key=${$.auth.data.authToken}`, {
 | 
			
		||||
    additionalProperties: {
 | 
			
		||||
      skipAddingAuthToken: true,
 | 
			
		||||
    },
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  await $.auth.set({
 | 
			
		||||
    screenName: $.auth.data.screenName,
 | 
			
		||||
    authToken: $.auth.data.authToken,
 | 
			
		||||
  });
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default verifyCredentials;
 | 
			
		||||
							
								
								
									
										10
									
								
								packages/backend/src/apps/airbrake/common/add-auth-token.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								packages/backend/src/apps/airbrake/common/add-auth-token.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
const addAuthToken = ($, requestConfig) => {
 | 
			
		||||
  if (requestConfig.additionalProperties?.skipAddingAuthToken)
 | 
			
		||||
    return requestConfig;
 | 
			
		||||
 | 
			
		||||
  requestConfig.url = requestConfig.url + `?key=${$.auth.data.authToken}`;
 | 
			
		||||
 | 
			
		||||
  return requestConfig;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default addAuthToken;
 | 
			
		||||
							
								
								
									
										11
									
								
								packages/backend/src/apps/airbrake/common/set-base-url.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								packages/backend/src/apps/airbrake/common/set-base-url.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
const setBaseUrl = ($, requestConfig) => {
 | 
			
		||||
  const subdomain = $.auth.data.instanceUrl;
 | 
			
		||||
 | 
			
		||||
  if (subdomain) {
 | 
			
		||||
    requestConfig.baseURL = `https://${subdomain}.airbrake.io`;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return requestConfig;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default setBaseUrl;
 | 
			
		||||
							
								
								
									
										17
									
								
								packages/backend/src/apps/airbrake/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								packages/backend/src/apps/airbrake/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
import defineApp from '../../helpers/define-app.js';
 | 
			
		||||
import setBaseUrl from './common/set-base-url.js';
 | 
			
		||||
import auth from './auth/index.js';
 | 
			
		||||
import addAuthToken from './common/add-auth-token.js';
 | 
			
		||||
 | 
			
		||||
export default defineApp({
 | 
			
		||||
  name: 'Airbrake',
 | 
			
		||||
  key: 'airbrake',
 | 
			
		||||
  iconUrl: '{BASE_URL}/apps/airbrake/assets/favicon.svg',
 | 
			
		||||
  authDocUrl: 'https://automatisch.io/docs/apps/airbrake/connection',
 | 
			
		||||
  supportsConnections: true,
 | 
			
		||||
  baseUrl: 'https://www.airbrake.io',
 | 
			
		||||
  apiBaseUrl: '',
 | 
			
		||||
  primaryColor: 'f58c54',
 | 
			
		||||
  beforeRequest: [setBaseUrl, addAuthToken],
 | 
			
		||||
  auth,
 | 
			
		||||
});
 | 
			
		||||
@@ -32,6 +32,12 @@ export default defineConfig({
 | 
			
		||||
    ],
 | 
			
		||||
    sidebar: {
 | 
			
		||||
      '/apps/': [
 | 
			
		||||
        {
 | 
			
		||||
          text: 'Airbrake',
 | 
			
		||||
          collapsible: true,
 | 
			
		||||
          collapsed: true,
 | 
			
		||||
          items: [{ text: 'Connection', link: '/apps/airbrake/connection' }],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          text: 'Carbone',
 | 
			
		||||
          collapsible: true,
 | 
			
		||||
@@ -305,7 +311,7 @@ export default defineConfig({
 | 
			
		||||
          collapsed: true,
 | 
			
		||||
          items: [
 | 
			
		||||
            { text: 'Actions', link: '/apps/removebg/actions' },
 | 
			
		||||
            { text: 'Connection', link: '/apps/removebg/connection' }
 | 
			
		||||
            { text: 'Connection', link: '/apps/removebg/connection' },
 | 
			
		||||
          ],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										13
									
								
								packages/docs/pages/apps/airbrake/connection.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								packages/docs/pages/apps/airbrake/connection.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
# Airbrake
 | 
			
		||||
 | 
			
		||||
:::info
 | 
			
		||||
This page explains the steps you need to follow to set up the Airbrake
 | 
			
		||||
connection in Automatisch. If any of the steps are outdated, please let us know!
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
1. Login to your Airbrake account: [https://www.airbrake.io/](https://www.airbrake.io/).
 | 
			
		||||
2. Go to your profile & notifications page.
 | 
			
		||||
3. Copy `Auth Token` from the page to the `Auth Token` field on Automatisch.
 | 
			
		||||
4. Fill the instance URL field with your subdomain. (https://{yoursubdomain}.airbrake.io)
 | 
			
		||||
5. Write any screen name to be displayed in Automatisch.
 | 
			
		||||
6. Now, you can start using the Airbrake connection with Automatisch.
 | 
			
		||||
							
								
								
									
										1
									
								
								packages/docs/pages/public/favicons/airbrake.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								packages/docs/pages/public/favicons/airbrake.svg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
<svg height="255" preserveAspectRatio="xMidYMid" viewBox="0 0 256 255" width="256" xmlns="http://www.w3.org/2000/svg"><path d="m128.636514 155.746615v-155.23361889h-3.522242v.06873152l-124.60824865 64.03287157v60.8642488h.00597665v3.234366h-.00597665v60.868233l124.60824865 64.747082h3.842989v-98.581914z" fill="#ff8e4a"/><path d="m129.941416 254.328529 125.568498-64.747082v-124.9668478l-125.887253-64.10160309h-2.243237v253.81055289h2.243237" fill="#f48746"/><path d="m109.097837 87.2551595h36.19561v59.2077195h-36.19561z" fill="#ff8e4a"/><path d="m66.1735097 188.397074h14.8639378c9.4102412 0 12.6087471-2.238257 15.6189883-9.988981l8.2796572-21.353587h45.159596l8.280653 21.353587c3.011238 7.750724 6.396016 9.988981 15.805261 9.988981h14.677665v-19.114335h-3.011237c-3.19751 0-4.704622-.689307-5.831222-3.790194l-39.516638-99.3658524h-25.779299l-39.703907 99.3658524c-1.1285915 3.100887-2.632716 3.790194-5.833214 3.790194h-3.0102413zm44.4075333-49.939922 11.478163-30.655253c2.445448-6.714771 5.269417-18.2556889 5.269417-18.2556889h.375533s2.822972 11.5409179 5.269416 18.2556889l11.478163 30.655253z" fill="#fff"/><path d="m231.204856 150.082739v-51.8086223c.235082 4.5233303 2.970397 16.8432063 24.305058 27.8512063v11.653479zm0-53.1623343v1.353712c-.029883-.5926848-.01793-1.0479066 0-1.353712zm.041837-.4392841s-.022911.1534008-.041837.4392841v-.4392841z" fill="#d4763c"/><path d="m231.155051 94.3016342c-.013946.9931207.05877 1.8945993.049805 2.0460078-.01793.2480312-2.220327 16.094132 24.305058 29.777681v-60.863253c-23.325883 12.0349884-24.449494 25.7414475-24.354863 29.0395642" fill="#ff8e4a"/></svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 1.6 KiB  | 
		Reference in New Issue
	
	Block a user