Skip to content

Commit

Permalink
Merge branch 'master' into fortuna-clean
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna authored Jul 26, 2024
2 parents 1665360 + b4585e4 commit 7622c46
Show file tree
Hide file tree
Showing 28 changed files with 38 additions and 41 deletions.
4 changes: 2 additions & 2 deletions client/electron/build.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import fs from 'fs/promises';
import path from 'path';
import url from 'url';

import {getRootDir} from '@outline/infrastructure/build/get_root_dir.mjs';
import {runAction} from '@outline/infrastructure/build/run_action.mjs';
import electron, {Platform} from 'electron-builder';
import minimist from 'minimist';

import {getRootDir} from '../../src/build/get_root_dir.mjs';
import {runAction} from '../../src/build/run_action.mjs';
import {getBuildParameters} from '../build/get_build_parameters.mjs';

const ELECTRON_BUILD_DIR = 'output';
Expand Down
5 changes: 3 additions & 2 deletions client/electron/build_main.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import fs from 'fs/promises';
import path from 'path';
import url from 'url';

import {getRootDir} from '@outline/infrastructure/build/get_root_dir.mjs';
import {runAction} from '@outline/infrastructure/build/run_action.mjs';

import electronMainWebpackConfigs from './webpack_electron_main.mjs';
import {getRootDir} from '../../src/build/get_root_dir.mjs';
import {runAction} from '../../src/build/run_action.mjs';
import {getBuildParameters} from '../build/get_build_parameters.mjs';
import {getWebpackBuildMode} from '../build/get_webpack_build_mode.mjs';
import {runWebpack} from '../build/run_webpack.mjs';
Expand Down
6 changes: 3 additions & 3 deletions client/electron/start.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
import path from 'path';
import url from 'url';

import {getRootDir} from '@outline/infrastructure/build/get_root_dir.mjs';
import {runAction} from '@outline/infrastructure/build/run_action.mjs';
import {spawnStream} from '@outline/infrastructure/build/spawn_stream.mjs';
import electron from 'electron';

import {getRootDir} from '../../src/build/get_root_dir.mjs';
import {runAction} from '../../src/build/run_action.mjs';
import {spawnStream} from '../../src/build/spawn_stream.mjs';
import {getBuildParameters} from '../build/get_build_parameters.mjs';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @param {Object} configuration.options a duplication of electron-builder.json
*/
async function electronBuilderEntryPoint(configuration) {
const {runAction} = await import('../../../src/build/run_action.mjs');
const {runAction} = await import('../../../infrastructure/build/run_action.mjs');
await runAction('client/electron/windows/sign_windows_executable',
'--target', configuration.path,
'--algorithm', configuration.hash);
Expand Down
8 changes: 4 additions & 4 deletions client/src/cordova/build.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ import fs from 'node:fs/promises';
import path from 'node:path';
import url from 'url';

import {downloadHttpsFile} from '@outline/infrastructure/build/download_file.mjs';
import {getRootDir} from '@outline/infrastructure/build/get_root_dir.mjs';
import {runAction} from '@outline/infrastructure/build/run_action.mjs';
import {spawnStream} from '@outline/infrastructure/build/spawn_stream.mjs';
import cordovaLib from 'cordova-lib';
const {cordova} = cordovaLib;

import {downloadHttpsFile} from '../../../src/build/download_file.mjs';
import {getRootDir} from '../../../src/build/get_root_dir.mjs';
import {runAction} from '../../../src/build/run_action.mjs';
import {spawnStream} from '../../../src/build/spawn_stream.mjs';
import {getBuildParameters} from '../../build/get_build_parameters.mjs';

/**
Expand Down
2 changes: 1 addition & 1 deletion client/src/cordova/import_messages.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import {readFile, readdir, mkdir} from 'fs/promises';
import path from 'path';
import url from 'url';

import {getRootDir} from '@outline/infrastructure/build/get_root_dir.mjs';
import chalk from 'chalk';
import minimist from 'minimist';

import * as ANDROID_IMPORTER from './android/import_messages.mjs';
import * as IOS_IMPORTER from './apple/import_messages.mjs';
import {getRootDir} from '../../../src/build/get_root_dir.mjs';

const ANDROID = 'android';
const IOS = 'ios';
Expand Down
10 changes: 4 additions & 6 deletions client/src/cordova/setup.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@ import os from 'os';
import path from 'path';
import url from 'url';

import {getRootDir} from '@outline/infrastructure/build/get_root_dir.mjs';
import {runAction} from '@outline/infrastructure/build/run_action.mjs';
import {spawnStream} from '@outline/infrastructure/build/spawn_stream.mjs';
import chalk from 'chalk';
import cordovaLib from 'cordova-lib';
import replace from 'replace-in-file';
import rmfr from 'rmfr';

const {cordova} = cordovaLib;

import {getRootDir} from '../../../src/build/get_root_dir.mjs';
import {runAction} from '../../../src/build/run_action.mjs';
import {spawnStream} from '../../../src/build/spawn_stream.mjs';
import {getBuildParameters} from '../../build/get_build_parameters.mjs';


const {cordova} = cordovaLib;
const WORKING_CORDOVA_OSX_COMMIT = '07e62a53aa6a8a828fd988bc9e884c38c3495a67';

/**
Expand Down
4 changes: 2 additions & 2 deletions client/src/cordova/test.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import os from 'os';
import path from 'path';
import url from 'url';

import {getRootDir} from '@outline/infrastructure/build/get_root_dir.mjs';
import {spawnStream} from '@outline/infrastructure/build/spawn_stream.mjs';
import minimist from 'minimist';
import rmfr from 'rmfr';

import {getRootDir} from '../../../src/build/get_root_dir.mjs';
import {spawnStream} from '../../../src/build/spawn_stream.mjs';

const APPLE_ROOT = path.join(getRootDir(), 'client', 'src', 'cordova', 'apple');
const APPLE_LIBRARY_NAME = 'OutlineAppleLib';
Expand Down
3 changes: 2 additions & 1 deletion client/src/tun2socks/build.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

import url from 'url';

import {spawnStream} from '../../../src/build/spawn_stream.mjs';
import {spawnStream} from '@outline/infrastructure/build/spawn_stream.mjs';

import {getBuildParameters} from '../../build/get_build_parameters.mjs';

/**
Expand Down
2 changes: 1 addition & 1 deletion client/src/www/build.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import fs from 'fs/promises';
import path from 'path';
import url from 'url';

import {getRootDir} from '@outline/infrastructure/build/get_root_dir.mjs';
import rmfr from 'rmfr';

import {getBrowserWebpackConfig} from './get_browser_webpack_config.mjs';
import {getRootDir} from '../../../src/build/get_root_dir.mjs';
import {getBuildParameters} from '../../build/get_build_parameters.mjs';
import {runWebpack} from '../../build/run_webpack.mjs';

Expand Down
2 changes: 1 addition & 1 deletion client/src/www/start.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

import url from 'url';

import {runAction} from '@outline/infrastructure/build/run_action.mjs';
import webpack from 'webpack';
import WebpackServer from 'webpack-dev-server';

import {getBrowserWebpackConfig} from './get_browser_webpack_config.mjs';
import {runAction} from '../../../src/build/run_action.mjs';

/**
* @description Starts the web app for development.
Expand Down
3 changes: 1 addition & 2 deletions client/src/www/storybook.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@
import path from 'path';
import url from 'url';

import {getRootDir} from '@outline/infrastructure/build/get_root_dir.mjs';
import image from '@rollup/plugin-image';
import {startDevServer} from '@web/dev-server';
import {esbuildPlugin} from '@web/dev-server-esbuild';
import {fromRollup} from '@web/dev-server-rollup';
import {storybookPlugin} from '@web/dev-server-storybook';

import {getRootDir} from '../../../src/build/get_root_dir.mjs';

const WWW_PATH = ['src', 'www'];
const STORYBOOK_PATH = [...WWW_PATH, '.storybook'];

Expand Down
4 changes: 1 addition & 3 deletions client/src/www/test.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
import path from 'path';
import url from 'url';

import {getRootDir} from '@outline/infrastructure/build/get_root_dir.mjs';
import karma from 'karma';
import minimist from 'minimist';
import puppeteer from 'puppeteer';


import {getRootDir} from '../../../src/build/get_root_dir.mjs';

const KARMA_CONFIG_PATH = ['client', 'src', 'www', 'karma.conf.js'];

/**
Expand Down
2 changes: 1 addition & 1 deletion client/src/www/webpack_cordova.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
// limitations under the License.
import path from 'path';

import {getRootDir} from '@outline/infrastructure/build/get_root_dir.mjs';
import CopyPlugin from 'copy-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import webpack from 'webpack';
import {merge} from 'webpack-merge';

import {baseConfig, browserConfig, require, __dirname, TS_LOADER, GENERATE_CSS_RTL_LOADER} from './webpack_base.mjs';
import {getRootDir} from '../../../src/build/get_root_dir.mjs';

const BABEL_LOADER = {
loader: 'babel-loader',
Expand Down
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ module.exports = {
'devtools',
'docs',
'infrastructure',
'infrastructure/build',
'manager',
'manager/linux',
'manager/mac',
'manager/windows',
'service',
'service/linux',
'service/windows',
'src/build',
'storybook',
'www',
],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion list.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import url from 'url';

import * as globby from 'globby';

import {getRootDir} from './src/build/get_root_dir.mjs';
import {getRootDir} from './infrastructure/build/get_root_dir.mjs';

/**
* @description returns a list of all valid actions to run
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"action:help": "npm run action list",
"action:list": "npm run action list",
"action": "node ./src/build/run_action.mjs",
"action": "node ./infrastructure/build/run_action.mjs",
"clean": "npm run clean --workspaces && rm -rf output node_modules third_party/jsign/*.jar && go run github.com/go-task/task/v3/cmd/task clean",
"format:all": "prettier --write \"**/*.{cjs,mjs,html,js,json,md,ts}\"",
"format": "pretty-quick --staged --pattern \"**/*.{cjs,mjs,html,js,json,md,ts}\"",
Expand Down
2 changes: 1 addition & 1 deletion server_manager/electron_app/build.action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if [[ -z "${WEBPACK_MODE:-}" ]]; then
fi

# Build the Web App.
node src/build/run_action.mjs server_manager/web_app/build
node infrastructure/build/run_action.mjs server_manager/web_app/build

# Compile the Electron main process and preload to the app root folder.
# Since Node.js on Cygwin doesn't like absolute Unix-style paths,
Expand Down
2 changes: 1 addition & 1 deletion server_manager/electron_app/package.action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function main() {
*) ;;
esac
done
node src/build/run_action.mjs server_manager/electron_app/build --buildMode="${BUILD_MODE}" --versionName="${version_name}"
node infrastructure/build/run_action.mjs server_manager/electron_app/build --buildMode="${BUILD_MODE}" --versionName="${version_name}"
package_electron
finish_yaml_files "${staging_percentage}"
}
Expand Down
2 changes: 1 addition & 1 deletion server_manager/electron_app/start.action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

node src/build/run_action.mjs server_manager/electron_app/build "$@"
node infrastructure/build/run_action.mjs server_manager/electron_app/build "$@"

cd "${BUILD_DIR}/server_manager/electron_app/static"

Expand Down
2 changes: 1 addition & 1 deletion server_manager/web_app/build.action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -eu
readonly OUT_DIR="${BUILD_DIR}/server_manager/web_app"
rm -rf "${OUT_DIR}"

node src/build/run_action.mjs server_manager/web_app/build_install_script
node infrastructure/build/run_action.mjs server_manager/web_app/build_install_script

# Node.js on Cygwin doesn't like absolute Unix-style paths.
# So, we use a relative path as input to webpack.
Expand Down
2 changes: 1 addition & 1 deletion server_manager/web_app/start.action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ set -eu

rm -rf "${BUILD_DIR}/server_manager/web_app"

node src/build/run_action.mjs server_manager/web_app/build_install_script
node infrastructure/build/run_action.mjs server_manager/web_app/build_install_script

webpack-dev-server --config=server_manager/browser.webpack.js --open
6 changes: 3 additions & 3 deletions third_party/jsign/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import {spawn} from 'node:child_process';
import {resolve} from 'node:path';

import {downloadHttpsFile} from '../../src/build/download_file.mjs';
import {getFileChecksum} from '../../src/build/get_file_checksum.mjs';
import {getRootDir} from '../../src/build/get_root_dir.mjs';
import {downloadHttpsFile} from '../../infrastructure/build/download_file.mjs';
import {getFileChecksum} from '../../infrastructure/build/get_file_checksum.mjs';
import {getRootDir} from '../../infrastructure/build/get_root_dir.mjs';

/**
* Run jsign.jar to sign `fileToSign` with a list of cli arguments stored in `options`.
Expand Down

0 comments on commit 7622c46

Please sign in to comment.