Skip to content

Commit ea43329

Browse files
committed
Merge branch 'develop'
2 parents 782eabc + 6a69781 commit ea43329

File tree

16 files changed

+239
-19392
lines changed

16 files changed

+239
-19392
lines changed

.github/workflows/deploy.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: filestack-js
2+
on:
3+
create:
4+
tags:
5+
- v*
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
# - uses: voxmedia/github-action-slack-notify-build@v1
11+
# with:
12+
# channel: team-charlie
13+
# status: STARTED
14+
# color: good
15+
# env:
16+
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
17+
- uses: actions/checkout@v2
18+
- name: Setup repository env
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: '14.x'
22+
registry-url: "https://registry.npmjs.org"
23+
- name: Install deps
24+
run: npm install
25+
- name: Run tests
26+
run: npm test
27+
- name: Update code cov report
28+
run: npm run test:codecov
29+
- name: Prepare docs
30+
run: npm run docs
31+
- name: Publish package to cdn
32+
run: npm run publish:s3
33+
env:
34+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
35+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
36+
AWS_REGION: ${{ secrets.AWS_REGION }}
37+
- name: Publush to NPM (only on tag)
38+
run: npm publish --access public
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
- name: Deploy docs
42+
uses: crazy-max/ghaction-github-pages@v2
43+
with:
44+
target_branch: gh-pages
45+
build_dir: build/docs
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
# - name: Notify slack success
49+
# if: success()
50+
# env:
51+
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
52+
# uses: voxmedia/github-action-slack-notify-build@v1
53+
# with:
54+
# channel: team-charlie
55+
# status: SUCCESS
56+
# color: good
57+
# - name: Notify slack fail
58+
# if: failure()
59+
# env:
60+
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
61+
# uses: voxmedia/github-action-slack-notify-build@v1
62+
# with:
63+
# channel: team-charlie
64+
# status: FAILED
65+
# color: danger

.github/workflows/deploy_beta.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: filestack-js
2+
on:
3+
create:
4+
tags:
5+
- v*
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Setup repository env
12+
uses: actions/setup-node@v1
13+
with:
14+
node-version: '14.x'
15+
registry-url: "https://registry.npmjs.org"
16+
- name: Install deps
17+
run: npm install
18+
- name: Run tests
19+
run: npm test
20+
- name: Prepare docs
21+
run: npm run docs
22+
- name: Publish package to cdn - beta version
23+
run: npm run publish:s3:beta
24+
env:
25+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
26+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
27+
AWS_REGION: ${{ secrets.AWS_REGION }}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<a href="https://static.filestackapi.com/filestack-js/3.x.x/filestack.min.js"><img src="https://img.badgesize.io/https://static.filestackapi.com/filestack-js/3.x.x/filestack.min.js?color=green" /></a>
2020
<img src="https://img.shields.io/badge/module%20formats-umd%2C%20esm%2C%20cjs-green.svg" />
2121
<br/>
22-
<img src="https://badges.herokuapp.com/browsers?labels=none&googlechrome=latest&firefox=latest&microsoftedge=latest&iexplore=11&safari=latest&iphone=latest" />
22+
<img src="https://badges.herokuapp.com/browsers?labels=none&googlechrome=latest&firefox=latest&microsoftedge=latest&edge=latest&safari=latest&iphone=latest" />
2323
</p>
2424
<hr/>
2525

@@ -174,6 +174,7 @@ Please see our examples above to learn more about customizing the picker for you
174174
## Polyfills
175175

176176
If you target IE11 or iOS before 8.0 you will need to add additional polyfills to your page or application.
177+
(We are no longer support IE11 and older browser, so it can stop working on this browser)
177178

178179
Polyfills we recommend:**
179180

manual_tests/request.ts

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,30 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
const nock = require('nock');
18+
// const nock = require('nock');
1919
import { FsRequest } from './../src/lib/request/index';
20-
import { FsCancelToken } from './../src/lib/request/token';
20+
// import { FsCancelToken } from './../src/lib/request/token';
2121

22-
nock('http://www.filestacktest.com')
23-
.get('/123')
24-
.once()
25-
// .delay(1000)
26-
.reply(404, '<html></html>', { 'content-type': 'text/plain' })
27-
.get('/123')
28-
.reply(200, '<html></html>', { 'content-type': 'text/plain' });
22+
// nock('http://www.filestacktest.com')
23+
// .get('/123')
24+
// .once()
25+
// // .delay(1000)
26+
// .reply(404, '<html></html>', { 'content-type': 'text/plain' })
27+
// .get('/123')
28+
// .reply(200, '<html></html>', { 'content-type': 'text/plain' });
2929

30-
const token = new FsCancelToken();
30+
// const token = new FsCancelToken();
3131

3232
// setTimeout(() => {
3333
// token.cancel();
3434
// }, 1000);
3535

36-
FsRequest.get('http://www.filestacktest.com/123', {
37-
cancelToken: token,
38-
timeout: 500,
39-
retry: {
40-
retry: 2,
41-
retryFactor: 2,
42-
retryMaxTime: 1500,
43-
},
36+
FsRequest.get('https://cdn.filestackcontent.com/llIbWqvRX25JPxCBqkoV', {
37+
// cancelToken: token,
38+
// timeout: 500,
4439
}).then((resp) => {
45-
console.log('Response:', resp);
40+
console.log('Response:', resp.data);
41+
console.log(resp.data.file.length);
4642
}).catch((e) => {
4743
console.error('Catch Errror', e);
4844
});

0 commit comments

Comments
 (0)