Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd082983

Browse files
authored
Merge pull requestsegmentio#3823 from segmentio/develop
Release 22.46.1
2 parents9c61c83 +b95af21 commitd082983

File tree

14 files changed

+1866
-5331
lines changed

14 files changed

+1866
-5331
lines changed

‎.github/styles/Vocab/Docs/accept.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ API(:?s)
2727
Appboy
2828
Appsflyer
2929
async
30+
Automations
3031
aws
3132
background(?:ed|ing)
3233
Bento

‎scripts/private-destination.js‎

Lines changed: 72 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const PAPI_URL = "https://api.segmentapis.com"
1515

1616
constPRIVATE_DESTINATIONS=yaml.load(fs.readFileSync(path.resolve(__dirname,`../src/_data/catalog/destinations_private.yml`)))
1717
constprivateDests=PRIVATE_DESTINATIONS.items
18+
letprivate=[]
1819
constgetCatalog=async(url,page_token="MA==")=>{
1920
try{
2021
constres=awaitaxios.get(url,{
@@ -36,6 +37,72 @@ const getCatalog = async (url, page_token = "MA==") => {
3637
}
3738
}
3839

40+
constgetDestinationData=async(id)=>{
41+
constres=awaitgetCatalog(`${PAPI_URL}/catalog/destinations/${id}`)
42+
destination=res.data.destinationMetadata
43+
letsettings=destination.options
44+
settings.sort((a,b)=>{
45+
if(a.name.toLowerCase()<b.name.toLowerCase()){
46+
return-1;
47+
}
48+
if(a.name.toLowerCase()>b.name.toLowerCase()){
49+
return1;
50+
}
51+
return0;
52+
})
53+
letactions=destination.actions
54+
letpresets=destination.presets
55+
56+
57+
58+
letupdatePrivateDest={
59+
id:destination.id,
60+
display_name:destination.name,
61+
name:destination.name,
62+
slug:destination.slug,
63+
previous_names:destination.previousNames,
64+
website:destination.website,
65+
status:destination.status,
66+
logo:{
67+
url:destination.logos.default
68+
},
69+
mark:{
70+
url:destination.logos.mark
71+
},
72+
methods:destination.supportedMethods,
73+
platforms:destination.supportedPlatforms,
74+
components:destination.components,
75+
browserUnbundlingSupported:destination.supportedFeatures.browserUnbundling,
76+
browserUnbundlingPublic:destination.supportedFeatures.browserUnbundlingPublic,
77+
replay:destination.supportedFeatures.replay,
78+
settings,
79+
actions,
80+
presets
81+
}
82+
83+
84+
if(destination.status==="PRIVATE_BETA"||destination.status==="PRIVATE_BUILDING"){
85+
private.push(updatePrivateDest)
86+
}else{
87+
console.log(`${destination.name} is public and will be removed`)
88+
}
89+
90+
constoptions={
91+
noArrayIndent:false
92+
}
93+
94+
output="# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT\n"
95+
vartodayDate=newDate().toISOString().slice(0,10);
96+
output+="# destination data last updated "+todayDate+" \n";
97+
output+=yaml.dump({
98+
items:private
99+
},options)
100+
fs.writeFileSync(path.resolve(__dirname,`../src/_data/catalog/destinations_private.yml`),output);
101+
}
102+
103+
104+
105+
39106
constaddPrivateDestination=async()=>{
40107
constDEST_ID=awaitprompt({
41108
type:'input',
@@ -52,65 +119,12 @@ const addPrivateDestination = async () => {
52119
console.log("This destination is already captured.")
53120
return
54121
}else{
55-
constres=awaitgetCatalog(`${PAPI_URL}/catalog/destinations/${DEST_ID.id}`)
56-
destination=res.data.destinationMetadata
57-
letsettings=destination.options
58-
59-
settings.sort((a,b)=>{
60-
if(a.name.toLowerCase()<b.name.toLowerCase()){
61-
return-1;
62-
}
63-
if(a.name.toLowerCase()>b.name.toLowerCase()){
64-
return1;
65-
}
66-
return0;
67-
})
68-
letactions=destination.actions
69-
letpresets=destination.presets
70-
71-
if(destination.status=="PRIVATE_BETA"||destination.status=="PRIVATE_BUILDING"){
72-
73-
letupdatePrivateDest={
74-
id:destination.id,
75-
display_name:destination.name,
76-
name:destination.name,
77-
slug:destination.slug,
78-
previous_names:destination.previousNames,
79-
website:destination.website,
80-
status:destination.status,
81-
logo:{
82-
url:destination.logos.default
83-
},
84-
mark:{
85-
url:destination.logos.mark
86-
},
87-
methods:destination.supportedMethods,
88-
platforms:destination.supportedPlatforms,
89-
components:destination.components,
90-
browserUnbundlingSupported:destination.supportedFeatures.browserUnbundling,
91-
browserUnbundlingPublic:destination.supportedFeatures.browserUnbundlingPublic,
92-
replay:destination.supportedFeatures.replay,
93-
settings,
94-
actions,
95-
presets
96-
}
97-
98-
privateDests.push(updatePrivateDest)
99-
constoptions={
100-
noArrayIndent:false
101-
}
122+
privateIds.push(DEST_ID.id)
123+
}
102124

103-
output="# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT\n"
104-
vartodayDate=newDate().toISOString().slice(0,10);
105-
output+="# destination data last updated "+todayDate+" with "+destination.name+" \n";
106-
output+=yaml.dump({
107-
items:privateDests
108-
},options)
109-
//console.log(output)
110-
fs.writeFileSync(path.resolve(__dirname,`../src/_data/catalog/destinations_private.yml`),output);
111-
}else{
112-
console.log("This destination is already public")
113-
}
125+
for(constelementinprivateIds){
126+
letcurrentId=privateIds[element]
127+
getDestinationData(currentId)
114128
}
115129

116130
}

‎src/_data/catalog/destination_categories.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
# destination categories last updated 2022-11-10
2+
# destination categories last updated 2022-11-15
33
items:
44
-display_name:A/B Testing
55
slug:a-b-testing

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp