Skip to content

Commit 474d571

Browse files
committed
utilsをローカルパッケージとして切り出す
1 parent 9f1d7e2 commit 474d571

21 files changed

+38
-47
lines changed

.github/workflows/deploy-google-calendar.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77
paths:
88
- google-calendar/**
9+
- utils/**
910
workflow_dispatch:
1011

1112
jobs:

.github/workflows/deploy-triplate-contact-form.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77
paths:
88
- triplate-contact-form/**
9+
- utils/**
910
workflow_dispatch:
1011

1112
jobs:

.github/workflows/deploy-triplate-delete-user-form.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77
paths:
88
- triplate-delete-user-form/**
9+
- utils/**
910
workflow_dispatch:
1011

1112
jobs:

.github/workflows/deploy-uplim-info-gmail.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77
paths:
88
- uplim-info-gmail/**
9+
- utils/**
910
workflow_dispatch:
1011

1112
jobs:

.yarn/install-state.gz

3.52 KB
Binary file not shown.

google-calendar/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@
1414
"@types/google-apps-script": "1.0.57",
1515
"esbuild": "0.19.4",
1616
"esbuild-gas-plugin": "0.8.0"
17+
},
18+
"dependencies": {
19+
"utils": "workspace:*"
1720
}
1821
}

google-calendar/src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { postMessage } from "utils";
12
import { fetchCalendarChanges } from "./functions/fetchCalendarChanges";
2-
import { postMessage } from "./functions/postMessage";
33

44
function main({ calendarId }: { calendarId: string }) {
55
for (const event of fetchCalendarChanges(calendarId)) {

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"triplate-contact-form",
1818
"google-calendar",
1919
"triplate-delete-user-form",
20-
"uplim-info-gmail"
20+
"uplim-info-gmail",
21+
"utils"
2122
]
2223
}

triplate-contact-form/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
"@types/google-apps-script": "1.0.77",
1111
"esbuild": "0.19.6",
1212
"esbuild-gas-plugin": "0.8.0"
13+
},
14+
"dependencies": {
15+
"utils": "workspace:*"
1316
}
1417
}

triplate-contact-form/src/functions/postMessage.ts

-14
This file was deleted.

triplate-contact-form/src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { postMessage } from "./functions/postMessage";
1+
import { postMessage } from "utils";
22

33
declare const global: Record<
44
string,

triplate-delete-user-form/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
"@types/google-apps-script": "1.0.77",
1111
"esbuild": "0.19.6",
1212
"esbuild-gas-plugin": "0.8.0"
13+
},
14+
"dependencies": {
15+
"utils": "workspace:*"
1316
}
1417
}

triplate-delete-user-form/src/functions/postMessage.ts

-14
This file was deleted.

triplate-delete-user-form/src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { postMessage } from "./functions/postMessage";
1+
import { postMessage } from "utils";
22

33
declare const global: Record<
44
string,

uplim-info-gmail/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
"@types/google-apps-script": "1.0.77",
1111
"esbuild": "0.19.6",
1212
"esbuild-gas-plugin": "0.8.0"
13+
},
14+
"dependencies": {
15+
"utils": "workspace:*"
1316
}
1417
}

uplim-info-gmail/src/functions/postMessage.ts

-14
This file was deleted.

uplim-info-gmail/src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { postMessage } from "utils";
12
import { createMessage } from "./functions/createMessage";
2-
import { postMessage } from "./functions/postMessage";
33

44
function main() {
55
const threads = GmailApp.search("in:Inbox is:Unread", 0, 100);

utils/package.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "utils",
3+
"version": "0.0.0",
4+
"main": "src/index.ts"
5+
}

utils/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./postMessage";
File renamed without changes.

yarn.lock

+10
Original file line numberDiff line numberDiff line change
@@ -2004,6 +2004,7 @@ __metadata:
20042004
"@types/google-apps-script": "npm:1.0.57"
20052005
esbuild: "npm:0.19.4"
20062006
esbuild-gas-plugin: "npm:0.8.0"
2007+
utils: "workspace:*"
20072008
languageName: unknown
20082009
linkType: soft
20092010

@@ -3681,6 +3682,7 @@ __metadata:
36813682
"@types/google-apps-script": "npm:1.0.77"
36823683
esbuild: "npm:0.19.6"
36833684
esbuild-gas-plugin: "npm:0.8.0"
3685+
utils: "workspace:*"
36843686
languageName: unknown
36853687
linkType: soft
36863688

@@ -3692,6 +3694,7 @@ __metadata:
36923694
"@types/google-apps-script": "npm:1.0.77"
36933695
esbuild: "npm:0.19.6"
36943696
esbuild-gas-plugin: "npm:0.8.0"
3697+
utils: "workspace:*"
36953698
languageName: unknown
36963699
linkType: soft
36973700

@@ -3829,6 +3832,7 @@ __metadata:
38293832
"@types/google-apps-script": "npm:1.0.77"
38303833
esbuild: "npm:0.19.6"
38313834
esbuild-gas-plugin: "npm:0.8.0"
3835+
utils: "workspace:*"
38323836
languageName: unknown
38333837
linkType: soft
38343838

@@ -3865,6 +3869,12 @@ __metadata:
38653869
languageName: node
38663870
linkType: hard
38673871

3872+
"utils@workspace:*, utils@workspace:utils":
3873+
version: 0.0.0-use.local
3874+
resolution: "utils@workspace:utils"
3875+
languageName: unknown
3876+
linkType: soft
3877+
38683878
"uuid@npm:^8.0.0":
38693879
version: 8.3.2
38703880
resolution: "uuid@npm:8.3.2"

0 commit comments

Comments
 (0)