mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
feat: Support Windows for development
Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
@@ -204,7 +204,10 @@ sh ./scripts/build.sh
|
||||
|
||||
By default, Docker volumes named dev_db, dev_elastic, and dev_files will be created for the MongoDB, Elasticsearch, and MinIO instances.
|
||||
|
||||
Add the following line to your /etc/hosts file
|
||||
Add the following lines to your hosts file:
|
||||
|
||||
- **macOS / Linux:** `/etc/hosts`
|
||||
- **Windows:** `C:\Windows\System32\drivers\etc\hosts`
|
||||
|
||||
```plain
|
||||
127.0.0.1 huly.local
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
"summary": "Build docker with platform",
|
||||
"description": "use to build all docker containers required for platform",
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
"shellCommand": "./common/scripts/docker.sh"
|
||||
"shellCommand": "node common/scripts/docker.js"
|
||||
},
|
||||
{
|
||||
"commandKind": "global",
|
||||
@@ -253,7 +253,7 @@
|
||||
"summary": "Build docker with platform",
|
||||
"description": "use to build all docker containers required for platform",
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
"shellCommand": "./common/scripts/docker-server.sh && rush docker:up:server"
|
||||
"shellCommand": "node common/scripts/docker-server.js && rush docker:up:server"
|
||||
},
|
||||
{
|
||||
"commandKind": "global",
|
||||
@@ -261,7 +261,7 @@
|
||||
"summary": "Up development build",
|
||||
"description": "Up development build",
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
"shellCommand": "cd ./dev && docker compose up -d --force-recreate"
|
||||
"shellCommand": "docker compose -f dev/docker-compose.yaml up -d --force-recreate"
|
||||
},
|
||||
{
|
||||
"commandKind": "global",
|
||||
@@ -269,7 +269,7 @@
|
||||
"summary": "Up development build",
|
||||
"description": "Up development build",
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
"shellCommand": "cd ./dev && docker compose up -d --force-recreate transactor_cockroach"
|
||||
"shellCommand": "docker compose -f dev/docker-compose.yaml up -d --force-recreate transactor_cockroach"
|
||||
},
|
||||
{
|
||||
"commandKind": "global",
|
||||
@@ -277,7 +277,7 @@
|
||||
"summary": "Up development build",
|
||||
"description": "Up development build",
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
"shellCommand": "cd ./dev/local-mongo && docker compose -p dev up -d --force-recreate"
|
||||
"shellCommand": "docker compose -f dev/local-mongo/docker-compose.yaml -p dev up -d --force-recreate"
|
||||
},
|
||||
{
|
||||
"commandKind": "global",
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
const path = require('path')
|
||||
const { spawnSync } = require('child_process')
|
||||
|
||||
const repoRoot = path.resolve(__dirname, '..', '..')
|
||||
const args = ['docker:build', '-p', '20', '--to', '@hcengineering/pod-server', '--to', '@hcengineering/tool']
|
||||
const result = spawnSync('rush', args, { stdio: 'inherit', cwd: repoRoot })
|
||||
// Mimic "|| true" - always exit 0 so rush docker-server can continue to docker:up:server
|
||||
process.exit(0)
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
const path = require('path')
|
||||
const { spawnSync } = require('child_process')
|
||||
|
||||
const repoRoot = path.resolve(__dirname, '..', '..')
|
||||
const packages = [
|
||||
'@hcengineering/pod-server',
|
||||
'@hcengineering/pod-front',
|
||||
'@hcengineering/prod',
|
||||
'@hcengineering/pod-account',
|
||||
'@hcengineering/pod-workspace',
|
||||
'@hcengineering/pod-collaborator',
|
||||
'@hcengineering/tool',
|
||||
'@hcengineering/pod-print',
|
||||
'@hcengineering/pod-sign',
|
||||
'@hcengineering/pod-analytics-collector',
|
||||
'@hcengineering/rekoni-service',
|
||||
'@hcengineering/pod-ai-bot',
|
||||
'@hcengineering/import-tool',
|
||||
'@hcengineering/pod-stats',
|
||||
'@hcengineering/pod-fulltext',
|
||||
'@hcengineering/pod-love',
|
||||
'@hcengineering/pod-mail',
|
||||
'@hcengineering/pod-datalake',
|
||||
'@hcengineering/pod-mail-worker',
|
||||
'@hcengineering/pod-export',
|
||||
'@hcengineering/pod-media',
|
||||
'@hcengineering/pod-preview',
|
||||
'@hcengineering/pod-link-preview',
|
||||
'@hcengineering/pod-external',
|
||||
'@hcengineering/pod-backup',
|
||||
'@hcengineering/backup-api-pod',
|
||||
'@hcengineering/pod-billing',
|
||||
'@hcengineering/pod-process',
|
||||
'@hcengineering/pod-rating',
|
||||
'@hcengineering/pod-payment'
|
||||
]
|
||||
|
||||
const args = ['docker:build', '-p', '20', ...packages.flatMap(p => ['--to', p])]
|
||||
const result = spawnSync('rush', args, { stdio: 'inherit', cwd: repoRoot })
|
||||
process.exit(result.status !== null ? result.status : 1)
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const { execSync, spawnSync } = require('child_process')
|
||||
|
||||
const image = process.argv[2]
|
||||
if (!image) {
|
||||
console.error('Usage: node docker_build.js <image-name> [.]')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const version = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim()
|
||||
const cleanup = process.env.DOCKER_BUILD_CLEANUP === 'true'
|
||||
const extra = (process.env.DOCKER_EXTRA || '').trim().split(/\s+/).filter(Boolean)
|
||||
|
||||
console.log('Building version:', version)
|
||||
|
||||
const dockerArgs = ['build', '-t', image, '-t', `${image}:${version}`, ...extra, '.']
|
||||
const result = spawnSync('docker', dockerArgs, { stdio: 'inherit', cwd: process.cwd() })
|
||||
if (result.status !== 0) {
|
||||
process.exit(result.status)
|
||||
}
|
||||
|
||||
if (cleanup) {
|
||||
console.log('Cleaning up build artifacts...')
|
||||
const dirs = ['bundle', 'dist', '.rush']
|
||||
for (const dir of dirs) {
|
||||
const fullPath = path.join(process.cwd(), dir)
|
||||
if (fs.existsSync(fullPath)) {
|
||||
console.log(' Removing', dir + '/')
|
||||
fs.rmSync(fullPath, { recursive: true, force: true })
|
||||
}
|
||||
}
|
||||
// Skip du -sh on Windows (no du); optional on Unix
|
||||
try {
|
||||
const size = execSync('du -sh . 2>/dev/null | cut -f1', { encoding: 'utf8' }).trim()
|
||||
if (size) console.log(' Size after cleanup:', size)
|
||||
} catch (_) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const withIcons = process.argv.includes('--with-icons')
|
||||
|
||||
// Run from desktop-package or qms-desktop-package directory (cwd = package dir)
|
||||
const distDir = path.join(process.cwd(), 'dist')
|
||||
const desktopDist = path.join(process.cwd(), '..', 'desktop', 'dist')
|
||||
const desktopEnv = path.join(process.cwd(), '..', 'desktop', '.env')
|
||||
|
||||
if (fs.existsSync(distDir)) {
|
||||
fs.rmSync(distDir, { recursive: true, force: true })
|
||||
}
|
||||
|
||||
fs.cpSync(desktopDist, distDir, { recursive: true })
|
||||
|
||||
if (fs.existsSync(desktopEnv)) {
|
||||
fs.cpSync(desktopEnv, path.join(distDir, '.env'))
|
||||
}
|
||||
|
||||
if (withIcons) {
|
||||
const publicDir = path.join(distDir, 'ui', 'public')
|
||||
fs.mkdirSync(publicDir, { recursive: true })
|
||||
const srcDir = path.join(process.cwd(), 'src')
|
||||
const iconPng = path.join(srcDir, 'AppIcon.png')
|
||||
const iconIco = path.join(srcDir, 'AppIcon.ico')
|
||||
if (fs.existsSync(iconPng)) {
|
||||
fs.cpSync(iconPng, path.join(publicDir, 'AppIcon.png'))
|
||||
}
|
||||
if (fs.existsSync(iconIco)) {
|
||||
fs.cpSync(iconIco, path.join(publicDir, 'AppIcon.ico'))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const cwd = process.cwd()
|
||||
const distDir = path.join(cwd, 'dist')
|
||||
const prodDist = path.join(cwd, '..', '..', 'dev', 'prod', 'dist')
|
||||
const prodPublic = path.join(cwd, '..', '..', 'dev', 'prod', 'public')
|
||||
|
||||
if (fs.existsSync(distDir)) {
|
||||
fs.rmSync(distDir, { recursive: true, force: true })
|
||||
}
|
||||
|
||||
fs.cpSync(prodDist, distDir, { recursive: true })
|
||||
|
||||
if (fs.existsSync(prodPublic)) {
|
||||
const entries = fs.readdirSync(prodPublic, { withFileTypes: true })
|
||||
for (const entry of entries) {
|
||||
const src = path.join(prodPublic, entry.name)
|
||||
const dest = path.join(distDir, entry.name)
|
||||
fs.cpSync(src, dest, { recursive: true })
|
||||
}
|
||||
}
|
||||
|
||||
const configJson = path.join(distDir, 'config.json')
|
||||
if (fs.existsSync(configJson)) {
|
||||
fs.rmSync(configJson, { force: true })
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// Copyright © 2026 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
const path = require('path')
|
||||
const { execSync, spawnSync } = require('child_process')
|
||||
|
||||
const scriptsDir = __dirname
|
||||
const modelVersion = execSync('node show_version.js', { encoding: 'utf8', cwd: scriptsDir }).trim()
|
||||
const version = execSync('node show_tag.js', { encoding: 'utf8', cwd: scriptsDir }).trim()
|
||||
|
||||
process.env.MODEL_VERSION = modelVersion
|
||||
process.env.VERSION = version
|
||||
|
||||
const [cmd, ...args] = process.argv.slice(2)
|
||||
if (!cmd) {
|
||||
process.exit(1)
|
||||
}
|
||||
const command = [cmd, ...args].join(' ')
|
||||
const result = spawnSync(command, { stdio: 'inherit', env: process.env, shell: true })
|
||||
process.exit(result.status !== null ? result.status : 1)
|
||||
+19
-13
@@ -13,19 +13,25 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
const exec = require('child_process').exec
|
||||
const execSync = require('child_process').execSync
|
||||
|
||||
exec('git describe --tags --abbrev=0', (err, stdout, stderr) => {
|
||||
if (err !== null) {
|
||||
console.log('"0.6.0"')
|
||||
}
|
||||
const rawVersion = stdout.trim().replace('v', '').replace('s', '').split('.')
|
||||
if (rawVersion.length === 3) {
|
||||
const version = {
|
||||
major: parseInt(rawVersion[0]),
|
||||
minor: parseInt(rawVersion[1]),
|
||||
patch: parseInt(rawVersion[2])
|
||||
function main() {
|
||||
try {
|
||||
const stdout = execSync('git describe --tags --abbrev=0', { encoding: 'utf8' })
|
||||
const rawVersion = stdout.trim().replace('v', '').replace('s', '').split('.')
|
||||
if (rawVersion.length === 3) {
|
||||
const version = {
|
||||
major: parseInt(rawVersion[0]),
|
||||
minor: parseInt(rawVersion[1]),
|
||||
patch: parseInt(rawVersion[2])
|
||||
}
|
||||
console.log(`"${version.major}.${version.minor}.${version.patch}"`)
|
||||
return
|
||||
}
|
||||
console.log(`"${version.major}.${version.minor}.${version.patch}"`)
|
||||
} catch (err) {
|
||||
// git failed or no tags
|
||||
}
|
||||
})
|
||||
console.log('"0.6.0"')
|
||||
}
|
||||
|
||||
main()
|
||||
|
||||
@@ -15,25 +15,23 @@
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const exec = require('child_process').exec
|
||||
const execSync = require('child_process').execSync
|
||||
|
||||
function main() {
|
||||
exec('git describe --tags --abbrev=0', (err, stdout) => {
|
||||
if (err !== null) {
|
||||
console.log('"0.6.0"')
|
||||
return
|
||||
}
|
||||
// Take version from file
|
||||
let version
|
||||
try {
|
||||
const versionFilePath = path.resolve(__dirname, 'version.txt')
|
||||
version = fs.readFileSync(versionFilePath, 'utf8').trim()
|
||||
} catch (error) {
|
||||
version = '"0.6.0"'
|
||||
}
|
||||
|
||||
console.log(version)
|
||||
})
|
||||
try {
|
||||
execSync('git describe --tags --abbrev=0', { encoding: 'utf8' })
|
||||
} catch (err) {
|
||||
console.log('"0.6.0"')
|
||||
return
|
||||
}
|
||||
let version
|
||||
try {
|
||||
const versionFilePath = path.resolve(__dirname, 'version.txt')
|
||||
version = fs.readFileSync(versionFilePath, 'utf8').trim()
|
||||
} catch (error) {
|
||||
version = '"0.6.0"'
|
||||
}
|
||||
console.log(version)
|
||||
}
|
||||
|
||||
main()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"template": "@hcengineering/default-package",
|
||||
"scripts": {
|
||||
"_phase:package": "rushx package",
|
||||
"package": "rm -rf ./dist && cp -r ../desktop/dist . && cp ../desktop/.env ./dist && echo 'done'",
|
||||
"package": "node ../common/scripts/package-desktop-copy.js && echo done",
|
||||
"dist": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false NODE_ENV=production VERSION=$(node ../common/scripts/show_tag.js) MODEL_VERSION=$(node ../common/scripts/show_version.js) electron-builder build -p onTag",
|
||||
"dist-local": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false NODE_ENV=production VERSION=$(node ../common/scripts/show_tag.js) MODEL_VERSION=$(node ../common/scripts/show_version.js) electron-builder build",
|
||||
"dist-signed": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=true NODE_ENV=production VERSION=$(node ../common/scripts/show_tag.js) MODEL_VERSION=$(node ../common/scripts/show_version.js) electron-builder build -c.afterSign=scripts/notarize.js -p onTag",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hcengineering/desktop",
|
||||
"version": "0.7.208",
|
||||
"version": "0.7.327",
|
||||
"main": "dist/main/electron.js",
|
||||
"template": "@hcengineering/webpack-package",
|
||||
"scripts": {
|
||||
@@ -9,12 +9,12 @@
|
||||
"_phase:package": "rushx package",
|
||||
"_phase:validate": "compile validate",
|
||||
"_phase:test": "jest --passWithNoTests --silent --forceExit --detectOpenHandles",
|
||||
"package": "rushx bump && cross-env MODEL_VERSION=$(node ../common/scripts/show_version.js) VERSION=$(node ../common/scripts/show_tag.js) NODE_ENV=production NODE_OPTIONS='--max-old-space-size=4094' webpack --stats-error-details && echo 'done'",
|
||||
"webpack": "cross-env MODEL_VERSION=$(node ../common/scripts/show_version.js) VERSION=$(node ../common/scripts/show_tag.js) NODE_ENV=development webpack --stats-error-details --progress -w",
|
||||
"devp": "cross-env MODEL_VERSION=$(node ../common/scripts/show_version.js) VERSION=$(node ../common/scripts/show_tag.js) NODE_ENV=production CLIENT_TYPE=dev webpack --progress -w",
|
||||
"dev": "cross-env MODEL_VERSION=$(node ../common/scripts/show_version.js) VERSION=$(node ../common/scripts/show_tag.js) NODE_ENV=development webpack --progress -w",
|
||||
"start": "cross-env MODEL_VERSION=$(node ../common/scripts/show_version.js) VERSION=$(node ../common/scripts/show_tag.js) NODE_ENV=production electron --no-sandbox .",
|
||||
"start-dev": "cross-env MODEL_VERSION=$(node ../common/scripts/show_version.js) VERSION=$(node ../common/scripts/show_tag.js) NODE_ENV=development electron --no-sandbox .",
|
||||
"package": "rushx bump && node ../common/scripts/run-with-version.js cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=4094 webpack --stats-error-details && echo done",
|
||||
"webpack": "node ../common/scripts/run-with-version.js cross-env NODE_ENV=development webpack --stats-error-details --progress -w",
|
||||
"devp": "node ../common/scripts/run-with-version.js cross-env NODE_ENV=production CLIENT_TYPE=dev webpack --progress -w",
|
||||
"dev": "node ../common/scripts/run-with-version.js cross-env NODE_ENV=development webpack --progress -w",
|
||||
"start": "node ../common/scripts/run-with-version.js cross-env NODE_ENV=production electron --no-sandbox .",
|
||||
"start-dev": "node ../common/scripts/run-with-version.js cross-env NODE_ENV=development electron --no-sandbox .",
|
||||
"test": "jest --passWithNoTests --silent --forceExit --verbose --detectOpenHandles",
|
||||
"test:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --no-cache",
|
||||
"format": "format",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js --entry=src/__start.ts --keep-names=true --define=MODEL_VERSION --define=GIT_REVISION --sourcemap=external",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/import-tool",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/import-tool",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/import-tool . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/import-tool",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/import-tool staging",
|
||||
"docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/import-tool",
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"_phase:package": "rushx package",
|
||||
"_phase:validate": "rm -rf ./types && compile validate",
|
||||
"package": "rm -rf ./dist && cross-env NODE_ENV=production webpack --stats-error-details && echo 'done'",
|
||||
"analyze": "rm -rf ./dist && cross-env NODE_ENV=production webpack --profile --json > stats.json",
|
||||
"_phase:validate": "node -e \"require('fs').rmSync('./types',{recursive:true,force:true})\" && compile validate",
|
||||
"package": "node -e \"require('fs').rmSync('./dist',{recursive:true,force:true})\" && cross-env NODE_ENV=production webpack --stats-error-details && echo done",
|
||||
"analyze": "node -e \"require('fs').rmSync('./dist',{recursive:true,force:true})\" && cross-env NODE_ENV=production webpack --profile --json > stats.json",
|
||||
"show": "webpack-bundle-analyzer stats.json dist",
|
||||
"dev-server": "cross-env USE_CACHE=false CLIENT_TYPE=dev-server webpack serve",
|
||||
"dev-server-test": "cross-env USE_CACHE=false CLIENT_TYPE=dev-server-test webpack serve",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js --entry=src/__start.ts --keep-names=true --external=snappy --sourcemap=external --define:MODEL_VERSION --define:GIT_REVISION",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/tool",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/tool",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/tool . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/tool",
|
||||
"docker:abuild": "docker build -t hardcoreeng/tool . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/tool",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/tool staging",
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const { execSync, spawnSync } = require('child_process')
|
||||
|
||||
const image = process.argv[2]
|
||||
if (!image) {
|
||||
console.error('Usage: node docker_build.js <image-name> [.]')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const version = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim()
|
||||
const cleanup = process.env.DOCKER_BUILD_CLEANUP === 'true'
|
||||
const extra = (process.env.DOCKER_EXTRA || '').trim().split(/\s+/).filter(Boolean)
|
||||
|
||||
console.log('Building version:', version)
|
||||
|
||||
const dockerArgs = ['build', '-t', image, '-t', `${image}:${version}`, ...extra, '.']
|
||||
const result = spawnSync('docker', dockerArgs, { stdio: 'inherit', cwd: process.cwd() })
|
||||
if (result.status !== 0) {
|
||||
process.exit(result.status)
|
||||
}
|
||||
|
||||
if (cleanup) {
|
||||
console.log('Cleaning up build artifacts...')
|
||||
const dirs = ['bundle', 'dist', '.rush']
|
||||
for (const dir of dirs) {
|
||||
const fullPath = path.join(process.cwd(), dir)
|
||||
if (fs.existsSync(fullPath)) {
|
||||
console.log(' Removing', dir + '/')
|
||||
fs.rmSync(fullPath, { recursive: true, force: true })
|
||||
}
|
||||
}
|
||||
// Skip du -sh on Windows (no du); optional on Unix
|
||||
try {
|
||||
const size = execSync('du -sh . 2>/dev/null | cut -f1', { encoding: 'utf8' }).trim()
|
||||
if (size) console.log(' Size after cleanup:', size)
|
||||
} catch (_) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js --entry=src/index.ts --keep-names=true --bundle=true --sourcemap=external --external=*.node --external=zeromq",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/network-pod",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/network-pod",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/network-pod . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/network-pod",
|
||||
"docker:abuild": "docker build -t hardcoreeng/network-pod . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/network-pod",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/network-pod staging",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js --entry=src/index.ts --keep-names=true --bundle=true --sourcemap=external --external=zeromq",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/network-tool",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/network-tool",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/network-tool . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/network-tool",
|
||||
"docker:abuild": "docker build -t hardcoreeng/network-tool . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/network-tool",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/network-tool staging",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js --entry=src/__start.ts --keep-names=true --define=MODEL_VERSION --sourcemap=external --external=*.node --external=snappy",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/account",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/account",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/account . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/account",
|
||||
"docker:abuild": "docker build -t hardcoreeng/account . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/account",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/account staging",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"get-model": "node ../../common/scripts/esbuild.js --entry=src/get-model.ts --keep-names=true --bundle=true --define=MODEL_VERSION --define=VERSION --define=GIT_REVISION && node ./bundle/bundle.js > ./bundle/model.json",
|
||||
"bundle": "rushx get-model && node ../../common/scripts/esbuild.js --entry=src/index.ts --keep-names=true --bundle=true --sourcemap=external --external=*.node",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/backup",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/backup",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/backup . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/backup",
|
||||
"docker:abuild": "docker build -t hardcoreeng/backup . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/backup",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/backup staging",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js --entry=src/__start.ts --keep-names=true --sourcemap=external --external=*.node --external=snappy --external=bufferutil",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/collaborator",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/collaborator",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/collaborator . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/collaborator",
|
||||
"docker:abuild": "docker build -t hardcoreeng/collaborator . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/collaborator",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/collaborator staging",
|
||||
|
||||
Vendored
+76
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const { spawnSync } = require('child_process')
|
||||
|
||||
const cwd = process.cwd()
|
||||
const registry = 'hardcoreeng'
|
||||
const tag = 'latest'
|
||||
const servicesDir = path.join(cwd, 'services.d')
|
||||
const tempDir = path.join(cwd, '.build-cache')
|
||||
|
||||
fs.mkdirSync(tempDir, { recursive: true })
|
||||
|
||||
const gitignorePath = path.join(cwd, '.gitignore')
|
||||
const gitignoreEntry = '.build-cache'
|
||||
if (fs.existsSync(gitignorePath)) {
|
||||
const content = fs.readFileSync(gitignorePath, 'utf8')
|
||||
if (!content.split(/\r?\n/).some(line => line.trim() === gitignoreEntry)) {
|
||||
fs.appendFileSync(gitignorePath, '\n' + gitignoreEntry + '\n')
|
||||
}
|
||||
} else {
|
||||
fs.writeFileSync(gitignorePath, gitignoreEntry + '\n')
|
||||
}
|
||||
|
||||
function getFirstLine(filePath) {
|
||||
const content = fs.readFileSync(filePath, 'utf8')
|
||||
const lines = content.split(/\r?\n/)
|
||||
for (const line of lines) {
|
||||
const trimmed = line.trim()
|
||||
if (trimmed && !trimmed.startsWith('#')) {
|
||||
return trimmed
|
||||
}
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
function dockerImageExists(image) {
|
||||
const r = spawnSync('docker', ['image', 'inspect', image], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] })
|
||||
return r.status === 0
|
||||
}
|
||||
|
||||
const serviceFiles = fs.readdirSync(servicesDir, { withFileTypes: true })
|
||||
.filter(d => d.isFile() && d.name.endsWith('.service') && !d.name.startsWith('-'))
|
||||
.map(d => path.join(servicesDir, d.name))
|
||||
.sort()
|
||||
|
||||
for (const file of serviceFiles) {
|
||||
const line = getFirstLine(file)
|
||||
const parts = line.split(/\s+/).map(p => p.trim()).filter(Boolean)
|
||||
const targetRepo = parts[0]
|
||||
const source = parts[1]
|
||||
if (!targetRepo || !source) continue
|
||||
|
||||
const target = `${registry}/${targetRepo}:${tag}`
|
||||
if (dockerImageExists(target)) {
|
||||
console.log('Exists (skipping):', target)
|
||||
continue
|
||||
}
|
||||
spawnSync('docker', ['pull', '--quiet', source], { stdio: 'inherit', cwd })
|
||||
spawnSync('docker', ['tag', source, target], { stdio: 'inherit', cwd })
|
||||
console.log('Pull&Tag:', source, '->', target)
|
||||
}
|
||||
Vendored
+52
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const { execSync, spawnSync } = require('child_process')
|
||||
|
||||
const cwd = process.cwd()
|
||||
const registry = 'hardcoreeng'
|
||||
const tag = execSync('git describe --tags --abbrev=0', { encoding: 'utf8', cwd }).trim()
|
||||
const servicesDir = path.join(cwd, 'services.d')
|
||||
|
||||
function getFirstLine(filePath) {
|
||||
const content = fs.readFileSync(filePath, 'utf8')
|
||||
const lines = content.split(/\r?\n/)
|
||||
for (const line of lines) {
|
||||
const trimmed = line.trim()
|
||||
if (trimmed && !trimmed.startsWith('#')) {
|
||||
return trimmed
|
||||
}
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
const serviceFiles = fs.readdirSync(servicesDir, { withFileTypes: true })
|
||||
.filter(d => d.isFile() && d.name.endsWith('.service') && !d.name.startsWith('-'))
|
||||
.map(d => path.join(servicesDir, d.name))
|
||||
.sort()
|
||||
|
||||
for (const file of serviceFiles) {
|
||||
const line = getFirstLine(file)
|
||||
const parts = line.split(/\s+/).map(p => p.trim()).filter(Boolean)
|
||||
const targetRepo = parts[0]
|
||||
const source = parts[1]
|
||||
if (!targetRepo || !source) continue
|
||||
|
||||
const target = `${registry}/${targetRepo}:${tag}`
|
||||
spawnSync('docker', ['buildx', 'imagetools', 'create', '--tag', target, source], { stdio: 'inherit', cwd })
|
||||
console.log('Copy:', source, '->', target)
|
||||
}
|
||||
Vendored
+2
-2
@@ -5,8 +5,8 @@
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"docker:build": "sh bin/build.sh",
|
||||
"docker:push": "sh bin/push.sh",
|
||||
"docker:build": "node bin/build.js",
|
||||
"docker:push": "node bin/push.js",
|
||||
"format": "true"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js --entry=src/__start.ts --keep-names=true --define=MODEL_VERSION --define=VERSION --sourcemap=external --minify --external=sharp",
|
||||
"package": "rm -rf ./dist && cp -r ../../dev/prod/dist . && cp -r ../../dev/prod/public/* ./dist/ && rm ./dist/config.json",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/front",
|
||||
"package": "node ../../common/scripts/package-pod-front-copy.js",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/front",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/front staging",
|
||||
"docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/front",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/front . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/front",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"get-model": "node ../../common/scripts/esbuild.js --entry=src/get-model.ts --keep-names=true --bundle=true --define=MODEL_VERSION --define=VERSION --define=GIT_REVISION && node ./bundle/bundle.js > ./bundle/model.json",
|
||||
"bundle": "rushx get-model && node ../../common/scripts/esbuild.js --keep-names=true --bundle=true --external=*.node --external=snappy --sourcemap=external",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/fulltext",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/fulltext",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/fulltext . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/fulltext",
|
||||
"docker:abuild": "docker build -t hardcoreeng/fulltext . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/fulltext",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/fulltext staging",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js --keep-names=true --sourcemap=external",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/link-preview",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/link-preview",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/link-preview staging",
|
||||
"docker:abuild": "docker build -t hardcoreeng/link-preview . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/link-preview",
|
||||
"docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/link-preview",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js --external=ws",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/media",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/media",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/media staging",
|
||||
"docker:abuild": "docker build -t hardcoreeng/media . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/media",
|
||||
"docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/media",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js --keep-names=true --sourcemap=external --external=sharp",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/preview",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/preview",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/preview staging",
|
||||
"docker:abuild": "docker build -t hardcoreeng/preview . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/preview",
|
||||
"docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/preview",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"get-model": "node ../../common/scripts/esbuild.js --entry=src/get-model.ts -keep-names=true --define=MODEL_VERSION --define=VERSION --define=GIT_REVISION --bundle=true && node ./bundle/bundle.js > ./bundle/model.json",
|
||||
"bundle": "rushx get-model && node ../../common/scripts/esbuild.js --entry=src/__start.ts --keep-names=true --bundle=true --sourcemap=external --external=*.node --external=bufferutil --external=snappy --define=MODEL_VERSION --define=VERSION --define=GIT_REVISION --external=utf-8-validate --external=msgpackr-extract",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/transactor",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/transactor",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/transactor . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/transactor",
|
||||
"docker:abuild": "docker build -t hardcoreeng/transactor . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/transactor",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/transactor staging",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js --entry=src/__start.ts --keep-names=true --sourcemap=external --define=MODEL_VERSION --external=*.node --external=snappy",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/stats",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/stats",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/stats . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/stats",
|
||||
"docker:abuild": "docker build -t hardcoreeng/stats . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/stats",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/stats staging",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js --entry=src/__start.ts --keep-names=true --sourcemap=external --external=*.node --define=MODEL_VERSION --external=snappy --minify=true",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/workspace",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/workspace",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/workspace . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/workspace",
|
||||
"docker:abuild": "docker build -t hardcoreeng/workspace . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/workspace",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/workspace staging",
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"template": "@hcengineering/default-package",
|
||||
"scripts": {
|
||||
"_phase:package": "rushx package",
|
||||
"package": "rm -rf ./dist && cp -r ../desktop/dist . && cp ../desktop/.env ./dist && cp src/AppIcon.png ./dist/ui/public && cp src/AppIcon.ico ./dist/ui/public && echo 'done'",
|
||||
"package": "node ../common/scripts/package-desktop-copy.js --with-icons && echo done",
|
||||
"dist": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false NODE_ENV=production VERSION=$(node ../common/scripts/show_tag.js) MODEL_VERSION=$(node ../common/scripts/show_version.js) electron-builder build -p onTag",
|
||||
"dist-local": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false NODE_ENV=production VERSION=$(node ../common/scripts/show_tag.js) MODEL_VERSION=$(node ../common/scripts/show_version.js) electron-builder build",
|
||||
"dist-signed": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=true NODE_ENV=production VERSION=$(node ../common/scripts/show_tag.js) MODEL_VERSION=$(node ../common/scripts/show_version.js) electron-builder build -c.afterSign=scripts/notarize.js -p onTag",
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "node esbuild.config.js",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/love-agent",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/love-agent",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/love-agent",
|
||||
"lint": "eslint src/**/*.ts",
|
||||
"lint:fix": "eslint --fix src/**/*.ts",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/ai-bot",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/ai-bot",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/ai-bot staging",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/ai-bot",
|
||||
"docker:tbuild": "rush bundle --to @hcengineering/pod-ai-bot && docker build -t hardcoreeng/ai-bot . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/ai-bot",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/analytics-collector",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/analytics-collector",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/analytics-collector staging",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/analytics-collector",
|
||||
"docker:tbuild": "rush bundle --to @hcengineering/pod-analytics-collector && docker build -t hardcoreeng/analytics-collector . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/analytics-collector",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js --keep-names=true --sourcemap=external",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/backup-api",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/backup-api",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/backup-api . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/backup-api",
|
||||
"docker:abuild": "docker build -t hardcoreeng/backup-api . --platform=linux/arm64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/backup-api",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/backup-api staging",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js --keep-names=true --sourcemap=external",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/billing",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/billing",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/billing . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/billing",
|
||||
"docker:abuild": "docker build -t hardcoreeng/billing . --platform=linux/arm64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/billing",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/billing staging",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js --external=ws",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/calendar-mailer",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/calendar-mailer",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/calendar-mailer . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/calendar-mailer",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/calendar-mailer staging",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/calendar-mailer",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/calendar",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/calendar",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/calendar . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/calendar",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/calendar staging",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/calendar",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js --keep-names=true --sourcemap=external",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/datalake",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/datalake",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/datalake . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/datalake",
|
||||
"docker:abuild": "docker build -t hardcoreeng/datalake . --platform=linux/arm64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/datalake",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/datalake staging",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js --keep-names=true",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/export",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/export",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/export . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/export",
|
||||
"docker:abuild": "docker build -t hardcoreeng/export . --platform=linux/arm64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/export",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/export staging",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js --sourcemap=external",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/github",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/github",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/github staging",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/github",
|
||||
"docker:tbuild": "rush bundle --to @hcengineering/pod-github && docker build -t hardcoreeng/github . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/github",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/gmail",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/gmail",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/gmail . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/gmail",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/gmail staging",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/gmail",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/love .",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/love .",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/love . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/love",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/love staging",
|
||||
"docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/love",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js --external=ws",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/mail-worker",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/mail-worker",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/mail-worker staging",
|
||||
"docker:abuild": "docker build -t hardcoreeng/mail-worker . --platform=linux/arm64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/mail-worker",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/mail-worker",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/mail",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/mail",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/mail staging",
|
||||
"docker:abuild": "docker build -t hardcoreeng/mail . --platform=linux/arm64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/mail",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/mail",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/notification",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/notification",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/notification staging",
|
||||
"docker:abuild": "docker build -t hardcoreeng/notification . --platform=linux/arm64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/notification",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/notification",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js --keep-names=true --sourcemap=external",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/payment",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/payment",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/payment . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/payment",
|
||||
"docker:abuild": "docker build -t hardcoreeng/payment . --platform=linux/arm64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/payment",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/payment staging",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js --keep-names=true",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/print",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/print",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/print . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/print",
|
||||
"docker:abuild": "docker build -t hardcoreeng/print . --platform=linux/arm64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/print",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/print staging",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/process .",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/process .",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/process . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/process",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/process staging",
|
||||
"docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/process",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"get-model": "node ../../common/scripts/esbuild.js --entry=src/get-model.ts --keep-names=true --bundle=true --define=MODEL_VERSION --define=VERSION --define=GIT_REVISION && node ./bundle/bundle.js > ./bundle/model.json",
|
||||
"bundle": "rushx get-model && node ../../common/scripts/esbuild.js --entry=./src/__start__.ts --keep-names=true --bundle=true --external=*.node --external=snappy --sourcemap=external",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/rating",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/rating",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/rating . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/rating",
|
||||
"docker:abuild": "docker build -t hardcoreeng/rating . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/rating",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/rating staging",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"_phase:bundle": "rushx bundle",
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/rekoni-service",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/rekoni-service",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/rekoni-service . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/rekoni-service",
|
||||
"docker:abuild": "docker build -t hardcoreeng/rekoni-service . --platform=linux/arm64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/rekoni-service",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/rekoni-service staging",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/sign",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/sign",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/sign . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/sign",
|
||||
"docker:abuild": "docker build -t hardcoreeng/sign . --platform=linux/arm64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/sign",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/sign staging",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/telegram-bot",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/telegram-bot",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/telegram-bot staging",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/telegram-bot",
|
||||
"run-local": "cross-env ts-node src/index.ts",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/telegram",
|
||||
"docker:build": "node ../../../common/scripts/docker_build.js hardcoreeng/telegram",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/telegram . --platform=linux/amd64 && ../../../common/scripts/docker_tag_push.sh hardcoreeng/telegram",
|
||||
"docker:staging": "../../../common/scripts/docker_tag.sh hardcoreeng/telegram staging",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/telegram",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"bundle": "node ../../common/scripts/esbuild.js",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/translate .",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/translate .",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/translate . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/translate",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/translate staging",
|
||||
"docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/translate",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"_phase:bundle": "rushx bundle",
|
||||
"_phase:docker-build": "rushx docker:build",
|
||||
"_phase:docker-staging": "rushx docker:staging",
|
||||
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/worker .",
|
||||
"docker:build": "node ../../common/scripts/docker_build.js hardcoreeng/worker .",
|
||||
"docker:tbuild": "docker build -t hardcoreeng/worker . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/worker",
|
||||
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/worker staging",
|
||||
"docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/worker",
|
||||
|
||||
Reference in New Issue
Block a user