@cocreate/file 1.9.9 → 1.10.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/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ # [1.10.0](https://github.com/CoCreate-app/CoCreate-file/compare/v1.9.10...v1.10.0) (2023-11-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * .ico content-type ([8f91239](https://github.com/CoCreate-app/CoCreate-file/commit/8f91239f3658d24363631edfe52d384709e432b4))
7
+ * if symbolic link skip ([fb0f4d7](https://github.com/CoCreate-app/CoCreate-file/commit/fb0f4d7d60a1d24d1776199c7a45d701426d3f60))
8
+ * meta name typo ([22e2888](https://github.com/CoCreate-app/CoCreate-file/commit/22e2888befd95f84ec214014de94872913092e6e))
9
+ * update host ([f5ec5e0](https://github.com/CoCreate-app/CoCreate-file/commit/f5ec5e0c84b84942749c400bfc4e366ef44a1ea9))
10
+
11
+
12
+ ### Features
13
+
14
+ * support webmanifest file type ([aca211d](https://github.com/CoCreate-app/CoCreate-file/commit/aca211d6c4fa830a1934ae68c98527f25f75baf6))
15
+
16
+ ## [1.9.10](https://github.com/CoCreate-app/CoCreate-file/compare/v1.9.9...v1.9.10) (2023-11-03)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * favicon.ico path ([d624243](https://github.com/CoCreate-app/CoCreate-file/commit/d62424361f2f55ee06ee6489a2c51f7e431c2639))
22
+ * update dependencies to the lates versions ([109bee3](https://github.com/CoCreate-app/CoCreate-file/commit/109bee3e9f120ec64c8bb1242b5c488bcab32475))
23
+ * update method to use object.update etc ([d412fe0](https://github.com/CoCreate-app/CoCreate-file/commit/d412fe0413483e69acd8a7e9817cfcfed50ed52c))
24
+
1
25
  ## [1.9.9](https://github.com/CoCreate-app/CoCreate-file/compare/v1.9.8...v1.9.9) (2023-10-25)
2
26
 
3
27
 
@@ -12,8 +12,7 @@ module.exports = {
12
12
  "pathname": "/docs/file/index.html",
13
13
  "src": "{{./docs/index.html}}",
14
14
  "host": [
15
- "*",
16
- "general.cocreate.app"
15
+ "*"
17
16
  ],
18
17
  "directory": "file",
19
18
  "content-type": "{{content-type}}",
package/demo/index.html CHANGED
@@ -6,9 +6,9 @@
6
6
  <!-- CoCreate Favicon -->
7
7
  <link
8
8
  rel="icon"
9
- href="https://cdn.cocreate.app/favicon.ico"
10
- type="image/ico"
11
- sizes="16x16" />
9
+ type="image/png"
10
+ sizes="32x32"
11
+ href="../assets/favicon.ico" />
12
12
  <link rel="manifest" href="/manifest.webmanifest" />
13
13
  </head>
14
14
  <body>
package/docs/index.html CHANGED
@@ -11,10 +11,10 @@
11
11
  sizes="32x32"
12
12
  href="https://cocreate.app/images/favicon.ico" />
13
13
  <meta
14
- key="description"
14
+ name="description"
15
15
  content="A convenient chain handler allows user to chain multiple components together. When one file is complete next one will start untill all file completed." />
16
16
  <meta
17
- key="keywords"
17
+ name="keywords"
18
18
  content="helper classes, utility classes, css framework, css library, inline style classes" />
19
19
  <meta name="robots" content="index,follow" />
20
20
  <meta
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/file",
3
- "version": "1.9.9",
3
+ "version": "1.10.0",
4
4
  "description": "A headless file uploader that uses HTML5 attributes for customization. Allows easy upload of files to server.",
5
5
  "keywords": [
6
6
  "file",
@@ -59,9 +59,9 @@
59
59
  "webpack-log": "^3.0.1"
60
60
  },
61
61
  "dependencies": {
62
- "@cocreate/actions": "^1.12.0",
63
- "@cocreate/config": "^1.6.5",
64
- "@cocreate/render": "^1.29.0",
65
- "@cocreate/utils": "^1.26.1"
62
+ "@cocreate/actions": "^1.12.1",
63
+ "@cocreate/config": "^1.6.6",
64
+ "@cocreate/render": "^1.29.1",
65
+ "@cocreate/utils": "^1.26.2"
66
66
  }
67
67
  }
package/src/client.js CHANGED
@@ -385,7 +385,7 @@ async function upload(element, data) {
385
385
  }
386
386
  }
387
387
 
388
- Data.method = 'update.' + Data.type
388
+ Data.method = Data.type + '.update'
389
389
  let response = await Crud.send(Data)({
390
390
  array,
391
391
  object,
@@ -459,7 +459,7 @@ async function Import(element, data) {
459
459
 
460
460
  if (data.length) {
461
461
  for (let i = 0; i < data.length; i++) {
462
- data[i].method = 'create.' + data[i].type
462
+ data[i].method = data[i].type + '.create'
463
463
  data[i] = await Crud.send(data[i])
464
464
  }
465
465
  }
@@ -502,7 +502,7 @@ async function Export(element, data) {
502
502
 
503
503
  if (Data.type === 'key')
504
504
  Data.type = 'object'
505
- Data.method = 'read.' + Data.type
505
+ Data.method = Data.type + '.read'
506
506
  Data = await Crud.send(Data)
507
507
  data.push(...Data[Data.type])
508
508
 
package/src/server.js CHANGED
@@ -22,7 +22,7 @@ const mimeTypes = {
22
22
  ".gif": "image/gif",
23
23
  ".htm": "text/html",
24
24
  ".html": "text/html",
25
- ".ico": "image/vnd.microsoft.icon",
25
+ ".ico": "image/x-icon",
26
26
  ".ics": "text/calendar",
27
27
  ".jar": "application/java-archive",
28
28
  ".jpeg": "image/jpeg",
@@ -63,6 +63,7 @@ const mimeTypes = {
63
63
  ".wav": "audio/wav",
64
64
  ".weba": "audio/webm",
65
65
  ".webm": "video/webm",
66
+ ".webmanifest": "application/manifest+json",
66
67
  ".webp": "image/webp",
67
68
  ".woff": "font/woff",
68
69
  ".woff2": "font/woff2",
@@ -167,6 +168,8 @@ module.exports = async function file(CoCreateConfig, configPath, match) {
167
168
  let files = fs.readdirSync(entryPath);
168
169
 
169
170
  for (let file of files) {
171
+ if (fs.lstatSync(`${entryPath}/${file}`).isSymbolicLink())
172
+ continue
170
173
  let skip = false
171
174
  for (let i = 0; i < exclude.length; i++) {
172
175
  if (file.includes(exclude)) {
@@ -413,13 +416,13 @@ module.exports = async function file(CoCreateConfig, configPath, match) {
413
416
  let response;
414
417
  if (!data.object._id && !data.$filter) {
415
418
  response = await crud.send({
416
- method: 'create.object',
419
+ method: 'object.create',
417
420
  ...config,
418
421
  ...data
419
422
  })
420
423
  } else {
421
424
  response = await crud.send({
422
- method: 'update.object',
425
+ method: 'object.update',
423
426
  ...config,
424
427
  ...data,
425
428
  upsert: true