File tree Expand file tree Collapse file tree 4 files changed +47
-74
lines changed Expand file tree Collapse file tree 4 files changed +47
-74
lines changed Original file line number Diff line number Diff line change 2727 - name : Build TypeScript
2828 run : npm run build
2929
30+ - name : Verify build output
31+ run : |
32+ echo "📁 dist フォルダの内容:"
33+ ls -la dist/
34+ echo ""
35+ echo "📄 appsscript.json の内容:"
36+ cat dist/appsscript.json
37+ echo ""
38+ echo "📊 main.js のサイズ:"
39+ wc -c dist/main.js
40+
3041 - name : Setup clasp credentials
3142 env :
3243 CLASPRC_JSON : ${{ secrets.CLASPRC_JSON }}
Original file line number Diff line number Diff line change 11import esbuild from 'esbuild' ;
2- import { GasPlugin } from 'esbuild-gas-plugin' ;
32import { copyFileSync , mkdirSync } from 'fs' ;
43
54// distフォルダを作成(存在しない場合)
@@ -14,7 +13,11 @@ esbuild
1413 bundle : true ,
1514 minify : true ,
1615 outfile : './dist/main.js' ,
17- plugins : [ GasPlugin ] ,
16+ format : 'iife' ,
17+ globalName : '__bundle__' ,
18+ footer : {
19+ js : 'function onEdit(e){__bundle__.onEdit(e)}' ,
20+ } ,
1821 } )
1922 . then ( ( ) => {
2023 console . log ( '✅ Build succeeded!' ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- import { onEdit , testNotification } from './App' ;
1+ import { getApplicationFromRow } from './application' ;
2+ import { sendDiscordNotification } from './discord' ;
23
3- interface Global {
4- onEdit : typeof onEdit ;
5- testNotification : typeof testNotification ;
6- }
7- declare const global : Global ;
4+ /**
5+ * スプレッドシートに行が追加されたときのトリガー
6+ */
7+ export function onEdit ( e : GoogleAppsScript . Events . SheetsOnEdit ) {
8+ try {
9+ const range = e . range ;
10+ const sheet = range . getSheet ( ) ;
11+ const row = range . getRow ( ) ;
12+
13+ // ヘッダー行(1行目)は無視
14+ if ( row <= 1 ) {
15+ return ;
16+ }
17+
18+ // 申請情報を取得
19+ const application = getApplicationFromRow ( sheet , row ) ;
820
9- // entryPoints
10- global . onEdit = onEdit ;
11- global . testNotification = testNotification ;
21+ if ( ! application ) {
22+ Logger . log ( `行${ row } : 申請情報が不完全のため通知をスキップ` ) ;
23+ return ;
24+ }
25+
26+ // Discord通知を送信
27+ sendDiscordNotification ( application ) ;
28+ Logger . log ( `行${ row } : 通知送信完了` ) ;
29+ } catch ( error ) {
30+ Logger . log ( `エラー: ${ error } ` ) ;
31+ throw error ;
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments