Skip to content

Commit c93efa0

Browse files
authored
Merge pull request #6 from solid/chat-with-me
chat with me
2 parents 7ac6e32 + 76abe35 commit c93efa0

File tree

10 files changed

+425
-16493
lines changed

10 files changed

+425
-16493
lines changed

.github/workflows/ci.yml

+45-3
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,11 @@ on:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
16-
1715
strategy:
1816
matrix:
1917
node-version: [ 10.x, 12.x, 14.x, 15.x ]
2018
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21-
2219
steps:
2320
- uses: actions/checkout@v2
2421
- name: Use Node.js ${{ matrix.node-version }}
@@ -29,3 +26,48 @@ jobs:
2926
- run: npm run lint
3027
- run: npm test
3128
- run: npm run build --if-present
29+
- name: Save build
30+
if: matrix.node-version == '14.x'
31+
uses: actions/upload-artifact@v2
32+
with:
33+
name: build
34+
path: |
35+
.
36+
!node_modules
37+
retention-days: 1
38+
39+
npm-publish-build:
40+
needs: build
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/download-artifact@v2
44+
with:
45+
name: build
46+
- uses: actions/setup-node@v1
47+
with:
48+
node-version: 14.x
49+
- uses: rlespinasse/[email protected]
50+
- name: Append commit hash to package version
51+
run: 'sed -i -E "s/(\"version\": *\"[^\"]+)/\1-${GITHUB_SHA_SHORT}/" package.json'
52+
- name: Disable pre- and post-publish actions
53+
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
54+
- uses: JS-DevTools/npm-publish@v1
55+
with:
56+
token: ${{ secrets.NPM_TOKEN }}
57+
tag: ${{ env.GITHUB_REF_SLUG }}
58+
59+
npm-publish-latest:
60+
needs: build
61+
runs-on: ubuntu-latest
62+
if: github.ref == 'refs/heads/main'
63+
steps:
64+
- uses: actions/download-artifact@v2
65+
with:
66+
name: build
67+
- uses: actions/setup-node@v1
68+
with:
69+
node-version: 14.x
70+
- uses: JS-DevTools/npm-publish@v1
71+
with:
72+
token: ${{ secrets.NPM_TOKEN }}
73+
tag: latest

.github/workflows/release.yml

-17
This file was deleted.

dev/context.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import {DataBrowserContext, LiveStore, PaneRegistry} from "pane-registry";
2-
import { store } from "solid-ui";
2+
import { store, solidLogicSingleton } from "solid-ui";
3+
import {longChatPane} from "chat-pane";
34

45
export const context: DataBrowserContext = {
56
session: {
67
store: store as LiveStore,
7-
paneRegistry: null as PaneRegistry,
8+
paneRegistry: {
9+
byName: (name: string) => {
10+
return longChatPane
11+
}
12+
} as PaneRegistry,
13+
logic: solidLogicSingleton
814
},
915
dom: document,
1016
getOutliner: () => null,

dev/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const loginButton = widgets.button(
1515
undefined,
1616
"Login",
1717
async function () {
18-
let session = await currentSession();
18+
const session = await currentSession();
1919
const popupUri = "https://solidcommunity.net/common/popup.html";
2020
if (!session) {
2121
await popupLogin({ popupUri });

0 commit comments

Comments
 (0)