@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/package.json CHANGED
@@ -1,42 +1,56 @@
1
1
  {
2
2
  "name": "@wg-npm/survey-service-api",
3
- "version": "0.1.272",
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
- "dev": "rollup -c --watch --environment INCLUDE_DEPS,BUILD:production",
9
- "build": "rollup -c --environment INCLUDE_DEPS,BUILD:production"
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": "^0.1.0",
13
- "axios": "^0.19.0",
14
- "vue": "^2.5.2"
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/core": "^7.6.2",
18
- "@wg-npm/survey-core": "^0.1.272",
19
- "axios": "^0.19.0",
20
- "axios-case-converter": "^0.3.0",
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
- "rollup": "^1.19.4",
24
- "rollup-plugin-babel": "^4.3.3",
25
- "rollup-plugin-buble": "^0.19.8",
26
- "rollup-plugin-commonjs": "^10.0.2",
27
- "rollup-plugin-dts": "^1.1.6",
28
- "rollup-plugin-node-resolve": "^5.2.0",
29
- "rollup-plugin-replace": "^2.2.0",
30
- "rollup-plugin-terser": "^5.1.1",
31
- "rollup-plugin-typescript": "^1.0.1",
32
- "tslib": "^1.10.0",
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.common.js",
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": "c61e91cd95628e67ba9f8813b7bf0761f506e29c",
51
- "dependencies": {
52
- "@babel/runtime": "^7.6.2",
53
- "acorn": "^6.3.0",
54
- "qs": "^6.9.0"
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
- 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
- })
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 "./survey-service"
3
- import {AsyncSurveyServiceImpl, BlockingSurveyServiceImpl} from "./survey-service-impl"
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
- static install(Vue: typeof _Vue, options: SurveyServiceOptions) {
14
- const asyncSurveyService = new AsyncSurveyServiceImpl(options)
15
- const blockingSurveyService = new BlockingSurveyServiceImpl(asyncSurveyService)
16
- Vue.prototype.$surveyService = asyncSurveyService
17
- Vue.prototype.$asyncSurveyService = asyncSurveyService
18
- Vue.prototype.$blockingSurveyService = blockingSurveyService
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
+ }