Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V33 #83

Merged
merged 15 commits into from
Nov 30, 2023
35 changes: 29 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module.exports = {
'**/3rd-party/*',
'**/*.d.ts',
'**/settings.schema.json',
'**/reports/*'
'**/reports/*',
'**/integrate-with-salesforce/public/js/preload.js'
],
parserOptions: {
ecmaVersion: 2020,
Expand Down Expand Up @@ -90,10 +91,10 @@ module.exports = {
'import/export': ['error'],
'import/named': ['off'],
'import/namespace': ['error'],
'import/no-duplicates': ['warn'],
'import/no-duplicates': ['error'],
'import/no-extraneous-dependencies': ['off'],
'import/no-named-as-default': ['warn'],
'import/no-named-as-default-member': ['warn'],
'import/no-named-as-default': ['error'],
'import/no-named-as-default-member': ['error'],
'import/no-unresolved': ['off'],
'import/no-unused-modules': ['off'],
'import/order': [
Expand Down Expand Up @@ -591,7 +592,6 @@ module.exports = {
'@typescript-eslint/no-array-constructor': ['error'],
'@typescript-eslint/no-base-to-string': ['error'],
'@typescript-eslint/no-dupe-class-members': ['error'],
'@typescript-eslint/no-duplicate-imports': ['error'],
'@typescript-eslint/no-dynamic-delete': ['off'],
'@typescript-eslint/no-empty-function': ['off'],
'@typescript-eslint/no-empty-interface': ['error'],
Expand Down Expand Up @@ -619,7 +619,6 @@ module.exports = {
'@typescript-eslint/no-namespace': ['error'],
'@typescript-eslint/no-non-null-asserted-optional-chain': ['error'],
'@typescript-eslint/no-non-null-assertion': ['error'],
'@typescript-eslint/no-parameter-properties': ['error'],
'@typescript-eslint/no-redundant-type-constituents': ['off'],
'@typescript-eslint/no-require-imports': ['error'],
'@typescript-eslint/no-shadow': ['error'],
Expand Down Expand Up @@ -691,6 +690,30 @@ module.exports = {
'@typescript-eslint/unbound-method': ['error'],
'@typescript-eslint/unified-signatures': ['error']
}
},
{
files: ['how-to/workspace-platform-starter/client/**/*.ts'],
rules: {
'no-restricted-syntax': [
'error',
{
selector: "BinaryExpression[operator='==='][right.type='Identifier'][right.name='undefined']",
message: 'Instead of using "=== undefined", please use the utils method isEmpty'
},
{
selector: "BinaryExpression[operator='!=='][right.type='Identifier'][right.name='undefined']",
message: 'Instead of using "!== undefined", please use the utils method !isEmpty'
},
{
selector: "BinaryExpression[operator='==='][right.type='Identifier'][right.name='null']",
message: 'Instead of using "=== null", please use the utils method isEmpty'
},
{
selector: "BinaryExpression[operator='!=='][right.type='Identifier'][right.name='null']",
message: 'Instead of using "!== null", please use the utils method !isEmpty'
}
]
}
}
]
};
20 changes: 12 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node 16
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
scope: '@openfin'
- name: Install dependencies
run: |-
npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm ci
- name: Run prettier
run: |-
npx prettier --config .prettierrc --check .
run: npx prettier --config .prettierrc --check .
- name: Run eslint
run: |-
npm run eslint
run: npm run eslint
- name: Run markdownlint
run: |-
npm run markdownlint
run: npm run markdownlint
202 changes: 101 additions & 101 deletions .github/workflows/publish-HOWTOs.yml
Original file line number Diff line number Diff line change
@@ -1,101 +1,101 @@
name: Publish HOWTOs
on:
- push
- workflow_dispatch
jobs:
build:
name: Build and package HOWTOs
runs-on: ubuntu-latest
env:
RELEASE_BRANCH_PREFIX: 'container/'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Build packages
run: npm run build-client --workspaces
- name: Package for publishing (GitHub Pages)
run: npm run package
env:
PKG_HOWTOS_LOCATION: github
PKG_HOWTOS_PATH: ${{ github.ref_name }}
- name: Package for publishing (AWS s3 CDN)
if: ${{ startsWith(github.ref_name, env.RELEASE_BRANCH_PREFIX) }}
run: npm run package
env:
PKG_HOWTOS_LOCATION: aws
PKG_HOWTOS_PATH: ${{ github.ref_name }}
- name: Upload artifacts (GitHub Pages)
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: workflow-howtos-github
path: public-github/
retention-days: 1
- name: Upload artifacts (AWS s3 CDN)
if: ${{ startsWith(github.ref_name, env.RELEASE_BRANCH_PREFIX) }}
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: workflow-howtos-aws
path: public-aws/
retention-days: 1
publish-gh:
name: Publish HOWTOs (GitHub Pages)
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: workflow-howtos-github
path: public-github/
- name: Publish
uses: JamesIves/[email protected]
with:
branch: gh-pages # Target branch to deploy to
folder: public-github # Source folder to deploy
target-folder: ${{ github.ref_name }} # Target folder to deploy to
publish-aws:
if: ${{ startsWith(github.ref_name, 'container/') }}
name: Publish HOWTOs (AWS s3 CDN)
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: workflow-howtos-aws
path: public-aws/
- name: Publish
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
# The bucket name should match the https host name in
# scripts/package.js:URLBaseMap['aws'].
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} # Target bucket to deploy to
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: public-aws # Source folder to deploy
DEST_DIR: container-starter/${{ github.ref_name }} # Target folder to deploy to
name: Publish HOWTOs
on:
- push
- workflow_dispatch

jobs:
build:
name: Build and package HOWTOs
runs-on: ubuntu-latest
env:
RELEASE_BRANCH_PREFIX: 'container/'
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: npm ci

- name: Build packages
run: npm run build-client --workspaces

- name: Package for publishing (GitHub Pages)
run: npm run package
env:
PKG_HOWTOS_LOCATION: github
PKG_HOWTOS_PATH: ${{ github.ref_name }}

- name: Package for publishing (AWS s3 CDN)
if: ${{ startsWith(github.ref_name, env.RELEASE_BRANCH_PREFIX) }}
run: npm run package
env:
PKG_HOWTOS_LOCATION: aws
PKG_HOWTOS_PATH: ${{ github.ref_name }}

- name: Upload artifacts (GitHub Pages)
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: workflow-howtos-github
path: public-github/
retention-days: 1

- name: Upload artifacts (AWS s3 CDN)
if: ${{ startsWith(github.ref_name, env.RELEASE_BRANCH_PREFIX) }}
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: workflow-howtos-aws
path: public-aws/
retention-days: 1

publish-gh:
name: Publish HOWTOs (GitHub Pages)
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: workflow-howtos-github
path: public-github/

- name: Publish
uses: JamesIves/[email protected]
with:
branch: gh-pages # Target branch to deploy to
folder: public-github # Source folder to deploy
target-folder: ${{ github.ref_name }} # Target folder to deploy to

publish-aws:
if: ${{ startsWith(github.ref_name, 'container/') }}
name: Publish HOWTOs (AWS s3 CDN)
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: workflow-howtos-aws
path: public-aws/

- name: Publish
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
# The bucket name should match the https host name in
# scripts/package.js:URLBaseMap['aws'].
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} # Target bucket to deploy to
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: public-aws # Source folder to deploy
DEST_DIR: container-starter/${{ github.ref_name }} # Target folder to deploy to
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@ node_modules
build
out
.DS_STORE

how-to/*/package-lock.json

# Bundle/builds
**/*.bundle.js
**/build

# Uploads

**/public/uploads/runtimelogs/*.log
**/public/uploads/applogs/*.zip

./public*/
updatable-packages.txt
updatable-packages.txt
public-github
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "auto",
"endOfLine": "lf",
"overrides": [
{
"files": ["*.html"],
Expand Down
4 changes: 3 additions & 1 deletion how-to/automation-testing/create-window-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"@openfin/automation-helpers": "^1.0.13",
"@openfin/automation-native": "^1.0.13",
"chai": "4.3.7",
"mochawesome": "7.1.3"
"mochawesome": "7.1.3",
"@openfin/core": "33.77.11",
"@openfin/node-adapter": "33.77.11"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"@openfin/automation-helpers": "^1.0.13",
"@openfin/automation-native": "^1.0.13",
"chai": "4.3.7",
"mochawesome": "7.1.3"
"mochawesome": "7.1.3",
"@openfin/core": "33.77.11",
"@openfin/node-adapter": "33.77.11"
}
}
4 changes: 3 additions & 1 deletion how-to/automation-testing/use-window-options-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"@openfin/automation-helpers": "^1.0.13",
"@openfin/automation-native": "^1.0.13",
"chai": "4.3.7",
"mochawesome": "7.1.3"
"mochawesome": "7.1.3",
"@openfin/core": "33.77.11",
"@openfin/node-adapter": "33.77.11"
}
}
4 changes: 2 additions & 2 deletions how-to/container-platform-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"license": "ISC",
"devDependencies": {
"@openfin/core": "^32.76.10",
"openfin-adapter": "32.76.10",
"@openfin/core": "33.77.11",
"@openfin/node-adapter": "33.77.11",
"ts-loader": "^9.4.4",
"typescript": "^5.1.6",
"webpack": "^5.88.1",
Expand Down
2 changes: 1 addition & 1 deletion how-to/container-platform-starter/public/manifest.fin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"runtime": {
"arguments": "--v=1 --inspect",
"version": "32.114.76.10"
"version": "33.116.77.11"
},
"platform": {
"enableBeforeUnload": true,
Expand Down
2 changes: 1 addition & 1 deletion how-to/container-platform-starter/scripts/launch.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* It uses the OpenFin NodeJS adapter to launch the url specified on the command line.
* Pressing Ctrl+C/Command+C will terminate the application.
*/
import { connect, launch } from '@openfin/node-adapter';
import { setDefaultResultOrder } from 'dns';
import { connect, launch } from 'openfin-adapter';

/**
* Run the process.
Expand Down
Loading
Loading