update server bundle
This commit is contained in:
Родитель
69bef30618
Коммит
f346fae4cd
|
@ -13,7 +13,7 @@
|
|||
"build": "graphql-codegen",
|
||||
"start": "graphql-codegen -w"
|
||||
},
|
||||
"dependencies": {
|
||||
"devDependencies": {
|
||||
"@graphql-codegen/cli": "^1.17.7",
|
||||
"@graphql-codegen/introspection": "^1.17.7",
|
||||
"@graphql-codegen/typescript": "^1.17.7",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (c) Microsoft. All rights reserved.
|
||||
* Licensed under the MIT license. See LICENSE file in the project.
|
||||
*/
|
||||
import { promises as fs, createWriteStream } from 'fs'
|
||||
import { promises as fs, createWriteStream, existsSync } from 'fs'
|
||||
import * as path from 'path'
|
||||
import archiver from 'archiver'
|
||||
|
||||
|
@ -55,15 +55,17 @@ async function walkDir(directory: string): Promise<string[]> {
|
|||
|
||||
for (const file of directoryFiles) {
|
||||
const filePath = path.join(currentDirectoryPath, file)
|
||||
const stats = await fs.stat(filePath)
|
||||
if (stats.isFile()) {
|
||||
allFiles = [...allFiles, filePath]
|
||||
} else if (stats.isDirectory()) {
|
||||
directoryStack.push(filePath)
|
||||
} else {
|
||||
console.warn(
|
||||
`${filePath} is not a file or directory. Skipping compression`,
|
||||
)
|
||||
if (existsSync(filePath)) {
|
||||
const stats = await fs.stat(filePath)
|
||||
if (stats.isFile()) {
|
||||
allFiles = [...allFiles, filePath]
|
||||
} else if (stats.isDirectory()) {
|
||||
directoryStack.push(filePath)
|
||||
} else {
|
||||
console.warn(
|
||||
`${filePath} is not a file or directory. Skipping compression`,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
"build": "tsc -p .",
|
||||
"bundle:clean": "essex clean node_modules",
|
||||
"bundle:npm-install": "npm install --production",
|
||||
"bundle:mkdir": "shx mkdir -p ./node_modules/@newsthreads/schema",
|
||||
"bundle:copy-schema": "shx cp -rf ../schema/ ./node_modules/@newsthreads/schema/",
|
||||
"bundle:mkdir": "shx mkdir -p ./node_modules/@newsthreads/schema/lib",
|
||||
"bundle:copy-schema": "shx cp -rf ../schema/* ./node_modules/@newsthreads/schema",
|
||||
"bundle:pnpm-install": "pnpm install",
|
||||
"bundle:server": "pnpm slurp zip deploy.zip config dist graphql node_modules host.json package.json",
|
||||
"bundle": "run-s bundle:clean bundle:npm-install bundle:mkdir bundle:copy-schema bundle:server",
|
||||
|
|
442
pnpm-lock.yaml
442
pnpm-lock.yaml
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче