@pixwel/pixwel-sdk 2.1.36 → 2.1.37

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.
@@ -1,8 +1,304 @@
1
1
  "use strict";
2
2
 
3
- var extname = require("path").extname;
3
+ var cov_6vz0wl3fa = function () {
4
+ var path = "/home/ec2-user/platform/pixwel-sdk/src/fileType.js",
5
+ hash = "479746e24a1bf0d4facba1d1ae2f30519ce932b2",
6
+ Function = function () {}.constructor,
7
+ global = new Function('return this')(),
8
+ gcv = "__coverage__",
9
+ coverageData = {
10
+ path: "/home/ec2-user/platform/pixwel-sdk/src/fileType.js",
11
+ statementMap: {
12
+ "0": {
13
+ start: {
14
+ line: 1,
15
+ column: 16
16
+ },
17
+ end: {
18
+ line: 1,
19
+ column: 39
20
+ }
21
+ },
22
+ "1": {
23
+ start: {
24
+ line: 3,
25
+ column: 14
26
+ },
27
+ end: {
28
+ line: 13,
29
+ column: 1
30
+ }
31
+ },
32
+ "2": {
33
+ start: {
34
+ line: 16,
35
+ column: 1
36
+ },
37
+ end: {
38
+ line: 20,
39
+ column: 2
40
+ }
41
+ },
42
+ "3": {
43
+ start: {
44
+ line: 17,
45
+ column: 2
46
+ },
47
+ end: {
48
+ line: 19,
49
+ column: 3
50
+ }
51
+ },
52
+ "4": {
53
+ start: {
54
+ line: 18,
55
+ column: 3
56
+ },
57
+ end: {
58
+ line: 18,
59
+ column: 15
60
+ }
61
+ },
62
+ "5": {
63
+ start: {
64
+ line: 24,
65
+ column: 1
66
+ },
67
+ end: {
68
+ line: 24,
69
+ column: 63
70
+ }
71
+ },
72
+ "6": {
73
+ start: {
74
+ line: 28,
75
+ column: 12
76
+ },
77
+ end: {
78
+ line: 28,
79
+ column: 42
80
+ }
81
+ },
82
+ "7": {
83
+ start: {
84
+ line: 30,
85
+ column: 1
86
+ },
87
+ end: {
88
+ line: 32,
89
+ column: 2
90
+ }
91
+ },
92
+ "8": {
93
+ start: {
94
+ line: 31,
95
+ column: 2
96
+ },
97
+ end: {
98
+ line: 31,
99
+ column: 14
100
+ }
101
+ },
102
+ "9": {
103
+ start: {
104
+ line: 34,
105
+ column: 1
106
+ },
107
+ end: {
108
+ line: 34,
109
+ column: 53
110
+ }
111
+ },
112
+ "10": {
113
+ start: {
114
+ line: 37,
115
+ column: 0
116
+ },
117
+ end: {
118
+ line: 41,
119
+ column: 2
120
+ }
121
+ }
122
+ },
123
+ fnMap: {
124
+ "0": {
125
+ name: "extensionType",
126
+ decl: {
127
+ start: {
128
+ line: 15,
129
+ column: 9
130
+ },
131
+ end: {
132
+ line: 15,
133
+ column: 22
134
+ }
135
+ },
136
+ loc: {
137
+ start: {
138
+ line: 15,
139
+ column: 34
140
+ },
141
+ end: {
142
+ line: 21,
143
+ column: 1
144
+ }
145
+ },
146
+ line: 15
147
+ },
148
+ "1": {
149
+ name: "extension",
150
+ decl: {
151
+ start: {
152
+ line: 23,
153
+ column: 9
154
+ },
155
+ end: {
156
+ line: 23,
157
+ column: 18
158
+ }
159
+ },
160
+ loc: {
161
+ start: {
162
+ line: 23,
163
+ column: 25
164
+ },
165
+ end: {
166
+ line: 25,
167
+ column: 1
168
+ }
169
+ },
170
+ line: 23
171
+ },
172
+ "2": {
173
+ name: "mediaType",
174
+ decl: {
175
+ start: {
176
+ line: 27,
177
+ column: 9
178
+ },
179
+ end: {
180
+ line: 27,
181
+ column: 18
182
+ }
183
+ },
184
+ loc: {
185
+ start: {
186
+ line: 27,
187
+ column: 25
188
+ },
189
+ end: {
190
+ line: 35,
191
+ column: 1
192
+ }
193
+ },
194
+ line: 27
195
+ }
196
+ },
197
+ branchMap: {
198
+ "0": {
199
+ loc: {
200
+ start: {
201
+ line: 17,
202
+ column: 2
203
+ },
204
+ end: {
205
+ line: 19,
206
+ column: 3
207
+ }
208
+ },
209
+ type: "if",
210
+ locations: [{
211
+ start: {
212
+ line: 17,
213
+ column: 2
214
+ },
215
+ end: {
216
+ line: 19,
217
+ column: 3
218
+ }
219
+ }, {
220
+ start: {
221
+ line: 17,
222
+ column: 2
223
+ },
224
+ end: {
225
+ line: 19,
226
+ column: 3
227
+ }
228
+ }],
229
+ line: 17
230
+ },
231
+ "1": {
232
+ loc: {
233
+ start: {
234
+ line: 30,
235
+ column: 1
236
+ },
237
+ end: {
238
+ line: 32,
239
+ column: 2
240
+ }
241
+ },
242
+ type: "if",
243
+ locations: [{
244
+ start: {
245
+ line: 30,
246
+ column: 1
247
+ },
248
+ end: {
249
+ line: 32,
250
+ column: 2
251
+ }
252
+ }, {
253
+ start: {
254
+ line: 30,
255
+ column: 1
256
+ },
257
+ end: {
258
+ line: 32,
259
+ column: 2
260
+ }
261
+ }],
262
+ line: 30
263
+ }
264
+ },
265
+ s: {
266
+ "0": 0,
267
+ "1": 0,
268
+ "2": 0,
269
+ "3": 0,
270
+ "4": 0,
271
+ "5": 0,
272
+ "6": 0,
273
+ "7": 0,
274
+ "8": 0,
275
+ "9": 0,
276
+ "10": 0
277
+ },
278
+ f: {
279
+ "0": 0,
280
+ "1": 0,
281
+ "2": 0
282
+ },
283
+ b: {
284
+ "0": [0, 0],
285
+ "1": [0, 0]
286
+ },
287
+ _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"
288
+ },
289
+ coverage = global[gcv] || (global[gcv] = {});
4
290
 
5
- var TYPES = {
291
+ if (coverage[path] && coverage[path].hash === hash) {
292
+ return coverage[path];
293
+ }
294
+
295
+ coverageData.hash = hash;
296
+ return coverage[path] = coverageData;
297
+ }();
298
+
299
+ var extname = (cov_6vz0wl3fa.s[0]++, require("path").extname);
300
+
301
+ var TYPES = (cov_6vz0wl3fa.s[1]++, {
6
302
  document: ["doc", "docx", "xls", "xlsx", "txt", "pdf", "ppt", "pptx"],
7
303
 
8
304
  video: ["mov", "mp4", "m4v", "mpg", "mxf"],
@@ -12,30 +308,53 @@ var TYPES = {
12
308
  image: ["jpg", "jpeg", "png", "tif", "tiff", "ai", "psd", "eps"],
13
309
 
14
310
  zip: ["zip"]
15
- };
311
+ });
16
312
 
17
313
  function extensionType(extension) {
314
+ cov_6vz0wl3fa.f[0]++;
315
+ cov_6vz0wl3fa.s[2]++;
316
+
18
317
  for (var type in TYPES) {
318
+ cov_6vz0wl3fa.s[3]++;
319
+
19
320
  if (TYPES[type].indexOf(extension) > -1) {
321
+ cov_6vz0wl3fa.b[0][0]++;
322
+ cov_6vz0wl3fa.s[4]++;
323
+
20
324
  return type;
325
+ } else {
326
+ cov_6vz0wl3fa.b[0][1]++;
21
327
  }
22
328
  }
23
329
  }
24
330
 
25
331
  function extension(path) {
332
+ cov_6vz0wl3fa.f[1]++;
333
+ cov_6vz0wl3fa.s[5]++;
334
+
26
335
  return extname(path.split("?")[0].toLowerCase()).substring(1);
27
336
  }
28
337
 
29
338
  function mediaType(path) {
30
- var type = extensionType(extension(path));
339
+ cov_6vz0wl3fa.f[2]++;
31
340
 
341
+ var type = (cov_6vz0wl3fa.s[6]++, extensionType(extension(path)));
342
+
343
+ cov_6vz0wl3fa.s[7]++;
32
344
  if (type) {
345
+ cov_6vz0wl3fa.b[1][0]++;
346
+ cov_6vz0wl3fa.s[8]++;
347
+
33
348
  return type;
349
+ } else {
350
+ cov_6vz0wl3fa.b[1][1]++;
34
351
  }
35
352
 
353
+ cov_6vz0wl3fa.s[9]++;
36
354
  throw new Error("Unknown extension '" + extension + "'");
37
355
  }
38
356
 
357
+ cov_6vz0wl3fa.s[10]++;
39
358
  module.exports = {
40
359
  extension: extension,
41
360
  extensionType: extensionType,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixwel/pixwel-sdk",
3
3
  "description": "",
4
- "version": "2.1.36",
4
+ "version": "2.1.37",
5
5
  "author": "Pixwel",
6
6
  "license": "UNLICENSED",
7
7
  "main": "./dist/index.js",
package/update-sdk.sh ADDED
@@ -0,0 +1,8 @@
1
+ #!/bin/bash
2
+
3
+ npm run build
4
+ npm publish
5
+
6
+ ( cd ../slurpee2 && npm i @pixwel/pixwel-sdk )
7
+ ( cd ../slurpee3/createFile && npm i @pixwel/pixwel-sdk)
8
+ ( cd ../ui && npm i @pixwel/pixwel-sdk)
package/npm-update.sh DELETED
@@ -1,8 +0,0 @@
1
- #!/bin/bash
2
-
3
- npm run build
4
- npm publish
5
-
6
- ( cd ../slurpee2 && npm update )
7
- ( cd ../slurpee3/createFile && npm update )
8
- ( cd ../ui && npm update )