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

Bump rxjs from 6.6.2 to 7.8.1 #1259

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 97 additions & 8 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lodash": "^4.17.21",
"moment": "^2.29.1",
"path-exists": "^5.0.0",
"rxjs": "^6.6.2",
"rxjs": "^7.8.1",
"rxjs-compat": "^6.6.7",
"stream": "0.0.2",
"typescript": "^5.0.4"
Expand Down
15 changes: 8 additions & 7 deletions core/src/CoreController.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
declare var _;
declare var sails;

import pathExists = require('path-exists');
import {pathExistsSync} from 'path-exists';

import {APIErrorResponse } from './model/APIErrorResponse';
export module Controllers.Core {

Expand Down Expand Up @@ -145,21 +146,21 @@ export module Controllers.Core {

//Check if view exists for branding and portal
var viewToTest: string = sails.config.appPath + "/views/" + branding + "/" + portal + "/" + view + ".ejs";
if (pathExists.pathExistsSync(viewToTest)) {
if (pathExistsSync(viewToTest)) {
resolvedView = branding + "/" + portal + "/" + view;
}
// If view doesn't exist, next try for portal with default branding
if (resolvedView == null) {
viewToTest = sails.config.appPath + "/views/default/" + portal + "/" + view + ".ejs";
if (pathExists.pathExistsSync(viewToTest)) {
if (pathExistsSync(viewToTest)) {
resolvedView = "default/" + portal + "/" + view;
}
}

// If view still doesn't exist, next try for default portal with default branding
if (resolvedView == null) {
viewToTest = sails.config.appPath + "/views/default/default/" + view + ".ejs";
if (pathExists.pathExistsSync(viewToTest)) {
if (pathExistsSync(viewToTest)) {
resolvedView = "default/default/" + view;
}
}
Expand All @@ -172,21 +173,21 @@ export module Controllers.Core {

//Check if view exists for branding and portal
var layoutToTest: string = sails.config.appPath + "/views/" + branding + "/" + portal + "/layout/layout.ejs";
if (pathExists.pathExistsSync(layoutToTest)) {
if (pathExistsSync(layoutToTest)) {
resolvedLayout = branding + "/" + portal + "/layout";
}
// If view doesn't exist, next try for portal with default branding
if (resolvedLayout == null) {
layoutToTest = sails.config.appPath + "/views/default/" + portal + "/layout.ejs";
if (pathExists.pathExistsSync(layoutToTest)) {
if (pathExistsSync(layoutToTest)) {
resolvedLayout = "/default/" + portal + "/layout";
}
}

// If view still doesn't exist, next try for default portal with default branding
if (resolvedLayout == null) {
layoutToTest = sails.config.appPath + "/views/default/default/" + "layout.ejs";
if (pathExists.pathExistsSync(layoutToTest)) {
if (pathExistsSync(layoutToTest)) {
resolvedLayout = "default/default/layout";
}
}
Expand Down
8 changes: 5 additions & 3 deletions core/src/CoreService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Observable } from 'rxjs/Rx';
import { from,bindNodeCallback, bindCallback, Observable } from 'rxjs';


declare var sails;
// changed to a manual lodash load instead of relying on Sails global object
// this enables testing of installable hooks that rely on services at load-time (i.e. index.js)
Expand All @@ -25,9 +27,9 @@ export module Services.Core {
*/
protected getObservable(q, method='exec', type='node'): Observable<any> {
if (type == 'node')
return Observable.bindNodeCallback(q[method].bind(q))();
return bindNodeCallback(q[method].bind(q))();
else
return Observable.bindCallback(q[method].bind(q))();
return bindCallback(q[method].bind(q))();
}

/**
Expand Down
Loading