Skip to content

Commit

Permalink
chore: bump package version
Browse files Browse the repository at this point in the history
Update package-lock.json
Update package.json
Update response.dev.js
Update response.js
Update CHANGELOG.md
  • Loading branch information
VirgilClyne committed Nov 18, 2024
1 parent f19196b commit b7455a7
Show file tree
Hide file tree
Showing 9 changed files with 257 additions and 442 deletions.
10 changes: 4 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
### 🆕 New Features
* `空气质量`增加`与昨日同时间对比`功能
* 为实现此功能,现在默认替换来自`和风天气``空气质量`数据

### 🔄 Other Changes
* `util``submodule` 更改为 `package`
### 🔣 Dependencies
* 升级了 `@nsnanocat/util`
* `util``submodule` 更改为 `package`
* `$platform` 改为 `$app`
651 changes: 234 additions & 417 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "weatherkit",
"version": "1.9.0",
"version": "1.9.1",
"organizationName": " iRingo",
"displayName": " iRingo: 🌤 WeatherKit",
"description": "iOS 18 & macOS 15 & watchOS 11\n1.解锁全部天气功能\n2.替换空气质量数据\n3.添加下一小时降水数据",
"homepage": "https://github.com/NSRingo/WeatherKit/wiki",
"homepage": "https://NSRingo.github.io/guide/Weather/weather-kit",
"openUrl": "http://boxjs.com/#/app/iRingo.WeatherKit",
"icon": "https://developer.apple.com/assets/elements/icons/weatherkit/weatherkit-128x128.png",
"keywords": [],
Expand All @@ -15,7 +15,6 @@
"system": [
"iOS",
"iPadOS",
"tvOS",
"macOS",
"watchOS"
],
Expand All @@ -39,17 +38,19 @@
"dts": "arguments-builder dts"
},
"browserslist": [
"iOS >= 15"
"iOS >= 18"
],
"devDependencies": {
"@iringo/arguments-builder": "^1.8.2",
"@iringo/arguments-builder": "^1.8.5",
"@iringo/sgmoudle-tools": "^1.2.1",
"@nsnanocat/util": "^1.3.6",
"@rspack/cli": "^1.0.11",
"@rspack/core": "^1.0.11",
"flatbuffers": "^24.3.25",
"node-polyfill-webpack-plugin": "^4.0.0",
"npm-run-all": "^4.1.5",
"typescript": "^5.5.4"
},
"dependencies": {
"@nsnanocat/util": "^1.4.8",
"flatbuffers": "^24.3.25",
"node-polyfill-webpack-plugin": "^4.0.0"
}
}
1 change: 0 additions & 1 deletion src/function/database.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export default {
WeatherKit: {
Settings: {
Switch: true,
NextHour: {
Provider: "ColorfulClouds",
},
Expand Down
8 changes: 4 additions & 4 deletions src/function/parseWeatherKitURL.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { log } from "@nsnanocat/util";

export default function parseWeatherKitURL(url = new URL($request.url)) {
log(`☑️ parseWeatherKitURL`, "");
const RegExp = /^\/api\/(?<version>v1|v2|v3)\/(availability|weather)\/(?<language>\w+)(?:-\w+)?(-(?<country>[A-Z]{2}))?\/(?<latitude>-?\d+\.?\d*)\/(?<longitude>-?\d+\.?\d*)$/i;
log("☑️ parseWeatherKitURL", "");
const WeatherKitRegExp = /^\/api\/(?<version>v1|v2|v3)\/(availability|weather)\/(?<language>\w+)(?:-\w+)?(-(?<country>[A-Z]{2}))?\/(?<latitude>-?\d+\.?\d*)\/(?<longitude>-?\d+\.?\d*)$/i;
//const LanguageRegExp = /^(?<language>\w+(-\w+)?)-(?<country>[A-Z]{2})$/i;
const Parameters = url?.pathname.match(RegExp)?.groups;
let result = {
const Parameters = url?.pathname.match(WeatherKitRegExp)?.groups;
const result = {
"version": Parameters?.version,
"language": Parameters?.language,
"latitude": Parameters?.latitude,
Expand Down
2 changes: 1 addition & 1 deletion src/function/providerNameToLogo.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ export default function providerNameToLogo(providerName, version) {
default:
break;
};
log(`✅ providerNameToLogo`, "");
log("✅ providerNameToLogo", "");
return providerLogo;
};
2 changes: 1 addition & 1 deletion src/function/setENV.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ export default function setENV(name, platforms, database) {
/***************** Configs *****************/
//Configs.Storefront = new Map(Configs.Storefront);
if (Configs.Locale) Configs.Locale = new Map(Configs.Locale);
if (Configs.i18n) for (let type in Configs.i18n) Configs.i18n[type] = new Map(Configs.i18n[type]);
if (Configs.i18n) for (const type in Configs.i18n) Configs.i18n[type] = new Map(Configs.i18n[type]);
return { Settings, Caches, Configs };
};
4 changes: 2 additions & 2 deletions src/response.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $platform, Lodash as _, Storage, fetch, notification, log, logError, wait, done } from "@nsnanocat/util";
import { $app, Lodash as _, Storage, fetch, notification, log, logError, wait, done } from "@nsnanocat/util";
import database from "./function/database.mjs";
import setENV from "./function/setENV.mjs";
import providerNameToLogo from "./function/providerNameToLogo.mjs";
Expand Down Expand Up @@ -84,7 +84,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
case "application/grpc+proto":
case "application/octet-stream": {
//log(`🚧 $response: ${JSON.stringify($response, null, 2)}`, "");
let rawBody = $platform === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array());
let rawBody = $app === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array());
//log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, "");
switch (FORMAT) {
case "application/vnd.apple.flatbuffer": {
Expand Down
4 changes: 2 additions & 2 deletions src/response.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $platform, Lodash as _, Storage, fetch, notification, log, logError, wait, done } from "@nsnanocat/util";
import { $app, Lodash as _, Storage, fetch, notification, log, logError, wait, done } from "@nsnanocat/util";
import database from "./function/database.mjs";
import setENV from "./function/setENV.mjs";
import providerNameToLogo from "./function/providerNameToLogo.mjs";
Expand Down Expand Up @@ -73,7 +73,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
case "application/grpc":
case "application/grpc+proto":
case "application/octet-stream": {
let rawBody = $platform === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array());
let rawBody = $app === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array());
switch (FORMAT) {
case "application/vnd.apple.flatbuffer": {
// 解析FlatBuffer
Expand Down

0 comments on commit b7455a7

Please sign in to comment.