lucos_search_component 0.0.2

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.
@@ -0,0 +1,14 @@
1
+ version: 2.1
2
+ orbs:
3
+ lucos: lucos/deploy@0
4
+
5
+ workflows:
6
+ version: 2
7
+ publish:
8
+ jobs:
9
+ - lucos/component-publish:
10
+ filters:
11
+ tags:
12
+ only: /^v.*/
13
+ branches:
14
+ ignore: /.*/
@@ -0,0 +1,13 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: npm
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "07:00"
8
+ open-pull-requests-limit: 10
9
+ - package-ecosystem: "github-actions"
10
+ directory: "/"
11
+ schedule:
12
+ interval: daily
13
+ time: "07:00"
@@ -0,0 +1,17 @@
1
+ name: Dependabot auto-merge
2
+ on: pull_request
3
+
4
+ permissions:
5
+ pull-requests: write
6
+ contents: write
7
+
8
+ jobs:
9
+ dependabot:
10
+ runs-on: ubuntu-latest
11
+ if: github.event.pull_request.user.login == 'dependabot[bot]'
12
+ steps:
13
+ - name: Enable auto-merge for Dependabot PRs
14
+ run: gh pr merge --auto --merge "$PR_URL"
15
+ env:
16
+ PR_URL: ${{github.event.pull_request.html_url}}
17
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -0,0 +1,71 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ main ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ main ]
20
+ schedule:
21
+ - cron: '37 16 * * *'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'javascript' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37
+ # Learn more:
38
+ # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39
+
40
+ steps:
41
+ - name: Checkout repository
42
+ uses: actions/checkout@v5
43
+
44
+ # Initializes the CodeQL tools for scanning.
45
+ - name: Initialize CodeQL
46
+ uses: github/codeql-action/init@v3
47
+ with:
48
+ languages: ${{ matrix.language }}
49
+ # If you wish to specify custom queries, you can do so here or in a config file.
50
+ # By default, queries listed here will override any specified in a config file.
51
+ # Prefix the list here with "+" to use these queries and those in the config file.
52
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
53
+
54
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55
+ # If this step fails, then you should remove it and run the build manually (see below)
56
+ - name: Autobuild
57
+ uses: github/codeql-action/autobuild@v3
58
+
59
+ # ℹ️ Command-line programs to run using the OS shell.
60
+ # 📚 https://git.io/JvXDl
61
+
62
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63
+ # and modify them (or add more) to build your code if your project
64
+ # uses a compiled language
65
+
66
+ #- run: |
67
+ # make bootstrap
68
+ # make release
69
+
70
+ - name: Perform CodeQL Analysis
71
+ uses: github/codeql-action/analyze@v3
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # lucos_search_component
2
+ Web Component for searching lucOS data
3
+
4
+ ## Technologies used
5
+ * ES Modules
6
+ * Web Components
7
+
8
+ ## Usage
9
+ Include the following in your javascript:
10
+ ```
11
+ import 'lucos_search_component';
12
+ ```
13
+
14
+ Include the following in your html:
15
+ ```
16
+ <lucos-search></lucos-search>
17
+ ```
18
+
19
+ ## Manual Testing
20
+
21
+ Expects a `.env` file in the root directory with the following environment variables:
22
+ * KEY_LUCOS_ARACHNE - an API for lucos_arachne, as set by lucos_creds
23
+
24
+ (The `.env` file can be automatically generated using the command `scp -P 2202 "creds.l42.eu:${PWD##*/}/development/.env" .`, assuming the correct credentials are in place)
25
+
26
+ Run:
27
+ ```
28
+ npm run example
29
+ ```
30
+ This uses webpack to build the javascript and then opens a html page which includes the web component
@@ -0,0 +1 @@
1
+ import '../index.js';
@@ -0,0 +1,9 @@
1
+ <html>
2
+ <head>
3
+ <title>Hello World Search Component</title>
4
+ <script src="./built.js"></script>
5
+ </head>
6
+ <body>
7
+ <lucos-search api-key="${KEY_LUCOS_ARACHNE}"></lucos-search>
8
+ </body>
9
+ </html>
@@ -0,0 +1,11 @@
1
+ import { URL } from 'url';
2
+ export default {
3
+ entry: {
4
+ example: './example/example.js',
5
+ },
6
+ output: {
7
+ filename: 'built.js',
8
+ path: new URL('.', import.meta.url).pathname,
9
+ },
10
+ mode: 'development',
11
+ };
package/index.js ADDED
@@ -0,0 +1,8 @@
1
+ class LucosSearchComponent extends HTMLElement {
2
+ constructor() {
3
+ super();
4
+ const shadow = this.attachShadow({mode: 'closed'});
5
+ console.log("Search Component initiated")
6
+ }
7
+ }
8
+ customElements.define('lucos-search', LucosSearchComponent);
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "lucos_search_component",
3
+ "version": "0.0.2",
4
+ "description": "Web Component for searching lucOS data",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "example": "source .env && KEY_LUCOS_ARACHNE=$KEY_LUCOS_ARACHNE envsubst < example/index.html > example/built.html && webpack -c example/webpack.config.js && open example/built.html"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/lucas42/lucos_search_component.git"
13
+ },
14
+ "keywords": [
15
+ "lucos",
16
+ "search"
17
+ ],
18
+ "author": "Luke Blaney",
19
+ "bugs": {
20
+ "url": "https://github.com/lucas42/lucos_search_component/issues"
21
+ },
22
+ "homepage": "https://github.com/lucas42/lucos_search_component#readme",
23
+ "devDependencies": {
24
+ "webpack-cli": "^6.0.1"
25
+ }
26
+ }