Bug694:ツール以外でJavaScriptをURL指定でアップロードするとデプロイエラーになる
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -216,9 +216,7 @@ def deoployappfromkintone(app:str,revision:str,c:config.KINTONE_ENV):
|
||||
headers={config.API_V1_AUTH_KEY:c.API_V1_AUTH_VALUE,"Content-Type": "application/json"}
|
||||
url = f"{c.BASE_URL}{config.API_V1_STR}/preview/app/deploy.json"
|
||||
data = {"apps":[{"app":app,"revision":revision}],"revert": False}
|
||||
print(data)
|
||||
r = httpx.post(url,headers=headers,data=json.dumps(data))
|
||||
print(r.json)
|
||||
return r.json
|
||||
|
||||
# 既定項目に含めるアプリのフィールドのみ取得する
|
||||
@@ -403,9 +401,11 @@ def updateappjscss(app,uploads,c:config.KINTONE_ENV):
|
||||
for key in upload:
|
||||
filename = os.path.basename(key)
|
||||
if key.endswith('.js'):
|
||||
existing_js = next((item for item in current_js if item['file']['name'] == filename), None)
|
||||
existing_js = next((item for item in current_js
|
||||
if item.get('type') == 'FILE' and item['file']['name'] == filename
|
||||
), None)
|
||||
if existing_js:
|
||||
current_js = [item for item in current_js if item['file'].get('name') != filename]
|
||||
current_js = [item for item in current_js if item.get('type') == 'URL' or item['file'].get('name') != filename]
|
||||
dsjs.append({'type':'FILE','file':{'fileKey':upload[key]}})
|
||||
else:
|
||||
if (key.endswith('alc_runtime.js') and config.DEPLOY_MODE == "DEV"):
|
||||
@@ -413,19 +413,15 @@ def updateappjscss(app,uploads,c:config.KINTONE_ENV):
|
||||
else:
|
||||
dsjs.append({'type':'FILE','file':{'fileKey':upload[key]}})
|
||||
elif key.endswith('.css'):
|
||||
existing_css = next((item for item in current_css if item['file']['name'] == filename), None)
|
||||
existing_css = next((item for item in current_css
|
||||
if item.get('type') == 'FILE' and item['file']['name'] == filename
|
||||
), None)
|
||||
if existing_css:
|
||||
current_css = [item for item in current_css if item['file'].get('name') != filename]
|
||||
current_css = [item for item in current_css if item.get('type') == 'URL' or item['file'].get('name') != filename]
|
||||
dscss.append({'type': 'FILE', 'file': {'fileKey': upload[key]}})
|
||||
else:
|
||||
dscss.append({'type': 'FILE', 'file': {'fileKey': upload[key]}})
|
||||
#現在のJSとCSSがdsjsに追加する
|
||||
current_js = [{'type': 'FILE', 'file': {'fileKey': item['file']['fileKey']}}
|
||||
for item in current_js
|
||||
if item.get('type') == 'FILE' and 'fileKey' in item.get('file', {})]
|
||||
current_css = [{'type': 'FILE', 'file': {'fileKey': item['file']['fileKey']}}
|
||||
for item in current_css
|
||||
if item.get('type') == 'FILE' and 'fileKey' in item.get('file', {})]
|
||||
dsjs.extend(current_js)
|
||||
dscss.extend(current_css)
|
||||
mbjs.extend(current_mobile_js)
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
<template v-slot:navigation>
|
||||
<q-stepper-navigation>
|
||||
<div class="row justify-end q-mt-md">
|
||||
<q-btn v-if="step > 1" flat color="primary" @click="$refs.stepper.previous()" label="戻る" class="q-ml-sm" />
|
||||
<q-btn @click="stepperNext" color="primary" :label="step === 2 ? '保存' : '次へ'"
|
||||
<q-btn v-if="step > 1" flat color="primary" @click="$refs.stepper.previous()" label="戻る" class="q-ml-sm" />
|
||||
<q-btn @click="stepperNext" color="primary" :label="step === 2 ? '確定' : '次へ'"
|
||||
:disable="nextBtnCheck()" />
|
||||
</div>
|
||||
</q-stepper-navigation>
|
||||
|
||||
Reference in New Issue
Block a user