@pushwoosh/http-client 1.4.2 → 1.5.0

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,5 @@
1
+ Edge 16
2
+ Firefox 54
3
+ Chrome 58
4
+ Safari 10.1
5
+ Opera 44
package/.dockerignore ADDED
@@ -0,0 +1,2 @@
1
+ deployments/*
2
+ node_modules/*
package/.env.example ADDED
@@ -0,0 +1,3 @@
1
+ DEV_SERVER_PORT=8080
2
+ DEV_SERVER_KEY_PEM_PATH=/Users/username/.ssl/key.pem
3
+ DEV_SERVER_CERT_PEM_PATH=/Users/username/.ssl/cert.pem
package/.eslintignore ADDED
@@ -0,0 +1,3 @@
1
+ ./dist/**
2
+ ./node_modules/**
3
+ ./static/**
package/.eslintrc ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "extends": [
3
+ "airbnb/base",
4
+ "airbnb-typescript/base",
5
+ "plugin:compat/recommended"
6
+ ],
7
+ "parserOptions": {
8
+ "project": "./tsconfig.eslint.json"
9
+ },
10
+ "env": {
11
+ "browser": true
12
+ },
13
+ "overrides": [
14
+ {
15
+ "files": [
16
+ "./**/*.js"
17
+ ],
18
+ "rules": {
19
+ "@typescript-eslint/explicit-function-return-type": "off"
20
+ }
21
+ },
22
+ {
23
+ "files": [
24
+ "./*.config.js"
25
+ ],
26
+ "rules": {
27
+ "import/no-extraneous-dependencies": "off"
28
+ }
29
+ }
30
+ ],
31
+ "rules": {
32
+ "import/no-default-export": "error",
33
+ "import/prefer-default-export": "off",
34
+ "max-classes-per-file": "off",
35
+ "max-len": "off",
36
+ "@typescript-eslint/explicit-function-return-type": "error"
37
+ }
38
+ }
package/.gitlab-ci.yml ADDED
@@ -0,0 +1,122 @@
1
+ image: node:16.13.2
2
+
3
+ variables:
4
+ # Путь по которому будет доступно содержимое сборки на cdn.
5
+ DELIVERY_PATH: "/frontend/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/"
6
+ # Адрес по которому будет доступно содержимое по сети.
7
+ DELIVERY_URL: "https://cdn.pushwoosh${DELIVERY_PATH}"
8
+
9
+ PACKAGE_NAME: "${COMPANY_NAMESPACE}/${CI_PROJECT_NAME}"
10
+ PACKAGE_PATH: "${DELIVERY_URL}index.js"
11
+
12
+ stages:
13
+ - install
14
+ - check
15
+ - build
16
+ - release
17
+ - deploy
18
+
19
+ install:
20
+ stage: install
21
+ script:
22
+ - npm ci
23
+ artifacts:
24
+ expire_in: 1 hour
25
+ paths:
26
+ - node_modules/
27
+
28
+ check:lint:
29
+ stage: check
30
+ dependencies:
31
+ - install
32
+ script:
33
+ - npm run check:lint
34
+
35
+ check:tests:
36
+ stage: check
37
+ dependencies:
38
+ - install
39
+ script:
40
+ - npm run check:tests
41
+
42
+ check:types:
43
+ stage: check
44
+ dependencies:
45
+ - install
46
+ script:
47
+ - npm run check:types
48
+
49
+ build:
50
+ stage: build
51
+ dependencies:
52
+ - install
53
+ script:
54
+ - npm run build
55
+ artifacts:
56
+ expire_in: 1 hour
57
+ paths:
58
+ - dist/
59
+ only:
60
+ - tags
61
+ except:
62
+ - branches
63
+
64
+ release:npm:
65
+ stage: release
66
+ dependencies:
67
+ - build
68
+ script:
69
+ - npm --no-git-tag-version --allow-same-version version $CI_COMMIT_TAG
70
+ - npm publish
71
+ only:
72
+ - tags
73
+ except:
74
+ - branches
75
+ allow_failure: false
76
+
77
+ release:cdn:
78
+ stage: release
79
+ image: registry-auth.corp.pushwoosh.com/docker/s3tool:master
80
+ dependencies:
81
+ - build
82
+ script:
83
+ - cd dist/
84
+ - >
85
+ s3cmd
86
+ --access_key=${S3_ACCESS_KEY}
87
+ --secret_key=${S3_SECRET_KEY}
88
+ --no-ssl
89
+ --recursive
90
+ --host=http://r1-nas-02.r1h.nue:7480
91
+ --host-bucket=ceph-s3.pushwoosh.local
92
+ --no-mime-magic
93
+ put --acl-public * s3://cdn${DELIVERY_PATH}
94
+ when: manual
95
+ only:
96
+ - tags
97
+ tags:
98
+ - k8s
99
+ - nue
100
+ except:
101
+ - branches
102
+ allow_failure: false
103
+
104
+ deploy:
105
+ stage: deploy
106
+ dependencies:
107
+ - release:cdn
108
+ script:
109
+ - >
110
+ curl --location --request POST 'https://frontend-release-manager.pushwoosh.com/release' \
111
+ --header 'Content-Type: application/json' \
112
+ --data-raw '{
113
+ "access_token": "${ACCESS_TOKEN}",
114
+ "package_name": "${PACKAGE_NAME}",
115
+ "package_path": "${PACKAGE_PATH}"
116
+ }'
117
+ when: manual
118
+ only:
119
+ - tags
120
+ except:
121
+ - branches
122
+ allow_failure: false