Skip to content

Commit a98c58c

Browse files
authored
Component base raw request
1 parent eb462a2 commit a98c58c

38 files changed

+9059
-1323
lines changed

.circleci/config.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
version: 2.1
2+
parameters:
3+
node-version:
4+
type: string
5+
default: "23.11.0"
6+
orbs:
7+
node: circleci/[email protected]
8+
slack: circleci/[email protected]
9+
commands:
10+
notify_on_failure:
11+
steps:
12+
- slack/notify:
13+
event: fail
14+
custom: |
15+
{
16+
"blocks": [
17+
{
18+
"type": "section",
19+
"fields": [
20+
{
21+
"type": "mrkdwn",
22+
"text": ":red_circle: *$CIRCLE_PROJECT_REPONAME*:*$CIRCLE_TAG* build failed"
23+
}
24+
]
25+
},
26+
{
27+
"type": "actions",
28+
"elements": [
29+
{
30+
"type": "button",
31+
"text": {
32+
"type": "plain_text",
33+
"text": "View Job"
34+
},
35+
"url": "${CIRCLE_BUILD_URL}"
36+
}
37+
]
38+
}
39+
]
40+
}
41+
notify_on_pass:
42+
steps:
43+
- slack/notify:
44+
event: pass
45+
custom: |
46+
{
47+
"blocks": [
48+
{
49+
"type": "section",
50+
"fields": [
51+
{
52+
"type": "mrkdwn",
53+
"text": ":tada: *$CIRCLE_PROJECT_REPONAME*:*$CIRCLE_TAG* was successfully built and published"
54+
}
55+
]
56+
},
57+
{
58+
"type": "actions",
59+
"elements": [
60+
{
61+
"type": "button",
62+
"text": {
63+
"type": "plain_text",
64+
"text": "View Job"
65+
},
66+
"url": "${CIRCLE_BUILD_URL}"
67+
}
68+
]
69+
}
70+
]
71+
}
72+
jobs:
73+
test:
74+
docker:
75+
- image: cimg/node:23.11.0
76+
steps:
77+
- checkout
78+
- node/install:
79+
node-version: << pipeline.parameters.node-version >>
80+
- node/install-packages:
81+
cache-path: ./node_modules
82+
override-ci-command: npm install
83+
- run:
84+
name: Audit Dependencies
85+
command: npm audit --production --audit-level=high
86+
- run:
87+
name: Running Tests
88+
command: npm test
89+
build:
90+
docker:
91+
- image: cimg/node:23.11.0
92+
user: root
93+
steps:
94+
- checkout
95+
- node/install:
96+
node-version: << pipeline.parameters.node-version >>
97+
- setup_remote_docker:
98+
version: default
99+
docker_layer_caching: true
100+
# build and push Docker image
101+
- run:
102+
name: Install component-build-helper lib
103+
command: npm install -g @elastic.io/component-build-helper
104+
- run:
105+
name: Build and publish docker image
106+
command: build_component_docker
107+
- notify_on_failure
108+
- notify_on_pass
109+
workflows:
110+
test:
111+
jobs:
112+
- test:
113+
name: "Running tests"
114+
filters:
115+
tags:
116+
ignore: /.*/
117+
publish_release:
118+
jobs:
119+
- build:
120+
name: "Build and publish docker image"
121+
context:
122+
- componentspusher
123+
filters:
124+
branches:
125+
ignore: /.*/
126+
tags:
127+
only: /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/

.eslintrc.js

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
module.exports = {
2+
env: {
3+
es6: true,
4+
node: true,
5+
mocha: true,
6+
},
7+
extends: [
8+
'airbnb-base',
9+
],
10+
globals: {
11+
Atomics: 'readonly',
12+
SharedArrayBuffer: 'readonly',
13+
},
14+
parser: '@typescript-eslint/parser',
15+
parserOptions: {
16+
ecmaVersion: 2018,
17+
sourceType: 'module',
18+
},
19+
plugins: [
20+
'@typescript-eslint',
21+
],
22+
rules: {
23+
'linebreak-style': 0,
24+
'import/no-extraneous-dependencies': 0,
25+
'no-plusplus': 0,
26+
'no-unused-vars': 0,
27+
'no-await-in-loop': 0,
28+
'prefer-default-export': 0,
29+
'import/prefer-default-export': 0,
30+
'import/no-import-module-exports': 0,
31+
'class-methods-use-this': 1,
32+
'max-len': ['error', { code: 180 }],
33+
'no-param-reassign': 1,
34+
'no-return-assign': 1,
35+
'no-use-before-define': 0,
36+
'no-restricted-syntax': 0,
37+
'comma-dangle': 0,
38+
'object-curly-newline': 0,
39+
camelcase: 0,
40+
'import/extensions': [
41+
'error',
42+
'ignorePackages',
43+
{
44+
js: 'never',
45+
jsx: 'never',
46+
ts: 'never',
47+
tsx: 'never',
48+
},
49+
],
50+
},
51+
settings: {
52+
'import/parsers': {
53+
'@typescript-eslint/parser': ['.ts', '.tsx'],
54+
},
55+
'import/resolver': {
56+
node: {
57+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
58+
},
59+
},
60+
},
61+
};

.gitignore

Lines changed: 110 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,133 @@
11
# Logs
22
logs
33
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
49

5-
.idea
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
612

713
# Runtime data
814
pids
915
*.pid
1016
*.seed
17+
*.pid.lock
1118

1219
# Directory for instrumented libs generated by jscoverage/JSCover
1320
lib-cov
1421

1522
# Coverage directory used by tools like istanbul
1623
coverage
24+
*.lcov
1725

18-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
1930
.grunt
2031

32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
2135
# node-waf configuration
2236
.lock-wscript
2337

24-
# Compiled binary addons (http://nodejs.org/api/addons.html)
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
2539
build/Release
2640

27-
# Dependency directory
28-
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
29-
node_modules
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+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
124+
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
130+
.pnp.*
131+
132+
*.js
133+
!.eslintrc.js

.jscsrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.jshintrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
# 1.0.1 (April 07, 2023)
1+
# 1.0.0 (June 03, 2025)
22

3-
* Fix version mismatch
3+
* Initial component release
4+
* Added `Make Raw Request` Action

0 commit comments

Comments
 (0)