Skip to content

Commit 2861d94

Browse files
committed
no erorr
1 parent e1cb052 commit 2861d94

3 files changed

Lines changed: 19 additions & 16 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
name: BundleCI
22
on:
33
- push
4+
permissions:
5+
id-token: write
6+
contents: read
47
jobs:
58
buildstatic:
69
runs-on: ubuntu-latest
710
steps:
811
- name: Checkout
9-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1013
- name: Setup node
11-
uses: actions/setup-node@v1
14+
uses: actions/setup-node@v4
1215
with:
1316
node-version: 24.x
1417
- name: Cache node modules
@@ -21,7 +24,7 @@ jobs:
2124
npm i -D
2225
2326
npm run build
24-
- uses: JS-DevTools/npm-publish@v1
25-
with:
26-
token: ${{ secrets.NPM }}
27-
package: ./package.json
27+
28+
- name: Publish
29+
run: >
30+
npm publish

index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
cache.match(new Request(`https://${this.prefix}/${encodeURIComponent(key)}`))
1515
.then(response => resolve(response ? true : false))
1616
}).catch(err => {
17-
console.error(`CacheDB Has Erorr: Key "${key}" ${err}`);
17+
console.error(`CacheDB Has Error: Key "${key}" ${err}`);
1818
reject(false)
1919
});
2020
})
@@ -27,7 +27,7 @@
2727
await this.write(key, config.default, config);
2828
return config.default;
2929
} else {
30-
console.error(`CacheDB Read Erorr: Key "${key}" not found and no default value provided.`);
30+
console.error(`CacheDB Read Error: Key "${key}" not found and no default value provided.`);
3131
return null;
3232
}
3333
}
@@ -84,7 +84,7 @@
8484
})
8585
})
8686
.catch(err => {
87-
console.error(`CacheDB Read Erorr: Key "${key}" ${err}`);
87+
console.error(`CacheDB Read Error: Key "${key}" ${err}`);
8888
reject(null);
8989
});
9090
})
@@ -126,7 +126,7 @@
126126
headers: { 'Content-Type': config.content_type }
127127
})).then(resolve(1))
128128
}).catch(err => {
129-
console.error(`CacheDB Write Erorr: Key "${key}" ${err}`);
129+
console.error(`CacheDB Write Error: Key "${key}" ${err}`);
130130
reject(0)
131131
});
132132
})
@@ -139,7 +139,7 @@
139139
.then(resolve(true))
140140
})
141141
.catch(err => {
142-
console.error(`CacheDB Delete Erorr: Key "${key}" ${err}`);
142+
console.error(`CacheDB Delete Error: Key "${key}" ${err}`);
143143
reject(false)
144144
});
145145
})
@@ -152,7 +152,7 @@
152152
resolve(keys.map(key => decodeURIComponent(key.url.split('/').pop())));
153153
})
154154
}).catch(err => {
155-
console.error(`CacheDB List Erorr: ${err}`);
155+
console.error(`CacheDB List Error: ${err}`);
156156
reject([])
157157
});
158158
})
@@ -167,7 +167,7 @@
167167
}))
168168
resolve(data);
169169
}).catch(err => {
170-
console.error(`CacheDB All Erorr: ${err}`);
170+
console.error(`CacheDB All Error: ${err}`);
171171
reject([])
172172
});
173173
})
@@ -181,7 +181,7 @@
181181
})
182182
resolve(true);
183183
}).catch(err => {
184-
console.error(`CacheDB Clear Erorr: ${err}`);
184+
console.error(`CacheDB Clear Error: ${err}`);
185185
reject(false)
186186
});
187187
})
@@ -192,7 +192,7 @@
192192
this.clear().then(() => {
193193
caches.delete(this.namespace).then(resolve(true));
194194
}).catch(err => {
195-
console.error(`CacheDB Destroy Erorr: ${err}`);
195+
console.error(`CacheDB Destroy Error: ${err}`);
196196
reject(false)
197197
});
198198
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@chenyfan\/cache-db",
2+
"name": "@chenyfan/cache-db",
33
"version": "1.1.6",
44
"description": "A common Key/Value database working on both DOM/WebWorker with auto type convert, based on CacheStorage.",
55
"main": "./dist/index.min.js",

0 commit comments

Comments
 (0)