Merge branch 'development' into webui-hotkeys

This commit is contained in:
Lincoln Stein 2022-10-06 13:25:12 -04:00 committed by GitHub
commit e4ef7bdbb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 780 additions and 7 deletions

View File

@ -0,0 +1,42 @@
# This workflow:
# - Sets up Node.js with a yarn cache
# - Installs packages via yarn, using yarn.lock
# - Builds the frontend bundle
# - Commits the frontend bundle
name: Frontend CI/CD [dev]
on:
push:
branches: [ "development" ]
paths: 'frontend/**'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'frontend'
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: install packages
run: yarn install --immutable --immutable-cache --check-cache
- name: build frontend bundle [dev]
run: yarn build-dev
- name: setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: commit bundle [dev]
run: |
git add dist/* -f
git commit -m "[bot] builds dev bundle"
git push origin development

View File

@ -0,0 +1,42 @@
# This workflow:
# - Sets up Node.js with a yarn cache
# - Installs packages via yarn, using yarn.lock
# - Builds the frontend bundle
# - Commits the frontend bundle
name: Frontend CI/CD [production]
on:
push:
branches: [ "main" ]
paths: 'frontend/**'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'frontend'
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: install packages
run: yarn install --immutable --immutable-cache --check-cache
- name: build frontend bundle [production]
run: yarn build
- name: setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: commit bundle [production]
run: |
git add dist/* -f
git commit -m "[bot] builds production bundle"
git push origin main

View File

@ -53,17 +53,14 @@ class InvokeAIWebServer:
cors_allowed_origins = [
'http://127.0.0.1:5173',
'http://localhost:5173',
'http://localhost:9090'
]
additional_allowed_origins = (
opt.cors if opt.cors else []
) # additional CORS allowed origins
if self.host == '127.0.0.1':
cors_allowed_origins.extend(
[
f'http://{self.host}:{self.port}',
f'http://localhost:{self.port}',
]
)
cors_allowed_origins.append(f'http://{self.host}:{self.port}')
if self.host == '127.0.0.1' or self.host == '0.0.0.0':
cors_allowed_origins.append(f'http://localhost:{self.port}')
cors_allowed_origins = (
cors_allowed_origins + additional_allowed_origins
)

2
frontend/.gitignore vendored
View File

@ -23,3 +23,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?
dist/*

690
frontend/dist/assets/index.a37f9479.js vendored Normal file

File diff suppressed because one or more lines are too long