@mochabug/adaptkit 0.10.3 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/configurator.ts +131 -0
- package/assets/executor_action.ts +22 -0
- package/assets/executor_browser.ts +118 -0
- package/assets/executor_cron_trigger.ts +26 -0
- package/assets/executor_external_trigger.ts +44 -0
- package/assets/gitignore +116 -0
- package/assets/license.md +15 -0
- package/assets/readme.md +51 -0
- package/assets/rollup.config.ts +30 -0
- package/assets/success_page.html +93 -0
- package/assets/tsconf.json +36 -0
- package/bin/add.d.ts.map +1 -1
- package/bin/genproto/google/api/client.d.ts +34 -0
- package/bin/genproto/google/api/client.d.ts.map +1 -1
- package/bin/index.js +141 -5544
- package/bin/init.d.ts.map +1 -1
- package/bin/publish.d.ts.map +1 -1
- package/bin/utils.d.ts +2 -1
- package/bin/utils.d.ts.map +1 -1
- package/bin/vertices.d.ts +1 -1
- package/bin/vertices.d.ts.map +1 -1
- package/package.json +16 -11
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import {
|
|
2
|
+
mapErrorToHttpError,
|
|
3
|
+
RpcError,
|
|
4
|
+
VertexConfig
|
|
5
|
+
} from '@mochabug/adapt-plugin-toolkit/api';
|
|
6
|
+
import {
|
|
7
|
+
ExternalConfiguratorRouter,
|
|
8
|
+
InternalConfiguratorRouter
|
|
9
|
+
} from '@mochabug/adapt-plugin-toolkit/router';
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
external: new ExternalConfiguratorRouter()
|
|
13
|
+
.useRequestLogging()
|
|
14
|
+
.useBearerAuthorization(['/api'])
|
|
15
|
+
.useErrorHandling(async (e) => {
|
|
16
|
+
console.error(e);
|
|
17
|
+
if (e instanceof RpcError) {
|
|
18
|
+
return new Response(null, { status: mapErrorToHttpError(e.code) });
|
|
19
|
+
}
|
|
20
|
+
return new Response(null, {
|
|
21
|
+
status: 500,
|
|
22
|
+
statusText: 'Internal server error'
|
|
23
|
+
});
|
|
24
|
+
})
|
|
25
|
+
.add('GET', '/api/config', async (_req, api) => {
|
|
26
|
+
const res = await api.getVertexConfig<VertexConfig>();
|
|
27
|
+
return new Response(JSON.stringify(res), {
|
|
28
|
+
headers: {
|
|
29
|
+
'Content-Type': 'application/json'
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
})
|
|
33
|
+
.add('GET', '(/?)', async () => {
|
|
34
|
+
return new Response(helloWorldPage, {
|
|
35
|
+
headers: {
|
|
36
|
+
'Content-Type': 'text/html'
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}),
|
|
40
|
+
internal: new InternalConfiguratorRouter()
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const helloWorldPage = `
|
|
44
|
+
<html>
|
|
45
|
+
<head>
|
|
46
|
+
<style>
|
|
47
|
+
@import url('https://fonts.googleapis.com/css2?family=Orbitron&display=swap');
|
|
48
|
+
@keyframes glow {
|
|
49
|
+
0% { text-shadow: 0 0 5px #0f0, 0 0 10px #0f0, 0 0 15px #0f0, 0 0 20px #0f0; }
|
|
50
|
+
100% { text-shadow: 0 0 10px #0f0, 0 0 20px #0f0, 0 0 30px #0f0, 0 0 40px #0f0; }
|
|
51
|
+
}
|
|
52
|
+
body {
|
|
53
|
+
background-color: #000;
|
|
54
|
+
color: #0f0;
|
|
55
|
+
font-family: 'Orbitron', sans-serif;
|
|
56
|
+
text-align: center;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
margin: 0;
|
|
59
|
+
padding: 0;
|
|
60
|
+
}
|
|
61
|
+
h1 {
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 30%;
|
|
64
|
+
left: 50%;
|
|
65
|
+
transform: translate(-50%, -50%);
|
|
66
|
+
font-size: 3em;
|
|
67
|
+
text-transform: uppercase;
|
|
68
|
+
letter-spacing: 4px;
|
|
69
|
+
animation: glow 2s infinite alternate;
|
|
70
|
+
}
|
|
71
|
+
#jsonOutput {
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 70%;
|
|
74
|
+
left: 50%;
|
|
75
|
+
transform: translate(-50%, -50%);
|
|
76
|
+
font-size: 1.5em;
|
|
77
|
+
text-transform: uppercase;
|
|
78
|
+
letter-spacing: 2px;
|
|
79
|
+
animation: glow 2s infinite alternate;
|
|
80
|
+
}
|
|
81
|
+
button {
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: 50%;
|
|
84
|
+
left: 50%;
|
|
85
|
+
transform: translate(-50%, -50%);
|
|
86
|
+
background-color: #0f0;
|
|
87
|
+
border: none;
|
|
88
|
+
color: black;
|
|
89
|
+
padding: 15px 32px;
|
|
90
|
+
text-align: center;
|
|
91
|
+
text-decoration: none;
|
|
92
|
+
display: inline-block;
|
|
93
|
+
font-size: 20px; /* Increase the font size */
|
|
94
|
+
margin: 4px 2px;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
transition-duration: 0.4s;
|
|
97
|
+
animation: glow 2s infinite alternate;
|
|
98
|
+
font-family: 'Orbitron', sans-serif;
|
|
99
|
+
border-radius: 15px;
|
|
100
|
+
transform: rotate(-10deg) skew(10deg, 10deg);
|
|
101
|
+
}
|
|
102
|
+
</style>
|
|
103
|
+
</head>
|
|
104
|
+
<body>
|
|
105
|
+
<h1>Hello, World!</h1>
|
|
106
|
+
<button id="assimilateButton">Assimilate</button>
|
|
107
|
+
<pre id="jsonOutput"></pre>
|
|
108
|
+
<script>
|
|
109
|
+
document.getElementById('assimilateButton').addEventListener('click', function() {
|
|
110
|
+
const hash = window.location.hash.substr(1).trim();
|
|
111
|
+
const token = decodeURIComponent(hash);
|
|
112
|
+
fetch('/api/config', {
|
|
113
|
+
method: 'GET',
|
|
114
|
+
headers: {
|
|
115
|
+
'Authorization': 'Bearer ' + token
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
.then(response => response.json())
|
|
119
|
+
.then(data => {
|
|
120
|
+
document.getElementById('jsonOutput').innerText = JSON.stringify(data, null, 2);
|
|
121
|
+
this.style.display = 'none'; /* Hide button after being clicked */
|
|
122
|
+
})
|
|
123
|
+
.catch(error => {
|
|
124
|
+
console.error('Error:', error);
|
|
125
|
+
document.getElementById('jsonOutput').innerText = 'Error occurred while assimilating data';
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
</script>
|
|
129
|
+
</body>
|
|
130
|
+
</html>
|
|
131
|
+
`;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { InternalExecutorRouter } from '@mochabug/adapt-plugin-toolkit/router';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
internal: new InternalExecutorRouter()
|
|
5
|
+
.onStart(async (start, api, ctx) => {
|
|
6
|
+
console.log('Start has been called');
|
|
7
|
+
console.log(start);
|
|
8
|
+
ctx.waitUntil(api.complete('output', {}));
|
|
9
|
+
})
|
|
10
|
+
.onStop(async (stop, _api) => {
|
|
11
|
+
console.log('Stop has been called');
|
|
12
|
+
console.log(stop);
|
|
13
|
+
})
|
|
14
|
+
.onStream(async (res, _api, name) => {
|
|
15
|
+
console.log(`Stream ${name} has been called`);
|
|
16
|
+
console.log(res);
|
|
17
|
+
})
|
|
18
|
+
.onProcedure(async (res, _api, name) => {
|
|
19
|
+
console.log(`Procedure ${name} has been called`);
|
|
20
|
+
console.log(res);
|
|
21
|
+
})
|
|
22
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import {
|
|
2
|
+
mapErrorToHttpError,
|
|
3
|
+
RpcError
|
|
4
|
+
} from '@mochabug/adapt-plugin-toolkit/api';
|
|
5
|
+
import {
|
|
6
|
+
ExternalExecutorRouter,
|
|
7
|
+
InternalExecutorRouter
|
|
8
|
+
} from '@mochabug/adapt-plugin-toolkit/router';
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
external: new ExternalExecutorRouter()
|
|
12
|
+
.useRequestLogging()
|
|
13
|
+
.useBearerAuthorization(['/api'])
|
|
14
|
+
.useErrorHandling(async (e) => {
|
|
15
|
+
console.error(e);
|
|
16
|
+
if (e instanceof RpcError) {
|
|
17
|
+
return new Response(null, { status: mapErrorToHttpError(e.code) });
|
|
18
|
+
}
|
|
19
|
+
return new Response(null, {
|
|
20
|
+
status: 500,
|
|
21
|
+
statusText: 'Internal server error'
|
|
22
|
+
});
|
|
23
|
+
})
|
|
24
|
+
.add('POST', '/api/done', async (req, api, _route, ctx) => {
|
|
25
|
+
const sapi = api.getSessionApi(req.headers.get('Authorization')!);
|
|
26
|
+
ctx.waitUntil(sapi.complete('output', {}));
|
|
27
|
+
return new Response();
|
|
28
|
+
})
|
|
29
|
+
.add('GET', '(/?)', async () => {
|
|
30
|
+
return new Response(helloWorld, {
|
|
31
|
+
headers: {
|
|
32
|
+
'Content-Type': 'text/html'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}),
|
|
36
|
+
internal: new InternalExecutorRouter()
|
|
37
|
+
.onStart(async (start, _api) => {
|
|
38
|
+
console.log('Start has been called');
|
|
39
|
+
console.log(start);
|
|
40
|
+
})
|
|
41
|
+
.onStop(async (stop, _api) => {
|
|
42
|
+
console.log('Stop has been called');
|
|
43
|
+
console.log(stop);
|
|
44
|
+
})
|
|
45
|
+
.onStream(async (res, _api, name) => {
|
|
46
|
+
console.log(`Stream ${name} has been called`);
|
|
47
|
+
console.log(res);
|
|
48
|
+
})
|
|
49
|
+
.onProcedure(async (res, _api, name) => {
|
|
50
|
+
console.log(`Procedure ${name} has been called`);
|
|
51
|
+
console.log(res);
|
|
52
|
+
})
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const helloWorld = `
|
|
56
|
+
<html>
|
|
57
|
+
<head>
|
|
58
|
+
<style>
|
|
59
|
+
@import url('https://fonts.googleapis.com/css2?family=Orbitron&display=swap');
|
|
60
|
+
@keyframes glow {
|
|
61
|
+
0% { text-shadow: 0 0 5px #0f0, 0 0 10px #0f0, 0 0 15px #0f0, 0 0 20px #0f0; }
|
|
62
|
+
100% { text-shadow: 0 0 10px #0f0, 0 0 20px #0f0, 0 0 30px #0f0, 0 0 40px #0f0; }
|
|
63
|
+
}
|
|
64
|
+
body {
|
|
65
|
+
background-color: #000;
|
|
66
|
+
color: #0f0;
|
|
67
|
+
font-family: 'Orbitron', sans-serif;
|
|
68
|
+
text-align: center;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
margin: 0;
|
|
71
|
+
padding: 0;
|
|
72
|
+
}
|
|
73
|
+
button {
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 50%;
|
|
76
|
+
left: 50%;
|
|
77
|
+
transform: translate(-50%, -50%);
|
|
78
|
+
background-color: #0f0;
|
|
79
|
+
border: none;
|
|
80
|
+
color: black;
|
|
81
|
+
padding: 15px 32px;
|
|
82
|
+
text-align: center;
|
|
83
|
+
text-decoration: none;
|
|
84
|
+
display: inline-block;
|
|
85
|
+
font-size: 20px;
|
|
86
|
+
margin: 4px 2px;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
transition-duration: 0.4s;
|
|
89
|
+
animation: glow 2s infinite alternate;
|
|
90
|
+
font-family: 'Orbitron', sans-serif;
|
|
91
|
+
border-radius: 15px;
|
|
92
|
+
transform: rotate(-10deg) skew(10deg, 10deg);
|
|
93
|
+
}
|
|
94
|
+
</style>
|
|
95
|
+
</head>
|
|
96
|
+
<body>
|
|
97
|
+
<button id="doneButton">Done</button>
|
|
98
|
+
<script>
|
|
99
|
+
document.getElementById('doneButton').addEventListener('click', function() {
|
|
100
|
+
const hash = window.location.hash.substr(1).trim();
|
|
101
|
+
const token = decodeURIComponent(hash);
|
|
102
|
+
fetch('/api/done', {
|
|
103
|
+
method: 'POST',
|
|
104
|
+
headers: {
|
|
105
|
+
'Authorization': 'Bearer ' + token
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
.then(data => {
|
|
109
|
+
this.innerText = 'Done';
|
|
110
|
+
})
|
|
111
|
+
.catch(error => {
|
|
112
|
+
console.error('Error:', error);
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
</script>
|
|
116
|
+
</body>
|
|
117
|
+
</html>
|
|
118
|
+
`;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CronExecutorRouter } from '@mochabug/adapt-plugin-toolkit/router';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
internal: new CronExecutorRouter()
|
|
5
|
+
.onStart(async (start, _api) => {
|
|
6
|
+
console.log('Start has been called');
|
|
7
|
+
console.log(start);
|
|
8
|
+
})
|
|
9
|
+
.onStop(async (stop, _api) => {
|
|
10
|
+
console.log('Stop has been called');
|
|
11
|
+
console.log(stop);
|
|
12
|
+
})
|
|
13
|
+
.onStream(async (res, _api, name) => {
|
|
14
|
+
console.log(`Stream ${name} has been called`);
|
|
15
|
+
console.log(res);
|
|
16
|
+
})
|
|
17
|
+
.onProcedure(async (res, _api, name) => {
|
|
18
|
+
console.log(`Procedure ${name} has been called`);
|
|
19
|
+
console.log(res);
|
|
20
|
+
})
|
|
21
|
+
.onCron(async (cron, api, ctx) => {
|
|
22
|
+
console.log('Received cron event');
|
|
23
|
+
ctx.waitUntil(api.complete('output', {}));
|
|
24
|
+
console.log(cron);
|
|
25
|
+
})
|
|
26
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
mapErrorToHttpError,
|
|
3
|
+
RpcError
|
|
4
|
+
} from '@mochabug/adapt-plugin-toolkit/api';
|
|
5
|
+
import {
|
|
6
|
+
ExternalExecutorRouter,
|
|
7
|
+
InternalExecutorRouter
|
|
8
|
+
} from '@mochabug/adapt-plugin-toolkit/router';
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
external: new ExternalExecutorRouter()
|
|
12
|
+
.useRequestLogging()
|
|
13
|
+
.useBearerAuthorization(['/api'])
|
|
14
|
+
.useErrorHandling(async (e) => {
|
|
15
|
+
console.error(e);
|
|
16
|
+
if (e instanceof RpcError) {
|
|
17
|
+
return new Response(null, { status: mapErrorToHttpError(e.code) });
|
|
18
|
+
}
|
|
19
|
+
return new Response(null, {
|
|
20
|
+
status: 500,
|
|
21
|
+
statusText: 'Internal server error'
|
|
22
|
+
});
|
|
23
|
+
})
|
|
24
|
+
.add('*', '(.*)', async (_req, _api, _route, _ctx) => {
|
|
25
|
+
return new Response();
|
|
26
|
+
}),
|
|
27
|
+
internal: new InternalExecutorRouter()
|
|
28
|
+
.onStart(async (start, _api) => {
|
|
29
|
+
console.log('Start has been called');
|
|
30
|
+
console.log(start);
|
|
31
|
+
})
|
|
32
|
+
.onStop(async (stop, _api) => {
|
|
33
|
+
console.log('Stop has been called');
|
|
34
|
+
console.log(stop);
|
|
35
|
+
})
|
|
36
|
+
.onStream(async (res, _api, name) => {
|
|
37
|
+
console.log(`Stream ${name} has been called`);
|
|
38
|
+
console.log(res);
|
|
39
|
+
})
|
|
40
|
+
.onProcedure(async (res, _api, name) => {
|
|
41
|
+
console.log(`Procedure ${name} has been called`);
|
|
42
|
+
console.log(res);
|
|
43
|
+
})
|
|
44
|
+
};
|
package/assets/gitignore
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
lerna-debug.log*
|
|
8
|
+
.pnpm-debug.log*
|
|
9
|
+
|
|
10
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
11
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
12
|
+
|
|
13
|
+
# Runtime data
|
|
14
|
+
pids
|
|
15
|
+
*.pid
|
|
16
|
+
*.seed
|
|
17
|
+
*.pid.lock
|
|
18
|
+
|
|
19
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
20
|
+
lib-cov
|
|
21
|
+
|
|
22
|
+
# Coverage directory used by tools like istanbul
|
|
23
|
+
coverage
|
|
24
|
+
*.lcov
|
|
25
|
+
|
|
26
|
+
# nyc test coverage
|
|
27
|
+
.nyc_output
|
|
28
|
+
|
|
29
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
30
|
+
.grunt
|
|
31
|
+
|
|
32
|
+
# Bower dependency directory (https://bower.io/)
|
|
33
|
+
bower_components
|
|
34
|
+
|
|
35
|
+
# node-waf configuration
|
|
36
|
+
.lock-wscript
|
|
37
|
+
|
|
38
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
39
|
+
build/Release
|
|
40
|
+
|
|
41
|
+
# Dependency directories
|
|
42
|
+
node_modules/
|
|
43
|
+
jspm_packages/
|
|
44
|
+
|
|
45
|
+
# Snowpack dependency directory (https://snowpack.dev/)
|
|
46
|
+
web_modules/
|
|
47
|
+
|
|
48
|
+
# TypeScript cache
|
|
49
|
+
*.tsbuildinfo
|
|
50
|
+
|
|
51
|
+
# Optional npm cache directory
|
|
52
|
+
.npm
|
|
53
|
+
|
|
54
|
+
# Optional eslint cache
|
|
55
|
+
.eslintcache
|
|
56
|
+
|
|
57
|
+
# Optional stylelint cache
|
|
58
|
+
.stylelintcache
|
|
59
|
+
|
|
60
|
+
# Microbundle cache
|
|
61
|
+
.rpt2_cache/
|
|
62
|
+
.rts2_cache_cjs/
|
|
63
|
+
.rts2_cache_es/
|
|
64
|
+
.rts2_cache_umd/
|
|
65
|
+
|
|
66
|
+
# Optional REPL history
|
|
67
|
+
.node_repl_history
|
|
68
|
+
|
|
69
|
+
# Output of 'npm pack'
|
|
70
|
+
*.tgz
|
|
71
|
+
|
|
72
|
+
# Yarn Integrity file
|
|
73
|
+
.yarn-integrity
|
|
74
|
+
|
|
75
|
+
# dotenv environment variable files
|
|
76
|
+
.env
|
|
77
|
+
.env.development.local
|
|
78
|
+
.env.test.local
|
|
79
|
+
.env.production.local
|
|
80
|
+
.env.local
|
|
81
|
+
|
|
82
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
83
|
+
.cache
|
|
84
|
+
.parcel-cache
|
|
85
|
+
|
|
86
|
+
# Next.js build output
|
|
87
|
+
.next
|
|
88
|
+
out
|
|
89
|
+
|
|
90
|
+
# Nuxt.js build / generate output
|
|
91
|
+
.nuxt
|
|
92
|
+
dist
|
|
93
|
+
build
|
|
94
|
+
|
|
95
|
+
# Gatsby files
|
|
96
|
+
.cache/
|
|
97
|
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
|
98
|
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
99
|
+
# public
|
|
100
|
+
|
|
101
|
+
# vuepress build output
|
|
102
|
+
.vuepress/dist
|
|
103
|
+
|
|
104
|
+
# vuepress v2.x temp and cache directory
|
|
105
|
+
.temp
|
|
106
|
+
.cache
|
|
107
|
+
|
|
108
|
+
# Stores VSCode versions used for testing VSCode extensions
|
|
109
|
+
.vscode-test
|
|
110
|
+
|
|
111
|
+
# yarn v2
|
|
112
|
+
.yarn/cache
|
|
113
|
+
.yarn/unplugged
|
|
114
|
+
.yarn/build-state.yml
|
|
115
|
+
.yarn/install-state.gz
|
|
116
|
+
.pnp.*
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [year] [fullname]
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
package/assets/readme.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# 🐞 Mochabug Adapt's Magnificent Plugin 🐞
|
|
2
|
+
|
|
3
|
+
[](PLUGIN_REPOSITORY_URL)
|
|
4
|
+
[](https://opensource.org/licenses/ISC)
|
|
5
|
+
|
|
6
|
+
## 📝 Description
|
|
7
|
+
|
|
8
|
+
Welcome to the Magnificent Plugin for Mochabug Adapt! Developed by a talented third-party developer, this plugin promises to bring extra flavor to your Mochabug Adapt cloud platform experience. PLUGIN_DESCRIPTION
|
|
9
|
+
|
|
10
|
+
This plugin consists of one or more vertices. Each vertex is made up of an Executor and may optionally include a Configurator to help you tailor its behavior.
|
|
11
|
+
|
|
12
|
+
## 📚 Table of Contents
|
|
13
|
+
|
|
14
|
+
- [🐞 Mochabug Adapt's Magnificent Plugin 🐞](#-mochabug-adapts-magnificent-plugin-)
|
|
15
|
+
- [📝 Description](#-description)
|
|
16
|
+
- [📚 Table of Contents](#-table-of-contents)
|
|
17
|
+
- [🚀 Getting Started](#-getting-started)
|
|
18
|
+
- [🎯 Usage](#-usage)
|
|
19
|
+
- [⚙️ Configuration](#️-configuration)
|
|
20
|
+
- [📖 Documentation](#-documentation)
|
|
21
|
+
- [🤝 Contributing](#-contributing)
|
|
22
|
+
- [📜 License](#-license)
|
|
23
|
+
- [👤 Author](#-author)
|
|
24
|
+
|
|
25
|
+
## 🚀 Getting Started
|
|
26
|
+
|
|
27
|
+
To begin using Mochabug Adapt's Magnificent Plugin, simply start incorporating its vertices into your workflows within the Mochabug Adapt platform. No installation is required.
|
|
28
|
+
|
|
29
|
+
## 🎯 Usage
|
|
30
|
+
|
|
31
|
+
You can start using the vertices by incorporating them into your workflows on the Mochabug Adapt platform. Each vertex will delight you with a specific task, and the usage will vary depending on your requirements. Consult the plugin documentation for a comprehensive guide on each vertex's usage.
|
|
32
|
+
|
|
33
|
+
## ⚙️ Configuration
|
|
34
|
+
|
|
35
|
+
Each vertex in the plugin may have a Configurator, which allows you to tailor the vertex's behavior to your liking. Configuration options may include settings for the Executor, input/output data formats, and other essential options.
|
|
36
|
+
|
|
37
|
+
## 📖 Documentation
|
|
38
|
+
|
|
39
|
+
For more insights into the plugin, its vertices, and their features, visit the [homepage](PLUGIN_HOMEPAGE) and the [repository](PLUGIN_REPOSITORY_URL).
|
|
40
|
+
|
|
41
|
+
## 🤝 Contributing
|
|
42
|
+
|
|
43
|
+
Ready to make the Magnificent Plugin for Mochabug Adapt even more magical? Contributions are welcome! Check the [repository](PLUGIN_REPOSITORY_URL) for open issues and guidelines on how to contribute.
|
|
44
|
+
|
|
45
|
+
## 📜 License
|
|
46
|
+
|
|
47
|
+
This plugin is licensed under the [ISC License](https://opensource.org/licenses/ISC).
|
|
48
|
+
|
|
49
|
+
## 👤 Author
|
|
50
|
+
|
|
51
|
+
PLUGIN_AUTHOR
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import typescript from '@rollup/plugin-typescript';
|
|
3
|
+
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
4
|
+
import terser from '@rollup/plugin-terser';
|
|
5
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
6
|
+
|
|
7
|
+
const config = [
|
|
8
|
+
{
|
|
9
|
+
input: 'src/executors.ts',
|
|
10
|
+
output: {
|
|
11
|
+
file: 'dist/executors.js',
|
|
12
|
+
format: 'esm'
|
|
13
|
+
},
|
|
14
|
+
plugins: [typescript(), nodeResolve(), commonjs(), terser()]
|
|
15
|
+
}
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
// Check if 'src/configurators.ts' exists
|
|
19
|
+
if (fs.existsSync('src/configurators.ts')) {
|
|
20
|
+
config.push({
|
|
21
|
+
input: 'src/configurators.ts',
|
|
22
|
+
output: {
|
|
23
|
+
file: 'dist/configurators.js',
|
|
24
|
+
format: 'esm'
|
|
25
|
+
},
|
|
26
|
+
plugins: [typescript(), nodeResolve(), commonjs(), terser()]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default config;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Authorization Success</title>
|
|
7
|
+
<!-- Add the Material-UI library -->
|
|
8
|
+
<link
|
|
9
|
+
rel="stylesheet"
|
|
10
|
+
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
|
|
11
|
+
/>
|
|
12
|
+
<link
|
|
13
|
+
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
|
14
|
+
rel="stylesheet"
|
|
15
|
+
/>
|
|
16
|
+
<style>
|
|
17
|
+
body {
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
font-family: 'Roboto', sans-serif;
|
|
21
|
+
background: linear-gradient(145deg, #121212, #1c1c1c);
|
|
22
|
+
color: #ffffff;
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
align-items: center;
|
|
26
|
+
height: 100vh;
|
|
27
|
+
text-align: center;
|
|
28
|
+
}
|
|
29
|
+
.success-container {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
align-items: center;
|
|
33
|
+
padding: 40px;
|
|
34
|
+
border-radius: 16px;
|
|
35
|
+
background-color: #242424;
|
|
36
|
+
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.5);
|
|
37
|
+
}
|
|
38
|
+
.success-icon {
|
|
39
|
+
color: #FFF700;
|
|
40
|
+
font-size: 120px;
|
|
41
|
+
}
|
|
42
|
+
.success-message {
|
|
43
|
+
font-size: 28px;
|
|
44
|
+
margin-top: 20px;
|
|
45
|
+
margin-bottom: 30px;
|
|
46
|
+
color: #e0e0e0;
|
|
47
|
+
}
|
|
48
|
+
.friendly-note {
|
|
49
|
+
font-size: 16px;
|
|
50
|
+
margin-top: 20px;
|
|
51
|
+
color: #9e9e9e;
|
|
52
|
+
font-style: italic;
|
|
53
|
+
}
|
|
54
|
+
.company-info {
|
|
55
|
+
font-size: 16px;
|
|
56
|
+
color: #9e9e9e;
|
|
57
|
+
text-align: center;
|
|
58
|
+
margin-top: 40px;
|
|
59
|
+
font-weight: 300;
|
|
60
|
+
line-height: 1.6; /* increase line spacing */
|
|
61
|
+
}
|
|
62
|
+
.company-info a {
|
|
63
|
+
color: #FFF700; /* primary main color */
|
|
64
|
+
text-decoration: none;
|
|
65
|
+
transition: transform 0.3s ease, color 0.3s ease;
|
|
66
|
+
}
|
|
67
|
+
.company-info a:hover, .company-info a:focus {
|
|
68
|
+
color: #ffffff; /* brighter color on hover/focus */
|
|
69
|
+
transform: scale(1.05); /* subtle zoom effect on hover/focus */
|
|
70
|
+
}
|
|
71
|
+
.company-info .company-link {
|
|
72
|
+
display: block; /* each link on its own line */
|
|
73
|
+
margin: 5px 0; /* add some space around links */
|
|
74
|
+
}
|
|
75
|
+
</style>
|
|
76
|
+
</head>
|
|
77
|
+
<body>
|
|
78
|
+
<div class="success-container">
|
|
79
|
+
<span class="material-icons success-icon">check_circle</span>
|
|
80
|
+
<div class="success-message">Authorization Complete!</div>
|
|
81
|
+
<p class="friendly-note">Feel free to close this window at your leisure, or stay a while and enjoy the ambiance.</p>
|
|
82
|
+
<div class="company-info">
|
|
83
|
+
<div class="company-link">
|
|
84
|
+
<a href="https://www.mochabug.com" target="_blank">www.mochabug.com</a>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="company-link">
|
|
87
|
+
<a href="mailto:support@mochabug.com">support@mochabug.com</a>
|
|
88
|
+
</div>
|
|
89
|
+
mochabug AB | orgnr: 559418-8640
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</body>
|
|
93
|
+
</html>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"rootDir": "src",
|
|
4
|
+
"jsx": "react",
|
|
5
|
+
"target": "esnext",
|
|
6
|
+
"module": "esnext",
|
|
7
|
+
"lib": [
|
|
8
|
+
"esnext"
|
|
9
|
+
],
|
|
10
|
+
"moduleResolution": "Bundler",
|
|
11
|
+
"types": [
|
|
12
|
+
"@mochabug/adapt-plugin-typings"
|
|
13
|
+
],
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"allowJs": true,
|
|
16
|
+
"checkJs": false,
|
|
17
|
+
"noEmit": true,
|
|
18
|
+
"isolatedModules": true,
|
|
19
|
+
"allowSyntheticDefaultImports": true,
|
|
20
|
+
"forceConsistentCasingInFileNames": true,
|
|
21
|
+
"strict": true,
|
|
22
|
+
"skipLibCheck": true,
|
|
23
|
+
"noUnusedLocals": true,
|
|
24
|
+
"noUnusedParameters": true,
|
|
25
|
+
"noFallthroughCasesInSwitch": true,
|
|
26
|
+
"noImplicitReturns": true,
|
|
27
|
+
"useUnknownInCatchVariables": true,
|
|
28
|
+
"noUncheckedIndexedAccess": true,
|
|
29
|
+
"noPropertyAccessFromIndexSignature": true
|
|
30
|
+
},
|
|
31
|
+
"exclude": [
|
|
32
|
+
"dist/**",
|
|
33
|
+
"assets/**",
|
|
34
|
+
"rollup.config.js"
|
|
35
|
+
]
|
|
36
|
+
}
|
package/bin/add.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../src/add.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AAG5E,wBAAsB,GAAG,CAAC,QAAQ,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../src/add.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AAG5E,wBAAsB,GAAG,CAAC,QAAQ,EAAE,QAAQ,iBAuE3C"}
|