mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'development' into webui-hotkeys
This commit is contained in:
commit
e4ef7bdbb9
42
.github/workflows/build-frontend-development.yml
vendored
Normal file
42
.github/workflows/build-frontend-development.yml
vendored
Normal 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
|
42
.github/workflows/build-frontend-production.yml
vendored
Normal file
42
.github/workflows/build-frontend-production.yml
vendored
Normal 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
|
@ -53,17 +53,14 @@ class InvokeAIWebServer:
|
|||||||
cors_allowed_origins = [
|
cors_allowed_origins = [
|
||||||
'http://127.0.0.1:5173',
|
'http://127.0.0.1:5173',
|
||||||
'http://localhost:5173',
|
'http://localhost:5173',
|
||||||
|
'http://localhost:9090'
|
||||||
]
|
]
|
||||||
additional_allowed_origins = (
|
additional_allowed_origins = (
|
||||||
opt.cors if opt.cors else []
|
opt.cors if opt.cors else []
|
||||||
) # additional CORS allowed origins
|
) # additional CORS allowed origins
|
||||||
if self.host == '127.0.0.1':
|
cors_allowed_origins.append(f'http://{self.host}:{self.port}')
|
||||||
cors_allowed_origins.extend(
|
if self.host == '127.0.0.1' or self.host == '0.0.0.0':
|
||||||
[
|
cors_allowed_origins.append(f'http://localhost:{self.port}')
|
||||||
f'http://{self.host}:{self.port}',
|
|
||||||
f'http://localhost:{self.port}',
|
|
||||||
]
|
|
||||||
)
|
|
||||||
cors_allowed_origins = (
|
cors_allowed_origins = (
|
||||||
cors_allowed_origins + additional_allowed_origins
|
cors_allowed_origins + additional_allowed_origins
|
||||||
)
|
)
|
||||||
|
2
frontend/.gitignore
vendored
2
frontend/.gitignore
vendored
@ -23,3 +23,5 @@ dist-ssr
|
|||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
|
|
||||||
|
dist/*
|
||||||
|
690
frontend/dist/assets/index.a37f9479.js
vendored
Normal file
690
frontend/dist/assets/index.a37f9479.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user