@wg-npm/survey-service-api 0.1.272 → 0.2.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.
- package/dist/survey-service-api.esm.js +174 -2768
- package/package.json +52 -31
- package/src/axios.ts +8 -8
- package/src/index.ts +10 -17
- package/src/survey-service-impl.ts +199 -307
- package/src/survey-service.ts +44 -78
- package/types/index.d.ts +13 -17
- package/types/vue.d.ts +11 -11
- package/dist/survey-service-api.common.js +0 -2774
- package/dist/survey-service-api.esm.browser.js +0 -2817
- package/dist/survey-service-api.esm.browser.min.js +0 -16
- package/dist/survey-service-api.js +0 -2778
- package/dist/survey-service-api.min.js +0 -16
- package/src/index.d.ts +0 -6
- package/src/index.js +0 -15
- package/src/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,42 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wg-npm/survey-service-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dts": "rollup -c rollup.dts.js --environment INCLUDE_DEPS,BUILD:production",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
8
|
+
"build": "rollup -c --environment INCLUDE_DEPS,BUILD:production",
|
|
9
|
+
"watch": "rollup -c --watch.include \"src/**\" --environment INCLUDE_DEPS,BUILD:production",
|
|
10
|
+
"lint": "eslint \"**/*.ts\" \"**/*.vue\" --no-error-on-unmatched-pattern",
|
|
11
|
+
"lint-fix": "eslint \"**/*.ts\" \"**/*.vue\" --fix --no-error-on-unmatched-pattern"
|
|
10
12
|
},
|
|
11
13
|
"peerDependencies": {
|
|
12
|
-
"@wg-npm/survey-core": "
|
|
13
|
-
"axios": "^0.19.
|
|
14
|
-
"
|
|
14
|
+
"@wg-npm/survey-core": "0.2.0",
|
|
15
|
+
"axios": "^0.19.2",
|
|
16
|
+
"axios-case-converter": "^0.6.0",
|
|
17
|
+
"qs": "^6.9.4",
|
|
18
|
+
"vue": "^2.6.11"
|
|
15
19
|
},
|
|
16
20
|
"devDependencies": {
|
|
17
|
-
"@babel/
|
|
18
|
-
"@
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
+
"@babel/code-frame": "^7.10.4",
|
|
22
|
+
"@babel/core": "^7.10.4",
|
|
23
|
+
"@babel/runtime": "^7.10.4",
|
|
24
|
+
"@rollup/plugin-buble": "^0.21.3",
|
|
25
|
+
"@rollup/plugin-commonjs": "^13.0.0",
|
|
26
|
+
"@rollup/plugin-node-resolve": "^8.1.0",
|
|
27
|
+
"@rollup/plugin-replace": "^2.3.3",
|
|
28
|
+
"@types/qs": "^6.9.3",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "^3.6.0",
|
|
30
|
+
"@typescript-eslint/parser": "^3.6.0",
|
|
31
|
+
"@vue/eslint-config-prettier": "^6.0.0",
|
|
32
|
+
"@vue/eslint-config-typescript": "^5.0.2",
|
|
33
|
+
"@wg-npm/survey-core": "^0.2.0",
|
|
34
|
+
"acorn": "^7.3.1",
|
|
35
|
+
"axios": "^0.19.2",
|
|
36
|
+
"axios-case-converter": "^0.6.0",
|
|
21
37
|
"es6-promise": "^4.2.8",
|
|
38
|
+
"eslint": "^7.4.0",
|
|
39
|
+
"eslint-plugin-prettier": "^3.1.4",
|
|
40
|
+
"eslint-plugin-vue": "^6.2.2",
|
|
22
41
|
"lodash": "^4.17.15",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"rollup
|
|
26
|
-
"rollup-plugin-
|
|
27
|
-
"rollup-plugin-dts": "^1.
|
|
28
|
-
"rollup-plugin-
|
|
29
|
-
"rollup-plugin-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"typescript": "^3.5.3",
|
|
34
|
-
"vue": "^2.6.10"
|
|
42
|
+
"prettier": "^2.0.5",
|
|
43
|
+
"qs": "^6.9.4",
|
|
44
|
+
"rollup": "^2.20.0",
|
|
45
|
+
"rollup-plugin-babel": "^4.4.0",
|
|
46
|
+
"rollup-plugin-dts": "^1.4.7",
|
|
47
|
+
"rollup-plugin-terser": "^6.1.0",
|
|
48
|
+
"rollup-plugin-typescript2": "^0.27.1",
|
|
49
|
+
"tslib": "^2.0.0",
|
|
50
|
+
"typescript": "^3.9.6",
|
|
51
|
+
"vue": "^2.6.11"
|
|
35
52
|
},
|
|
36
|
-
"main": "dist/survey-service-api.
|
|
37
|
-
"module": "dist/survey-service-api.esm.js",
|
|
38
|
-
"unpkg": "dist/survey-service-api.js",
|
|
39
|
-
"jsdelivr": "dist/survey-service-api.js",
|
|
53
|
+
"main": "dist/survey-service-api.esm.js",
|
|
40
54
|
"sideEffects": false,
|
|
41
55
|
"typings": "types/index.d.ts",
|
|
42
56
|
"files": [
|
|
@@ -47,10 +61,17 @@
|
|
|
47
61
|
"publishConfig": {
|
|
48
62
|
"access": "public"
|
|
49
63
|
},
|
|
50
|
-
"gitHead": "
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
"gitHead": "577c7fabd6df149e573991c6dddbe7ac1fd7eedd",
|
|
65
|
+
"rollup": {
|
|
66
|
+
"external": [
|
|
67
|
+
"axios",
|
|
68
|
+
"vue",
|
|
69
|
+
"qs",
|
|
70
|
+
"axios-case-converter",
|
|
71
|
+
"@wg-npm/survey-core"
|
|
72
|
+
],
|
|
73
|
+
"output": {
|
|
74
|
+
"name": "SurveyServiceApiPlugin"
|
|
75
|
+
}
|
|
55
76
|
}
|
|
56
77
|
}
|
package/src/axios.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Axios, {AxiosInstance} from 'axios'
|
|
2
|
-
import Qs from 'qs'
|
|
1
|
+
import Axios, { AxiosInstance } from 'axios';
|
|
2
|
+
import Qs from 'qs';
|
|
3
3
|
|
|
4
4
|
export function createHttpFunction(baseUrl: string, version: string): AxiosInstance {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
const baseURL = `${baseUrl}/${version}`;
|
|
6
|
+
return Axios.create({
|
|
7
|
+
baseURL: baseURL,
|
|
8
|
+
headers: { Pragma: 'no-cache' },
|
|
9
|
+
paramsSerializer: params => Qs.stringify(params, { arrayFormat: 'repeat' }),
|
|
10
|
+
});
|
|
11
11
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import _Vue from 'vue'
|
|
2
|
-
import {SurveyServiceOptions} from
|
|
3
|
-
import {
|
|
1
|
+
import _Vue from 'vue';
|
|
2
|
+
import { SurveyServiceOptions } from './survey-service';
|
|
3
|
+
import { SurveyServiceImpl } from './survey-service-impl';
|
|
4
4
|
|
|
5
|
-
export * from './survey-service'
|
|
6
|
-
|
|
7
|
-
//todo install options
|
|
8
|
-
// export class SurveyServiceApiOptions implements SurveyServiceOptions{
|
|
9
|
-
//
|
|
10
|
-
// }
|
|
5
|
+
export * from './survey-service';
|
|
11
6
|
|
|
12
7
|
export default class SurveyServiceApiPlugin {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
}
|
|
8
|
+
static install(Vue: typeof _Vue, options: SurveyServiceOptions) {
|
|
9
|
+
const surveyService = new SurveyServiceImpl(options);
|
|
10
|
+
Vue.$surveyService = surveyService;
|
|
11
|
+
Vue.prototype.$surveyService = surveyService;
|
|
12
|
+
}
|
|
13
|
+
}
|