Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 02 2020 12:39
    HeReleased Piral v0.10.0
  • Feb 02 2020 12:36
    Hello!
  • Feb 02 2020 12:06
    Hello!
ninjaWajid
@ninjaWajid
image.png
Ayyanababu Kopparthi
@ayyanababu
image.png

@FlorianRappl we have created an app using the piral framework, and we try to load one micro app by using the pilet configuration and registered the page, it successfully integrated, now the problem for us.

The micro-app has its own routing which is now breaking saying the below error

Is there a way to make the individual micro app to work with its own routing , or we need to tag along with the piral framework routing , if so is there any doc or sample app
5 replies
Josh Brown
@mtyrealhanla
It seems that changing the value for the PIRAL_AUTH_LOCAL_PASS env variable will not actually change the password if the feed service has been spun up once already and created the users. I wanted to verify this is the desired behavior before we explore other avenues. We dont plan on using local auth for very long, but it would be much easier to roll a password if just changing the env var and redeploying did that. I dont see an API, only changing via portal
6 replies
Paul
@dagda1

have you ever seen

system.jss:72 Failed to load SystemJS module http://url-to-index.js ReferenceError: process is not defined

Process in this context is process.env.REACT_APP_TRACKING_ID?

3 replies
Paul
@dagda1
I think it is pretty amazing what you have built here. How has adoption been?
1 reply
Webpack Module Federation is what comes back from google for microfrontend but this is a much better and friendlier API
1 reply
Paul
@dagda1

I notice that piral-cli-webpack5 is adding the webpack.DefinePlugin

        new webpack_1.DefinePlugin({
            'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
            "process.env.REACT_APP_TRACKING_ID": JSON.stringify(process.env.REACT_APP_TRACKING_ID ?? 'NOT_SET')
        })

And it is definitely getting called when I run pilet build --bundler webpack5 but process is still undefined in the browser.

3 replies
Sunny Wilson
@sunnywilson93_twitter
templateUrl: './Tile.component.html'
// template: '<div>hello</div>'
in the above example templateUrl loads empty html while template displays some data. can someone help me out to fix this
9 replies
Sunny Wilson
@sunnywilson93_twitter
anyone has an idea on react_devtools_backend.js:4026 Unhandled Promise rejection: Can't resolve all parameters for MatDialog: ([object Object], [object Object], [object Object], [object Object], [object Object], [object Object], [object Object], ?). ; Zone: <root> ; Task: Promise.then ; Value: Error: Can't resolve all parameters for MatDialog: ([object Object], [object Object], [object Object], [object Object], [object Object], [object Object], [object Object], ?).
at syntaxError (parse_util.ts:184:17)
wsoetanto
@wsoetanto
Hello running into an issue, with typings after upgrading to piral-core@0.12.1 to piral-core@0.13.9 we noticed that the typings of react element in the emulator is set as
export interface ReactElement {}
currently we are still using react@16.13 and set that as a devDependencies in in the shell package.json Any help will be appreacited
15 replies
sdtomlin
@sdtomlin
working with Piral.Blazor, just wondering if anyone has gotten javascript isolation to work and the steps you had to undertake?
3 replies
Sunny Wilson
@sunnywilson93_twitter

@FlorianRapplI am trying to wrap an Angular app inside the Piral but the angular app dependencies on the ionic framework. , the angular app is running, but when integrated into the Piral framework, we are getting below errors, I am suspecting it is related to loaders configuration in webpack. Can you throw some light on this issue? Any help appreciated.

Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

<ion-header>

1 reply
dilip.nilanka.odg
@dilipnilanka-dpc

@FlorianRappl - Accessing config file values within Piral angular (pilet)

I have an Angular application as a Pilet for my Piral application. I'm trying to access a config value passed from Piral application via PageComponentProperties. As described in this page, https://docs.piral.io/plugins/piral-ng, I'm trying to access the page Component Properties ("PageComponentProps") as follows within AppModule.

export class AppModule {
@Input('Props') public props: PageComponentProps<any>;
}

And I'm registering the angular component as follows,
app.registerPage(/test-location, app.fromNg(AppModule));. However I'm getting following error, https://i.stack.imgur.com/WxO7f.png

33 replies
ImtiyazShaikGit
@ImtiyazShaikGit
Hi, i working on small project to understand Piral framework along with Blazor WASM. I have developed app-shell based of react, and my pilet is blazor wasm and made changes in the project file to link the PiralInstance using local emulator tar ball file and installed piral blazor tool and util package and Build runs fine, but when i run the npm Start in Piral~, i getting this below error. Any help on this is appreciated. [i am using Net 6.0 framework for blazor wasm pilet, Piral version 0.14.26]
11 replies
image.png
Thank you in Advance.
dczarnota-apptio
@dczarnota-apptio

I have a problem. When I run command npx pilet debug --env --port 80 - pilets are downloaded from localhost and it doesn't work with custom domains. In file piral/src/tooling/piral-cli/src/injectors/pilet.ts I found switch for it: this.piletApi = /^https?:/.test(options.api) ? options.api : : ${config.ssl ? 'https' : 'http'}://localhost:${config.port}${options.api}.

What exactly options.api is? How can I make pilet debug works with custom domain?
Thank you in advance

5 replies
Lukas Eiter
@luckyluggi

Hi. Thanks for the great work in piral.blazor v2.
It fixed the problem we had with DI in 3rd party packages.

I now have 2 questions i couldn't find an answer for in the docs.

  1. I can call js functions on the pilet api when my pilet is loaded via the setup.tsx file.
    Is there also a way to call such functions when the pilet is unloaded?
    A concrete example might be that i register a menuItem and when i remove the pilet via f.e. the browser plugin the Menuitem should also be removed. (Currently it stays)

  2. In a Blazor Page-Component i can define the page url like so and get the ID as a Parameter:
    @page "/tags/update/{Id}"
    This does not seem to work after converting my project to a pilet. Is this currently supported?
    Also Blazor allowes to add multiple routes to one Page-Component like so:
    @page "/tags/create"
    @page "/tags/update/{Id}"
    Since converting the project to a pilet only the first route is recognized.

8 replies
Lukas Eiter
@luckyluggi
Hi. Since i'm having trouble ordering Extgension items coming from blazor pilets i have created an mvp showing the problem:
https://github.com/luckyluggi/-mvp_piral_extension_order
You can read everything in detail in the readme.md file.
In short: i can easily sort extension items coming from js pilets, but i cant do so with extension items coming from blazor pilets because they are wrapped in 2 divs.
14 replies
ImtiyazShaikGit
@ImtiyazShaikGit

Hi, I am working on Default Blazor pilet, When i am trying to load Weather fetchdata page after integrating the PiralInstance, i am getting below error. Any help or suggestion on how to fix ? thank you ~~~

[blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.Serialization.JsonConverter1[[WeatherBlazorPilet.Pages.FetchData.WeatherForecast[], WeatherBlazorPilet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter1[[WeatherBlazorPilet.Pages.FetchData.WeatherForecast[], WeatherBlazorPilet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadCore[WeatherForecast[]](JsonConverter jsonConverter, Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadCore[WeatherForecast[]](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
at System.Text.Json.JsonSerializer.ContinueDeserializeWeatherForecast[]
at System.Text.Json.JsonSerializer.<ReadAllAsync>d65`1[[WeatherBlazorPilet.Pages.FetchData.WeatherForecast[], WeatherBlazorPilet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at System.Net.Http.Json.HttpContentJsonExtensions.<ReadFromJsonAsyncCore>d
41[[WeatherBlazorPilet.Pages.FetchData.WeatherForecast[], WeatherBlazorPilet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() at System.Net.Http.Json.HttpClientJsonExtensions.<GetFromJsonAsyncCore>d__131[[WeatherBlazorPilet.Pages.FetchData.WeatherForecast[], WeatherBlazorPilet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at WeatherBlazorPilet.Pages.FetchData.OnInitializedAsync() in C:\Users\ishaik\source\WeatherBlazorPilet\WeatherBlazorPilet\Pages\FetchData.razor:line 44
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

~~~

9 replies
Florian Rappl
@FlorianRappl

Hi everyone - I just created another channel dedicated to Piral.Blazor discussions.

We've seen that many discussions now actually take place around Piral.Blazor. I think separating piral from Piral.Blazor might be a good thing.

The subchannel is reachable via https://gitter.im/piral-io/blazor

Bill
@whilke
@FlorianRappl You guys ever try getting piral working offline in something like Electron/Cordova/etc.? Seems biggest issue is route based routing. If piral supported hash based routing it would be much easier. Know if any issues with trying to use the react hash router?
10 replies
David Laughlin
@dlaugh14
@FlorianRappl - The --feed flag sets the url of a feed service. How is this called? I was testing this and I'm not seeing any additional request for this feed service when debugging a pilet. Is this dependent on something else as well? Or maybe I am misunderstanding something here.
12 replies
Aditya Chauhan
@aditya2158
Hi @FlorianRappl , can i use a npm library via CDN in pilets? I would like to import it using a <script> tag. But the pilets have no standalone html. Is there any workaround for this?
3 replies
Paul
@dagda1

I know you are aware of it but is breaking the hard dependency on react-router 5 on the roadmap for the near future?

It is a show stopper for me but I'm sure you have many different similar things that need done

3 replies
Robin
@Robbson
Hello,
I just added some peer dependencies in my piral instance's package.json to make sure a pilet using the emulator has all the requirements. Unfortunately this doesn't work. Because when the emulator gets build, all declared peer dependencies are removed from its package.json. Is there a specific reason for that behavior? Thx
30 replies
Josh Brown
@mtyrealhanla
@FlorianRappl We are having an issue with piral feed service, version 1.6.0. While sitting idle eventually the service throws the following error logs and then starts to return 503 for any requests. It may be a health check of some sort and I have verified all the tables are created. Restarting the pod fixes the issue generally. Curious if you have seen this behavior.
(node:13) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
{"@fields":{"level":"\u001b[31merror\u001b[39m"},"@message":"\u001b[31m[azure-tablestorage] Could not create table \"audits\".\u001b[39m","@timestamp":"2022-06-26T22:15:06.059Z"}
{"@fields":{"level":"\u001b[31merror\u001b[39m"},"@message":"\u001b[31m[azure-tablestorage] Could not create table \"apikeys\".\u001b[39m","@timestamp":"2022-06-26T22:15:06.114Z"}

.... includes a list of all the tables as well, cut off for brevity
5 replies
ingshak
@ingshak
I'm new to Piral, is here a good place to ask questions?
1 reply
Can I run my own Piral Feed Service?
12 replies
Taya Valieva
@tayavalieva

Hi All,

I’ve read lots of posts here – thank you everyone for lots of helpful tips on Piral and thank you so much @FlorianRappl for being here for us!
I’ve got a question about Tailwind: basically, need to get it running at a Piral shell instance.
I’m very new to Piral, Tailwind, postcss, and doing any Webpack configurations – so any tips would be really really appreciated (even if you think that it is trivial, it might be not so obvious for me :) ).
This is what I did so far:

  1. Initialized piral shell app:
    npm init piral-instance -- --target my-app –defaults
  2. Installed Tailwind, postcss and autoprefixer.
    npm install -D tailwindcss@latest postcss@latest autoprefixer@latest
  3. Removed bootstrap stylesheet, referenced style.css in the html and added tailwind references to style.css
    @tailwind base;
    @tailwind components;
    @tailwind utilities;
  4. Installed piral-cli-webpack5
    npm i piral-cli-webpack5
  5. Installed postcss-loader
    npm i postcss-loader –save-dev
  6. Added tailwind config:
    /** @type {import('tailwindcss').Config} */
    module.exports = {
     content: ["./src/*.{html,js, tsx, ts}"],
     theme: {
         extend: {},
     },
     plugins: [],
    };
  7. Added postcss config :
    module.exports = {
     plugins: {
         tailwindcss: {},
         autoprefixer: {},
     },
    };
  8. Added webpack config (extended webpack config):
    ```
    const extendConfig = require("piral-cli-webpack5/extend-config");

module.exports ==
extendConfig({
cssLoaderOptions: {
rules: {
test: /.css$/,
exclude: /node_modules/,
use: ["postcss-loader"],
},
},
});
```

  1. Run the piral instance in debug mode and tailwind classes that I've added to layout components are not loaded. Piral instance is running normally, but without any css styles.

Will webpack understand to use postcss to load Tailwind css with my current webpack extention?
Could anything be wrong with my postcss config/loader?
I was only able to find one piral project using Tailwind that I cannot unfortunately get running locally, so any working Piral-Tailwind samples to look at would be really helpful.
Thanks so much!

13 replies
anand
@anand514
Hello, has anyone tried converting angular js project into a pilet, and use it
with piral instance(shell app), it would be helpful if some one has GitHub samples for a quick reference
1 reply
Nate Von Benken
@nvonbenken
Is using vite with Piral considered production ready?
4 replies
Taya Valieva
@tayavalieva
Hi,
Is there any documentation about how to build a production Piral feeds server from scratch and host it ourselves? If so an you please point me in the direction of any resources that might help me.
If we cannot build a production feed server from scratch and we have to use your docker image. Is it possible to host a Piral feeds sever using your docker image somewhere other than Azure such as AWS? If so, where can I get the docker image?
14 replies
Robin
@Robbson
Hi,
we recently switched from the ancient old Piral 0.14.5 to the late 0.14.28. Unfortunately the production build of the Piral Instance doesn't work anymore. Because Piral 0.14.9 introduced some normalization of the public-url path where we no longer can use an empty "" string. It always adds a "/" to the path so resources are not requested from the index.html's folder but from the root path of the web server. This could be compensated by using some specific nginx configuration. But our environment is very flexible with lot of different configurations (there are multiple Piral Instances in different environments) so those changes could break some of them.
Is there any way to force the old behavior so no leading "/" is added to linked resources?
Thx
4 replies
jjhvlabs
@jjhvlabs
hi, we are looking into piral for a rewrite of our current software as a platform, so that 3rd parties can develop apps / pilets. this is probably a noob question, but I couldn't find anything about security: is it possible to restrict pilets to not beeing able to interfer with other pilets, install for example a keyloggers, listen to network traffic of other pilets etc.? Or is that only possible via an iframe solution?
7 replies
ninjaWajid
@ninjaWajid
image.png
Hi there
I was trying to decrease the bundle size of the piral container app, and tried using piral build tags but its giving the same built size.
So please suggestion something to reduce this bundle size
I was trying to decrease the bundle size of the piral container app, and tried using piral build tags but its giving the same built size.
So please suggestion something to reduce this bundle size
4 replies
anand
@anand514
Hi, anybody have experience on converting existing angular js monolith into micro frontends using piral, i would to know the journey of that
2 replies
Taya Valieva
@tayavalieva

Hi Florian,

Thanks so much again for all the suggestions – we are progressing quite nicely!
What is the best practise to implement logging out functionality under the following scenario:
I’m creating the Piral instance when the user info is already set in the root component, doing something like that:

if (!loggedIn) return <LoginPage /> else <Piral ... />;

User data is pulled from react context and then createInstance() function uses createAuthApi() to initialize a Piral instance with the given user.

Then I need a way to log out and unmount the current Piral instance created for a certain user.
Ideally, I’d pass a logout handler function to Piral instance menu, but I think Piral by design does not take any custom props.
Is there any way to extend the interface or should I approach it differently?
Thank you so much!

5 replies
JasonEsposito
@JasonEsposito
Hi! I've managed to get the Azure basic container up and running but obviously due to the nature of containers they are stateless. I understand this is only the basic version but is there anyway for us to stop losing our feeds every time the container restarts/stops/updates? I don't want the developers to have to reimport the feed/pilets everytime this happens....
43 replies
JasonEsposito
@JasonEsposito
I have pulled the docker image (v1.7.1) and it is now running in AWS ECS. When I go to the public facing URL I get a setup page.. When I run through the setup it gives me a config file. What are the next steps? Previous version I could just sign in after the site was up and running
6 replies
Ben Kolb
@bolbken
image.png
Hello all, I'm struggling with using createInstance. From everything I can gather, my feed server is working... but I'm getting some odd errors that I haven't seen anywhere in issues or this gitter. Hoping someone can help.
80 replies
JasonEsposito
@JasonEsposito

Hi - just wondering how to use the api key for authorisation instead of using a valid user session? What do I need to pass into the headers to make a request for example /api/v1/feed/{feed}/contributors. I can't seem to find it in the docs.

I've set a PIRAL_DEFAULT_API_KEY in my environment variable and I was hoping this could just be passed in all the requests?