Add json output for issue show

Added  --json flag for issues show output. Body is almost same as http api.

Hi @eskrano I recommend openning an issue to discuss this before submitting a patch.  Its unclear whether we cant JSON output.

This indeed needs to be discussed, it's not that straightforward, we need to come up with a plan. I'd invite you to open an issue or come discuss in zulip (https://radicle.zulipchat.com)


this plugin destroy sourcemap

When using this plugin, I can't normally debugging in chrome. For example, I can't set breakpoint at below position:

After I remove this plugin, eveything goes ok.
reproduce repositiory: https://github.com/tjx666/vite-antv/blob/master/src/App.vue#L20

I got the same problem with this plugin, it cause the source map locate at wrong row, if set breakpoint at row 21 or 23, the breakpoint maybe at row 20

When using this plugin, I can't normally debugging in chrome. For example, I can't set breakpoint at below position:

After I remove this plugin, eveything goes ok.
reproduce repositiory: https://github.com/tjx666/vite-antv/blob/master/src/App.vue#L20

      {
        ...Components({
          resolvers: [VantResolver()],
        }),
        enforce: 'post',  // Add
      },

This solved my problem


feat: add prometheus, grafana, loki, tempo

Hi,
I want to add new observation (promethues, grafana, loki, tempo)  :D . Plz help me review.
Thanks

@nduyhai does your configurations support fully tracing end to end ? (request -> kafka -> reply etc,..)


[fix](roup commit) remove unused code (#44015)

pick https://github.com/apache/doris/pull/44015

run buildall

run p0


[BUG]setting clientrole in PROFILE_LIVE_BROADCASTING gives  "rtc mode can not use setClientRole"

Describe the bug
When setting clientrole in PROFILE_LIVE_BROADCASTING we get   "rtc mode can not use setClientRole"
Uncaught (in promise)  Object { name: "AgoraRTCException", code: "INVALID_OPERATION", message: "AgoraRTCError INVALID_OPERATION: rtc mode can not use setClientRole", data: undefined } agorachannel.js:647:7     setClientRole2_MC https://xxxx/WEBGL2020/AgoraWebSDK/libs/agorachannel.js:647     AsyncFunctionThrow self-hosted:699     (Async: async)     setClientRole2_MC https://xxxx/WEBGL2020/AgoraWebSDK/libs/multichannel.js:83     _setClientRole2 https://xxxxx/WEBGL2020/Build/WEBGL2020.framework.js:17730     _IRtcEngineNative_setClientRole2_mA8577854DC3AE35AD11364891B2B51350A45AD18 https:/xxx/WEBGL2020/Build/WEBGL2020.wasm:43969130     _AgoraChannel_SetClientRole_mB18450F0EB4E7B1BE65B74C3289A4630696EEFDF https://xxxWEBGL2020/Build/WEBGL2020.wasm:44923361
To Reproduce
use code:
   	int channelOk = mRtcEngine.SetChannelProfile( CHANNEL_PROFILE.CHANNEL_PROFILE_LIVE_BROADCASTING);
	currentChannel.SetClientRole(CLIENT_ROLE_TYPE.CLIENT_ROLE_BROADCASTER);

Expected behavior
Set the role correctly without error message
Desktop (please complete the following information):
Webgl, firefox

Did you try the code from dev/refactor1 branch?

yes!


wip: Suport tls

This is work in progress.
See #17

I've pushed some changes to handle all TLS related work by NioSslChannel.
But not completed yet.
I'm not sure that how to accept and handshake in NioSslChannel. I will keep investigating...

Could you PR which contains TLSPrint, ForwardServer and NioChannelConfig in this PR?
I have implemented some parts in transport layer, and I need NioChannelConfig to pass parameters.

@okumin I've pushed changes about NioChannelConfig.

@okkez Thanks for your contribution!
Can you create PR which is stashed and contains only TLSPrint, ForwardServer and NioChannelConfig?
After merging the PR, I will integrate it with my branch which provides SSL/TLS supported channel.
I'm working reading this PR, so I hope that you open a new dedicated PR.

Sure! I will create new PR ASAP.

@okumin I've created #23

SSL/TLS support is merged.
https://github.com/okumin/influent/pull/23
https://github.com/okumin/influent/pull/27


I wonder how to learn to parse pptx, could you give me some direction ?

the ecma office open xml  was too big to learn
some direction to quick start?
thank you!

I made a tiny document, unzipped it, and started looking at the XML. Looking at my source may help a little, but really it's just a DIY struggle.


Fix __TS__AsyncAwaiter error handling

Similar to line 64, this should use errorOrErrorHandler in order to capture the thrown error.
Happy to add tests if you can give me some pointers on how to do so. Here is an example where the current code breaks:
const success = async () => {};
const error = async () => {
  await success();
  throw new Error('Hello World');
}
error().catch((err) => {
  // prints true prior to change in this PR
  print(err === undefined);
});

Thanks, would indeed be nice if you can add a test here: https://github.com/TypeScriptToLua/TypeScriptToLua/blob/master/test/unit/builtins/async-await.spec.ts#L297
Since all of this should be able to run synchonously, you can make use of the promiseTestLib log the error which you return from the test, similar to how this test works: https://github.com/TypeScriptToLua/TypeScriptToLua/blob/master/test/unit/builtins/async-await.spec.ts#L50
To save some time you can use npm test async-await to only run the tests in that file


fix(detect-secrets): improve how secret detection works

The type of this PR is: TYPE

This PR resolves []
Description
Secret detection has been added, but it had some small issues with certain filepaths and how we handle these.
There's some context info here https://artsy.slack.com/archives/CP9P4KR35/p1643215901266300?thread_ts=1643198172.246900&cid=CP9P4KR35 but the gist of it is:

eigen has a bunch of lockfiles, image files, and generated files, that we can skip when detecting secrets. i added this filtering.
eigen has some filepaths with spaces, ', (, ) in them. the original bash script did not handle them, and to account for them we just skipped them. i fixed that by making xargs do better delimiting so the command can run.
added --verbose so we can see progress and any wrong running of the command.
we had some excluded lines and secrets that were for the relay generated files. i removed that since we are filtering these files out with --exclude-files.
removed the python version of detect-secrets and used the brew version. (more info: https://github.com/artsy/homebrew-formulas/pull/13)
added some basic troubleshooting docs for secrets.

so the idea is:

we run the generate script at the start. that is done already. (we might need to run it again in the future, but it should be fine for a while, if we dont change many things).
we run the check scripts on precommit hook and on ci, to make sure we dont commit secrets.

todo:

[ ] make sure CI works.

PR Checklist (tick all before merging)

[x] I have included screenshots or videos to illustrate my changes, or I have not changed anything that impacts the UI.
[x] I have tested my changes on iOS and Android.
[x] I have added tests/stories for my changes, or my changes don't require testing/stories, or I have included a link to a separate Jira ticket covering the tests.
[x] I have added a feature flag, or my changes don't require a feature flag. (How do I add one?)
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added an app state migration, or my changes do not require one. (What are migrations?)
[x] I have added a changelog entry below or my changes do not require one.

To the reviewers 👀

[ ] I would like at least one of the reviewers to run this PR on the simulator or device.

Changelog updates
Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

Dev changes

better secret detection - pavlos

This PR contains the following changes:

Dev changes (better secret detection - pavlos)

  Generated by :no_entry_sign: dangerJS against 64ee2024ed0e6b3ec018a5da8930148649b72748

no need to run eigen for this, especially if you havent touched it in a while. i will show this on next KS and do a demo, but if you wanna try it out, i think the minimum thing is:

checkout this pr
make a branch from that
add a line in a tsx file like const SECRET_KEY = "ghp_wowsecret5347gANkA3ADQTKpkQS544eoyvU"
maybe another line console.log(SECRET_KEY) so the compiler stops crying
try to commit. you should get an error about the secret, and you cant commit
then try to add the pragma line and commit again. that should now commit fine.
then try to remove the pragma line, commit again. it should fail again.
that should be all

extra:

one extra thing could be if we want to commit this without pragma, and in that special case you can run yarn secrets-add-all and it will scan all files and add the new one on the baseline file. verify that happens in your git, and we are good to go, should be able to commit just fine.

@pvinis
➜  eigen git:(verify-secrets-improvement) git diff
modified: src/lib/AndroidApp.tsx
@ src/lib/AndroidApp.tsx:37 @ addTrackingProvider("console", ConsoleTrackingProvider)
if (UIManager.setLayoutAnimationEnabledExperimental) {
  UIManager.setLayoutAnimationEnabledExperimental(true)
}

const SECRET_KEY = "ghp_wowsecret5347gANkA3ADQTKpkQS544eoyvU"
console.log(SECRET_KEY)
const Main: React.FC<{}> = track()(({}) => {
  useEffect(() => {
    GoogleSignin.configure({

➜  eigen git:(verify-secrets-improvement) ✗ git commit -m "add secret"
yarn run v1.22.17
$ /Users/ozzievasdi/code/eigen/node_modules/.bin/lint-staged
✔ Preparing...
✔ Running tasks...
✔ Applying modifications...
✔ Cleaning up...
✨  Done in 10.15s.
yarn run v1.22.17
$ scripts/secrets-check-staged
+ git diff --staged --name-only
+ tr '\n' '\0'
+ xargs -0 detect-secrets-hook --baseline .secrets.baseline --verbose
[scan]	INFO	Checking file: src/lib/AndroidApp.tsx
[scan]	INFO	Skipping secret due to `detect_secrets.filters.heuristic.is_indirect_reference`.
[scan]	INFO	Skipping secret due to `detect_secrets.filters.heuristic.is_indirect_reference`.
[scan]	INFO	Skipping secret due to `detect_secrets.filters.heuristic.is_indirect_reference`.
[scan]	INFO	Skipping secret due to `detect_secrets.filters.heuristic.is_indirect_reference`.
ERROR: Potential secrets about to be committed to git repo!

Secret Type: Base64 High Entropy String
Location:    src/lib/AndroidApp.tsx:37

Secret Type: Secret Keyword
Location:    src/lib/AndroidApp.tsx:37

Possible mitigations:
  - For information about putting your secrets in a safer place, please ask in
    #security
  - Mark false positives with an inline `pragma: allowlist secret`
    comment

If a secret has already been committed, visit
https://help.github.com/articles/removing-sensitive-data-from-a-repository
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
husky - pre-commit hook exited with code 1 (error)

➜  eigen git:(verify-secrets-improvement) ✗ git diff
modified: src/lib/AndroidApp.tsx
@ src/lib/AndroidApp.tsx:37 @ addTrackingProvider("console", ConsoleTrackingProvider)
if (UIManager.setLayoutAnimationEnabledExperimental) {
  UIManager.setLayoutAnimationEnabledExperimental(true)
}

const SECRET_KEY = "ghp_wowsecret5347gANkA3ADQTKpkQS544eoyvU"
const SECRET_KEY = "ghp_wowsecret5347gANkA3ADQTKpkQS544eoyvU" // pragma: allowlist secret
console.log(SECRET_KEY)
const Main: React.FC<{}> = track()(({}) => {
  useEffect(() => {

➜  eigen git:(verify-secrets-improvement) ✗ git commit -m "add secret"
yarn run v1.22.17
$ /Users/ozzievasdi/code/eigen/node_modules/.bin/lint-staged
✔ Preparing...
✔ Hiding unstaged changes to partially staged files...
✔ Running tasks...
✔ Applying modifications...
✔ Restoring unstaged changes to partially staged files...
✔ Cleaning up...
✨  Done in 10.04s.
yarn run v1.22.17
$ scripts/secrets-check-staged
+ git diff --staged --name-only
+ tr '\n' '\0'
+ xargs -0 detect-secrets-hook --baseline .secrets.baseline --verbose
[scan]	INFO	Checking file: src/lib/AndroidApp.tsx
[scan]	INFO	Skipping secret due to `detect_secrets.filters.allowlist.is_line_allowlisted`.
[scan]	INFO	Skipping secret due to `detect_secrets.filters.heuristic.is_indirect_reference`.
[scan]	INFO	Skipping secret due to `detect_secrets.filters.heuristic.is_indirect_reference`.
[scan]	INFO	Skipping secret due to `detect_secrets.filters.heuristic.is_indirect_reference`.
[scan]	INFO	Skipping secret due to `detect_secrets.filters.heuristic.is_indirect_reference`.
✨  Done in 0.94s.
[verify-secrets-improvement e15146ca8] add secret
 1 file changed, 2 insertions(+), 1 deletion(-)

removed inline allowlist
➜  eigen git:(verify-secrets-improvement) yarn secrets-add-all
yarn run v1.22.17
$ scripts/secrets-add-all
+ git ls-files
+ tr '\n' '\0'
+ xargs -0 detect-secrets scan --exclude-files '/.lock$/' --exclude-files '/.png$/' --exclude-files '/.webp$/' --exclude-files '/.jpg$/' --exclude-files '/.jar$/' --exclude-files /__generated__/ --baseline .secrets.baseline
✨  Done in 13.03s.

➜  eigen git:(verify-secrets-improvement) ✗ git diff
modified: .secrets.baseline
@ .secrets.baseline:412 @
        "line_number": 151
      }
    ],
    "src/lib/AndroidApp.tsx": [
      {
        "type": "Base64 High Entropy String",
        "filename": "src/lib/AndroidApp.tsx",
        "hashed_secret": "7d13f5838b78a45234b6e3c3ee7676a6ce6ae875",
        "is_verified": false,
        "line_number": 37
      },
      {
        "type": "Secret Keyword",
        "filename": "src/lib/AndroidApp.tsx",
        "hashed_secret": "7d13f5838b78a45234b6e3c3ee7676a6ce6ae875",
        "is_verified": false,
        "line_number": 37
      }
    ],
    "src/lib/Scenes/Artwork/Components/CommercialInformation.tests.tsx": [
      {
        "type": "Hex High Entropy String",
@ .secrets.baseline:578 @
      }
    ]
  },
  "generated_at": "2022-01-26T19:00:43Z"
  "generated_at": "2022-01-27T14:19:05Z"
}

Do we intend to run the "add/generate" commands regularly? If not, would it make sense to document that process / commands rather than defining these package.json commands?

@dblandin I've been involved with this tool for some time and I have not had to add secrets and I don't immediately recall having to exclude any (it may have happened) however I've had to re-generate the baseline on a number of occasions, thought not in a while. This was something that would happen more frequently after we started to incorporate this tool to projects. Just wanted to share my experience.

this should be good to go. ill mark it as #squashongreen and we can show it on the next free KS. the last two were taken over by other stuff.


Paket.Push showing inconsistent behaviour

After publishing dotnet-fable 1.3.0-beta-003 when I tried to use the package, after downloading it normally with Paket and running dotnet fable I get the following message:
No executable found matching command "dotnet-fable"

After several tries, and thanks to Enrico's help I noticed the dotnet-fable 1.3.0-beta-003 package didn't contain a lib folder. You can check that by manually downloading the package and uncompressing it (that's the same for the same version of Fable.Core and Fable.Compiler packages). I pushed a couple of packages more making some changes in the .fsproj file without luck, finally I created and pushed the package manually using the dotnet nuget push command and that time it worked. The PublishPackages target in Fable's build.fsx calls Paket.Push so I'm assuming the problem is there, but I don't know what exactly triggered it as it as working for 1.3.0-beta-002 and before.
Some things that changed when publishing 1.3.0-beta-003:

Paket version: 5.119.9
Fable dependencies are managed now by Paket
Additional MSBuild properties have been added to the project files

The same day I pushed Fable.Import.Browser which also invokes Paket.Push but in this case it worked 🤔

Are you sure it's push that is behaving weird? Probably the pack is not
working for unknown reasons
Am 27.10.2017 18:45 schrieb "Alfonso Garcia-Caro"<EMAIL_ADDRESS>
:

After publishing dotnet-fable 1.3.0-beta-003
https://www.nuget.org/packages/dotnet-fable/1.3.0-beta-003 when I tried
to use the package, after downloading it normally with Paket and running dotnet
fable I get the following message:
No executable found matching command "dotnet-fable"
After several tries, and thanks to Enrico's help I noticed the
dotnet-fable 1.3.0-beta-003 package didn't contain a lib folder. You can
check that by manually downloading the package and uncompressing it (that's
the same for the same version of Fable.Core and Fable.Compiler packages). I
pushed a couple of packages more making some changes in the .fsproj file
without luck, finally I created and pushed the package manually using the dotnet
nuget push command and that time it worked. The PublishPackages target in
Fable's build.fsx calls Paket.Push
https://github.com/fable-compiler/Fable/blob/cafb72ea145fe1446b6023fa17923e662d9ef9cb/build.fsx#L381
so I'm assuming the problem is there, but I don't know what exactly
triggered it as it as working for 1.3.0-beta-002 and before.
Some things that changed when publishing 1.3.0-beta-003:

Paket version: 5.119.9
Fable dependencies are managed now by Paket
https://github.com/fable-compiler/Fable/pull/1195
Additional MSBuild properties have been added to the project files
https://github.com/fable-compiler/Fable/commit/fb8d576fac102d18524dabbe873ff5291871d3b3#diff-8aff36462b4f5839270364f283c63ba4

The same day I pushed Fable.Import.Browser
https://github.com/fable-compiler/fable-import/commit/64a7d6d5decfd1de5c8af312084b63098b44f807
which also invokes Paket.Push but in this case it worked 🤔
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/2869, or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNDChzfF-wBDPewXQcYS5s_9S6WgSks5swgiigaJpZM4QJU2n
.


use HMAC and timing safe comparison

Instead of naive code vulnerable to length-extension attack and instead of short-circuiting string comparison.
https://en.wikipedia.org/wiki/Hash-based_message_authentication_code#Design_principles
https://docs.python.org/2/library/hmac.html#hmac.compare_digest

I'm not a fan of changes that suggest that it might be feasible, let alone a workable idea, to run the debug toolbar in untrusted environments. But people will do it anyway, and defense in depth is a good thing. For this reason, I'm in favor of making these changes.
Travis CI says the PR doesn't work on Python 3.

Current coverage is 75.99% (diff: 80.00%)

Merging #883 into master will decrease coverage by 1.01%

@@             master       #883   diff @@
==========================================
  Files            30         30
  Lines          1635       1637     +2
  Methods           0          0
  Messages          0          0
  Branches        244        244
==========================================
- Hits           1259       1244    -15
- Misses          302        307     +5
- Partials         74         86    +12

Powered by Codecov. Last update 637b0b7...d27d817

@aaugustin I think there are two possible states that make sense: either an authentication tag is not produced and is not checked, or it is produced securely and checked securely. The current situation in which an authentication tag is produced insecurely and then checked insecurely does not make sense. The code needs to change to be either in state 1 or 2. I prefer state 2, but state 1 is also good, because it emphasizes that debug toolbar is only for trusted environments.

Thanks!

Yep. It's best to follow best-practices regardless of the context, since the context may change or not be what we expect. Thanks for the patch.


feat(ngrok): Ngrok extension to support V3

https://ngrok.com/docs/guides/upgrade-v2-v3
Do I need to add compability for Ngrok v2 agent (v1 config)?
Also added a flag for specifying default_ngrok_config.

ya, i think we probably need a way for people to transition? i'd be fine with a version param, and use the old config on version 2

ya, i think we probably need a way for people to transition? i'd be fine with a version param, and use the old config on version 2

Would that work?

Can someone please help me install ngrok agent v3 ?

I managed . I guess they no longer support phishing . Coz i was trying to demonstrate phishing with blackeye to my students and they blocked me . I guess i'll have to find another ngrok alternative for phishing .


Arbiter with Early Stopping Configuration Json

Issue Description
When trying to use Arbiter and an EarlyStoppingConfiguration, I get an JsonMappingException:
Caused by: org.nd4j.shade.jackson.databind.JsonMappingException: Can not construct instance of org.nd4j.linalg.dataset.api.iterator.DataSetIterator, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated with additional type information
additional:
line: 39, column: 29] (through reference chain: org.deeplearning4j.arbiter.optimize.config.OptimizationConfiguration["candidateGenerator"]->org.deeplearning4j.arbiter.MultiLayerSpace["earlyStoppingConfiguration"]->org.deeplearning4j.earlystopping.EarlyStoppingConfiguration["scoreCalculator"]->DeepLearningExamples.dl4jexamples.MyDataSetLossCalculator["iterator"])
Because the DataSetIterator is an interface, I created my own implementation "MyDataSetIterator" with Default constructor (also "MyDataSetLossCalculator" for ScoreCalculator and "MyDataSetFetcher" for DataSetFetcher). This works when using the
org.deeplearning4j.arbiter.optimize.serde.jackson.JSonMapper because it uses a global ObjectMapper which can be configured like this:
SimpleModule module = new SimpleModule("CustomModel", Version.unknownVersion()); SimpleAbstractTypeResolver resolver = new SimpleAbstractTypeResolver();	 resolver.addMapping(ScoreCalculator.class, MyDataSetLossCalculator.class); module.setAbstractTypes(resolver); org.deeplearning4j.arbiter.optimize.serde.jackson.JsonMapper.getMapper().registerModule(module);
But Arbiter uses the org.deeplearning4j.arbiter.ui.misc.JsonMapper. In this class the method
org.deeplearning4j.arbiter.ui.misc.JsonMapper.fromJson(String, Class<? extends T>) creates a new mapper (every time) instead of using the global field "MAPPER". So it is impossible to Register the interfaces and their implementations (with default constructor).
Is this a bug or is there another way to make it run?
Kind regards
Version Information
1.0.0-beta4
Additional Information
A little bit of the Stack to see from where we come:
JsonMapper.fromJson(String, Class<? extends T>) line: 68	 GlobalConfigPersistable.getOptimizationConfiguration() line: 67	 ArbiterModule.getSummaryStatus() line: 616

Found this:
https://github.com/deeplearning4j/dl4j-examples/commit/e3c5432d5af3ba76fc109265dcb723ab3bf58b3e
I think the other examples I'd found earlier were related to older versions.


WiP: energy_model: Fix loading simplified EM from target w/o 'capacity'

The v5 of the simplified EM doesn't expose the 'capacity' file in sysfs.
Fix this by checking if the file exists, and re-compute those values
form within LISA if not.
Signed-off-by: Quentin Perret<EMAIL_ADDRESS>

I leave this as WiP until the patches actually get posted

No more special case for EM v4 and previous. We just recompute the capacity no matter what. That seem to work in both cases


@Model

A set of route handlers are setup with an @Routable class:
@Routable()
class SomeSetOfRouteHandlers {

  @Route({
    path: '/',
    method: 'get'
  })
  someGetHandler(req, res) {

  }

  @Route({
    path: '/',
    method: 'post'
  })
  somePostHandler(req, res) {

  }
}

This class is instantiated by the @Routable decorator and added to the Express router through a call to SakuraApi.instance.route(this);.
Because there's a single instance of this class responsible for route handlers, it's not an appropriate place to represent a model (i.e., there's only one of these @Routable objects handling routes, but each request will be handling different objects that are relevant to various models).
Possible Solution?:
@Model({
  // these get injected as a dbConfig property that can be used when
  // manually writing to the DB
  dbConfig: {
    db: 'someDatabase',
    collection: 'someCollection'
  },
  // if not defined, perhaps look at the configs for a dbModelBindings.json file
  // (db.ModelBindings.dev.json, etc)
  suppressInjection: ['create']
})
class User {

  id: ObjectId; // object Id will have timestamp capabilities
                       // & uuid generation on instantiation
                       // the id property will automatically be recognized as
                       // being the _id for MongoDB

  // perhaps these decorators create getters and setters that manipulate an
  // injected _propertyName variable and decorate the getter with various
  // functions that implement the Decorator behaviors?

  @Required
  @json('fname') @db('fn')
  firstName: string;

  @Required
  @json({'name: "fname"', excludeNull: true})
  @db({field: 'fn', excludeNull: true})
  lastName: string;

  @Required @Validate(emailValidator)
  @db('em')
  email: string;

  @Private        // i.e., filter this before sending to client
  ssn: string;

  constructor(json: any) {
    json = json || {}; // perhaps this can be done in the @Model logic

    this.firstName = json.firstName || '';
    this.lastName = json.lastName || '';
    this.email = json.email || '';
  }

  save() : Promise<null> {
    // persist to MongoDB
    super.save();
    // if nothing's added, you don't have to override the save()
    // method.

    // There will need to be some kind of DataSource definition that binds an
    // @Model to a specific DB / Collection... perhaps that can be done in
    // the @Model({})
  }

  static getById(id) : Promise<User> {
    // retrieve from MongoDB
  }

  static get(filter:any) : Promise<User[]> {
    // get list from MongoDB
  }

  deleteById(id) : Promise<null> {
    // delete from MongoDB
  }

  emailValidator(email:string) {
    return (...meets some proper condition...) ? true : false;
  }
}

Then, from within the @Routable class @Route method:
  @Route({
    path: '/',
    method: 'post',
    model: User
  })
  somePostHandler(req, res) {
    req.model.save();
    // where .model was patched onto req automatically.
  }

  @Route({
    path: '/',
    method: 'get'
  })
  somePostHandler(req, res) {
    res.send(200).json(User.get(req.query.id));
    // this requires a lot more thought... what about error handling, etc?
  }

ES6 Symbols, Reflect, and Proxy are likely the way to move forward with implementing these features:

https://www.keithcirkel.co.uk/metaprogramming-in-es6-symbols/
https://www.keithcirkel.co.uk/metaprogramming-in-es6-part-2-reflect/
https://www.keithcirkel.co.uk/metaprogramming-in-es6-part-3-proxies/

Default Method Injection
What methods should be automatically injected with default behavior unless implemented by the user directly, or suppressed with the @model({suppressInjection: []}) property?
Static

get(where?: any, limit?: number, skip?: number) ;
getById(id: string);
deleteWhere(where: any);

Instance

create()
save()
delete()

Todo:

[ ] Implement basics of @Model

[ ] Implement dbConfig for ModelOption
[ ] Implement suppressInjection for ModelOption
[ ] Default CRUD function injection

[ ] @Required
[ ] @Json
[ ] @Db
[ ] @Private
[ ] @Validate

@Required
What should be the proper behavior of this decorator?
Http Requests through @Routable

on save, it returns an HTTP error
on create, it returns an HTTP error
on update, it returns a HTTP error

Class behavior
It doesn't do anything intrinsically on the class itself. I.e., you can instantiate a class with a property that has @Required and not have the field, and nothing will happen. @Required only kicks in when an HTTP CRUD operation takes place through @Routable. If that's right, then this should probably be separated out into a separate ticket since it won't be possible to implement then until @Model with @Routable.

@Default
This is probably not required.
@Model()
SomeClass {
    @Json('sp') @Default(777);
    someProperty = 777;
}

It's not clear to me what benefit @Default would provide... in fact, it seems to just clutter things.

merged to develop


Unlimited Retries of failed Transformations

Failed Transformation will be retried indefinitely if a RetryableDriverException is thrown.

This is the protocol, yes. One needs to look at the particular error case and make sure, that a retryable driver exception is not thrown.
Additionally, we could add a maximum number of retries for RetryableDriverExceptions.
Am 26.07.2016 10:41 schrieb Alexander Kolb<EMAIL_ADDRESS>Failed Transformation will be retried indefinitely if a RetryableDriverException is thrown.

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/ottogroup/schedoscope/issues/97, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMBaJ1UKYh9nhGkmnht9OLUFLOL4-mo4ks5qZcgmgaJpZM4JU6bx.

I don't think limiting RetryableDriverExceptions makes sense. One needs to take care that drivers answer with transformation failed if unlimited retries are not wanted


Hot reload loses device connection on Windows

Master: commit = fbf68bbc6daa7a4f0b6f7b738b0134a318c4974b
[√] Flutter (Channel master, v0.0.0-unknown, on Microsoft Windows [Version 10.0.16299.248], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[√] Android Studio (version 3.0)
[√] IntelliJ IDEA Ultimate Edition (version 2017.3)
[√] VS Code (version 1.20.1)
[√] Connected devices (1 available)

After starting a Flutter app either via an IDE or via flutter run, Flutter will lose the connection to the Android Emulator when attempting a hot reload or a full restart with an error message similar to:
Initializing hot reload...
D/ (18113): HostConnection::get() New Host Connection established 0xa4623ac0, tid 18134 Lost connection to device.

Restarting the device doesn't help.
/cc @devoncarew

There are quite a few issues about crashes and disconnects during hot reloads, but I think mostly only see them through the IDE and it's fine from the CLI. Some possibly related cases:
https://github.com/flutter/flutter/issues/14945
https://github.com/flutter/flutter-intellij/issues/1809
https://github.com/flutter/flutter/issues/14847
https://github.com/flutter/flutter/issues/14633
https://github.com/flutter/flutter/issues/14312

I'm seeing this crash in the CLI also unfortunately.

Maybe this?
https://github.com/flutter/flutter/issues/14945#issuecomment-370973017
Seems like maybe Windows path issues (slashes) causing problems.

I am also facing a similar problem regularly
Initializing hot reload...
D/ (11339): HostConnection::get() New Host Connection established 0x9b7e4a80, tid 11362
Lost connection to device.
Is there any workaround to resolve this? This is completely blocking my productivity.

#14945 has just been closed (and the fix is merged to master). I think it should resolve this issue as well.

I am using beta channel for now. Will the fix be available in beta? I am very bored by this problem right now.

Had this issue in beta, can confirm it's gone in master.
@zarub2k You can do "flutter channel master" and "flutter packages upgrade" and change back when current master will be merged to current beta.

Closing as fixed (and a dup of https://github.com/flutter/flutter/issues/14945).


[fpv/edn_sec_cm] Small fixes to pass fpv sec_cm test

This PR fixes two small cases to pass fpv sec_cm test: 1). Trigger fsm_error_o directly in default case.
This enhancement prevents the case where attacker continously drive
to default FSM state.
2). Add a gating condition for fatal alert assertions. The fatal alerts
will only fire if the edn is enabled.
Signed-off-by: Cindy Chen<EMAIL_ADDRESS>

covered by #15829


[CON-4974] Deactivate xdebug for travis

Coverage decreased (-1.4%) to 41.948% when pulling f26c94f41209d1aa9403b568cc8744b6ed528b64 on CON-4974 into 9db866e307fa4fc3ab0775deb2f1f902e08fc697 on master.

Coverage decreased (-1.4%) to 41.948% when pulling f26c94f41209d1aa9403b568cc8744b6ed528b64 on CON-4974 into 9db866e307fa4fc3ab0775deb2f1f902e08fc697 on master.

Coverage decreased (-1.4%) to 41.948% when pulling f9ea8104d77d1e8e298fffabbd1908fe8b7cf243 on CON-4974 into 9db866e307fa4fc3ab0775deb2f1f902e08fc697 on master.


[Filesystem Routing] Avoid samed named files (e.g. 10 filenames +Page.tsx)

Description
Hi 👋 ! First of all congrats on reaching v1!
I'm unfortunately though holding back on upgrading to the "v1 design" because of the weird way file system routing is behaving now.
To me, the file name of a source code file is much more significant than the folder it is in. I also believe that there are quite a few tools that work better when different files have different names.
So I'm hoping there will be a possibility to retain logical filenames when using filesystem-based routing. If the files need to be in separate folders, fine, but I should be able to name them in whichever way I feel is best.

How about:
# Route: /about
/pages/about+Page.js
# Route: /products
/pages/products+Page.js
# Route: /product/@id
<EMAIL_ADDRESS>
Looks weird but it's functional.

That would definitely work for me (it isn't working right now though according to my testing, right?)

Correct, this isn't implemented yet.
There is also https://github.com/vikejs/vike/issues/341.
I've busy with high priorities at the moment, but let's see if I can take a stab at it sometime. Contribution welcome.
@dfrkp Btw. would your company be up for sponsoring?

Instead of:
# Route: /about
/pages/about+Page.js
# Route: /products
/pages/products+Page.js
# Route: /product/@id
<EMAIL_ADDRESS>
How about:
# Route: /about
/pages/+about.page.js
# Route: /products
/pages/+products.page.js
# Route: /product/@id
<EMAIL_ADDRESS>
Or even just:
# Route: /about
/pages/+about.js
# Route: /products
/pages/+products.js
# Route: /product/@id
<EMAIL_ADDRESS>
Re my earlier comment: https://github.com/vikejs/vike/issues/578#issuecomment-1692994364
The arguments for and against + for +Page.ts also go for +onBeforeRender.ts and +route.ts which are also in the V1 design:
https://vike.dev/migration/v1-design
Some arguments in favor of the + prefix,  specifically sortability and grouping of Vike related files: https://github.com/vikejs/vike/issues/578#issuecomment-1694344528

@redbar0n Neat ideas, I like them. Although it's a bit unconventional to use the file extension to denote semantics. (That said the whole + thing is unconventional to begin with :sweat_smile:.)
I think we're going in the right direction :eyes:
So far I like misusing the file extensions as you propose. Actually, I'm just realizing that Telefunc does that already with its .telefunc.js files.
Actually, there is an issue currently when using Vike with Telefunc:
# Currently, users define this: (confusing as +Page.telefunc.js isn't a Vike file)
/pages/some-page/+Page.js
/pages/some-page/+Page.telefunc.js
# Or this: (ugly)
/pages/some-page/+Page.js
/pages/some-page/Page.telefunc.js

Maybe we can solve that issue as well while we're at it.

Maybe the trick is to have Vike support both: the + syntax as of today, as well as the suffix syntax:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
(I understand that Page starting with a capital P is offsetting at first, but I think users get used to it quickly so I don't think it's much of an issue. It's important to have a consistent capitalization: @id.Layout.js, @id.Page.js, +config.js > export default { Page, Layout }. Alternatively, maybe we could lower-case all component setting names thus breaking the convention that component functions start with a capital letter :thinking:)

Those who prefer having page files tucked in their own directly could use + (like what's currently already possible):
<EMAIL_ADDRESS><EMAIL_ADDRESS># We can make Telefunc understand that syntax
<EMAIL_ADDRESS>
In other words<EMAIL_ADDRESS>is the same as and just a prettier version of<EMAIL_ADDRESS>

@redbar0n WDYT?

Hey wanted to add my 2 cents here:

having + in the front is nice as in alphabetical order all the config files are always at the top
but it's indeed annoying that it's not possible to specify a custom name for a page ( make fuzzy search and filtering quite annoying )

To me allowing something like +Page.SomeName.tsx would sound quite nice.

Or just, like previously suggested (which seemed popular), collate all the Vike stuff into one explicity declared file, so you'd have:
#folder
## the index
/pages/products/products.page.js
/pages/products/products.vike.js
...
/pages/products/products.telefunc.js

## an item
<EMAIL_ADDRESS><EMAIL_ADDRESS>...
<EMAIL_ADDRESS>
I think maybe I prefer this, since the amount of files in the file system directory structure often quickly grows out of hand to actually have a nice overview. It also make having a flat folder structure more viable, as the amount of Vike related files would be greatly minimized.

If you really want to keep the capitalized component name convention, then...
Instead of:
/pages/products/products.page.js

Then the convention could be:
/pages/products/ProductsPage.js

which would make it clearer that ProductsPage is a component like all the other components in the folder capitalized that way.
Then importing would be like:
import { ProductsPage } from "/pages/products/ProductsPage.js".

Not sure if it makes sense, but you could rename the Vike file too, for symmetry / aesthetical reasons:
# the index
/pages/products/ProductsPage.js
/pages/products/ProductsPage.vike.js

# item
<EMAIL_ADDRESS><EMAIL_ADDRESS>
Even better perhaps:
# the index
/pages/products/Products.js
/pages/products/Products.vike.js

# item
<EMAIL_ADDRESS><EMAIL_ADDRESS>
Where by convention the file with the same name as the .vike file in the same folder would be treated as the index/page. That way (relying on the vike file and not the folder name for the convention), you don't even have to rename files when moving them out/into folders (/pages/Products.js to /pages/products/Products.js).


Types not working again?

Hi
I see there was #18 and #19
I've just done like
yarn create react-app --template typescript try-geo-three
yarn add geo-three

And then try to import * as foo from "geo-three" and I'm getting:
error TS7016: Could not find a declaration file for module 'geo-three'. '/home/tom/dev/now/try-geo-three/node_modules/geo-three/build/geo-three.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/geo-three` if it exists or add a new declaration (.d.ts) file containing `declare module 'geo-three';`

4 import * as foo from "geo-three"
                       ~~~~~~~~~~~
Found 1 error in src/App.tsx:4

This is with 0.1.0

Hello
I will have to recheck this topic i have been using the library  with typescript without any issue.

Can you please provide your transpiler settings?

@tentone thank you. It works for me 😁

Great! Thanks a lot!


Add support for custom objects and fields

Fixes #1
Add support for custom objects and fields in JSON feeds.

Add CustomObjects property to JsonFeed and JsonFeedItem classes to store custom objects.
Update Simple.json test resource to include examples of custom objects with names starting with an underscore and alphanumeric member keys.
Add test in JsonFeedTests.cs to verify the handling of custom objects in the feed.

For more details, open the Copilot Workspace session.

Not bad 🤖, not bad.
Marking as draft as there's some things I want to adjust before merging.

Played around with this for a bit. The CustomObject signature needs to actually be Dictionary<string, object> to allow us to both serialize and deserialize easily.
Unfortunately, with source generation enabled, we need to know our types and provide the JsonTypeInfo when serializing and deserializing. I'm at a bit of an impasse on the best way to handle that, so I'm going close this PR for now.


feat(#53): Implements some useful health checks

Fixes #53

After looking at this I can see value in having basic checks available like this that a runtime or developer can just to use easily. However, I think complex checks that require additional dependencies would probably not be a good idea.
What do you think about the up and down calls adding withData to provide information about the endpoint that was checked, what the exception was, etc?

Yes, that was my idea just providing basic checks.
Also, I agree on providing info in the data section.

@kenfinnigan I have updated the PR with the comments you mentioned.

@kenfinnigan Changes done.

@kenfinnigan 🤞 hahaha

Any other comments @xstefank or @Ladicek?

@Ladicek I have fixed what you mention as I think it has sense.


Server auth

** BASED ON THE BRANCH "removing-gin" **
** MERGE FIRST "removing-gin" **

Add a HTTP Basic Auth (digest) mecanism to secure the BeePing server.
Update the readme file.

TODO: Update the dependencies lock (don't know how to do, sorry...)

dep ensure to update your Gopkg

Dependencies lock updated.

Thanks Brice!
Here some examples for testing this PR.

$ ./beeping -listen "[2002:c000:203::1]" -auth "admin:0821726485a84fcb0d4c90fecf5d40b6"
$ curl -6 '[2002:c000:203::1]:8080/check' -d '{"url": "http://www.nyan.cat/"}' -u "admin:passw0rd" --digest

But digest is a bit complicated if you don't really know how to set correctly Realm or DigestDomain.
This is why I generally implement BasicAuth because it's easier to setup and with a strong password + HTTPS there is no security problem (maybe @insp3ctre can argue on this point).
Also, there is no need for external dependencies, look at this function:
https://github.com/yanc0/greedee/blob/master/http.go#L16-L32
Digest is OK for me but I think we have to document (README) how to activate BeePing Auth more precisely with command line only (MacOS and GNU/Linux)?
What do you think guys?
Cheers !
Yann

I thought we can add the -auth-method argument. By default it could be "basic", and we could have "digest".

Seems OK for me.

Just made some changes. Please do not merge until I add at least md5 digest mechanism :)


Not authenticating

I managed to deploy the client, but when clicking sign in, nothing is happening... Am I missing a step?

I didn't follow instructions correctly. Didn't enable google sign in method in the project.


2.0-wip docs pagination example

In components.html#pagination the "Aligned links" example is missing class="next"  and class="previous" attributes for <li>.

Resolved, thanks!