Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
refactor: updating to latest ARC standards
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Psztyc <jarrodek@gmail.com>
  • Loading branch information
jarrodek committed Aug 5, 2021
1 parent df31211 commit 3dd7b24
Show file tree
Hide file tree
Showing 21 changed files with 2,393 additions and 4,836 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintrc.js

This file was deleted.

39 changes: 15 additions & 24 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,14 @@ env:
FORCE_COLOR: 1
on:
push:
branches:
- master
- main
- develop
- stage
pull_request:
branches:
- master
- main
- stage
jobs:
test_linux:
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
# os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
name: Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
Expand All @@ -34,10 +23,10 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm test
test_win:
name: "Windows"
runs-on: windows-latest
Expand All @@ -53,10 +42,10 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm test
tag:
name: "Publishing release"
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
Expand All @@ -79,7 +68,9 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Read version from package.json
uses: culshaw/read-package-node-version-actions@v1
id: package-node-version
Expand All @@ -98,6 +89,6 @@ jobs:
${{ steps.Changelog.outputs.changelog }}
draft: false
prerelease: false
- run: npm publish --access public
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"hasextension"
]
}
63 changes: 0 additions & 63 deletions CHANGELOG.md

This file was deleted.

74 changes: 0 additions & 74 deletions CONTRIBUTING.md

This file was deleted.

123 changes: 2 additions & 121 deletions api-console-ext-comm.d.ts
Original file line number Diff line number Diff line change
@@ -1,126 +1,7 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/tools/tree/master/packages/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* api-console-ext-comm.js
*/


// tslint:disable:variable-name Describing an API that's defined elsewhere.
// tslint:disable:no-any describes the API as best we are able today

import {LitElement} from 'lit-element';

declare namespace ApiElements {

/**
* `<api-console-ext-comm>` is an element that support communication with
* the api-console-extension.
*
* If the extension is installed then it will intercept the `api-request`
* and cancel it.
*
* Data from the event are passed to the extension and the request is to
* be executed from within the extension.
*/
class ApiConsoleExtComm extends LitElement {

/**
* If true then the API console extension has been detected.
*/
readonly hasExtension: boolean|null|undefined;
_hasExtension: any;

/**
* An event handler for the API console events (request, abort,
* token request etc). By default it uses body but it should be
* the console if possible or the request panel.
*/
eventTarget: object|null|undefined;

/**
* List of active requests sent to the extension.
* The key is request ID (generated by the console) and the value
* is the request data.
*/
_activeRequests: object|null|undefined;
constructor();
connectedCallback(): void;
disconnectedCallback(): void;
createRenderRoot(): any;

/**
* Posts message on a window object to request an event from the
* extension if it is installed.
*/
_notifyExtension(): void;

/**
* Handler for event target change. Removes listener from old
* hasndelr and sets up API console event listeners on the node.
*
* @param et New event target
*/
_eventTargetChanged(et: Node|null, old: Node|null): void;

/**
* Sets up API console event listeners on the target node.
*
* @param node Target for the events
*/
_observerConsoleEvents(node: Node|null): void;

/**
* Removes API console event listeners from the target node.
*
* @param node Target for the events
*/
_unobserverConsoleEvents(node: Node|null): void;

/**
* A handler for the message event dispatched on window object.
* This is used in communication with an extension.
*/
_messsageHandler(e: MessageEvent|null): void;

/**
* A handler for API console request event
*/
_requestHandler(e: CustomEvent|null): void;

/**
* A handler for API console abort request handler.
*/
_abortHandler(e: CustomEvent|null): void;

/**
* A handler for API console OAuth2 toekn request handler.
*/
_oauthTokenHandler(e: CustomEvent|null): void;

/**
* Called when the api-console-extension is detected.
*/
_extensionDetected(): void;

/**
* A handler for the response notified by the extension.
*/
_responseReady(data: object|null): void;

/**
* Handler for OAuth token response.
*/
_oauthTokenReady(data: object|null): void;
}
}
import ApiConsoleExtComm from './src/ApiConsoleExtCommElement.js';

declare global {

interface HTMLElementTagNameMap {
"api-console-ext-comm": ApiElements.ApiConsoleExtComm;
"api-console-ext-comm": ApiConsoleExtComm;
}
}
Loading

0 comments on commit 3dd7b24

Please sign in to comment.