Skip to content

Commit 6a54f00

Browse files
authored
Merge pull request #55 from WideChat/master_catchup_1.34.0
Master catchup 1.34.0
2 parents cda2a91 + ebcf95c commit 6a54f00

820 files changed

Lines changed: 24405 additions & 10891 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 0 additions & 146 deletions
This file was deleted.
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
name: Build and Test
2+
3+
on:
4+
release:
5+
types: [published]
6+
pull_request:
7+
push:
8+
branches:
9+
- "alpha"
10+
11+
jobs:
12+
prepare:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Github Info
17+
run: |
18+
echo "GITHUB_ACTION: $GITHUB_ACTION"
19+
echo "GITHUB_ACTOR: $GITHUB_ACTOR"
20+
echo "GITHUB_REF: $GITHUB_REF"
21+
echo "GITHUB_HEAD_REF: $GITHUB_HEAD_REF"
22+
echo "GITHUB_BASE_REF: $GITHUB_BASE_REF"
23+
echo "github.event_name: ${{ github.event_name }}"
24+
cat $GITHUB_EVENT_PATH
25+
26+
- name: Use Node.js 14.19.3
27+
uses: actions/setup-node@v2
28+
with:
29+
node-version: "14.19.3"
30+
31+
- uses: actions/checkout@v2
32+
33+
- name: Versions
34+
run: |
35+
npm --versions
36+
node -v
37+
git version
38+
39+
- name: check package-lock
40+
run: |
41+
npx package-lock-check
42+
43+
- name: Cache node modules
44+
id: cache-nodemodules
45+
uses: actions/cache@v2
46+
with:
47+
path: ./node_modules
48+
key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('./package-lock.json', '.github/workflows/build_and_test.yml') }}
49+
50+
- name: npm install
51+
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
52+
run: npm install
53+
54+
- name: Prepare workspace
55+
run: |
56+
tar czf /tmp/workspace.tar.gz .
57+
58+
- uses: actions/upload-artifact@v2
59+
with:
60+
name: workspace
61+
path: /tmp/workspace.tar.gz
62+
63+
lint:
64+
runs-on: ubuntu-latest
65+
needs: prepare
66+
67+
steps:
68+
- name: Use Node.js 14.19.3
69+
uses: actions/setup-node@v2
70+
with:
71+
node-version: "14.19.3"
72+
73+
- uses: actions/download-artifact@v2
74+
with:
75+
name: workspace
76+
path: /tmp
77+
78+
- name: Decompress workspace
79+
run: |
80+
tar xzf /tmp/workspace.tar.gz .
81+
82+
- name: Lint TypeScript Code
83+
run: npm run lint
84+
85+
test:
86+
runs-on: ubuntu-latest
87+
needs: prepare
88+
89+
steps:
90+
- name: Use Node.js 14.19.3
91+
uses: actions/setup-node@v2
92+
with:
93+
node-version: "14.19.3"
94+
95+
- uses: actions/download-artifact@v2
96+
with:
97+
name: workspace
98+
path: /tmp
99+
100+
- name: Decompress workspace
101+
run: |
102+
tar xzf /tmp/workspace.tar.gz .
103+
104+
- name: Test TypeScript Code
105+
run: npm run unit-tests
106+
107+
build:
108+
runs-on: ubuntu-latest
109+
needs:
110+
- lint
111+
- test
112+
113+
steps:
114+
- name: Use Node.js 14.19.3
115+
uses: actions/setup-node@v2
116+
with:
117+
node-version: "14.19.3"
118+
119+
- uses: actions/download-artifact@v2
120+
with:
121+
name: workspace
122+
path: /tmp
123+
124+
- name: Decompress workspace
125+
run: |
126+
tar xzf /tmp/workspace.tar.gz .
127+
128+
- name: Compile TypeScript into JavaScript
129+
run: npm run compile
130+
131+
- name: Prepare workspace
132+
run: |
133+
tar czf /tmp/workspace.tar.gz .
134+
135+
- uses: actions/upload-artifact@v2
136+
with:
137+
name: workspace
138+
path: /tmp/workspace.tar.gz
139+
140+
publish:
141+
runs-on: ubuntu-latest
142+
if: github.event_name == 'release' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta'
143+
needs: build
144+
145+
steps:
146+
- name: Use Node.js 14.19.3
147+
uses: actions/setup-node@v2
148+
with:
149+
node-version: "14.19.3"
150+
151+
- uses: actions/download-artifact@v2
152+
with:
153+
name: workspace
154+
path: /tmp
155+
156+
- name: Decompress workspace
157+
run: |
158+
tar xzf /tmp/workspace.tar.gz .
159+
160+
- name: Authenticate with registry
161+
env:
162+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
163+
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
164+
165+
- name: Publish package
166+
run: |
167+
if [[ '${{ github.event_name }}' = 'release' ]]; then
168+
npm publish --tag latest
169+
else
170+
ls -la
171+
# Add build number to the end of the version
172+
npm version "$(node -p "require('./package.json').version").${{ github.run_number }}" --no-git-tag-version
173+
174+
GIT_BRANCH="${GITHUB_REF#*heads/}"
175+
if [[ $GIT_BRANCH == 'alpha' ]]; then
176+
npm run go-publish-alpha
177+
else
178+
npm run go-publish-beta
179+
fi;
180+
fi;
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: "Code scanning - action"
2+
3+
on:
4+
push:
5+
branches: [master, alpha]
6+
pull_request:
7+
branches: [master, alpha]
8+
# schedule:
9+
# ┌───────────── minute (0 - 59)
10+
# │ ┌───────────── hour (0 - 23)
11+
# │ │ ┌───────────── day of the month (1 - 31)
12+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
13+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
14+
# │ │ │ │ │
15+
# │ │ │ │ │
16+
# │ │ │ │ │
17+
# * * * * *
18+
# - cron: '30 1 * * 0'
19+
20+
jobs:
21+
CodeQL-Build:
22+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
23+
runs-on: ubuntu-latest
24+
25+
permissions:
26+
# required for all workflows
27+
security-events: write
28+
29+
# only required for workflows in private repositories
30+
# actions: read
31+
# contents: read
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v3
36+
37+
# Initializes the CodeQL tools for scanning.
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@v2
40+
# Override language selection by uncommenting this and choosing your languages
41+
# with:
42+
# languages: go, javascript, csharp, python, cpp, java
43+
44+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
45+
# If this step fails, then you should remove it and run the build manually (see below).
46+
- name: Autobuild
47+
uses: github/codeql-action/autobuild@v2
48+
49+
# ℹ️ Command-line programs to run using the OS shell.
50+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
51+
52+
# ✏️ If the Autobuild fails above, remove it and uncomment the following
53+
# three lines and modify them (or add more) to build your code if your
54+
# project uses a compiled language
55+
56+
#- run: |
57+
# make bootstrap
58+
# make release
59+
60+
- name: Perform CodeQL Analysis
61+
uses: github/codeql-action/analyze@v2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Thoughts While Working (for docs)
22
- Apps which don't provide a valid uuid4 id will be assigned one, but this is not recommended and your App should provide an id
33
- The language strings are only done on the clients (`TAPi18next.addResourceBundle(lang, projectName, translations);`)
4-
- The implementer of this should restrict the server setting access and environmental variables. Idea is to allow the implementer to have a default set of restricted ones while letting the admin/owner of the server to restrict it even further or lift the restriction on some more. Simple interface with settings and checkbox to allow/disallow them. :thinking:
4+
- The implementer of this should restrict the server setting access and environmental variables. Idea is to allow the implementer to have a default set of restricted ones while letting the admin/owner of the server to restrict it even further or lift the restriction on some more. Simple interface with settings and checkbox to allow/disallow them. :thinking:
55

66
## What does the Apps-Engine enable you to do?
77
The Apps-Engine is Rocket.Chat's _plugin framework_ - it provides the APIs for Rocket.Chat Apps to interact with the host system.

0 commit comments

Comments
 (0)