-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathconstants.ts
More file actions
177 lines (129 loc) · 4.8 KB
/
constants.ts
File metadata and controls
177 lines (129 loc) · 4.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { MessageItem } from "vscode";
import { localize } from "./utils/localize";
export const githubApiEndpoint: string = 'https://api.github.com';
export const remoteRepositoriesId: string = 'ms-vscode.remote-repositories';
export const defaultAppLocation: string = '/';
export const defaultApiLocation: string = 'api';
export const productionEnvironmentName: string = 'Production';
export const appSubpathSetting: string = 'appSubpath';
export const apiSubpathSetting: string = 'apiSubpath';
export const appArtifactSubpathSetting: string = 'appArtifactSubpath';
export const outputSubpathSetting: string = 'outputSubpath';
export const configFileName: string = 'staticwebapp.config.json';
export const showActionsMsg: MessageItem = { title: localize('openActions', 'Open Actions in GitHub') };
export const openExistingProject = 'openExistingProject';
export const onlyGitHubSupported: string = localize('onlyGitHubSupported', 'Only Static Web Apps linked to GitHub are supported at this time.');
export const isStartGroup = (t: string): boolean => /##\[group\]/.test(t);
export const isEndGroup = (t: string): boolean => /##\[endgroup\]/.test(t);
export const githubAuthProviderId: string = 'github';
// same scopes as the GitHub extension so we won't have to prompt for auth again
export const githubScopes: string[] = ['repo', 'workflow', 'user:email', 'read:user'];
export const angularOutputLocation = 'dist/<project-name>';
export const swaCliPackageName = '@azure/static-web-apps-cli';
export const installSwaCliUrl: string = 'https://aka.ms/installSwaCli';
export const emulatorAddress = 'http://localhost:4280';
export const swaWatchProblemMatcher = '$swa-watch';
export const swa: string = 'swa';
export const funcAddress: string = 'http://localhost:7071';
export const pwaChrome: string = 'pwa-chrome';
export const shell: string = 'shell';
export const minSwaCliVersion = '0.8.0';
export const swaCliConfigFileName = 'swa-cli.config.json';
export const swaFilter = {
type: 'microsoft.web/staticsites',
};
// https://docs.microsoft.com/en-us/azure/static-web-apps/apis#constraints
export const reservedSettingsPrefixes: (RegExp | string)[] = [/^APPSETTING_/, /^AZUREBLOBSTORAGE_/, /^AZUREFILESSTORAGE_/, /^AZURE_FUNCTION_/, /^CONTAINER_/, /^DIAGNOSTICS_/, /^DOCKER_/, /^FUNCTIONS_/, /^IDENTITY_/, /^MACHINEKEY_/, /^MAINSITE_/, /^MSDEPLOY_/, /^SCMSITE_/, /^SCM_/, /^WEBSITES_/, /^WEBSITE_/, /^WEBSOCKET_/, /^AzureWeb/];
export const gitignoreFileName = '.gitignore';
export const openRemoteProjectMsg: MessageItem = { title: localize('openRemoteProject', 'Open remote repository') };
// Source: https://github.com/github/gitignore/blob/master/Node.gitignore
export const defaultGitignoreContents: string = `# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*`;