Consider using a more flexible logging crate in forc (and throughout sway) over println

This should help in providing different levels of verbosity in forc and any other sway-related CLI tooling.
We could probably get away with something simple like log, but may also want to consider something that has some profiling integration so we can time passes and track compiler performance #318 (I think maybe trace does something like this?)

Was just taking a look at rust-analyzer and they are using the tracing crate for logging which is made by the tokio team. It has compatibility with log through the tracing-log crate.
One main benefit to using tracing over log is we can add logs for Spans and Events on functions that return a Future. There also seems to be quite a rich ecosystem of other crates extending the functionality of tracing for doing things like timing-profiling etc..

+1 to tracing. We already use tracing in sdk and fuel-core as per the code guidelines here: https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/logging.md

Although, I just discovered this other library which might be useful for more interactive cli usecases: https://github.com/crossterm-rs/crossterm

Nice, crossterm does look super powerful! It might be a little overkill for now as we don't have any interactive CLI stuff going on just yet, but will be good to keep in mind.
For now, starting with integrating tracing sounds like a great approach.

I started to integrate tracing into forc and I was curious about a couple of details of the desired behavior.
We use anyhow::Result<()> as the return type throughout the repo. As I understand the error message is printed automatically when the main also returns an anyhow::Result<()>. Do we want to keep this behavior? I think we may want to switch errors to tracing as well.
As for implementation, I am currently leaning towards consuming that error in main (or to be more general in the caller function) and logging a generic error with tracing (the details of the error will be already logged in the failing calls).
For example, if an error happens at forc_init.rs:140 the output would be something like:
(output of: cargo run --bin forc -- init --template er name)
2022-05-11T13:23:08.454138Z ERROR init: forc::ops::forc_init: 110: error=Failed to initialize project from a template with the given name "er": https://api.github.com/repos/FuelLabs/sway/contents/examples/er: status code 404.
  Note: If you are attempting to initialize this project from a Sway example, please ensure the template name matches one of the available examples.
	- asm_return_tuple_pointer
	- counter
	- fizzbuzz
	- liquidity_pool
	- msg_sender
	- native_token
	- storage_example
	- subcurrency
	- wallet_smart_contract

2022-05-11T13:23:08.454420Z ERROR forc::cli::commands::init: 36: Forc init error

I am more than happy to discuss if there are any suggestions about error outputs in terms of this issue.

I think we may want to switch errors to tracing as well.
As for implementation, I am currently leaning towards consuming that error in main and logging a generic error with tracing

To clarify, you're talking about checking the result returned from run_cli() for the Err case and logging that, rather than returning it from main? That sounds good to me! It might be useful to post a couple of before and after error messages just when opening the PR so reviewers can easily see the difference (e.g. if there's any formatting difference and so on).
Also, you might already be onto this, but just a reminder that we'll still want to return with some non-zero exit code that indicates the failure, possibly using std::process::exit after logging the error. I don't quite remember specifically what code to return, but could be worth checking what error code Rust exes normally produce when main returns Err and follow suit.
Output Formatting
On a related note - we may want to consider the formatting of the tracing output more generally.
The reason why a crate like tracing is helpful is that it gives us a lot more control over the filtering and handling of output. E.g. it would be very useful for eventually having flags along the lines of --quiet or --verbose - something that would be a much bigger pain to implement with printlns.
That said, the default output formatting from tracing's logs is probably too verbose for user consumption in most cases where we're replacing println. E.g. information like the timestamp, the log-level, the call-path and line number are all likely unnecessary for the majority of forc's user-facing output. I think generally, we want to keep the output looking close to what it was, which is very much inspired by the formatting of cargo's output. I'm not yet too familiar with tracing myself, but I'm guessing there's some sort of "subscriber" or "logger" configuration or similar that allows for tweaking this stuff.

To clarify, you're talking about checking the result returned from run_cli() for the Err case and logging that, rather than returning it from main?

Yes, I was thinking like that.
For the formatting part I am currently playing with subscriber will be trying to trim verbose parts so that it will match with current outputs of forc.

Here's an example of customizing the tracing subscriber to enable or disable things like line numbers: https://github.com/FuelLabs/fuel-core/blob/master/fuel-core/src/args.rs#L75
Also, if you add the #[tracing] to the main fn of the cli, it should automatically log the errors returned by the function.

Thanks! with the following settings
.with_ansi(true)
.with_level(false)
.with_file(false)
.with_line_number(false)
.without_time()
.with_target(false)

Output on the same example in this comment becomes the following.
init:init_from_git_template: error=https://api.github.com/repos/FuelLabs/sway/contents/examples/er: status code 404
init: error=Failed to initialize project from a template with the given name "er": https://api.github.com/repos/FuelLabs/sway/contents/examples/er: status code 404.
  Note: If you are attempting to initialize this project from a Sway example, please ensure the template name matches one of the available examples.
	- asm_return_tuple_pointer
	- counter
	- fizzbuzz
	- liquidity_pool
	- msg_sender
	- native_token
	- storage_example
	- subcurrency
	- wallet_smart_contract

Forc error!

I am currently looking into understanding the source of call-paths (?) like init:init_from_git_template

The default event formatter is defined here, maybe this will provide some clues about what needs to be modified: https://docs.rs/tracing-subscriber/latest/src/tracing_subscriber/fmt/format/mod.rs.html#889


Update website - Section: This is how the app works best

Closes https://github.com/corona-warn-app/cwa-website/issues/856

removed also
bzw. mindestens iOS [ios.minimum-required-os-version]

EN

DE

@dsarkar
Will we keep [ios.latest-os-version] with the latest release (iOS 14.4)?

O/T @GisoSchroederSAP Maybe you would like to make your membership of the CWA organization public?
Thanks!


NO-jIRA: move some operator crds to openshift/api

etcd
kube-apiserver
kube-controller-manager
kube-scheduler
openshift-apiserver
openshift-controller-manager
openshift-authentication

to come in other PRs, MCO stuff, image registry, network edge, storage.
/assign @JoelSpeed

/retest

Change looks fine, and until all CRDs are deployed from this repo, the awkward duplication does save us some E2E cycles, so, lets keep this approach for now and once we are complete, we can remove the duplication
/lgtm
/hold
Holding in case this needs to be released in a particular time window

clusterbot cluster installed correctly.  Merging and will get the others later to help the nightly image build likelihood.


speed of zooming MS spectra in and out

The current speed of zooming in and out is really slow. It is even slower than uploading the imzml file for first time. I think this can be improved can be at least as quickly as data upload.

This is mainly due to profile mode data types. We need to specify which datatype to use and how to convert it without loosing low abundant peaks.


version.partition is a floating point number

Getting an error at this line, when running:
torch.save('/tmp/test.t7', {hello=123, world=torch.rand(1,2,3)})

o = torchfile.load('/tmp/test.t7')
ValueError: invalid literal for int() with base 10: b'1.0'

The version in my test.t7 file is "V 1.0".
This is with Python 2.7 or 3.5, and Lua 5.3.

Fixing here.

Thank you!


fix(android): track selection parameter has change in last release.

Summary
Move all setSelectedTrack to String instead of Dynamic
Fix regression introduced by: https://github.com/react-native-video/react-native-video/pull/3487
Motivation
Typing of native module changed from String|Int to String only
Will fix: https://github.com/react-native-video/react-native-video/issues/3592
Changes

Move Dynamics to Strings on Java side
Fix crash issue in sample

Test plan
Tested on sample by hardcoding the value like in the opened ticket: https://github.com/react-native-video/react-native-video/issues/3592

ping @yungblud

ping @yungblud

@freeboub sorry for the late reply.
Seems like the bug was from my PR.
I will have a look

ping @yungblud

@freeboub sorry for the late reply.
Seems like the bug was from my PR.
I will have a look

@yungblud it's ok, it is more for information (just to explain why I was afraid to merge very big PR). This PR fix the issue, thank you !


Create ROCK2PAY token

This is payout token for token ROCK2 which is already added, so PR is the same as for ROCK2.
icerockmining.io

Sorry but token name is longer than 5 chars because it is payout token for ROCK2 token, so name ROCK2PAY make sense.

Closing this due to inactivity, feel free to reopen. In addition we implemented a new feature called watchAsset I recommend you to use it, with this you could suggest your users to track your token.


export: add an option to export events to tetragon container log

right now tetragon only supports exporting events to json log file, and then have a separate container that tails the log and print them to stdout. add an option to export events directly to tetragon container logs. some people prefer not having to deal with mounting volumes, run a separate container and such.

@michi-covalent please assign me

Hello @Jack-R-lantern, do you still plan to work on this?

I initially also thought that an --export-stdout could be useful, but have since arrived at a different (still preliminary) view: isn't it the case that his would mix both diagnostic output from Tetragon and its JSON events in its stdout? Splitting the two apart would presumably require a heuristic such as grep -v '^{', so why the burden? I also presume that quite often Tetragon and the consumers of its events run in different mount namespaces (e.g. different pods), whereas an --export-stdout would serve in more traditional (and perhaps rare) setups with single mount namespaces and Unix pipes. So not supporting it may be the cleaner solution.


Handle MSBuild property conditions that have a property wrapped in single quotes in NuGetUpdater

It is very common for conditions in MSBuild to have the property values wrapped in single quotes. This PR updates MSBuildHelper to understand how to deal with these.
There were tests around the condition handling, so I added variations of the test data that includes quotes.

Thank you so much @bording and @DavidBoike for this!


Mu.Stringy documentation is missing

Problem or new feature
Mu.Stringy documentation is missing. The Stringy method is only described for Blob and Sequence types and in the later case it seems there is an implicity reference to Mu.Stringy.
Suggestions
Document Mu.Stringy and/or mention it in the Stringy role documentation.

Declared here


python312Packages.widlparser: 1.0.12 -> 1.1.5

Diff: https://github.com/plinss/widlparser/compare/v1.0.12...v1.1.5

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[x] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 353139 at 5c96771a run on aarch64-darwin 1

:x: 1 package failed to build:

bikeshed

:white_check_mark: 2 packages built:

python311Packages.widlparser
python312Packages.widlparser

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 353139

x86_64-linux

:white_check_mark: 5 packages built:

bikeshed
python311Packages.kdl-py
python311Packages.widlparser
python312Packages.kdl-py
python312Packages.widlparser

aarch64-linux

:white_check_mark: 5 packages built:

bikeshed
python311Packages.kdl-py
python311Packages.widlparser
python312Packages.kdl-py
python312Packages.widlparser

x86_64-darwin

:white_check_mark: 5 packages built:

bikeshed
python311Packages.kdl-py
python311Packages.widlparser
python312Packages.kdl-py
python312Packages.widlparser

aarch64-darwin

:white_check_mark: 5 packages built:

bikeshed
python311Packages.kdl-py
python311Packages.widlparser
python312Packages.kdl-py
python312Packages.widlparser


Dependencies not working when add UglifyJsPlugin plugin into webpack

Here my webpack.config.js
var webpack = require("webpack");
module.exports = {
  devtool: 'sourcemap',
  output: {
    filename: 'bundle.js'//,
    //path: './build'
  },
  plugins:[
    new webpack.optimize.UglifyJsPlugin()
  ],
  module: {
    preLoaders: [{
      test:    /\.js$/,
      exclude: [/app\/lib/, /node_modules/],
      loader:  'jshint!jscs'
    }],
    postLoaders: [
      { test: /\.js$/, exclude: [/app\/lib/, /node_modules/], loader: 'babel' },
      { test: /\.html$/, loader: 'raw' },
      { test: /\.styl$/, loader: 'style!css!stylus' },
      { test: /\.css$/, loader: 'style!css' }
    ]
  }
};

Here the error:
Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module app.components due to:
Error: [$injector:modulerr] Failed to instantiate module home due to:
Error: [$injector:unpr] Unknown provider: e

Here my home module:
import angular from 'angular';
import uiRouter from 'angular-ui-router';
import ngSanitize from 'angular-sanitize';
import homeComponent from './home.component';

let homeModule = angular.module('home', [
  uiRouter,
  ngSanitize
])

.config(($stateProvider, $urlRouterProvider) => {
  $urlRouterProvider.otherwise('/');

  $stateProvider
    .state('home', {
      url: '/',
      template: '<home></home>'
    });
})

.directive('home', homeComponent);

export default homeModule;

Because you need to provide dependency annotations:
javascript
export default class FooService {
constructor(depA, depB) {}
}
FooService.$inject = ['depA', 'depB'];

Of you could use ngAnnotate: https://www.npmjs.com/package/ng-annotate-webpack-plugin

Please also read the following distussion: https://github.com/AngularClass/NG6-starter/issues/39

Closing since #64 is merged


Why used Rebuild task instead Build in build.template file?

Hi, all!
Maybe answer will be obvious, but I can't understand why in the target Build in the file build.template, used task Rebuild instead Build for build solution (project).
As far as I know, only Build task allows incremental build that gives us the big boost in the build speed.

Good question. I don't have the answer, but here's my thoughts.
Maybe rebuild is considered more "safe", and I was OK with that before I started using ionide plugins to build from my editor.
These days, I think the default should be build (incremental) unless you are doing a release (where perhaps rebuild is more appropriate).

About the task Rebuild in MSDN documentation says: initially, will delete all temporary files and artifacts, and then will build the project, include recompilation of all the source files.
In practice, in most cases, it is recommended to run Build project as it runs much faster. And just in case "strange" errors when building, it is recommended to try Rebuild, because temporary files are cleared, due to which the project could fail build.
So, in my opinion, would be perfect to make the following changes:

In the target Build to set the task to Build. In 99% of cases, it will be OK and faster.
Add the target Rebuild, where to set the task Rebuild.

Actually, it is done in MS Visual Studio, where we have two items in the  application build menu.
If there is no objection, I can make a PR.


Bug Fux iPhone Slider Overlap

Fixed sliders on iPhone such that they no longer overlap. Included a comment on both SettngsView pages to ensure no one recreates this issue in the future by accident. SettingsView on iPhone now closer resembles Apple Watch.

 Slider Overlap and SettingsView Cleanup


chore(main): release 0.6.0

:robot: I have created a release beep boop
0.6.0 (2023-07-26)
Features

✨ add container build spec and dependancy tooling (0ca6cd8)
add useful YAML extension to Devcontainer (be5600c)
ensure latest tag is available on images from main (#34) (7856da7)

Bug Fixes

🐛 update Poetry and Beets package dependencies (#31) (cdfde7a)

Documentation

📝 add limited documentation and license (186e034)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/arrrgi/beets-alpine-exec/releases/tag/untagged-8442857e403f09ac8c55 :sunflower:


[azeventhubs/azservicebus] Cleanup Close(ctx) calls and signatures

The original task was to clean up some of the remaining places where we prevented Close(ctx) from being cancelled. That was a mistake as it destabilized customers since Close() could potentially hang.
The original reason for fixing this was that it was possible to cancel NegotiateClaim(). Since $cbs is a singleton on the service-side this could cause future calls to fail if we weren't able to cleanly close all the links involved.
We can implement a similar fix to what we've done for the recovery code - we make sure we Close() as cleanly as possible, but cap it at 60 seconds. If it fails, we kill the connection.
As part of PR#19492 we're no longer cancelling the closing of links. This avoids an issue we found in #19347, where cancelling a negotiate claim could leak the $cbs attached link, which would prevent future links from working as well.
It'd be nice to clean it up since we're still passing contexts around, they're just no longer being used for actual cancellation. We could do this a few ways:
- Remove the actual 'ctx' parameter (for now when it's ignored I rename the input parameter to _
- Make cancellation "work" somehow. This is more complicated but we could try to move some of this work into a goroutine. That can get us partway there, but for singleton resources like $cbs, we'd need to still have some dependency between future calls and the previous Close() that hasn't completed.
- Make $cbs a persistent link. This would reduce the window of time where this affects us, but it wouldn't be an entire solution since we'd still have the window of time where a user is creating something, cancels it and then (because of 'ctx') we do only a partial cleanup after the fact.

The original work is done.
There's another spot I see that would benefit here, specifically around RPC Links.


Swapped Bearish and Bullish Harami

fixes #115
**Please note was unable to run tests due to keras-js upstream issue

Should prob check the crosses as well.. I didn't even think about it

The test data will need swapped as well


Breadcrumbs: clicking the scrollbar clears selection

it seems to focus the container... not doing anything special tho

my outline view has the same problem. seems to be me. @joaomoreno do I need to set something on the tree or its container?

:man_shrugging:

Thanks


Some Images in the card section do not have an alt attribute

Hi @redxzeta, I would like work on this issue.


Add numDmlAffectedRows to com.google.cloud.bigquery.TableResult

Hi Team,
I am using the below code to update the rows in my table using Java Cloud Bigquery.

String dmlQuery = String.format("update exploreTest.Student  set Stud_Name = \"Shruti11\", Stud_Class=\"II\" where Stud_Id = 300", datasetName, tableName);

			QueryJobConfiguration dmlQueryConfig =
					QueryJobConfiguration.newBuilder(dmlQuery).build();

			// Execute the query.
			TableResult result = bigquery.query(dmlQueryConfig);

I need to retrieve the number of rows affected/modified/updated.  Request you to add the API for the same. Similar to the one we have in Bigquery V2 API as . queryResponse.getNumDmlAffectedRows()
Thanks.

Opened the issue in the wrong project


t2 update failed

Yesterday, I updated to the latest version.  It erased the name I had assigned to my tessel.  In order to reproduce that issue so I could create an issue here, I attempted to rollback to version 0.0.11.  After a long time, my tessel was stuck in an infinite loop of rebooting.
Is there a way to do a factory reset?  I didn't find anything in the docs to troubleshoot this problem, feel free to point me at any links I missed or offer suggestions on recovery.
$ t2 list
INFO Searching for nearby Tessels...
	robbie	USB

$ t2 update -v 0.0.11
INFO Looking for your Tessel...
INFO Connected to robbie.
INFO Beginning update download. This could take a couple minutes..
  downloading [====================] 100% 0.0s remaining
INFO Download complete!
INFO Updating OpenWRT (1/2)
INFO Transferring image of size 20.19 MB
INFO Starting OpenWRT update. Please do not remove power from Tessel.
^C

$ t2 list
INFO Searching for nearby Tessels...
WARN Detected a Tessel that may be booting.
WARN No Tessels Found.

$ t2 list
INFO Searching for nearby Tessels...
WARN Detected a Tessel that may be booting.
WARN No Tessels Found.

https://forums.tessel.io/t/t2-update-stuck-on-openwrt-update/2235/5
My bad for not waiting.  Just curious if I can correct my mistake or I'm out of luck?

I'm working through these instructions:
https://github.com/tessel/t2-firmware
We'll say this was my fault for not waiting, and it looks like there is a PR to reduce the wait.


Feature1

Checklist

[ ] I ran npm test locally and it passed without errors.

[x] I only edited the _data/pixels.json file.

[x] I entered the username in the pixels.json that I'm also using to create this pull request.
[x] I acknowledge that all my contributions will be made under the project's license.

Twiloquest is a very nice game for learning!


Inconsistency of type conversions with the table in README

Some entries in the type conversion table in README are wrong:

kdb/q
r (wrong)
r (correct)

timespan
character
difftime

time
difftime
integer

Correct means what actually happen in rkdb.
Please check whether the README or the code should be fixed.

Are you up for submitting a patch for readme?
On Mon, 9 Apr 2018, 11:55 pm Shang Linwei<EMAIL_ADDRESS>wrote:

Some entries in the type conversion table in README are wrong:
kdb/q r (wrong) r (correct)
timespan character difftime
time difftime integer
Correct means what actually happen in rkdb.
Please check whether the README or the code should be fixed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/KxSystems/rkdb/issues/27, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA3BvYHp0YgV0wmZe9HADYJLULqHLktks5tm4RjgaJpZM4TMybq
.

I'm not sure whether we should just correct readme.
Because it's reasonable to convert time to difftime, so maybe we should modify the from_time_kobject function to return a difftime object.

Hi @sv ,
Are you considering this issue? Do you think it is better to change the way to deal with time instead of modifying readme?
I would like to fix it and make a pull request. But I want to have a consensus on it before start to working on it.
And could please to give some instructions on how to set up the develop tools for this project? I notice that you put the source codes into several separate files like common.c, base.c and sexp2k.c then include the header and these source files inside rkdb.c which will be compiled in the end. This is very different with my previous coding practice. What IDE or editor with plugin are you using to make the develop environment efficient?

thanks for looking into submitting pull request.
I think initially, we can just fix up documentation and discuss how we should handle time types consistently.
Issue is that according to documentation where is no support for milliseconds in difftime(i might be wrong here) and we should not lose millis when converting. There also seem to be some consesus around bringing nanotime package into the mix.
for dev environment, i just use RStudio with devtools package and rarely need to move functions between files.  Agree that common.c/base.c/sexp2k.c is a bit misleading and should be just header files that get imported in rkdb.c. We can cleanup this as we go
Let me know if you need any help with raising PR


API Automation using QAF

Hi Team,
We are trying to implement the API automation using QAF.
Can anyone please suggest on the below queries?

Syntax or method to GET method in QAF? We are not sure which method to select from the list of GET options. Attached is the screenshot.

Struck at --> new RestTestBase().getWebResource(getBundle().getString("ws.endurl", url), "/application.json").********** --> which GET method to use?

Once we received the response, how to extract the contents from the JSON response and validate the same using QAF?

Thanks in advance!!
Regards,
Prem

If you are expecting any POJO you can provide that class or a String.class or generic response ClientResponse.class
You can use ws-support for ready to use steps.

Thanks for the response!
Hoping the below portion of code shall be helpful. But we require the values of paramers.
String resource, Map<String, String> params
What's ----> String resource
What's ---->Map<String, String> params
private static void requestFor(String resource, Map<String, String> params) {

  WebResource webResource = new RestTestBase().getWebResource(

  		getBundle().getString("ws.endurl", ApplicationProperties.SELENIUM_BASE_URL.getStringVal()), resource);

  if (null != params && !params.isEmpty()) {

  	MultivaluedMap<String, String> mparams = new MultivaluedMapImpl();

  	for (String key : params.keySet()) {

  		mparams.add(key, params.get(key));

  	}

  	webResource = webResource.queryParams(mparams);

  }

  webResource.get(ClientResponse.class);

}

We tried with the below portion of code and we are getting an exception as below.
Tried script:
	WebResource webResource = new RestTestBase().getWebResource(getBundle().getString("ws.endurl", url));
	webResource.get(ClientResponse.class);

Error:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Hi @APrem
This looks like the HTTP Client is not trusting the certificate.
For this - you have to extend the RestClientFactory with the code snippet from here:
https://gist.github.com/outbounder/1069465
so your extended class will looks like as below and you can place this inside any of your java package:
`package ;
import com.qmetry.qaf.automation.ws.rest.RestClientFactory;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.config.ClientConfig;
import com.sun.jersey.api.client.config.DefaultClientConfig;
import com.sun.jersey.client.urlconnection.HTTPSProperties;
import javax.net.ssl.*;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
public class ClientHelper extends RestClientFactory {
public static ClientConfig configureClient() {
    TrustManager[ ] certs = new TrustManager[ ] {
            new X509TrustManager() {
                @Override
                public X509Certificate[] getAcceptedIssuers() {
                    return null;
                }
                @Override
                public void checkServerTrusted(X509Certificate[] chain, String authType)
                        throws CertificateException {
                }
                @Override
                public void checkClientTrusted(X509Certificate[] chain, String authType)
                        throws CertificateException {
                }
            }
    };
    SSLContext ctx = null;
    try {
        ctx = SSLContext.getInstance("TLS");
        ctx.init(null, certs, new SecureRandom());
    } catch (java.security.GeneralSecurityException ex) {
    }
    HttpsURLConnection.setDefaultSSLSocketFactory(ctx.getSocketFactory());

    ClientConfig config = new DefaultClientConfig();
    try {
        config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(
                new HostnameVerifier() {
                    @Override
                    public boolean verify(String hostname, SSLSession session) {
                        return true;
                    }
                },
                ctx
        ));
    } catch(Exception e) {
    }
    return config;
}

@Override
protected  Client createClient() {
    return Client.create(ClientHelper.configureClient());
}

}`
Once you do this, you have to register this class inside application properties:
rest.client.impl=<Your Package Name>.ClientHelper

Hi Prem,
Hope above comment will help you to get your problem resolve.
I would like to request you move the question to community support forum like stackoverflow with QAF tag or linked in group. When you are asking on stackoverflow add tag qaf to get quick response.
Thanks,
Chirag

Thanks for the response.
Added ClientHelper class and now we could able to see the response.
But the URL which ever is given inside .getWebResource(getBundle().getString("ws.endurl", url)); is having the api key. Hence, Question mark symbol "?" is there in the URL. This piece of code is taking the "?" as "%3F" and printing the console out put as below.
Expected: https://sample.url.com/REST/v1/catalog/product/default/1398739**?**apikey=l7xxfc8df89f313944a89e280481e09bb411
Actual: https://sample.url.com/REST/v1/catalog/product/default/1398739**%3F**apikey=l7xxfc8df89f313944a89e280481e09bb411
Because of this conversion we get error in output. Let us know how to handle this.
Console output:
1 * Client out-bound request
1 >> GET https://sample.url.com/REST/v1/catalog/product/default/1398739**%3F**apikey=l7xxfc8df89f313944a89e280481e09bb411
1 * Receive Start: 87
1 * Received: delta: 87 bytes: 87
Finished1 * Finished
1 * Client in-bound response
1 << 401
1 << Server: Apache-Coyote/1.1
1 << Content-Length: 87
1 << Date: Fri, 31 Mar 2017 14:39:19 GMT
1 << Content-Type: text/plain;charset=UTF-8
1 <<
{
"errors": [
{
"message": "Invalid apikey",
"code": 4010
}
]
}

I have passed the apikey with Header object as below and able to get response.
Builder builder = webResource.getRequestBuilder();
builder.header(apikey, apiValue);
builder.get(ClientResponse.class);
Thank You!

Thank you @cjayswal @thetechnocrat for the support !!


Add data file and retrieval script for character reference names supported by HTML

This PR relates to issue #22 and is a first step towards the request I made in that issue.

Note that this PR does not touch any of the source code of chars.
As such, the failing clippy tests are unrelated to this PR.

I am a little busy these next few days (just wrapping up an international move), so won't be able to take a good look very soon - I just wanted to say, holy CATS this is a great PR & issue that you submitted there. Thank you!!!
I'm extremely excited to get more search criteria into chars, and hope to be able to review & merge this soon!

For the clippy failure, I just merged a change that should make the chars_data crate tests succeed again - if you rebase, I can merge (despite what I said, I couldn't resist glancing, and it looks good) (:

I just wanted to say, holy CATS this is a great PR & issue that you submitted there. Thank you!!!

Thanks for the kind words :)

if you rebase, I can merge

I've rebased now. Thank you :)

bors r+

Thanks so much for your contribution! As mentioned, I can take a look at integrating the data into the search/presentation functionality; or if you want to, feel free to take a stab yourself!


Identifier "val" has already been declared

Getting this Vite / Rollup build error when I upgraded to vite v5.
Looks like there is a duplicate var defined in the scope here

I can't find any reference to setLabel in this repository's source code, maybe this is in an upstream dependency?

https://github.com/rollup/rollup/issues/5259
Found the issue is caused by the rollup build process


Shell improvements, adjustments and fixes

Recent commands looks broken

Let's make "delete" icon less "aggressive" (smaller, grey and white on hover). Also if there is no space for text, let's use .... For example:

Tooltip is broken also


Issue found on page Excel Export

In section Exporting Excel Sheets there is a box stating a warning which seems to be outdated:
"The output file must not already exist."
I have no problems to export to an existing excel file, it simply gets replaced.

Thanks, indeed this needs to be fixed. A PR is on its way.


API to get last and current results.

Added these
Last (not including running job):
http://localhost:7777/jobs/1/results/**last**
Current (can be a running job):
http://localhost:7777/jobs/1/results/**current**

@thekushpatel for some reason the code .where('status').nin(['queued', 'running']) works now

CLA is valid!

@thekushpatel @BruceBGordon please merge!


Uncaught TypeError: Cannot read property 'trim' of undefined

[Enter steps to reproduce:]

Configure the file for ServiceNow sync
Setup proxy as described in doc.
Retrieve the file. Works fine.
Make changes in the file
The first time I tried to sync the file to servicenow, I receieved the below error:

Uncaught TypeError: Cannot read property 'trim' of undefined

Then any attempt to get info from serviceNow for any file I get an other error:

An error occurred retrieving Test from https://instance.service-now.com
Error details: Error: write EPROTO 0:error:14077419:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert access denied:c:\users\electron\workspace\electron-win-ia32\vendor\node\deps\openssl\openssl\ssl\s23_clnt.c:769:

Atom: 1.18.0 ia32
Electron: 1.3.15
OS: Microsoft Windows 7 Enterprise
Thrown From: servicenow-sync package 0.2.17
Stack Trace
Uncaught TypeError: Cannot read property 'trim' of undefined
At C:\Users\fournelf\.atom\packages\servicenow-sync\lib\modules\servicenow-sync-utils.coffee:387

TypeError: Cannot read property 'trim' of undefined
    at Object.checkSum (/packages/servicenow-sync/lib/modules/servicenow-sync-utils.coffee:387:53)
    at /packages/servicenow-sync/lib/servicenow-sync.coffee:99:44
    at Request._callback (/packages/servicenow-sync/lib/modules/servicenow-sync-utils.coffee:672:16)
    at self.callback (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/request/request.js:188:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at Request.onRequestError (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/request/request.js:884:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at TLSSocket.socketErrorListener (_http_client.js:308:9)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:188:7)
    at onwriteError (_stream_writable.js:319:10)
    at onwrite (_stream_writable.js:337:5)
    at WritableState.onwrite (_stream_writable.js:89:5)
    at fireErrorCallbacks (net.js:463:13)
    at TLSSocket.Socket._destroy (net.js:504:3)
    at WriteWrap.afterWrite (net.js:797:10)

Commands
     -8:10.7.0 window:toggle-dev-tools (div.package-detail.panels-item)
     -2:55.6.0 core:confirm (input.hidden-input)
  5x -2:54 core:backspace (input.hidden-input)
     -2:52.6.0 core:confirm (input.hidden-input)
     -2:12.9.0 tree-view:remove (div.tool-panel.tree-view)
     -1:52.5.0 servicenow-sync:sync (input.hidden-input)
     -1:35.9.0 core:paste (input.hidden-input)
     -1:28.1.0 editor:select-to-beginning-of-word (input.hidden-input)
     -0:51.9.0 editor:newline (input.hidden-input)
  2x -0:49 core:backspace (input.hidden-input)
     -0:44.2.0 core:move-right (input.hidden-input)
     -0:41.8.0 core:save (input.hidden-input)

Non-Core Packages
atom-beautify 0.30.3
autocomplete-xml 0.9.4
compare-files 0.8.0
daylight-ui 0.2.2
git-control 0.9.0
git-plus 7.9.3
github-atom-light-syntax 0.5.0
language-batchfile 0.7.0
language-powershell 4.0.0
line-diff-details 1.8.0
minimap 4.28.2
minimap-git-diff 4.3.1
minimap-split-diff 0.3.7
monokai 0.22.0
qolor 0.4.2
servicenow-sync 0.2.17
sort-lines 0.14.0
split-diff 1.4.3
tablr 1.8.3
xml-tools 0.2.1

Hi @franck-fourel,
This is happening as servicenow-sync doesn’t appear to be handling the proxy correctly on first time configuration with the sync function.
Does the error go away once atom is restarted?

Any updates? I'd like to use this solution for editing JS files.  Or know if there is another solution being used instead


Which license?

What's the license for the data in the https://github.com/openpolis/geojson-italy repository?

Thank you for your question Michele, I completely overlooked this.
This is going to be addressed properly, and it will by CC-BY-4.0, https://creativecommons.org/licenses/by/4.0/.
The original data come from ISTAT, that licenses their data under CC-BY, as well.

Thanks for the lightning fast reply!


Add support for post_fields without buffer copy

Hi
I wanted to add support for uploading data without the buffer copy between curl and rust, and without copying it in parts into a read function.
Basically support CURLOPT_POSTFIELDS, but unlike today, without setting CURLOPT_COPYPOSTFIELDS.
I've added both the option to support uploading 'static data, which I think is simple.
I'm not so sure about my approach to solving it for Transfer. I'm open to any other approach really, if you have any pointers. This was for me high magic, and I hope I've got it right.
And, of course, all that is in case that is something that you're interested in adding support for.

I think the reason I didn't originally bind this was the lifetime issue with data. I think we'll probably want to either make this unsafe or figure out a safe operation, because having &'static isn't too too helpful I think?

I think the reason I didn't originally bind this was the lifetime issue with data. I think we'll probably want to either make this unsafe or figure out a safe operation, because having &'static isn't too too helpful I think?

You're right. I mostly added it out of completion (to have all the options) and being useful for tests I guess.
What about tying it the lifetime in some way into a transfer object? Does it have to be unsafe?
I'm not sure that what I did is safe, but if not, surely there is some way to make sure that the upload buffer is set to null when the transfer goes out of scope?

I'm not very familiar with the safety here or this option, and I don't have a ton of time to dig in right now unfortunately. It might be possible though to tie it to the Transfer object.


[Bug] Stucked at step 3 due to axios dependency

Summary
Due to a new vulnerability for axios 0.21.2, Depeandabot creates a PR "Bump axios from 0.21.1 to 1.6.0 in /code/src/AttendeeSite" indtead of "Bump axios from 0.21.1 to 0.21.2 in /code/src/AttendeeSite". As a result GH Actions cant proceed to the next step.
How to reproduce
Just follow the step of the tutorial

Should be fixed by https://github.com/skills/secure-repository-supply-chain/pull/17


Drop CodeMirror from the Editor

With reference to the Split Screen Editor Epic (#1294)

The Ghost editor undeniably needs some :heart:. No matter how you consider what the editor might look like in the future, there is one underlying problem - to ship improvements like spellcheck, we need to build a completely custom editor, that's an enormous undertaking, and it would detract from all the other features we want to ship :-1:.
That is, unless we drop formatting/syntax highlighting from the left side of the editor :boom:
yep... I'm talking about dropping CodeMirror in favour of a plain textarea.
CodeMirror currently has two main jobs: 1) it formats/syntax highlights the markdown and 2) provides an API for interacting with the entered text. However, what it does under the bonnet is generate a completely custom representation of the document which is neither markdown or HTML. This breaks the browser spellcheck, doesn't work reliably on mobile/touch (which meant we had to remove it from mobile/touch devices), and the way it interprets markdown is quite different to our HTML conversion, which causes weird bugs and adds complexity.
If we strip out CodeMirror, we will lose formatting, but what we get instead will be an editor with working spellcheck, working mobile uploads and significantly reduced complexity: because we only have two document representations - markdown and HTML, and we are in control of them both. This means we can focus on making the conversion between them better (i.e. adding advanced markdown features).
In the future, we'll be able to bring back formatting if we want it using contenteditable, but in the meantime we can more easily focus on the features we want to bring to the editor, the markdown we want to support, and creating our own way of modelling documents - because the editor is so significantly less complicated.
I've been working on a prototype testing out how to interact with selections in the textarea to make sure that image uploads will still work (on ALL devices) etc and to me this feels like taking back control, and I'm REALLY, ridiculously excited about it.

Could you consider medium-editor? It basically has all the common features to replace CodeMirror (except syntax highlighting), plus it's easy to use while still maintain the clean look of the current design


How to protect sensitive data in server side without share with client?

Hi everyone,
I just begun to use nuxt and is not clear to me what part of the code is shared between client and server and what part belong to each side exclusively. So i'm afraid to put some sensitive data like API credentials and things like that in code cause i dont know where this data will be readable only by server. Can someone help me to organize my code in some way that i can guarantee that the sensitive data will be only readable by server and not exposing on client inside some bundle javascript client side code.

This question is available on Nuxt.js community (#c1804)

Hi renatomattos2912;
I have just begun, too. I have the same concerns with you and i try to find out this.
I use this scenario: I try to crypt some data at server side with the secret key and send data to page.
In vue page's "fetch" property , i crypted the data and try to show in page like :
<div>{{cryptedData}}<div>
When i browse the page and view the source (ctrl+shift+F in Chrome and searched the secret key), i could see the secret key! Alos, i tried page middleware but same problem occured...
I want to ask that, is this way is wrong?
Which way we should use for securing our data or private functions on server side?

I would like to know this too. I need to include some API keys but only on the backend.

Extremely good question, does nuxt not have an answer for this ? im facing same problem

From what I've gathered you should be fine when using environment variables that you access via process.env, as long as you don't add them to the env section of your nuxt config.
Be careful though if you plan to use .env files with the dotenv nuxt module instead of using the dotenv package directly: by default the module will add each variable declared inside that file to options.env, thus exposing it to the client.

@mootari thanks, i'm using the dotenv nuxt module, i will try to change.

@mootari , as far as i can see from Nuxt, you cannot have code which is just on the backend and not exposed to the client, unless im mistaken, so even if you retrieve the keys from process.env, they will be in the client side code, for example if your making an axios request when a button is pressed;
//click event
{
const credentials = {accessKeyId: process.env.acccessKey};
}
//Then do something with the above credentials

If you need to fetch data using that key then you'll have to proxy that through a custom API endpoint. In the examples this is commonly done by running a small express server alongside nuxt.
Regarding unbundled code that interacts with nuxt directly: there's e.g. serverMiddleware, and afaik nuxt.config.js doesn't get bundled either.

Thanks @mootari, i will do some tests

Is it outside the scope of Nuxt for a feature like this?
I've been using a separate Express server alongside of Nuxt to accomplish things like this before, but having that functionality built into Nuxt would be fantastic.
Specifically, I want to be able to consume APIs which need keys without using a separate Express app to handle it.

I'm deploying a static site using the npm run generate command. I have an .env file with the API key inside. I was previously using the @nuxtjs/dotenv module but as others have said this bundles up the api tokens and exposes them in the app.js client side file, I could see them in plain text.
To solve this I removed @nuxtjs/dotenv and instead simply ran npm install dotenv from https://github.com/motdotla/dotenv then at the top of nuxt.config.js add:
require('dotenv').config()

Then I just access all the .env variables using process.env.API_KEY etc. you can access them in nuxt.config.js and all pages.
I've checked all the js bundles etc and can no longer find the secret API key.

Hai @willbrowningme
I'v tested it did not work.... I still can see API_KEY on main.js on plain text

@willbrowningme Mind sharing your code? I don't see how that will work as once the Nuxt app is loaded in the browser, it effectively becomes a Vue app, no longer doing any server side stuff. Your API calls will still be processed by the browser after the first visit to your site. Yes, the first page load will be hidden from the user as it's processed on the server, but subsequent calls will be visible by the browser. At that point, you can sniff out those API keys with dev tools.

it's just working on server side but not client side
for whom using Firebase/Firestore realtime database will not working... for firebase that found solution is restricted credentials on cloud console

@Imanullah @krestaino The static site I've built only makes API calls on the server side using the asyncData method. Example source code can be seen here - https://github.com/willbrowningme/nuxt-cockpit-static-blog
If you're building an SPA that makes client side API calls then you might need to use a different way for authenticating calls.

so iv actually found a way around this. Not the prettiest solution but still works. Have your API credentials and your API call in a server middleware file (not exposed to client at all). Then from your front end where you want to make the API call, you then ONLY call the server middleware API, which will then in turn call the API you want to call, get the data and then return it to the browser.. Hope that makes sense

really hope nuxt can support such a basic requirement as a SSR framework.
can we have function like getInitialProps() of next.js, it does:

doing things before the components mounted
support nodejs modules(like fs, request)
able to acccess data of express, req, res
not rendering in the browser.

that is the reason we need SSR.

I'm specifically looking to have two pages:

Login Page
Secret Page

Currently, the Auth Routes example can be easily bypassed by editing the store on the client side. The server doesn't actually protect the data on the server side, and sends the whole secret.vue page to the client despite claiming not to do so.
Is there a way to protect whole pages or components from the server side?

why would you ever want to have a page or component "secret" and never sent to a users browser ? this would seem to defeat the whole point of developing a website / webapp ?

Hi all!
Actually, it's very easy to add some data in server side when fetching api.
You have to use the axios module with proxy one.
See the documentation : https://axios.nuxtjs.org/options.html#proxy
An example of configuration I have:
{
axios: {
    prefix: '/api/',
    proxy: true,
},
proxy: {
   '/api': {
        target: apiUrl,
        pathRewrite: { '^/api/': '' },
        headers: { 'X-API-KEY': apiKey },
        logLevel: 'debug',
    },
}

I let you read the available docs to understand all of that. 😉

yup, seems pretty much the same as the solution i coded. It sends an api request to a url which will return the protected API keys and then makes a concurrent API request with the results (keys) of the previous one

Outch, nope, it's not the same at all 😅 Here, only one call is made, just all calls are proxyfied. It's a native feature of nuxt.

In my solution, only one call is made from the client. And the serverMiddleware file is effectively the proxy..

@rosea1 If you look at the linked example, pages/secret.vue is a page that is only supposed to be seen if the user has authenticated. The example is called "Auth Routes" (implying authentication is needed for those routes) but the whole pages/secret.vue is sent to the client regardless of the user being authenticated.
To clarify, the component shouldn't be sent to the client unless the client is authenticated, which is not the case in the example.

Awesome. Thanks, I'll check that out.

asyncData & fetch are executed server-side anyway, so why can't we have middleware targetting server-side only in pages?
without these packages compiled into client.js
using lokijs with vue pages would be nice, so server-side handles rendering and database, without the massive overhead of using axios and making a whole api-server..

https://github.com/nuxt-community/separate-env-module

asyncData & fetch are executed server-side anyway, so why can't we have middleware targetting server-side only in pages?

@nitwhiz I believe that the serverMiddleware bits referenced by @bitk0der should do the trick:
https://nuxtjs.org/api/configuration-servermiddleware#the-servermiddleware-property

Same question(s)

Hmm... so if I have in my store,
async nuxtServerInit() {
  const secret = process.env.secret
  data = await this.$axios.post(... {secret})
  ...
}

Will secret be somehow available in the client? (process is not, and secret is not present in context.env) If not, then this seems simpler than serverMiddleware?

after using nuxt for one year time, I found out the solution. there is no easy way to protect secret data.

creating a express router for access protected data GET /apis/secret
accessing secret data inside asyncData (isomorphic-ly, for both serverside and browser render):

asyncData: async function ({req, res}){
    const data = await axios(`/apis/secret/${somekey}`)
    return {secret: data.data.secret}
}

Remark
It is impossible to wrap serverside code (Nodejs only) inside asyncData, such as 'fs', 'os' modules. As the reason that asyncData is also compiled through webpack into browser javascript.

Possibly a helpful gotcha: any files added to the ~/middleware folder will automatically be compiled into the client bundle, even if they aren't referenced the ~/nuxt.config.js router.middleware array.
This caught me off guard because I was trying to place both route middlewares and server middlewares in the same ~/middleware folder for organization.
To remedy, I have moved server middlewares to a sibling ~/middleware-serverside folder and they are no longer included in the client bundle.

after using nuxt for one year time, I found out the solution. there is no easy way to protect secret data, but express API.

@wahengchang I have had good success using server middleware, which are significantly less complex than defining a custom express API. See above note for gotcha.

server middleware leads to a mess, I will never use it again.

While this discussion emerges, I leave a small related blog post here 😉
https://blog.lichter.io/posts/my-take-on-using-nuxt-with-an-api/

Indeed, your article covers all the available approaches for Nuxt + a REST API. @manniL
I read that article (and every single word you you wrote on your useful blog)
And Organize and decouple your API calls in Nuxt.js is also a very nice one.

process.env values are only visible to the client if we set a variable that we're sending to the client, correct? Might be a silly question but after reading @rosea1 's comment, I just want to clarify. @rosea1 's comment was giving an example where process.env. was being set to a variable that was going to be available on client side, and not suggesting that in general all process.env values are exposed to the client..... right?... please say right

Hi all!
Actually, it's very easy to add some data in server side when fetching api.
You have to use the axios module with proxy one.
See the documentation : https://axios.nuxtjs.org/options.html#proxy
An example of configuration I have:
{
axios: {
    prefix: '/api/',
    proxy: true,
},
proxy: {
   '/api': {
        target: apiUrl,
        pathRewrite: { '^/api/': '' },
        headers: { 'X-API-KEY': apiKey },
        logLevel: 'debug',
    },
}

I let you read the available docs to understand all of that. 😉

I have the same problem, but I'm confused about @nuxtjs/proxy
how to import the apiKey

I'm sorry but I'm afraid I don't understand your question. If you don't want to set it explicitly here, you're in a js file, what's the problem of importing a variable in it? Or (better) why don't you use an env var?

@youncccat The proxy configuration goes in the nuxt.config.js.
// nuxt.config.js

module.exports = {
axios: {
    prefix: '/api/',
    proxy: true,
},
proxy: {
   '/api': {
        target: apiUrl,
        pathRewrite: { '^/api/': '' },
        headers: { 'X-API-KEY': apiKey },
        logLevel: 'debug',
    },
}

Then, you can use [dotenv](https://github.com/motdotla/dotenv) module to get API key from your .env file which you do not check into your version control. Your nuxt.config.js will end up looking something like this.
// nuxt.config.js with dotenv

require('dotenv').config()

module.exports = {
axios: {
    prefix: '/api/',
    proxy: true,
},
proxy: {
   '/api': {
        target: apiUrl,
        pathRewrite: { '^/api/': '' },
        headers: { 'X-API-KEY': process.env.API_KEY },
        logLevel: 'debug',
    },
}

This works because:

Your .env file is not committed to the repository. So it's not public.
Because we are using the Nuxt proxy, the client JS does not contain the API key either.

Hope that helps.

I'm a bit confused about setting proxy headers.
If i set my api-key in my proxy headers, so anyone which request my app through the proxy will get the data from my api ?
So if someone want to get the data from my api will use my app proxy to be authorize to access data ?

I confused so much that there is a lot of workarounds but no working solutions :( @Atinux @pi0 Is there some way to survive?

I confused so much that there is a lot of workarounds but no working solutions :( @Atinux @pi0 Is there some way to survive?

@patron I actually really don't see what you need more than all the previous answers. I gave you the code and @prashantpalikhe all the details.

@patron I actually really don't see what you need more than all the previous answers. I gave you the code and @prashantpalikhe all the details.

@mathieutu Hi! Your solution looks good, but what can I do if I need to store credentials in the body of request, not in headers?

@mathieutu Hi! Your solution looks good, but what can I do if I need to store credentials in the body of request, not in headers?

@patron Proxy usage is a shortcut, but you can use a ServerMiddleware to do exactly what you want.
There is an example here https://github.com/nuxt/nuxt.js/issues/2033#issuecomment-418056214, but you can find more on the web I think.

@patron Proxy usage is a shortcut, but you can use a ServerMiddleware to do exactly what you want.
There is an example here https://github.com/nuxt/nuxt.js/issues/2033#issuecomment-418056214, but you can find more on the web I think.

@mathieutu I'll try to use it, but server middlewares such a messy thing to debug, and there is no more useful examples in the web. Thanks anyway

@mathieutu I'll try to use it, but server middlewares such a messy thing to debug, and there is no more useful examples in the web. Thanks anyway

To sum it up:

If you want to use secrets on the server-side only, you can use privateRuntimeConfig Further read. Be aware that those values are not accessible on client-side.
You can use serverMiddleware or a standalone API service to ensure that private keys (e.g. a private stripe key) are kept on the server-side only.
In the future you can use Nuxt functions

Closing here but feel free to discuss further 👍

To sum it up:

If you want to use secrets on the server-side only, you can use privateRuntimeConfig Further read. Be aware that those values are not accessible on client-side.
You can use serverMiddleware or a standalone API service to ensure that private keys (e.g. a private stripe key) are kept on the server-side only.
In the future you can use Nuxt functions

Closing here but feel free to discuss further 👍

Actually, how to access privateRuntimeConfig in a serverMiddleware?

Actually, is it possible to access privateRuntimeConfig in a custom serverMiddleware?

Not at the moment, no.

@dzcpy you can create custom .server.env file to hide creds

I tried option.onProxyReq of proxy, which can programmably insert api key according to each htttp request.

Actually I read all the comments here. But I couldn't find any solution.
There is a remote api and it needs hmac sha256 key which is generated with secret key and timestamp for each request.
This header generation should not be seen on client.
How to add this header to axios for server side calls to the api ?

Actually I read all the comments here. But I couldn't find any solution.
There is a remote api and it needs hmac sha256 key which is generated with secret key and timestamp for each request. This header generation should not be seen on client.
How to add this header to axios for only server side axios requests ?

You should use server-middleware and you should understand how Express.js server under the hood of Nuxt works. If you need a solution I can put some code example

Actually I read all the comments here. But I couldn't find any solution.
There is a remote api and it needs hmac sha256 key which is generated with secret key and timestamp for each request. This header generation should not be seen on client.
How to add this header to axios for only server side axios requests ?

You should use server-middleware and you should understand how Express.js server under the hood of Nuxt works. If you need a solution I can put some code example

Can you please share the code. That would be amazing. Here I asked this on Stackoverflow.

so iv actually found a way around this. Not the prettiest solution but still works. Have your API credentials and your API call in a server middleware file (not exposed to client at all). Then from your front end where you want to make the API call, you then ONLY call the server middleware API, which will then in turn call the API you want to call, get the data and then return it to the browser.. Hope that makes sense

But how about restriction on the API? do you give any restriction when some users accessed that api? or just let them in to access it?

@adnanerlansyah403 with all my respect IDK what to do, that preety old tread :) I suggest first of all to switch from 2.x aaand theoreticaly it's possible (even in 2.x) to add some auth token to any endpoint using Express (or whatever type) middleware but that beyond of task of just hiding creds on servers .envs


[Enhancement] Add hyperlink capability for custom detail column

Summary
Since the introduction of #137, users can view custom alert details in the incident table.
At the present time, we only display raw text for the custom fields, but it has been requested from customers to ensure that hyperlinks/URLs can be clickable.
Proposed Changes

Update alert column model to include link attribute
Apply URL sanitization & validation for the configured alert column; default to plaintext if invalid

PR #218 has been merged - closing ticket.


Unexpected errors on VSCode with a library project but compilation with dotnet core CLI works well

Hello,
I use VSCode with the extension ionide-vscode-fsharp on my F# solution (that contains 2 projects) and I have unexpected errors on VSCode when I activate ionide-vscode-fsharp.
For me these are unexpected errors because when I build and run my solution using the dotnet core CLI I have no errors and all are working fine.
I use this tutorial to bootstrap my F# solution: https://docs.microsoft.com/en-us/dotnet/fsharp/get-started/get-started-command-line
My solution contains 2 projects:

A library project that contains 2 files, each file has its own module and expose 1 function.
A console application project that use the library above and call the function exposed by the 2 library.

My errors are the following:

On file src/App/Program.fs

The namespace or module 'Toto' is not defined. [2, 6]
The value or constructor 'bar' is not defined. [10, 5]

The source code is available here: https://github.com/idarous/fsharp_test
My configuration is the following:

OS: Ubuntu 18.04
dotnet core CLI version 2.2.104
VScode version 1.31.1 1b8e8302e405050205e69b59abb3559592bb9e60 x64
ionide-fsharp version 3.33.0
C# VSCode plugin version 1.17.1

Please can someone explain why ionide-vscode-fsharp show my errors.
Thank you very much.

@idarous the source code link above is broken.
I think I was having this problem just now. It was the order of <Compile Include=...>'s in the .fsproj file.
Broken:

Fixed:

However in both cases the project was still being built and run. Or so I thought until I restarted the webpack watch/build process and then the build broke. I can also break the build by editing the apparently broken file. Looks like something in the build pipeline is getting cached/confused.
I'd argue the order of the <Compile Include=..>'s should not matter but:

I started learning F# last week, there could be a good reason for this I am not aware of
It is not something ionide can fix, it is the fsharp compiler behaviour, which ionide appears to be correctly mimicking

@richardcrichardc I don't use webpack and as I said, in my side it works well with the .net CLI compiler but VSCode print errors. The <Compile Include=..> are in the right order.

@idarious Maybe your issue is just superficially similar to what I was experiencing.

The source code is available here: https://github.com/idarous/fsharp_test

This link 404's, is it a private repo?

I am pretty sure I'm facing the same issue. @Krzysztof-Cieslak maybe my additional details shed some light? Any tips on how I can debug this further?
I'm trying to switch from multiple standalone .fsproj projects, linked through <ProjectReference Include="../../LibClient/src/LibClient.fsproj" /> references, which I was editing in separate VSCode windows, to a .sln based solution in the hope that I would be able to edit it all in the same window. Used the dotnet CLI to create the .sln file and add projects to it.
Once I open the directory in VSCode, it correctly loads the .sln file. However, dozens of errors come up in the Problems tab. No errors come up with building through webpack (it's a Fable project).
What is particularly strange is that it seems like the main project is being compiled against old versions of linked projects. For example, I get errors like The type 'BlahRenamed' is not defined in 'Some.Module'. Maybe you want one of the following: 'BlahOriginal'. When you command+click through to Some.Module, it shows that BlahRenamed is indeed there. The renaming happened two weeks ago. Command+clicking often lands you on a wrong line, once again as if the error information was generated based on an older version of the file. Same deal for errors like The type Some.Type<_,_,_> expects 3 arguments but is given 2 — indeed a few days ago it did expect 3, but nowhere in the file system should this old file be available.
I have tried rm'ing the .ionide directory in all my projects. I've also tried the F# Clear Cache command in VSCode.

I got to a resolution on a subset of my issues, and figured an update here may be useful to someone.
A number of issues interplayed to create this difficult to understand scenario.
First, my setup consists of leaf node apps, one per directory, each opened in one VSCode window, and libs, code shared at various levels, in directories sibling to apps, also edited one directory per instance. All this is linked through .fsproj files using ProjectReferece tags.
The apps are Fable apps, and are build via webpack and Fable compiler.
I turns out that there is a number of scenarios that result in errors when compiled using the dotnet toolchain, but are not errors when compiled through Fable. Since I was used to considering the command-line fable compiler as the main source of truth, it was easy to conclude that "VSCode has gone mad", especially given the history of seemingly-random VSCode issues when doing F# development (though thinking back, perhaps they were all of the nature I here discovered).
What made things crazier is that I had a three-month-old version of the lib's dll file sitting in its bin/Debug/netstandard2.0/ directory. I'm guessing here, but perhaps Ionide or some downstream internals thereof, failing to get the source of the lib to compile into anything meaningful, fell back onto this dll it discovered. This perfectly explains the errors I was seeing of the type "this was true weeks ago, but certainly not now!".
So going into every lib directory, running dotnet build, fixing the Fable-permitted errors, eventually brought VSCode back into a usable state.
Except most times Ionide internals (I assume) would still crash with "dotnet unexpectedly quit", making it barely usable. I switched FSAC from netcore to net as was suggested by some other github issue. This fixed the crashes, but resulted in a 100% CPU hugging mono-sgen64 process per window, rendering VSCode kind of unusable.
Anyway, hopefully this helps someone debug their own non-standard setup.

Hello everyone. Thank you all for your feedbacks.
This of all this link that I provide is currently broken. I remove the code and I always delete the source code from my own computer. But it was a test project so it's not important.
I recreate a solution that contains 2 projects (one console application and one library) and now I don't have problem. Ionide works well. So I will close this issue.
For information, my setup is the following

OS: Ubuntu 18.04
dotnet core CLI version 2.2.402
VScode version 1.39.0
ionide-fsharp version 4.2.0
C# VSCode plugin version 1.21.1


error in authenticate: None

Hello, I'm trying to run authenticated scans of my web app and am running into a bit of a problem with authentication. I'm still getting a report out, but it doesn't contain any context past what can be scanned from the login page.
The command I'm running is:
docker run --rm -u 0 -v $(pwd):/zap/wrk/:rw -t ictu/zap2docker-weekly zap-baseline.py -I -j \
-t http://[my-website] -d \
-r zap_report_auth.html \
--hook=/zap/auth_hook.py \
-z "auth.loginurl=http://[website-login] \
  auth.username="user" \
  auth.password="pass""

Which produces the output:
2021-11-12 18:46:06,017 Finished Request
Traceback (most recent call last):
  File "/zap/zap_auth.py", line 84, in authenticate
    self.setup_webdriver()
  File "/zap/zap_auth.py", line 70, in setup_webdriver
    self.driver = webdriver.Firefox(
  File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/firefox/webdriver.py", line 170, in __init__
    RemoteWebDriver.__init__(
  File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 1

2021-11-12 18:46:06,019 error in authenticate: None

I'm sure this is a simple syntax problem or something but for the life of me I can't figure it out. Any help would be greatly appreciated.

Hi, I've seen this kind of error too. As far as I know, this solution gives you 5 seconds to load the application in webdriver. If it's more than 5 sec, then it will fail.

Hi, please try the new params that were recently added:
auth.check_delay          How long to wait after submitting the form.
auth.check_element        Element to look for to verify login completed.
Please reopen the issue if you still have issues.

Appreciate the replies!
I have since set auth.check_delay to a bunch of different ints, from 5 to 120, as well as auth.check_element to an XPath (it is supposed to be an XPath right?) of an element that appears after logging in and am still getting the same stack trace.

with configuring auth.check_delay, my application seems working. Appreciate the help!


Vim9: cannot pass argument of type "any" to "popup_create()"

Describe the bug
In Vim9 script, we cannot pass an argument of type any to popup_create().
To Reproduce
Run this shell command:
vim -Nu NONE -S <(cat <<'EOF'
    vim9script
    def Func()
        var what: any = ''
        popup_create(what, {})
    enddef
    defcompile
EOF
)

This error is given:
E1013: Argument 1: type mismatch, expected string but got any

Expected behavior
No error is given.
Environment

Vim version: 8.2 Included patches: 1-3151
OS: Ubuntu 20.04.2 LTS
Terminal: XTerm(353)

Additional context
The {what} argument of popup_create() can be many things; including a number or a string.  Thus, it makes sense to use a variable of type any for the first argument of popup_create().

No error is given at the script level:
vim9script
vim9script
var what: any = ''
popup_create(what, {})
echo 'no error'

no error

Which is inconsistent.

If we give a number in compiled code, no error is given:
vim9script
def Func()
    popup_create(123, {})
enddef
defcompile
echo 'no error'

no error

It means that Vim is ok with us giving a number to popup_create().  But that's not what the first error message said:
E1013: Argument 1: type mismatch, expected string but got any
                                  ^-------------^

Hi,
On Sun, Jul 11, 2021 at 11:34 AM lacygoill @.***>
wrote:

Describe the bug
In Vim9 script, we cannot pass an argument of type any to popup_create().
To Reproduce
Run this shell command:
vim -Nu NONE -S <(cat <<'EOF'
vim9script
def Func()
var what: any = ''
popup_create(what, {})
enddef
defcompile
EOF
)
This error is given:
E1013: Argument 1: type mismatch, expected string but got any
Expected behavior
No error is given.
Environment

Vim version: 8.2 Included patches: 1-3151
OS: Ubuntu 20.04.2 LTS
Terminal: XTerm(353)

Additional context
The {what} argument of popup_create() can be many things; including a
number or a string. Thus, it makes sense to use a variable of type any
for the first argument of popup_create().
No error is given at the script level:
vim9scriptvim9scriptvar what: any = ''popup_create(what, {})echo 'no error'
no error
Which is inconsistent.
If we give a number in compiled code, no error is given:
vim9scriptdef Func()
popup_create(123, {})enddefdefcompileecho 'no error'
no error
It means that Vim is ok with us giving a number to popup_create(). But
that's not what the first error message said:
E1013: Argument 1: type mismatch, expected string but got any
^-------------^

I have created PR #8551 to address this issue.
Regards,
Yegappan


How can I solve this error?

local install
IP address blocked by policy .
The hostname of the origin is unresolvable (DNS) or blocked by policy.

By default, access to loopback, link-local, multicast and private IP addresses is denied.
https://github.com/weserv/images/blob/4133e2ff4745a2a70ca12e3113a5306e9e941efd/ngx_conf/nginx.conf#L119-L133
For self-hosted instances, you can remove those weserv_deny_ip nginx directives from your nginx.conf. For example, in Docker:
# Usage:
# docker build -t weserv/images .
# docker run -d -p 8080:80 --shm-size=1gb --name=weserv weserv/images
FROM ghcr.io/weserv/images:5.x

RUN sed -i '/weserv_deny_ip/d' /etc/nginx/nginx.conf

Thank you so much


feat: file nesting

closes #118
Is not finished yet, I need to complete the TODO LIST, but could you try it(it's only tested on Windows)?, any feedback is appreciated!
TODO LIST:

[ ] Add it to README.md
[ ] Add a component that tells you if a file has nesting files
[x] Better file base parser
[ ] How to handle expand and collapse (at the moment just keeps expanded all the time)
[x] Rename file_nesting config to nesting_rules

Thanks for working on this! I tried it out and it works for some files, but not all. It seems like a pattern matching issue. Given this config:
        nesting_rules = {
          ["ts"] = {"d.ts", "js", "spec.ts", "html", "css", "scss" }
        },

..this will work:
test.ts
test.js

but this won't:
test-test.ts
test-test.js

Maybe add it to README.md?

I think this is an interesting enough feature to highlight on the README.

Handle entire name rules?

I think the extension logic is probably the right way to go, keeps it simple.

How to handle expand and collapse (at the moment just keeps expanded all the time)

I would expect it to behave like a folder. Personally, I would also want them to be collapsed by default. We might need to replace some node.type == "directory" checks throughout the codebase with node:has_children() now that non-folders can be expanded.

I'm thinking on adding a link_resolver module

I would expect it to behave like a folder. Personally, I would also want them to be collapsed by default.

I thought it, but what if you want to open the file itself?, also I should add a component that tells you if the file have a nesting files

Thanks for working on this! I tried it out and it works for some files, but not all. It seems like a pattern matching issue. Given this config:

and yes, I think the problem is here, I'll look for all naming cases to add to the pattern

pattern fixed 👍 (I did notice that git integration doesn't works with that names, lmao)

FWIW, the default UI I'd expect would collapse these "dirs", but add a + icon next to (preferably overlaying, but I understand we're limited here) the file icon

FWIW, the default UI I'd expect would collapse these "dirs", but add a + icon next to (preferably overlaying, but I understand we're limited here) the file icon

I noticed in the original request, there was a screenshot showing the use of both expand/collapse icons AND the item type icons:

That seems like the only way to do it. The icon component would need to be aware that nesting is enabled and switch to the combo expand/collapse icon with a second filetype icon or folder icon.

Sounds legit

Hi, sorry inactivity, then should I set a custom icon(instead of the file icon itself) if file is file has nesting files?

Hi, sorry inactivity, then should I set a custom icon(instead of the file icon itself) if file is file has nesting files?

sounds like there should be a new icon column to the left of the existing icon, which (for now) holds the disclosure widget (>)

Hi, sorry inactivity, then should I set a custom icon(instead of the file icon itself) if file is file has nesting files?

sounds like there should be a new icon column to the left of the existing icon, which (for now) holds the disclosure widget (>)

Yes, I think that's the way. When file nesting is enabled, the folder icon should look like a folder instead of the simple triangle, and anything that has_children(), like a folder or nested file container, should have the additional triangle style expand/collapse icon to the left of the normal icon.

Sounds good

It's ok if markers are disabled(if file nesting is enabled)?, looks a bit weird
without markers:

with markers:

I think we can just fix the markers so that they extend the extra space when they need to. I'm happy to work on that separately if you want to submit this as is.

I'll try to fix it first, thanks

@cseickel I had to put the arrows into the indent component, so is fine if the arrows uses the same highlight group as the indent markers or should have a specific highlight group(might be a breaking change because it will need to change the highlight to marker_highlight & arrow_highlight config for the indent component)?

I'm not crazy about having the indent component doing so many different things, but I do like the way that looks. I think in the future I might try to find a way to configure overlapping components to handle things like the indent / guides / nesting component. Definitely a problem for another day though...
For now, I think you can go ahead and add the two new highlight groups, but also keep the existing highlight group which can serve as the default for both.
  local marker_highlight = config.marker_highlight or config.highlight
  local arrow_highlight = config.arrow_highlight or config.highlight

That way there's no breaking change.

Oh, yeah

@cseickel could you check it if works fine?, then I just need add it to README.md and update the docs
also I have fixed the first issue of #186

I gave it a quick try and it works well.
One thing I would change is that it didn't feel intuitive to have to turn on the with_arrows property in the indent component. I think that can be implicit and can just be set to true in setup() if the value is currently nil and nesting_rules is truthy. On the off chance that someone wants nesting but not expanders, they can explicitly set that value to false. This option can be a side note in the vim docs.
Also, on the same topic, I think I prefer the term expanders over arrows, because someone may use a different icon that doesn't happen to be an arrow.
All in all, this looks really awesome!

All in all, this looks really awesome!

Thanks!

Also, on the same topic, I think I prefer the term expanders over arrows, because someone may use a different icon that doesn't happen to be an arrow.

Something like this?
require("neo-tree").setup({
  expander = {
    enabled = true, -- if nil and file nesting is enabled, will set to true
    expanded = "", -- expanded icon
    collapsed = "", -- collapsed icon
    highlight = "NeoTreeExpander",
  }
})

(still all the logic will be into the indent marker component)

Something like this?
require("neo-tree").setup({
  expander = {
    enabled = true, -- if nil and file nesting is enabled, will set to true
    expanded = "", -- expanded icon
    collapsed = "", -- collapsed icon
    highlight = "NeoTreeExpander",
  }
})

I was originally just thinking of replacing the word "arrow" with "expander" in the indent component config:
      with_arrows = true,
      arrow_collapsed = "",
      arrow_expanded = "",

changed to:
      with_expanders = true,
      expander_collapsed = "",
      expander_expanded = "",

...but having a completely different section is probably cleaner. That entire section can just be copied right onto the indent components config during setup.
I'm just not sure if the name "expander" is obvious enough in that context. Maybe "expander_icons" or "expander_controls"? @bennypowers do you have any thoughts on this?

I have an idea, it's a bit complex(I think) but is making the expander(maybe markers too) component like other components but with "metadata"(_target = "indent"), then in setup copy it into de indent component, I think it will looks more cleaner

I have an idea, it's a bit complex(I think) but is making the expander(maybe markers too) component like other components but with "metadata"(_target = "indent"), then in setup copy it into de indent component, I think it will looks more cleaner

YES!

@cseickel check it again please(check default.lua too), btw the exntensions thing could be a migration, the sadly part is the documentation ;_;

wrt naming, i don't mind "expander". another name for the top level config key that i think makes sense is "nesting"

Hey @lopi-py , sorry for all the back and forth on how to configure this. I think that the whole concept of hot to handle these overlapping elements is a bigger discussion that we should take our time with, and not hold up this feature. For now, can we just go back to the simple case of adding this config to the indent component and finish it off?
    indent = {
      indent_size = 2,
      padding = 1,
      -- indent guides
      with_markers = false,
      indent_marker = "│",
      last_indent_marker = "└",
      highlight = "NeoTreeIndentMarker",
      -- expander config, needed for nesting files
      with_expanders = true,
      expander_collapsed = "",
      expander_expanded = "",
      expander_highlight = "NeoTreeExpander"
    },

We can refactor later once discussion #191 has had some time to hopefully gather input from more people.

@cseickel This can be merged I guess

Looks good, thanks!


Social Icons not able to be hovered/clicked

Describe the bug
Mousing over the social icons in any of the footers does not trigger the hover action.
To Reproduce
Steps to reproduce the behavior:

Go to liferay.design
Scroll to the bottom
Hover on social icons

Expected behavior
They should turn blue and scale up — and you should be able to click on it.

there was a negative z-index on them — I think this was for the mobile nav — I removed this and added positive z-indexes to the mobile nav stuff


Windows Terminal for Windows Server editions.

Windows Terminal for Windows Server editions is not available.

Please provide a Windows terminal installer which can install terminal on servers. All tricks to install this on server failed. A lot of console work done on server machines as servers are for professionals who like to work on console. Terminal has more usefulness for servers rather then desktop OS.

Thanks for the suggestion! Please make sure to search for duplicates when filing new issues, and read the FAQ.


Update to add additional linked libraries to be mounted as a volume to run systemd-run

Issue:

Fixes https://github.com/rancher/rancher/issues/44203

To fix the GlusterFS kubelet image issue we mounted the additional linked libraries as volume from host to Hyperkube Kubelet container along with systemd-run, -v /usr/lib/x86_64-linux-gnu/libcrypto.so.3:/usr/lib/x86_64-linux-gnu/libcrypto.so.3 and -v /lib/systemd/l ibsystemd-shared-249.so:/lib/systemd/libsystemd-shared-249.so

Command and manifest of GlusterFS Volumes document is updated with the following

docker run -v /usr/bin/systemd-run:/usr/bin/systemd-run -v /usr/lib/x86_64-linux-gnu/libcrypto.so.3:/usr/lib/x86_64-linux-gnu/libcrypto.so.3 -v /lib/systemd/l ibsystemd-shared-249.so:/lib/systemd/libsystemd-shared-249.so --entrypoint /usr/bin/systemd-run rancher/hyperkube:v1.28.7-rancher1 --version

services:
  kubelet:
    extra_binds:
      - "/usr/bin/systemd-run:/usr/bin/systemd-run"
      -  "/usr/lib/x86_64-linux-gnu/libcrypto.so.3:/usr/lib/x86_64-linux-gnu/libcrypto.so.3"
      -  "/lib/systemd/l ibsystemd-shared-249.so:/lib/systemd/libsystemd-shared-249.so"

Related

https://github.com/rancher/hyperkube-base/pull/20
https://github.com/rancher/rancher/issues/40508
https://github.com/rancher/rancher/issues/41601

Do these instructions apply to Rancher v2.7 and earlier, or just v2.8? Asking as we have separate files for Rancher v2.0-2.4, 2.5, etc. that would need to be updated as well.

I believe it should be updated for 2.7 as well (maybe even 2.6) - but given 2.6 is practically EoL I think it's fine to update only 2.8/2.7.
Though for 2.7 we want to make sure to not reference K8s 1.28 as it's not supported there. (FWIW it's not yet supported for 2.8 yet until 2.8.3 release so maybe we can reference earlier K8s version in all the cases?)
I understand it's just an example but it could be safer to just reference K8s 1.26 on these examples.
@chiukapoor , please update accordingly.

Updated the versioned docs for 2.7 and 2.8 with 1.26.14 k8s reference.


Question: auto formatting & sorting imports

@NickCrews would you be OK with auto sorting/formatting imports (probably with isort)?
When I was rebasing the error message PR just now, and a few other branches I've got, probably 3/4 of my merge conflicts were just imports. I'm thinking it would help to use isort with the single line option, so that instead of:
from typing import Any, Callable, Tuple, Type, Union, cast

we get:
from typing import Any
from typing import Callable
from typing import Tuple
from typing import Type
from typing import Union
from typing import cast

Which doesn't look as nice, but means import changes shouldn't cause merge conflicts.

This is what it would look like: https://github.com/jazzband/docopt-ng/compare/master...h4l:docopt-ng:isort

Yes I LOVE autoformatters such as black and I sort. Please implement that of you like, or I can do it too.

Awesome! Yep, please do.

I merged #37 first to avoid merge conflicts, which then made your branch have conflicts, so I just re-implemented it myself

Thanks @NickCrews, that's sensible. Good to move towards pyproject.toml too.


Add a Django CMS plugin for pure Django Template code

We are currently misusing the MarkIt plugin for writing template code, but this often gets in the way, since it tries to reformat the code as MarkDown.
It would be better to have a pure Django Template plugin which takes the template code as input and renders this directly within the page.

I implement this in https://github.com/EuroPython/epcon/pull/1415


[ServiceBus] Support websockets

This is also needed for EventHubs. Blocked by support needed in uAMQP.

What is the update on this? Is my pull request redundant with upcoming updates , or can it be merged as a minor update to the current version of the library at least?

Hey Dennis,
Apt timing, as we're very literally on a call discussing this right now.  (There was some back and forth under whether this would be coming in via our next major version, but we've settled on looking into this now.)
Thanks in advance for all your patience thus far re: the delay to our engaging in this.  Expect PR comments shortly :)

@KieranBrantnerMagee @yunhaoling are the updates ok?

Closing the issue as the PR is merged already.
Apart from that, azure-servicebus 7.0.0b1 is out: https://pypi.org/project/azure-servicebus/7.0.0b1/ with websockets support.

will there be a 0.50.3 release?

I see you wrote NVM but just in case for any other interested parties, we're intending to do a 0.50.3 release within the next few weeks, keep an eye out on the repo/release notes (or don't hesitate to ping us) for any updates.
Thanks again!


Bukkit/Spigot/Paper: Add Command

Option to add a command that creates a command executor
class package name should use JavaPlugin class as "base", and if base.commands package exists, default to that, else default to base
so if I have co.aikar.MyPlugin, and co.aikar.commands package, it would default to co.aikar.commands package, else co.aikar
on creation, add the setup commands to a "registerCommands()" method, and add the method to onEnable if it does not exists.
This should then encourage plugin devs to put any of their manual commands in that method.
If they don't like the auto placement, they could manually move it.

Singular package rather than plural - com.example.command.*.

Could just as well search for either.
Or just open a window with a class path, have default filled in, let the user change it.


Rewrite?

A lot of the JS and CSS is quite horrendous if you look at it closely. I myself have had to work with how the CSS was initially written and it's a limiting factor in my opinion. I don't think anything warrants a rewrite yet until people actually use this hopefully in the upcoming school year, definitely v2024.0.0 if it gets to that. We've moved the current infrastructure for JS over to TS so it hopefully scales better. At least a CSS rewrite would be nice for now, redoing the class names, removing redundant properties, etc. I think the JSX needs to be split into more components too.

Yeah I totally agree. I think we should at least fix some of the css. I'm not very good with css though, so if someone else can rewrite that would be good. Also, do you think it's a good idea to break up the course into two components, one for editing and one for viewing?
React doesn't like the hacky code I used to get the text out of the courses
We really should be using a form and then capturing that data

I can refactor the course editing and viewing if we decide that's something we want to do.

Also Magnify behaves like a React 17 app still because we're using the ReactDOM.render still

Is there a simple fix for that?

Is there a simple fix for that?

I'm not sure, the way React creates the root element or whatever is different in react 18. You might want to look at how it's setup by create-react-app in my website code https:///github.com/GoogleGenius/erich

I'm going to close this issue and open several smaller ones instead, so we have a better workable step-by-step goal.


Calculate MCC (McCabe Complexity) accordingly

Your feature request may already be reported!
Please search in the issues before creating a new one.
Expected Behavior
The cyclomatic complexity should be calculated with reference to the control flow graph of the program.
Current Behavior
Some statements that introduce are new path are still not counted.
Context

[ ] Refactor cases/ComplexClass.kt!!
[ ] elvis operator ?:
[ ] && and || not only in if statements but rather in every binary-expression
[ ] jumps (break / continue)
[ ] throw
[x] safe call operator ?. (can only be accurately calculated using Java byte code)

reference #1793

Thanks for tackling this. I suggest to get all points implemented before shipping this if you are okay with it.

The refactoring of ComplexClass.kt can be done in a single PR.
The rest is mostly testing effort.

I mean this rule is a breaking change/bug fix/improvement and we should ship it in a new minor version when all 6 bullet points are ready.


Use mailing list summaries rather than raw body

We have the mailing list summaries indexed on ES. We should use those rather than the raw body to save tokens.

Closing this since it doesn't make the chat response any better.


Add support for 6.5.1 and 6.5.2

This PR adds support for 6.5.1 and 6.5.2

run
npm run links --branch master

before merging


Adding the ability to pass a nonce attribute to the hydration script

Fixes #500. This change allows you to pass a nonce to the hydration script tag in order to allow inline scripts to run under a CSP that has the script-src directive enabled. The following example shows how to use this change in a Next.js project:
export default class extends Document {
  static getInitialProps({ renderPage, res }) {
    const page = renderPage()
    const { nonce } = res.locals
    // Pass the nonce to `extractStyles`
    const { css, hydrationScript } = extractStyles({ nonce })
    return { ...page, css, hydrationScript, nonce }
  }

  render() {
    const { css, hydrationScript, nonce } = this.props
    return (
      <html lang="en">
        <Head>
          <style dangerouslySetInnerHTML={{ __html: css }} />
        </Head>
        <body>
          <Main />
          {hydrationScript}
          <NextScript nonce={nonce} />
        </body>
      </html>
    )
  }
}

(See also this example for more context)
Note that this implementation is pretty loose — you could pass any object to extractStyles and it would get spread to the hydration script tag. I'm open to ideas on how to make this more strict while keeping it clean and backwards-compatible.

Would it make more sense to explicitly permit an optional nonce value that gets set as the nonce prop instead? Rather than allowing an anything-goes object?
console.log(extractStyles({ nonce: 'whatever' }))
// {
//   type: 'application/json',
//   id: 'evergreen-hydrate',
//   dangerouslySetInnerHTML: { __html: JSON.stringify(evergreenCache) },
//   nonce: 'whatever'
// }

I think the biggest risk is that we are letting consumers pass in their own dangerouslySetInnerHTML, id and type that would override our values.

@mshwery what about if the scriptAttributes spread was first? That way, type, id, and dangerouslySetInnerHTML couldn't be overwritten.
const scriptProps = {
  ...scriptAttributes,
  type: 'application/json',
  id: 'evergreen-hydrate',
  dangerouslySetInnerHTML: { __html: JSON.stringify(evergreenCache) }
}

This approach is less explicit, but more future-proof – if it was desired to add another attribute in the future, all that would need to change would be a call-out in the docs.

I agree with @mshwery, we should expose one prop that takes care of that functionality, without letting developers overwrite any prop on the script tag. Exposing specific props for specific bits of functionality is better long term and is easier to maintain, because we know exactly what input to expect.

@vadimdemedes @mshwery makes sense to me. I've updated the branch.


Large distribution package

Thanks for the library, we're enjoying using it!
I do wonder if the build could be more optimized. At 1.6Mb it seems like it has an awfully large footprint. Pdfjs-dist comes in at only 264kb.

Hi @coolhand79,
Most of this is the PDF worker, which is needed for the document loading. And since vue-pdf-embed  aims to be an all-in-one solution, the worker is included in the build.
As an option, adding more builds (without the worker) might be considered in the future.

A build without a worker has been added in v2.0.0, and I will try to further reduce the build size in future releases. Thanks for pointing it out!


.bashrc settings no longer work

I had some configuration in my .bashrc file, for formating the prompt, displaying certain information, etc. These settings were invaluable to me. Sadly, after installing hishtory, these settings no longer apply and I am faced with a plain-formatted bash prompt. The settings are still in .barshrc. They just do not matter anymore.

Ah interesting! What OS are you on? And how are you opening a terminal (what app? is it via SSH?). If you run source ~/.bashrc does it fix the issue?
If so, I believe that adding these lines to ~/.bash_profile should fix your issue:
if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi

Please let me know, and if this fixes it I'll figure out how to include this by default in the installer.

Thank you so much for replying quickly.
source ~/.bashrc  fixed it. I have no idea what sorcery is at play, but I'm grateful for it. Hishtory seems like a fantastic tool and I've no doubt it's going to become an indispensible part of my life. Thank you!

Sorry, I should add, for the benefit of anyone else reading this with the same problem:
I also had to add the lines you recommended to ~/.bash_profile. This appears to have fixed it.