@cocreate/pwa 1.10.1 → 1.11.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/.github/workflows/automated.yml +0 -26
- package/CHANGELOG.md +14 -0
- package/package.json +2 -2
- package/src/cache.js +1 -3
|
@@ -41,30 +41,4 @@ jobs:
|
|
|
41
41
|
outputs:
|
|
42
42
|
new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
|
|
43
43
|
new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
|
|
44
|
-
upload:
|
|
45
|
-
runs-on: ubuntu-latest
|
|
46
|
-
needs: release
|
|
47
|
-
if: needs.release.outputs.new_release_published == 'true'
|
|
48
|
-
env:
|
|
49
|
-
VERSION: "${{ needs.release.outputs.new_release_version }}"
|
|
50
|
-
steps:
|
|
51
|
-
- name: Checkout
|
|
52
|
-
uses: actions/checkout@v3
|
|
53
|
-
- name: Setup Node.js
|
|
54
|
-
uses: actions/setup-node@v3
|
|
55
|
-
with:
|
|
56
|
-
node-version: 16
|
|
57
|
-
- name: Set npm registry auth
|
|
58
|
-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
|
|
59
|
-
- name: Install dependencies
|
|
60
|
-
run: yarn install
|
|
61
|
-
- name: Build
|
|
62
|
-
run: yarn build
|
|
63
|
-
- name: Set Environment Variables
|
|
64
|
-
run: |
|
|
65
|
-
echo "organization_id=${{ secrets.COCREATE_ORGANIZATION_ID }}" >> $GITHUB_ENV
|
|
66
|
-
echo "key=${{ secrets.COCREATE_KEY }}" >> $GITHUB_ENV
|
|
67
|
-
echo "host=${{ secrets.COCREATE_HOST }}" >> $GITHUB_ENV
|
|
68
|
-
- name: CoCreate Upload
|
|
69
|
-
run: coc upload
|
|
70
44
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.11.0](https://github.com/CoCreate-app/CoCreate-pwa/compare/v1.10.2...v1.11.0) (2023-09-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* bump dependencies for there latest features ([1881c46](https://github.com/CoCreate-app/CoCreate-pwa/commit/1881c465f6773722aaaca9f27aae32ffbcb57ae2))
|
|
7
|
+
|
|
8
|
+
## [1.10.2](https://github.com/CoCreate-app/CoCreate-pwa/compare/v1.10.1...v1.10.2) (2023-09-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* fileUl using pathname ([b25f638](https://github.com/CoCreate-app/CoCreate-pwa/commit/b25f63862c27fdc0a68fb7b1ad10fe730f968e07))
|
|
14
|
+
|
|
1
15
|
## [1.10.1](https://github.com/CoCreate-app/CoCreate-pwa/compare/v1.10.0...v1.10.1) (2023-09-18)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/pwa",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "A simple pwa component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pwa",
|
|
@@ -59,6 +59,6 @@
|
|
|
59
59
|
"webpack-log": "^3.0.1"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@cocreate/local-storage": "^1.10.
|
|
62
|
+
"@cocreate/local-storage": "^1.10.2"
|
|
63
63
|
}
|
|
64
64
|
}
|
package/src/cache.js
CHANGED
|
@@ -9,9 +9,6 @@ function putFile(cacheName, data) {
|
|
|
9
9
|
return
|
|
10
10
|
// Open the cache and update it with the new file data
|
|
11
11
|
caches.open(cacheName).then((cache) => {
|
|
12
|
-
// Construct the URL for the file based on the fileObject's path and src
|
|
13
|
-
const fileUrl = new URL(data.name, window.location.origin + data.path).toString();
|
|
14
|
-
|
|
15
12
|
// Create a Response object with the file data
|
|
16
13
|
const fileResponse = new Response(data.src, {
|
|
17
14
|
headers: {
|
|
@@ -20,6 +17,7 @@ function putFile(cacheName, data) {
|
|
|
20
17
|
});
|
|
21
18
|
|
|
22
19
|
// Update the cache with the new version (or add it if not in the cache)
|
|
20
|
+
const fileUrl = window.location.origin + data.pathname;
|
|
23
21
|
cache.put(fileUrl, fileResponse).then(() => {
|
|
24
22
|
console.log(`Updated cache for ${fileUrl}`);
|
|
25
23
|
});
|