@mathrunet/masamune_workflow_sales 3.8.0 → 3.9.1
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 +39 -3
- package/README.md +4 -6
- package/dist/clients/app_store_scraper_client.d.ts +71 -7
- package/dist/clients/app_store_scraper_client.js +135 -58
- package/dist/clients/app_store_scraper_client.js.map +1 -1
- package/dist/functions/collect_app_store_developers.js +4 -37
- package/dist/functions/collect_app_store_developers.js.map +1 -1
- package/dist/functions/collect_google_play_developers.js +4 -37
- package/dist/functions/collect_google_play_developers.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +10 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
1
|
+
## 3.9.1 (2026-10-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### chore
|
|
5
|
+
|
|
6
|
+
* update dependencies and platform compatibility ([95acab0](https://github.com/mathrunet/node_masamune/commit/95acab03ca34bf928b299c8e94fd6e4f0df2693f))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### test
|
|
10
|
+
|
|
11
|
+
* **firebase:** handle ESM dependencies in Node 22 Jest suites ([cee6adb](https://github.com/mathrunet/node_masamune/commit/cee6adbc327c5f4c727b7c7f5e08c49730537245))
|
|
12
|
+
|
|
13
|
+
### dependencies
|
|
14
|
+
|
|
15
|
+
* Update dependencies: @mathrunet/masamune, @mathrunet/masamune_firebase, @mathrunet/masamune_firebase_workflow.
|
|
16
|
+
|
|
17
|
+
## 3.9.0 (2026-09-24)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### feat
|
|
21
|
+
|
|
22
|
+
* release version 3.7.0 with enhanced database features and vector support ([d1b49eb](https://github.com/mathrunet/node_masamune/commit/d1b49eb511e5943d2a81b0f33cb59a3535d37408))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### docs
|
|
26
|
+
|
|
27
|
+
* update README links to include masamune_functions_cloudflare for server-side function execution across multiple packages ([d3f8c32](https://github.com/mathrunet/node_masamune/commit/d3f8c322180fbdb8d8d65d2f93942cf82efcefff))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### test
|
|
31
|
+
|
|
32
|
+
* **firebase:** run offline package tests in release CI ([627bd65](https://github.com/mathrunet/node_masamune/commit/627bd65efe283d219db8c0e2f27ac1215451f343))
|
|
33
|
+
|
|
34
|
+
### dependencies
|
|
35
|
+
|
|
36
|
+
* Update dependencies: @mathrunet/masamune, @mathrunet/masamune_firebase, @mathrunet/masamune_firebase_workflow.
|
|
37
|
+
|
|
1
38
|
# 3.8.0 (2026-06-29)
|
|
2
39
|
|
|
3
40
|
|
|
@@ -65,7 +102,7 @@
|
|
|
65
102
|
* Update. ([370300f](https://github.com/mathrunet/node_masamune/commit/370300f93798fe50af3ed6ee60c04d37585ab869))
|
|
66
103
|
* Upgrade `@mathrunet/katana` to `3.9.4` and update `@mathrunet/masamune` dependencies. ([4eb3e8f](https://github.com/mathrunet/node_masamune/commit/4eb3e8ffcd17334eb380ea780605eb1f925b8eea))
|
|
67
104
|
* Workflow base class completed. ([04b3da4](https://github.com/mathrunet/node_masamune/commit/04b3da430a997861e8d8409b115f7205bc0f5b7e))
|
|
68
|
-
*
|
|
105
|
+
* Remove comments ([900f3b9](https://github.com/mathrunet/node_masamune/commit/900f3b98417ebe17c9d9f481223d493db4892d13))
|
|
69
106
|
|
|
70
107
|
### docs
|
|
71
108
|
|
|
@@ -162,7 +199,7 @@
|
|
|
162
199
|
* ModelFieldValue specification change. ([148f423](https://github.com/mathrunet/node_masamune/commit/148f4236d835707280870f5b8ddc5a51577699bd))
|
|
163
200
|
* Package separation. And monorepo management. ([2647952](https://github.com/mathrunet/node_masamune/commit/2647952ad48823ac0c3d578a366f4af0bf60bcc1))
|
|
164
201
|
* Package Update. ([f66513b](https://github.com/mathrunet/node_masamune/commit/f66513bf5b510e1f9acdab0942d1a243705c9056))
|
|
165
|
-
* ProcessFunctionBase
|
|
202
|
+
* Create ProcessFunctionBase ([ecc5da7](https://github.com/mathrunet/node_masamune/commit/ecc5da70f3f7e687309511923ba6156022ebb951))
|
|
166
203
|
* refactor short video BGM handling to use `bgmTracks` array and introduce `masamune_marketing_pipeline`. ([6fe3878](https://github.com/mathrunet/node_masamune/commit/6fe3878bf02ecc40008a3aa7f10dd13a78a028e7))
|
|
167
204
|
* Support for sending multiple tokens. ([6d16257](https://github.com/mathrunet/node_masamune/commit/6d16257242a9ad9d8b0709992c30892eb80fdb10))
|
|
168
205
|
* Supports iOS StoreKit 2 validation. ([62450c5](https://github.com/mathrunet/node_masamune/commit/62450c566e33f97b0112bb55b1e3f34ea0d3a25e))
|
|
@@ -358,4 +395,3 @@
|
|
|
358
395
|
* Test code implementation. ([7f40834](https://github.com/mathrunet/node_masamune/commit/7f40834936b13a1b54b792b1c47f7c1ae2319502))
|
|
359
396
|
|
|
360
397
|
|
|
361
|
-
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<a href="https://mathru.net">
|
|
3
|
-
<img width="240px" src="https://raw.githubusercontent.com/mathrunet/node_masamune/main/.github/images/icon.png" alt="Masamune logo" style="border-radius: 32px"
|
|
3
|
+
<img width="240px" src="https://raw.githubusercontent.com/mathrunet/node_masamune/main/.github/images/icon.png" alt="Masamune logo" style="border-radius: 32px"><br/>
|
|
4
4
|
</a>
|
|
5
5
|
<h1 align="center">Masamune Workflow Sales for Firebase Functions</h1>
|
|
6
6
|
</p>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
Masamune framework package plugin that manages sales tools for Masamune Workflow.
|
|
34
34
|
|
|
35
|
-
Also, [katana_functions_firebase](https://pub.dev/packages/katana_functions_firebase
|
|
35
|
+
Also, [katana_functions_firebase](https://pub.dev/packages/katana_functions_firebase) can be used to execute server-side functions from methods defined on the client side, allowing for safe implementation.
|
|
36
36
|
|
|
37
37
|
# Installation
|
|
38
38
|
|
|
@@ -46,12 +46,10 @@ npm install @mathrunet/masamune_firebase_workflow_sales
|
|
|
46
46
|
|
|
47
47
|
Import the package as follows and pass the value of `exports` and the list of functions you wish to define to the `deploy` function.
|
|
48
48
|
|
|
49
|
-
```
|
|
49
|
+
```typescript
|
|
50
50
|
import * as m from "@mathrunet/masamune_firebase_workflow_sales";
|
|
51
51
|
|
|
52
52
|
// Define [m.Functions.xxxx] for the functions to be added to Functions.
|
|
53
|
-
//
|
|
54
|
-
// Functionsに追加する機能を[m.Functions.xxxx]を定義してください。
|
|
55
53
|
m.deploy(
|
|
56
54
|
exports,
|
|
57
55
|
[
|
|
@@ -67,4 +65,4 @@ Functions passed to deploy are deployed to Cloud Functions for Firebase.
|
|
|
67
65
|
|
|
68
66
|
Sponsors are always welcome. Thank you for your support!
|
|
69
67
|
|
|
70
|
-
[https://github.com/sponsors/mathrunet](https://github.com/sponsors/mathrunet)
|
|
68
|
+
[https://github.com/sponsors/mathrunet](https://github.com/sponsors/mathrunet)
|
|
@@ -1,5 +1,41 @@
|
|
|
1
|
-
import * as appStore from "app-store-scraper";
|
|
2
1
|
import { AppStoreDeveloperInfo, AppStoreCategoryRankingConfig, AppStoreSearchConfig } from "../models/app_store_developer_data";
|
|
2
|
+
/**
|
|
3
|
+
* App information retrieved from the public iTunes Search API / RSS feeds.
|
|
4
|
+
*
|
|
5
|
+
* 公開iTunes Search API / RSSフィードから取得したアプリ情報。
|
|
6
|
+
*/
|
|
7
|
+
export interface AppStoreApp {
|
|
8
|
+
/** App ID (track ID) / アプリID(トラックID) */
|
|
9
|
+
id: number;
|
|
10
|
+
/** Bundle ID / バンドルID */
|
|
11
|
+
appId: string;
|
|
12
|
+
/** App title / アプリ名 */
|
|
13
|
+
title: string;
|
|
14
|
+
/** App Store URL / App StoreのURL */
|
|
15
|
+
url?: string;
|
|
16
|
+
/** App description / アプリ説明 */
|
|
17
|
+
description?: string;
|
|
18
|
+
/** Icon URL / アイコンURL */
|
|
19
|
+
icon?: string;
|
|
20
|
+
/** Primary genre / メインジャンル */
|
|
21
|
+
primaryGenre?: string;
|
|
22
|
+
/** Price / 価格 */
|
|
23
|
+
price?: number;
|
|
24
|
+
/** Currency / 通貨 */
|
|
25
|
+
currency?: string;
|
|
26
|
+
/** Whether the app is free / 無料かどうか */
|
|
27
|
+
free?: boolean;
|
|
28
|
+
/** Developer ID (artist ID) / デベロッパーID(artistID) */
|
|
29
|
+
developerId?: number;
|
|
30
|
+
/** Developer name / デベロッパー名 */
|
|
31
|
+
developer?: string;
|
|
32
|
+
/** Developer page URL / デベロッパーページURL */
|
|
33
|
+
developerUrl?: string;
|
|
34
|
+
/** Developer website (seller URL) / デベロッパーWebサイト(sellerUrl) */
|
|
35
|
+
developerWebsite?: string;
|
|
36
|
+
/** Average rating score / 平均評価スコア */
|
|
37
|
+
score?: number;
|
|
38
|
+
}
|
|
3
39
|
/**
|
|
4
40
|
* Configuration for AppStoreScraperClient.
|
|
5
41
|
*
|
|
@@ -16,9 +52,13 @@ export interface AppStoreScraperClientConfig {
|
|
|
16
52
|
enableWebsiteScraping?: boolean;
|
|
17
53
|
}
|
|
18
54
|
/**
|
|
19
|
-
* Client for
|
|
55
|
+
* Client for collecting App Store developer information.
|
|
56
|
+
*
|
|
57
|
+
* Uses Apple's public iTunes Search API and RSS feeds directly.
|
|
20
58
|
*
|
|
21
|
-
* App Store
|
|
59
|
+
* App Storeデベロッパー情報を収集するクライアント。
|
|
60
|
+
*
|
|
61
|
+
* Appleの公開iTunes Search APIとRSSフィードを直接利用する。
|
|
22
62
|
*/
|
|
23
63
|
export declare class AppStoreScraperClient {
|
|
24
64
|
private config;
|
|
@@ -41,7 +81,7 @@ export declare class AppStoreScraperClient {
|
|
|
41
81
|
* @param appId App ID (track ID - numeric) / アプリID(トラックID - 数値)
|
|
42
82
|
* @returns App details or null / アプリ詳細またはnull
|
|
43
83
|
*/
|
|
44
|
-
getAppDetails(appId: number): Promise<
|
|
84
|
+
getAppDetails(appId: number): Promise<AppStoreApp | null>;
|
|
45
85
|
/**
|
|
46
86
|
* Get apps from category ranking.
|
|
47
87
|
*
|
|
@@ -50,7 +90,7 @@ export declare class AppStoreScraperClient {
|
|
|
50
90
|
* @param options Category ranking options / カテゴリランキングオプション
|
|
51
91
|
* @returns List of apps / アプリ一覧
|
|
52
92
|
*/
|
|
53
|
-
getListApps(options: AppStoreCategoryRankingConfig): Promise<
|
|
93
|
+
getListApps(options: AppStoreCategoryRankingConfig): Promise<AppStoreApp[]>;
|
|
54
94
|
/**
|
|
55
95
|
* Search for apps by keyword.
|
|
56
96
|
*
|
|
@@ -59,7 +99,7 @@ export declare class AppStoreScraperClient {
|
|
|
59
99
|
* @param options Search options / 検索オプション
|
|
60
100
|
* @returns List of apps / アプリ一覧
|
|
61
101
|
*/
|
|
62
|
-
searchApps(options: AppStoreSearchConfig): Promise<
|
|
102
|
+
searchApps(options: AppStoreSearchConfig): Promise<AppStoreApp[]>;
|
|
63
103
|
/**
|
|
64
104
|
* Extract unique developer IDs from app list.
|
|
65
105
|
*
|
|
@@ -68,7 +108,7 @@ export declare class AppStoreScraperClient {
|
|
|
68
108
|
* @param apps List of apps / アプリ一覧
|
|
69
109
|
* @returns Unique developer IDs / 重複のないデベロッパーID一覧
|
|
70
110
|
*/
|
|
71
|
-
extractDeveloperIds(apps:
|
|
111
|
+
extractDeveloperIds(apps: AppStoreApp[]): number[];
|
|
72
112
|
/**
|
|
73
113
|
* Enrich developer info with website and email from website scraping.
|
|
74
114
|
*
|
|
@@ -84,6 +124,30 @@ export declare class AppStoreScraperClient {
|
|
|
84
124
|
* Webサイトコンタクトクライアントを閉じる。
|
|
85
125
|
*/
|
|
86
126
|
close(): Promise<void>;
|
|
127
|
+
/**
|
|
128
|
+
* Call the iTunes Search / Lookup API and return the results array.
|
|
129
|
+
*
|
|
130
|
+
* iTunes Search / Lookup APIを呼び出し、results配列を返す。
|
|
131
|
+
*/
|
|
132
|
+
private requestItunes;
|
|
133
|
+
/**
|
|
134
|
+
* Fetch a URL and parse it as JSON.
|
|
135
|
+
*
|
|
136
|
+
* URLを取得しJSONとして解析する。
|
|
137
|
+
*/
|
|
138
|
+
private fetchJson;
|
|
139
|
+
/**
|
|
140
|
+
* Convert an iTunes Search / Lookup result to AppStoreApp.
|
|
141
|
+
*
|
|
142
|
+
* iTunes Search / Lookupの結果をAppStoreAppに変換する。
|
|
143
|
+
*/
|
|
144
|
+
private toApp;
|
|
145
|
+
/**
|
|
146
|
+
* Convert an iTunes RSS feed entry to AppStoreApp.
|
|
147
|
+
*
|
|
148
|
+
* iTunes RSSフィードのエントリをAppStoreAppに変換する。
|
|
149
|
+
*/
|
|
150
|
+
private rssEntryToApp;
|
|
87
151
|
/**
|
|
88
152
|
* Sleep for throttle interval.
|
|
89
153
|
*
|
|
@@ -1,46 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.AppStoreScraperClient = void 0;
|
|
37
|
-
const appStore = __importStar(require("app-store-scraper"));
|
|
38
4
|
const masamune_1 = require("@mathrunet/masamune");
|
|
39
5
|
const website_contact_client_1 = require("./website_contact_client");
|
|
6
|
+
const ITUNES_BASE_URL = "https://itunes.apple.com";
|
|
40
7
|
/**
|
|
41
|
-
*
|
|
8
|
+
* Mapping from collection names to legacy iTunes RSS feed names.
|
|
9
|
+
*
|
|
10
|
+
* コレクション名からiTunes RSSフィード名への対応表。
|
|
11
|
+
*/
|
|
12
|
+
const RSS_COLLECTIONS = {
|
|
13
|
+
TOP_FREE_IOS: "topfreeapplications",
|
|
14
|
+
TOP_PAID_IOS: "toppaidapplications",
|
|
15
|
+
TOP_GROSSING: "topgrossingapplications",
|
|
16
|
+
TOP_GROSSING_IOS: "topgrossingapplications",
|
|
17
|
+
TOP_FREE_IPAD: "topfreeipadapplications",
|
|
18
|
+
TOP_PAID_IPAD: "toppaidipadapplications",
|
|
19
|
+
TOP_GROSSING_IPAD: "topgrossingipadapplications",
|
|
20
|
+
NEW_IOS: "newapplications",
|
|
21
|
+
NEW_FREE_IOS: "newfreeapplications",
|
|
22
|
+
NEW_PAID_IOS: "newpaidapplications",
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Client for collecting App Store developer information.
|
|
26
|
+
*
|
|
27
|
+
* Uses Apple's public iTunes Search API and RSS feeds directly.
|
|
28
|
+
*
|
|
29
|
+
* App Storeデベロッパー情報を収集するクライアント。
|
|
42
30
|
*
|
|
43
|
-
*
|
|
31
|
+
* Appleの公開iTunes Search APIとRSSフィードを直接利用する。
|
|
44
32
|
*/
|
|
45
33
|
class AppStoreScraperClient {
|
|
46
34
|
config;
|
|
@@ -66,12 +54,15 @@ class AppStoreScraperClient {
|
|
|
66
54
|
*/
|
|
67
55
|
async getDeveloperInfo(devId) {
|
|
68
56
|
try {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
57
|
+
const results = await this.requestItunes("/lookup", {
|
|
58
|
+
id: String(devId),
|
|
59
|
+
entity: "software",
|
|
60
|
+
limit: "200",
|
|
73
61
|
});
|
|
74
|
-
|
|
62
|
+
const apps = results
|
|
63
|
+
.filter((item) => item.wrapperType === "software")
|
|
64
|
+
.map((item) => this.toApp(item));
|
|
65
|
+
if (apps.length === 0) {
|
|
75
66
|
return null;
|
|
76
67
|
}
|
|
77
68
|
// Convert to our app format
|
|
@@ -89,8 +80,8 @@ class AppStoreScraperClient {
|
|
|
89
80
|
// Create basic developer info
|
|
90
81
|
const developerInfo = {
|
|
91
82
|
developerId: devId,
|
|
92
|
-
developerName: apps[0].developer,
|
|
93
|
-
developerUrl: apps[0].developerUrl,
|
|
83
|
+
developerName: apps[0].developer ?? "",
|
|
84
|
+
developerUrl: apps[0].developerUrl ?? "",
|
|
94
85
|
apps: developerApps,
|
|
95
86
|
collectedTime: new masamune_1.ModelTimestamp(new Date())
|
|
96
87
|
};
|
|
@@ -113,11 +104,11 @@ class AppStoreScraperClient {
|
|
|
113
104
|
async getAppDetails(appId) {
|
|
114
105
|
try {
|
|
115
106
|
await this.throttle();
|
|
116
|
-
|
|
117
|
-
id: appId,
|
|
118
|
-
country: this.config.country,
|
|
119
|
-
lang: this.config.lang
|
|
107
|
+
const results = await this.requestItunes("/lookup", {
|
|
108
|
+
id: String(appId),
|
|
120
109
|
});
|
|
110
|
+
const item = results.find((result) => result.wrapperType === "software");
|
|
111
|
+
return item ? this.toApp(item) : null;
|
|
121
112
|
}
|
|
122
113
|
catch (error) {
|
|
123
114
|
console.warn(`Failed to get app details for: ${appId}`, error);
|
|
@@ -135,13 +126,17 @@ class AppStoreScraperClient {
|
|
|
135
126
|
async getListApps(options) {
|
|
136
127
|
try {
|
|
137
128
|
await this.throttle();
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
})
|
|
129
|
+
const collection = RSS_COLLECTIONS[options.collection ?? "TOP_FREE_IOS"];
|
|
130
|
+
if (!collection) {
|
|
131
|
+
throw new Error(`Unsupported collection: ${options.collection}`);
|
|
132
|
+
}
|
|
133
|
+
const num = Math.min(Math.max(options.num ?? 50, 1), 200);
|
|
134
|
+
const genre = options.category ? `/genre=${options.category}` : "";
|
|
135
|
+
const url = `${ITUNES_BASE_URL}/${encodeURIComponent(this.config.country)}/rss/${collection}/limit=${num}${genre}/json`;
|
|
136
|
+
const json = await this.fetchJson(url);
|
|
137
|
+
const entry = json?.feed?.entry;
|
|
138
|
+
const entries = Array.isArray(entry) ? entry : entry ? [entry] : [];
|
|
139
|
+
return entries.map((item) => this.rssEntryToApp(item));
|
|
145
140
|
}
|
|
146
141
|
catch (error) {
|
|
147
142
|
console.warn(`Failed to get list apps for category: ${options.category}`, error);
|
|
@@ -159,12 +154,14 @@ class AppStoreScraperClient {
|
|
|
159
154
|
async searchApps(options) {
|
|
160
155
|
try {
|
|
161
156
|
await this.throttle();
|
|
162
|
-
|
|
157
|
+
const results = await this.requestItunes("/search", {
|
|
163
158
|
term: options.term,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
lang: this.config.lang
|
|
159
|
+
entity: "software",
|
|
160
|
+
limit: String(Math.min(Math.max(options.num ?? 50, 1), 200)),
|
|
167
161
|
});
|
|
162
|
+
return results
|
|
163
|
+
.filter((item) => item.wrapperType === "software" || item.kind === "software")
|
|
164
|
+
.map((item) => this.toApp(item));
|
|
168
165
|
}
|
|
169
166
|
catch (error) {
|
|
170
167
|
console.warn(`Failed to search apps for term: ${options.term}`, error);
|
|
@@ -239,6 +236,86 @@ class AppStoreScraperClient {
|
|
|
239
236
|
await this.websiteContactClient.close();
|
|
240
237
|
}
|
|
241
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* Call the iTunes Search / Lookup API and return the results array.
|
|
241
|
+
*
|
|
242
|
+
* iTunes Search / Lookup APIを呼び出し、results配列を返す。
|
|
243
|
+
*/
|
|
244
|
+
async requestItunes(path, params) {
|
|
245
|
+
const query = new URLSearchParams({
|
|
246
|
+
...params,
|
|
247
|
+
country: this.config.country,
|
|
248
|
+
lang: `${this.config.lang}_${this.config.country}`.toLowerCase(),
|
|
249
|
+
});
|
|
250
|
+
const json = await this.fetchJson(`${ITUNES_BASE_URL}${path}?${query.toString()}`);
|
|
251
|
+
return Array.isArray(json?.results) ? json.results : [];
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Fetch a URL and parse it as JSON.
|
|
255
|
+
*
|
|
256
|
+
* URLを取得しJSONとして解析する。
|
|
257
|
+
*/
|
|
258
|
+
async fetchJson(url) {
|
|
259
|
+
const response = await fetch(url, {
|
|
260
|
+
headers: { "Accept": "application/json" },
|
|
261
|
+
signal: AbortSignal.timeout(30000),
|
|
262
|
+
});
|
|
263
|
+
if (!response.ok) {
|
|
264
|
+
throw new Error(`Request failed with status ${response.status}: ${url}`);
|
|
265
|
+
}
|
|
266
|
+
return await response.json();
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Convert an iTunes Search / Lookup result to AppStoreApp.
|
|
270
|
+
*
|
|
271
|
+
* iTunes Search / Lookupの結果をAppStoreAppに変換する。
|
|
272
|
+
*/
|
|
273
|
+
toApp(item) {
|
|
274
|
+
const price = typeof item.price === "number" ? item.price : undefined;
|
|
275
|
+
return {
|
|
276
|
+
id: item.trackId,
|
|
277
|
+
appId: item.bundleId,
|
|
278
|
+
title: item.trackName,
|
|
279
|
+
url: item.trackViewUrl,
|
|
280
|
+
description: item.description,
|
|
281
|
+
icon: item.artworkUrl512 ?? item.artworkUrl100 ?? item.artworkUrl60,
|
|
282
|
+
primaryGenre: item.primaryGenreName,
|
|
283
|
+
price: price,
|
|
284
|
+
currency: item.currency,
|
|
285
|
+
free: price === undefined ? undefined : price === 0,
|
|
286
|
+
developerId: item.artistId,
|
|
287
|
+
developer: item.artistName,
|
|
288
|
+
developerUrl: item.artistViewUrl,
|
|
289
|
+
developerWebsite: item.sellerUrl,
|
|
290
|
+
score: item.averageUserRating,
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Convert an iTunes RSS feed entry to AppStoreApp.
|
|
295
|
+
*
|
|
296
|
+
* iTunes RSSフィードのエントリをAppStoreAppに変換する。
|
|
297
|
+
*/
|
|
298
|
+
rssEntryToApp(entry) {
|
|
299
|
+
const artistUrl = entry?.["im:artist"]?.attributes?.href;
|
|
300
|
+
const developerIdMatch = artistUrl?.match(/\/id(\d+)/);
|
|
301
|
+
const amount = parseFloat(entry?.["im:price"]?.attributes?.amount ?? "");
|
|
302
|
+
const images = entry?.["im:image"] ?? [];
|
|
303
|
+
return {
|
|
304
|
+
id: parseInt(entry?.id?.attributes?.["im:id"] ?? "0", 10),
|
|
305
|
+
appId: entry?.id?.attributes?.["im:bundleId"],
|
|
306
|
+
title: entry?.["im:name"]?.label,
|
|
307
|
+
url: entry?.link?.attributes?.href ?? entry?.id?.label,
|
|
308
|
+
description: entry?.summary?.label,
|
|
309
|
+
icon: images.length > 0 ? images[images.length - 1]?.label : undefined,
|
|
310
|
+
primaryGenre: entry?.category?.attributes?.term,
|
|
311
|
+
price: isNaN(amount) ? undefined : amount,
|
|
312
|
+
currency: entry?.["im:price"]?.attributes?.currency,
|
|
313
|
+
free: isNaN(amount) ? undefined : amount === 0,
|
|
314
|
+
developerId: developerIdMatch ? parseInt(developerIdMatch[1], 10) : undefined,
|
|
315
|
+
developer: entry?.["im:artist"]?.label,
|
|
316
|
+
developerUrl: artistUrl,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
242
319
|
/**
|
|
243
320
|
* Sleep for throttle interval.
|
|
244
321
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app_store_scraper_client.js","sourceRoot":"","sources":["../../src/clients/app_store_scraper_client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app_store_scraper_client.js","sourceRoot":"","sources":["../../src/clients/app_store_scraper_client.ts"],"names":[],"mappings":";;;AAAA,kDAAqD;AAOrD,qEAAgE;AAwDhE,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAEnD;;;;GAIG;AACH,MAAM,eAAe,GAA8B;IAC/C,YAAY,EAAE,qBAAqB;IACnC,YAAY,EAAE,qBAAqB;IACnC,YAAY,EAAE,yBAAyB;IACvC,gBAAgB,EAAE,yBAAyB;IAC3C,aAAa,EAAE,yBAAyB;IACxC,aAAa,EAAE,yBAAyB;IACxC,iBAAiB,EAAE,6BAA6B;IAChD,OAAO,EAAE,iBAAiB;IAC1B,YAAY,EAAE,qBAAqB;IACnC,YAAY,EAAE,qBAAqB;CACtC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAa,qBAAqB;IACtB,MAAM,CAAwC;IAC9C,oBAAoB,GAAgC,IAAI,CAAC;IAEjE,YAAY,SAAsC,EAAE;QAChD,IAAI,CAAC,MAAM,GAAG;YACV,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,IAAI;YACzB,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,IAAI;YAC/B,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,IAAI;YACjC,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,IAAI,IAAI;SAC9D,CAAC;QAEF,IAAI,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC;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this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.CollectAppStoreDevelopers = void 0;
|
|
37
|
-
const
|
|
4
|
+
const firestore_1 = require("firebase-admin/firestore");
|
|
38
5
|
const masamune_firebase_workflow_1 = require("@mathrunet/masamune_firebase_workflow");
|
|
39
6
|
const app_store_scraper_client_1 = require("../clients/app_store_scraper_client");
|
|
40
7
|
/**
|
|
@@ -190,13 +157,13 @@ class CollectAppStoreDevelopers extends masamune_firebase_workflow_1.WorkflowPro
|
|
|
190
157
|
* @param devInfo Developer information / デベロッパー情報
|
|
191
158
|
*/
|
|
192
159
|
async saveToFirestore(devInfo) {
|
|
193
|
-
const firestore =
|
|
160
|
+
const firestore = (0, firestore_1.getFirestore)();
|
|
194
161
|
const docId = `appStore_${devInfo.developerId}`;
|
|
195
162
|
const docPath = `plugins/workflow/address/${docId}`;
|
|
196
|
-
const now =
|
|
163
|
+
const now = firestore_1.Timestamp.now();
|
|
197
164
|
// Convert ModelTimestamp to Firestore Timestamp
|
|
198
165
|
const collectedTimestamp = devInfo.collectedTime
|
|
199
|
-
?
|
|
166
|
+
? firestore_1.Timestamp.fromDate(devInfo.collectedTime.value())
|
|
200
167
|
: now;
|
|
201
168
|
// Build document, omitting undefined values
|
|
202
169
|
const addressDoc = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect_app_store_developers.js","sourceRoot":"","sources":["../../src/functions/collect_app_store_developers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collect_app_store_developers.js","sourceRoot":"","sources":["../../src/functions/collect_app_store_developers.ts"],"names":[],"mappings":";;;AAAA,wDAAmE;AAEnE,sFAA6G;AAC7G,kFAA4E;AAQ5E;;;;GAIG;AACH,MAAa,yBAA0B,SAAQ,wDAA2B;IACtE;;;;OAIG;IACH,EAAE,GAAW,8BAA8B,CAAC;IAE5C;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,OAAwB;QAClC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,IAAmD,CAAC;QAEnF,yBAAyB;QACzB,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC;YAChB,OAAO,CAAC,IAAI,CAAC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AAI,OAAO,CAAC,KAAK;YAAE,UAAU,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QACpD,IAAI,OAAO,CAAC,OAAO;YAAE,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC1D,IAAI,OAAO,CAAC,YAAY;YAAE,UAAU,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzE,IAAI,OAAO,CAAC,eAAe,IAAI,OAAO,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChE,UAAU,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;QACzD,CAAC;QAED,MAAM,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAClE,CAAC;CACJ;AAxMD,8DAwMC;AAED,MAAM,CAAC,OAAO,GAAG,CACb,OAAiB,EACjB,OAA6B,EAC7B,IAA4B,EAC9B,EAAE,CAAC,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAE3D,2BAA2B;AAC3B,MAAM,CAAC,OAAO,CAAC,yBAAyB,GAAG,yBAAyB,CAAC"}
|
|
@@ -1,40 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.CollectGooglePlayDevelopers = void 0;
|
|
37
|
-
const
|
|
4
|
+
const firestore_1 = require("firebase-admin/firestore");
|
|
38
5
|
const masamune_firebase_workflow_1 = require("@mathrunet/masamune_firebase_workflow");
|
|
39
6
|
const google_play_scraper_client_1 = require("../clients/google_play_scraper_client");
|
|
40
7
|
/**
|
|
@@ -185,13 +152,13 @@ class CollectGooglePlayDevelopers extends masamune_firebase_workflow_1.WorkflowP
|
|
|
185
152
|
* @param devInfo Developer information / デベロッパー情報
|
|
186
153
|
*/
|
|
187
154
|
async saveToFirestore(devInfo) {
|
|
188
|
-
const firestore =
|
|
155
|
+
const firestore = (0, firestore_1.getFirestore)();
|
|
189
156
|
const docId = `googlePlay_${this.sanitizeId(devInfo.developerId)}`;
|
|
190
157
|
const docPath = `plugins/workflow/address/${docId}`;
|
|
191
|
-
const now =
|
|
158
|
+
const now = firestore_1.Timestamp.now();
|
|
192
159
|
// Convert ModelTimestamp to Firestore Timestamp
|
|
193
160
|
const collectedTimestamp = devInfo.collectedTime
|
|
194
|
-
?
|
|
161
|
+
? firestore_1.Timestamp.fromDate(devInfo.collectedTime.value())
|
|
195
162
|
: now;
|
|
196
163
|
// Build document, omitting undefined values
|
|
197
164
|
const addressDoc = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect_google_play_developers.js","sourceRoot":"","sources":["../../src/functions/collect_google_play_developers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collect_google_play_developers.js","sourceRoot":"","sources":["../../src/functions/collect_google_play_developers.ts"],"names":[],"mappings":";;;AAAA,wDAAmE;AAEnE,sFAA6G;AAC7G,sFAAgF;AAShF;;;;GAIG;AACH,MAAa,2BAA4B,SAAQ,wDAA2B;IACxE;;;;OAIG;IACH,EAAE,GAAW,gCAAgC,CAAC;IAE9C;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,OAAwB;QAClC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,IAAqD,CAAC;QAErF,yBAAyB;QACzB,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC;YAChB,OAAO,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;YAC/D,OAAO;gBACH,GAAG,MAAM;gBACT,OAAO,EAAE;oBACL,oBAAoB,EAAE;wBAClB,KAAK,EAAE;4BACH,IAAI,EAAE,SAAS;4BACf,WAAW,EAAE,CAAC;4BACd,cAAc,EAAE,CAAC;4BACjB,cAAc,EAAE,CAAC;4BACjB,UAAU,EAAE,CAAC;yBAChB;wBACD,UAAU,EAAE,EAAE;wBACd,KAAK,EAAE,yCAAyC;qBACnD;iBACJ;aACJ,CAAC;QACN,CAAC;QAED,uBAAuB;QACvB,MAAM,MAAM,GA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EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;OAOG;IACK,UAAU,CAAC,EAAU;QACzB,OAAO,EAAE;aACJ,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC;aAC9B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;aACpB,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC3B,CAAC;CACJ;AAjND,kEAiNC;AAED,MAAM,CAAC,OAAO,GAAG,CACb,OAAiB,EACjB,OAA6B,EAC7B,IAA4B,EAC9B,EAAE,CAAC,IAAI,2BAA2B,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAE7D,2BAA2B;AAC3B,MAAM,CAAC,OAAO,CAAC,2BAA2B,GAAG,2BAA2B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Masamune framework package plugin that manages sales tools for Masamune Workflow.
|
|
5
5
|
*
|
|
6
|
-
* To use, import * as m from "@mathrunet/
|
|
6
|
+
* To use, import * as m from "@mathrunet/masamune_firebase_workflow_sales";
|
|
7
7
|
*
|
|
8
8
|
* [mathru.net]: https://mathru.net
|
|
9
9
|
* [YouTube]: https://www.youtube.com/c/mathrunetchannel
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
*
|
|
20
20
|
* Masamune framework package plugin that manages sales tools for Masamune Workflow.
|
|
21
21
|
*
|
|
22
|
-
* To use, import * as m from "@mathrunet/
|
|
22
|
+
* To use, import * as m from "@mathrunet/masamune_firebase_workflow_sales";
|
|
23
23
|
*
|
|
24
24
|
* [mathru.net]: https://mathru.net
|
|
25
25
|
* [YouTube]: https://www.youtube.com/c/mathrunetchannel
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mathrunet/masamune_workflow_sales",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.1",
|
|
4
4
|
"description": "Masamune framework package plugin that manages sales tools for Masamune Workflow.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "tsc",
|
|
9
9
|
"prepare": "npm run build",
|
|
10
10
|
"prepublish": "npm install && npm run build && npm run test",
|
|
11
|
-
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
|
|
11
|
+
"test": "NODE_OPTIONS='--experimental-vm-modules' jest --runInBand --config test/unit/jest.config.json",
|
|
12
12
|
"cleanup": "npx ts-node scripts/cleanup_test_data.ts",
|
|
13
13
|
"postversion": "npm run changelog",
|
|
14
14
|
"changelog": "conventional-changelog -p eslint -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'chore(release): publish package'",
|
|
@@ -38,24 +38,23 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://github.com/mathrunet/node_masamune#readme",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@mathrunet/masamune": "^3.
|
|
42
|
-
"@mathrunet/masamune_firebase": "^3.1
|
|
43
|
-
"@mathrunet/masamune_firebase_workflow": "^3.
|
|
41
|
+
"@mathrunet/masamune": "^3.11.1",
|
|
42
|
+
"@mathrunet/masamune_firebase": "^3.2.1",
|
|
43
|
+
"@mathrunet/masamune_firebase_workflow": "^3.11.1",
|
|
44
44
|
"@sparticuz/chromium": "^131.0.0",
|
|
45
|
-
"
|
|
46
|
-
"firebase-
|
|
47
|
-
"firebase-functions": "^6.3.2",
|
|
45
|
+
"firebase-admin": "^14.5.0",
|
|
46
|
+
"firebase-functions": "^7.4.0",
|
|
48
47
|
"google-play-scraper": "^9.1.1",
|
|
49
|
-
"puppeteer-core": "^
|
|
48
|
+
"puppeteer-core": "^25.13.0",
|
|
50
49
|
"typescript": "^5.9.2"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
52
|
"@types/debug": "^4.1.12",
|
|
54
|
-
"@types/jest": "^
|
|
53
|
+
"@types/jest": "^30.0.0",
|
|
55
54
|
"conventional-changelog-cli": "^5.0.0",
|
|
56
55
|
"dotenv": "^16.4.5",
|
|
57
56
|
"firebase-functions-test": "^3.4.0",
|
|
58
|
-
"jest": "^
|
|
57
|
+
"jest": "^30.1.3",
|
|
59
58
|
"ts-jest": "^29.1.2"
|
|
60
59
|
}
|
|
61
60
|
}
|