profile
viewpoint
Saad Quadri saadq Front End Engineer at Amazon Seattle https://saadq.com Open Source 💚

startedhedgerh/hiring-with-records

started time in 15 days

startedkrisk/Fuse

started time in 25 days

startedFormidableLabs/runpkg

started time in a month

CommitCommentEvent

push eventsaadq/resumake.io

saadq

commit sha 3de226a1c99770aba3e11c23a16e490f08f447b7

Add @ronakdpatel as a contributor

view details

push time in a month

issue commentdooboolab/react-native-iap

How to make iOS UI similar to Android experience?

It seems that it may just be due to the current environment you're in. There was a similar post on Reddit about this issue, and they mentioned that the plain popup is only during development and that the nice popup comes when you install the app from the App Store. I have not tested it yet though, so can't confirm.

zaynv

comment created time in a month

issue commentsaadq/resumake.io

Add in custom sections

I have some stuff to say about this, will do so later tonight!

jeeva86

comment created time in a month

issue commentsaadq/node-latex

Error: ENOENT: no such file or directory

The specific error you're getting is a problem with the library. I am trying to read the error log file that is created by LaTeX (named texput.log by default) but in some instances it is not created. In other cases (something I recently found out), the generated file name is named something other than texput.log.

To help me debug this, could you install the dev version:

npm install node-latex@dev

And then running the above code again? Your logs should have a line like:

{ files: [...] }

This will basically be a list of files that are generated by running LaTeX. Could you show me what files are created for you? Additionally, this error should be fixed because I am no longer trying to read an error log that doesn't exist.

I will still need to update the code to look for the proper error log file if it was created though, otherwise the user may not be notified of errors in the TeX document. Your logs will help with that.


As a sidenote, you can change fonts: path.resolve('assets', 'latex', 'fonts', 'itcavantgardestd') to just fonts: path.resolve('assets', 'latex', 'fonts'), which would be more useful in case you ever add additional fonts.

savaryt

comment created time in a month

issue commentdenoland/deno

Wanted: A simple TS/JS code formatter using the TS compiler

I think that's on purpose. It's probably going to be more like gofmt where all Deno code will have the same formatting rather than letting people customize their Prettier config. Might be wrong though.

ry

comment created time in a month

issue closedsaadq/node-latex

usage of options

Dear saadq, I find that there exist several options to be loaded, but I cannot find any documentations about the usage of these options (a concrete example like how to set fonts will be great). Thx!

closed time in 2 months

ZUNJI

issue commentsaadq/node-latex

usage of options

I am currently working on v3 of node-latex which is a complete rewrite, and I will hopefully add examples of each option usage in there. For now, here is how you would use some options:

Let's say you had a folder structure like this:

.
├── doc.tex
├── fonts
│   ├── lato
│   │   ├── Lato-Bol.ttf
│   │   ├── Lato-BolIta.ttf
│   │   ├── Lato-Reg.ttf
│   │   └── Lato-RegIta.ttf
│   └── raleway
│       ├── Raleway-Bold.otf
│       ├── Raleway-ExtraBold.otf
│       ├── Raleway-ExtraLight.otf
│       ├── Raleway-Heavy.otf
│       ├── Raleway-Light.otf
│       ├── Raleway-Medium.otf
│       ├── Raleway-Regular.otf
│       ├── Raleway-SemiBold.otf
│       └── Raleway-Thin.otf
└── inputs
    └── texstyles.cls

To include these fonts when running latex, you just need to include the path to a toplevel directory which they are in. Something like:

const latex = require('node-latex');
const path = require('path');
const fs = require('fs');

const texDocPath = path.join(__dirname, 'doc.tex');
const inputsPath = path.join(__dirname, 'inputs');
const fontsPath = path.join(__dirname, 'fonts');

const input = fs.createReadStream(texDocPath);

const pdf = latex(input, {
  fonts: [fontsPath],  // You can put multiple paths in here if you have fonts in different places
  inputs: [inputsPath] // Same thing for your TEXINPUTS
});

// Do something with pdf...

If you still have issues with usage, please comment a code example here and I can help you debug. Closing for now though.

ZUNJI

comment created time in 2 months

pull request commentDefinitelyTyped/DefinitelyTyped

[text-table] align can be null or undefined

Yep, sorry I somehow missed the comment. But I see what you mean, LGTM.

dimitropoulos

comment created time in 2 months

Pull request review commentDefinitelyTyped/DefinitelyTyped

[text-table] align can be null or undefined

 declare namespace table {         hsep?: string;          /** An array of alignment types for each column, default ['l','l',...]. */-        align?: Array<'l' | 'r' | 'c' | '.'>;+        align?: Array<'l' | 'r' | 'c' | '.' | null | undefined>;
        align?: Array<'l' | 'r' | 'c' | '.' | null>;

I think the ? in the property name for align already allows undefined, but adding the null looks good to me.

dimitropoulos

comment created time in 2 months

issue closedaws-amplify/amplify-js

Unable to pass demographic to Analytics.updateEndpoint()

So as a preface to the issue I mentioned in the title, I wanted to first mention another issue I saw in the docs for Analytics. The updateEndpoint() docs seem to say to pass in an object like so for user attributes:

Analytics.updateEndpoint({
  // User attributes
  userAttributes: {
    interests: ['football', 'basketball', 'AWS']
    // ...
  }
})

However this led to UserAttributes being undefined when inspecting the debug logs with Amplify.Logger.LOG_LEVEL = 'DEBUG'. I was only able to get it to work when using UserAttributes instead of userAttributes.


So the current issue I'm facing is that I can't seem to get the demographic passed no matter what I do. The docs mention to do something like:

Analytics.updateEndpoint({
  demographic: {
    appVersion: 'xxxxxxx', // The version of the application associated with the endpoint.
    locale: 'xxxxxx', // The endpoint locale in the following format: The ISO 639-1 alpha-2 code, followed by an underscore, followed by an ISO 3166-1 alpha-2 value
    make: 'xxxxxx', // The manufacturer of the endpoint device, such as Apple or Samsung.
    model: 'xxxxxx', // The model name or number of the endpoint device, such as iPhone.
    modelVersion: 'xxxxxx', // The model version of the endpoint device.
    platform: 'xxxxxx', // The platform of the endpoint device, such as iOS or Android.
    platformVersion: 'xxxxxx', // The platform version of the endpoint device.
    timezone: 'xxxxxx' // The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles.
  }
})

However, no matter what I pass to updateEndpoint, it doesn't seem to get actually get sent in the request. As a simple example, let's say I just wanted to pass in an appVersion (though I tried several other things as well like make, model, etc). I have tried doing different variations with casing like:

Analytics.updateEndpoint({
  ...
  demographic: {
    appVersion: '0.1.0'
  }
})

and

Analytics.updateEndpoint({
  ...
  Demographic: {
    appVersion: '0.1.0'
  }
})

and

Analytics.updateEndpoint({
  ...
  Demographic: {
    AppVersion: '0.1.0'
  }
})

...etc

but none of them seemed to work. No matter what I pass to the demographic section, I always see something like this in the logs when testing on the iOS simulator:

[22:04:57]   "[DEBUG] 04:57.128 AWSPinpointProvider - updateEndpoint with params: ": Object {
[22:04:57]     "ApplicationId": "...",
[22:04:57]     "EndpointId": "...",
[22:04:57]     "EndpointRequest": Object {
[22:04:57]       "Address": "...",
[22:04:57]       "Attributes": undefined,
[22:04:57]       "ChannelType": "APNS",
[22:04:57]       "Demographic": Object {
[22:04:57]         "AppVersion": "ios/12.1",
[22:04:57]         "Make": "iPhone",
[22:04:57]         "Model": "iPhone 6/7/8 plus",
[22:04:57]         "ModelVersion": "12.1",
[22:04:57]         "Platform": "ios",
[22:04:57]       },
[22:04:57]       "EffectiveDate": "...",
[22:04:57]       "OptOut": undefined,
[22:04:57]       "RequestId": undefined,
[22:04:57]       "User": Object {
[22:04:57]         "UserAttributes": Object {
[22:04:57]           "email": Array [
[22:04:57]             "...",
[22:04:57]           ],
[22:04:57]           "email_verified": Array [
[22:04:57]             "...",
[22:04:57]           ],
[22:04:57]           "name": Array [
[22:04:57]             "...",
[22:04:57]           ],
[22:04:57]           "sub": Array [
[22:04:57]             "...",
[22:04:57]           ],
[22:04:57]         },
[22:04:57]         "UserId": "...",
[22:04:57]       },
[22:04:57]     },
[22:04:57]   },

Notice that the Demographic object in there ignores the app version I pass to it. Additionally, if I try to pass in other things like locale or whatever, it still always sticks to this same exact Demographic object passed in to the request. It seems like it just doesn't use my Demographic object I pass to it no matter what.

This is v1.1.8. Let me know if I can provide any other info, and any help would be appreciated. Thanks!

closed time in 2 months

saadq

issue commentaws-amplify/amplify-js

Unable to pass demographic to Analytics.updateEndpoint()

I don't remember when I fixed this, but I believe I just updated my version of aws-amplify and it just started working.

saadq

comment created time in 2 months

issue commentaws-amplify/amplify-js

PushNotification.onRegister() not called at "@aws-amplify/pushnotification": "^1.0.20"

Will probably move this to another issue, but I am still kind of confused about updateEndpoint. The AWS docs within the pinpoint console seem to suggest this kind of syntax:

Screen Shot 2019-04-18 at 1 42 55 PM

But the Amplify docs seem to lowercase everything instead of PascalCase like above:

Analytics.updateEndpoint({
    address: 'xxxxxxx', // The unique identifier for the recipient. For example, an address could be a device token, email address, or mobile phone number.
    attributes: {
        // Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create a segment.
        hobbies: ['piano', 'hiking'],
    },
    channelType: 'APNS', // The channel type. Valid values: APNS, GCM
    demographic: {
        appVersion: 'xxxxxxx', // The version of the application associated with the endpoint.
        locale: 'xxxxxx', // The endpoint locale in the following format: The ISO 639-1 alpha-2 code, followed by an underscore, followed by an ISO 3166-1 alpha-2 value
        make: 'xxxxxx', // The manufacturer of the endpoint device, such as Apple or Samsung.
        model: 'xxxxxx', // The model name or number of the endpoint device, such as iPhone.
        modelVersion: 'xxxxxx', // The model version of the endpoint device.
        platform: 'xxxxxx', // The platform of the endpoint device, such as iOS or Android.
        platformVersion: 'xxxxxx', // The platform version of the endpoint device.
        timezone: 'xxxxxx' // The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles.
    },
    location: {
        city: 'xxxxxx', // The city where the endpoint is located.
        country: 'xxxxxx', // The two-letter code for the country or region of the endpoint. Specified as an ISO 3166-1 alpha-2 code, such as "US" for the United States.
        latitude: 0, // The latitude of the endpoint location, rounded to one decimal place.
        longitude: 0, // The longitude of the endpoint location, rounded to one decimal place.
        postalCode: 'xxxxxx', // The postal code or zip code of the endpoint.
        region: 'xxxxxx' // The region of the endpoint location. For example, in the United States, this corresponds to a state.
    },
    metrics: {
        // Custom metrics that your app reports to Amazon Pinpoint.
    },
    /** Indicates whether a user has opted out of receiving messages with one of the following values:
        * ALL - User has opted out of all messages.
        * NONE - Users has not opted out and receives all messages.
        */
    optOut: 'ALL',
    // Customized userId
    userId: 'XXXXXXXXXXXX',
    // User attributes
    userAttributes: {
        interests: ['football', 'basketball', 'AWS']
        // ...
    }
})

Other than that, my main confusion on why the logs are showing updateEndpoint called multiple times with different params... I'm wondering if doing Analytics.configure({ ... }) automatically calls updateEndpoint() for you with mostly empty/undefined values.

RobertNg1125

comment created time in 2 months

issue commentaws-amplify/amplify-js

PushNotification.onRegister() not called at "@aws-amplify/pushnotification": "^1.0.20"

Apologies for the delay.

So I set the log level to 'DEBUG', and I'm noticing some strange things, and I think I am facing some issues with updateEndpoint() because I am using a manual config instead of using Amplify CLI.

I only call updateEndpoint() once in my code after sign in, but there seem to be multiple AWSPinpointProvider - updateEndpoint with params: ... calls showing up in my JS logs, with some not having any correct info like UserAttributes:

<details> <summary>Example 1 (incorrect info)</summary> <pre> [12:59:07] [DEBUG] 59:05.888 AWSPinpointProvider - updateEndpoint with params: Object { [12:59:07] "ApplicationId": "f0eb5d745d374bb7a7e493b1735d3dad", [12:59:07] "EndpointId": "059c4870-61f9-11e9-923c-eb372d07f776", [12:59:07] "EndpointRequest": Object { [12:59:07] "Attributes": Object {}, [12:59:07] "ChannelType": undefined, [12:59:07] "Demographic": Object { [12:59:07] "AppVersion": "android/28", [12:59:07] "Make": undefined, [12:59:07] "Model": undefined, [12:59:07] "ModelVersion": "28", [12:59:07] "Platform": "android", [12:59:07] }, [12:59:07] "EffectiveDate": "2019-04-18T16:59:05.888Z", [12:59:07] "Location": Object {}, [12:59:07] "Metrics": Object {}, [12:59:07] "RequestId": "...", [12:59:07] "User": Object { [12:59:07] "UserAttributes": Object {}, [12:59:07] "UserId": "...", [12:59:07] }, [12:59:07] }, [12:59:07] } </pre> </details>

<details> <summary>Example 2 (correct info)</summary> <pre> [13:00:22] [DEBUG] 59:25.830 AWSPinpointProvider - updateEndpoint with params: Object { [13:00:22] "ApplicationId": "...", [13:00:22] "EndpointId": "...", [13:00:22] "EndpointRequest": Object { [13:00:22] "Address": "...", [13:00:22] "Attributes": Object {}, [13:00:22] "ChannelType": "GCM", [13:00:22] "Demographic": Object { [13:00:22] "AppVersion": "0.0.15", [13:00:22] "Make": undefined, [13:00:22] "Model": undefined, [13:00:22] "ModelVersion": "28", [13:00:22] "Platform": "android", [13:00:22] }, [13:00:22] "EffectiveDate": "2019-04-18T16:59:25.829Z", [13:00:22] "Location": Object {}, [13:00:22] "Metrics": Object {}, [13:00:22] "RequestId": "...", [13:00:22] "User": Object { [13:00:22] "UserAttributes": Object { [13:00:22] "email": Array [ [13:00:22] "...", [13:00:22] ], [13:00:22] "email_verified": Array [ [13:00:22] "true", [13:00:22] ], [13:00:22] "name": Array [ [13:00:22] "...", [13:00:22] ], [13:00:22] "sub": Array [ [13:00:22] "...", [13:00:22] ], [13:00:22] }, [13:00:22] "UserId": "...", [13:00:22] }, [13:00:22] }, [13:00:22] } </pre> </details>

I also see multiple fail responses in the logs like so:

[12:59:07] [DEBUG] 59:06.135 AWSPinpointProvider - updateEndpoint failed [BadRequestException: Exceeded maximum endpoint per user count 10]

Along with some warnings like:

Please ensure you have updated your Pinpoint IAM Policy with the Action: "mobiletargeting:GetUserEndpoints" in order to get endpoints info of the user

As for my Android logs, here are some relevant logs for the push notifications:

I/ReactNativeJS: '[DEBUG] 49:29.330 Notification - update endpoint in push notification', '...token...'
I/ReactNativeJS: [DEBUG] 49:29.347 Notification - update endpoint success, setting token into cache
2019-04-18 12:49:29.330 30367-30534/com.investroo.zoya I/ReactNativeJS: '[DEBUG] 49:29.330 Notification - update endpoint in push notification', '...token...'
2019-04-18 12:49:29.344 30367-30534/com.investroo.zoya I/ReactNativeJS: '[DEBUG] 49:29.343 Notification - refresh the device token with', '...different token value...'
2019-04-18 12:49:29.347 30367-30534/com.investroo.zoya I/ReactNativeJS: [DEBUG] 49:29.347 Notification - update endpoint success, setting token into cache
2019-04-18 12:49:29.365 30367-30534/com.investroo.zoya I/ReactNativeJS: '[DEBUG] 49:29.364 AWSPinpointProvider - endpointId from cache', [ '...endpoint-id...', 'type', 'string' ]
2019-04-18 12:49:29.366 30367-30534/com.investroo.zoya I/ReactNativeJS: '[DEBUG] 49:29.366 AWSPinpointProvider - setting endpoint id from the cache', '...endpoint-id...'
2019-04-18 12:49:29.367 30367-30534/com.investroo.zoya I/ReactNativeJS: '[DEBUG] 49:29.366 Hub - Dispatching to analytics with ', { event: 'pinpointProvider_configured', data: null }
2019-04-18 12:49:29.367 30367-30534/com.investroo.zoya I/ReactNativeJS: '[DEBUG] 49:29.367 Analytics - on hub capsule analytics', { event: 'pinpointProvider_configured', data: null }
2019-04-18 12:59:01.005 32113-32285/com.investroo.zoya I/RNPushNotificationModule: getting tokenf3mLkobgWqk:APA91bHqzPKuYYEHVKZUrc-kqv4MzkbIMhKkZX6MhJ_XKIxsd_mC7EMDCSlSrQhZlMXBaaIfSSUV32gSYbdS4IyQOYD3QZ-o6tUNyqFovrpF7a_gZbATfWRimrMFV55yeLFj_7oTLkA-
2019-04-18 12:59:01.019 32113-32284/com.investroo.zoya I/ReactNativeJS: '[DEBUG] 59:01.19 Notification - Get the token from Firebase Service', 'f3m...'
2019-04-18 12:59:01.019 32113-32284/com.investroo.zoya I/ReactNativeJS: '[DEBUG] 59:01.19 Notification - update endpoint in push notification', 'f3m...'
2019-04-18 12:59:01.025 32113-32284/com.investroo.zoya I/ReactNativeJS: '[DEBUG] 59:01.25 AuthClass - failed to get or parse item aws-amplify-federatedInfo', { [SyntaxError: JSON Parse error: Unexpected identifier "undefined"]

I think I'm going to try to fix updateEndpoint() first before I try to pursue fixing push notifications.

RobertNg1125

comment created time in 2 months

issue commentaws-amplify/amplify-js

PushNotification.onRegister() not called at "@aws-amplify/pushnotification": "^1.0.20"

Sure, I will try it out by today or tomorrow and let you know how it goes!

RobertNg1125

comment created time in 2 months

issue commentaws-amplify/amplify-js

PushNotification.onRegister() not called at "@aws-amplify/pushnotification": "^1.0.20"

Just confirming that I did it when the app was NOT in the foreground. It still didn't work when using Pinpoint, but sending a test notification from the Firebase console DID work. I am also on the latest version of @aws-amplify/pushnotification (but an older version of aws-amplify, which is 1.1.8).

RobertNg1125

comment created time in 2 months

issue commentaws-amplify/amplify-js

I'm not getting push notifications from AWS Pinpoint in react native (android) project, onRegister method is never triggered

For anyone else who runs into this, just search for gcm registration token in the logs to find it.

But yeah, I basically have the same issue. I get the successful message sent message but I don't actually get any notification to my device.

Luckygirlllll

comment created time in 2 months

issue commentaws-amplify/amplify-js

I'm not getting push notifications from AWS Pinpoint in react native (android) project, onRegister method is never triggered

I did actually try passing a hardcoded device token to the address of updateEndpoint, but it didn't seem to resolve the issue :/

To answer your question, I was actually unable to get the onRegister call to run either. I just looked at the logs in Android Studio Logcat to get the device, token that I used for both Firebase/Pinpoint.

I did however see this issue which seems related, going to look into that.

Luckygirlllll

comment created time in 2 months

issue commentaws-amplify/amplify-js

I'm not getting push notifications from AWS Pinpoint in react native (android) project, onRegister method is never triggered

I am having similar issues with my device not receiving push notifications. I have an ejected Expo app where I setup Push Notifications by following the docs. I also have the PushNotification setup code, but none of the methods seem to ever get called.

From Firebase, sending a test notification worked when I passed it my device token and I received the notification on my device.

From the Pinpoint console in the "Test messaging" section, I tried Push Notifications with both an endpoint id as well as a device token:

Screen Shot 2019-04-13 at 12 25 25 PM

When I tried the endpoint id method by using my user's endpoint id, I got a message saying endpoints must have an address to target:

Screen Shot 2019-04-13 at 12 21 14 PM

When I tried the device token method by using the same device token that I used within the Firebase console, it seemingly says it worked:

Screen Shot 2019-04-13 at 12 24 34 PM

However, my device never actually received any notification, not were any of the PushNotification event handlers called.


My setup code:

Analytics.configure({
  AWSPinpoint: {
    appId: '...',
    region: 'us-east-1',
    mandatorySignIn: false
  }
})

// This is called after sign in
Analytics.updateEndpoint({
  ...
})

PushNotification.configure({
  appId: '...'
})

PushNotification.onNotification(notification => {
  console.log('in app notification', notification)
})

// get the registration token
PushNotification.onRegister(token => {
  console.log('in app registration', token)
})

// get the notification data when notification is opened
PushNotification.onNotificationOpened(notification => {
  console.log('the notification is opened', notification)
})
Luckygirlllll

comment created time in 2 months

issue commentiexg/IEX-API

Peers endpoint seems to be giving weird results

I don't think it was actually fixed, it seems more of a case that it sometimes works and sometimes gives weird results. Currently at the time of this writing, it is giving similar results as above.

I noticed that the docs mentioned:

This is not intended to represent a definitive or accurate list of peers, and is subject to change at any time.

From this statement, are we to gather that this endpoint is not suitable for use as the list of peers can be inaccurate and may change to results like above?

saadq

comment created time in 2 months

IssuesEvent

startedjustjavac/vscode-deno

started time in 2 months

PR opened mfrachet/rn-placeholder

Add missing style prop to TypeScript definition

Based on this comment it seems like Box, Line, and Media should be able to take in a style prop.

+14 -0

0 comment

1 changed file

pr created time in 2 months

push eventsaadq/rn-placeholder

saadq

commit sha a9ddd05063cb6ca649318cb0492c98254dd7688b

Add missing style prop to TypeScript definition

view details

push time in 2 months

fork saadq/rn-placeholder

:dash: :dizzy: :sparkles: Display some placeholder stuff before rendering your text or media content in React Native

fork in 2 months

startedmfrachet/rn-placeholder

started time in 2 months

fork saadq/iex-api

Unofficial SDK for using the IEX API

fork in 2 months

startedfacebook/react-native

started time in 2 months

startedfeross/buffer

started time in 2 months

startedlatviancoder/useJquery

started time in 2 months

startedunimodules/react-native-unimodules

started time in 2 months

PR opened unimodules/react-native-unimodules

Add TypeScript libdef

It seems like the individual unimodules already had library definitions, so I just added a simple libdef which reexported those types. Seems to have fixed the TS issues I had when trying to import stuff from react-native-unimodules.

+12 -0

0 comment

2 changed files

pr created time in 2 months

push eventsaadq/react-native-unimodules

saadq

commit sha 070618e3882c7dcd52a9392e723fad462447bde3

Add TypeScript libdef

view details

push time in 2 months

fork saadq/react-native-unimodules

Core Unimodule infrastructure and a collection of Unimodules and interfaces that are commonly depended on by other Unimodules

fork in 2 months

fork saadq/expo

The Expo platform for making cross-platform mobile apps

https://docs.expo.io/

fork in 2 months

startedreact-navigation/react-navigation

started time in 2 months

startedreduxjs/react-redux

started time in 2 months

issue commentsindresorhus/globby

Incomplete TypeScript type definitions

Yep, the above libdef would also solve a new issue that arrived.

This should be valid in TS (when using esModuleInterop):

import globby from 'globby'

globby.sync(fileGlobs)

However, the current ES6 module exports in the libdef cause an error like:

Property 'sync' does not exist on type '(patterns: string | ReadonlyArray<string>, options?: GlobbyOptions | undefined) => Promise<string[]>'.

I am currently having to get around this by doing:

- import globby from 'globby'
+ import * as globby from 'globby'
karlismelderis

comment created time in 3 months

issue commentaws-amplify/amplify-js

React-Native Android build fails

Thanks @viniciusfont! Going to try it out soon.

erez-guesty

comment created time in 3 months

pull request commentsaadq/node-latex

add typescript definitions

Looks good, just published v2.6.0 with the TypeScript libdef. Thanks again @georgyfarniev!

georgyfarniev

comment created time in 3 months

push eventsaadq/node-latex

saadq

commit sha eb0c16830c6f7e47d6a0108a9b0175f33c52e158

2.6.0

view details

push time in 3 months

PR merged saadq/node-latex

add typescript definitions

Hello. First of all, thank you for creating node-latex! Here is a typescript definitions for convenient usage in typescript projects.

+71 -0

1 comment

3 changed files

georgyfarniev

pr closed time in 3 months

push eventsaadq/node-latex

georgyfarniev

commit sha 9a4223aeea65ca0364f514fda0db584383c0d6d3

add typescript definitions (#18) * add typescript definitions * add node types * fix export * Update index.d.ts Co-Authored-By: georgyfarniev <gfarniev@icloud.com> * Update index.d.ts Co-Authored-By: georgyfarniev <gfarniev@icloud.com>

view details

push time in 3 months

issue closedsaadq/node-latex

I can't write on file texput.pdf

Hi, I have some "random" problems with the pfd generation. I get the following error message sometimes and sometimes not.

LaTeX Syntax Error ! I can't write on file `texput.pdf'. ! Emergency stop.

The latex document as such is syntactically ok. And under the /tmp directory the log and aux files are created. The error seems totally random ? Maybe it depends on the environment? I use a LXC Container with Ubuntu 16.10

I would appreciate any help!

closed time in 3 months

samlinux

issue commentsaadq/node-latex

I can't write on file texput.pdf

I'm going to close this as it seems to have been a hardware issue rather than an issue with the module.

samlinux

comment created time in 3 months

issue closedsaadq/node-latex

Path seperator ':' in windows

Windows doesn't like the : path separator very much, resulting in it not using the inputs directories. replace it with a ; for windows.

    const joinPaths = inputs => {
      var separator = (process.platform.indexOf('win') != -1) ? ";" : ":"
      return Array.isArray(inputs)
        ? `${inputs.join(separator)}` + separator
        : `${inputs}` + seperator
    }

closed time in 3 months

karellodewijk

issue commentsaadq/node-latex

Path seperator ':' in windows

This is fixed as of v2.4.7. Please feel free to reopen this issue if any issue persists.

karellodewijk

comment created time in 3 months

push eventsaadq/node-latex

saadq

commit sha 8ecf26549f3dc33e0cebe5eb4feedfab2b8a81ab

Use the correct path separator for Windows path.delimiter() is used to make sure the correct path separator is used depending on the OS.

view details

saadq

commit sha 213449d11be6ed6cdfd455c01b7a03c5776f5340

2.4.7

view details

push time in 3 months

Pull request review commentsaadq/node-latex

add typescript definitions

+import { Readable } from 'stream'
import { Readable, Transform } from 'stream'

I believe you can just import Transform from here.

georgyfarniev

comment created time in 3 months

Pull request review commentsaadq/node-latex

add typescript definitions

+import { Readable } from 'stream'++/**+ * node-latex options+ */+interface INodeLatexOptions {+  /**+   * The absolute path (or an array of absolute paths) to the directory which+   * contains the assets necessary for the doc.+   */+  inputs?: string | string[]++  /**+   * The absolute path (or an array of absolute paths) to the directory which+    * contains the fonts necessary for the doc (you will most likely want to use+   * this option if you're working with fontspec).+   */+  fonts?: string | string[]++  /**+   * The command to run for your document (pdflatex, xetex, etc). pdflatex is the+   * default.+   */+  cmd?: string++  /**+   * Arguments passed to cmd. Defaults to ['-halt-on-error'].+   */+  args?: string[]++  /**+   * The number of times to run options.cmd. Some documents require multiple+   * passes. Only works when doc is a String. Defaults to 1.+   */+  passes?: number++  /**+   * The path to the file where you want to save the contents of the error log+   * to.+   */+  errorLogs?: string+}++/**+ * Compiles latex to pdf document+ *+ * @param doc+ * The (La)TeX document you want to use.+ *+ * @param options+ * The compiler options+ */+declare function latex(doc: Readable | string, options?: INodeLatexOptions)+  : Readable
  : Transform

The only thing that needs to be fixed here is that latex() returns a Transform stream

georgyfarniev

comment created time in 3 months

issue closedsaadq/node-latex

temporary directory is not deleted if template is invalid

Temporary directories polluting disk space if template compilation failed. I think they should be removed

closed time in 3 months

georgyfarniev

issue commentsaadq/node-latex

temporary directory is not deleted if template is invalid

This should be fixed as of version 2.4.6. Please feel free to reopen this if the issue persists.

georgyfarniev

comment created time in 3 months

push eventsaadq/node-latex

saadq

commit sha 669dad2c50c6998e32552070f6bf11ced835543c

2.4.6

view details

push time in 3 months

push eventsaadq/node-latex

saadq

commit sha c26fe33a908afcd457e6b450e023f77f9969575a

Remove temp directory when LaTeX errors More info here: https://github.com/bruce/node-temp#want-cleanup-make-sure-you-ask-for-it

view details

push time in 3 months

issue commentsaadq/node-latex

temporary directory is not deleted if template is invalid

Looking into this, will have this fixed by tonight hopefully when I get home.

georgyfarniev

comment created time in 3 months

issue commentsaadq/node-latex

Path seperator ':' in windows

This was a very simple fix, I think I just left it open for Hacktoberfest so someone could get their first PR, though I forgot to label the issue as Hacktoberfest. I'll fix this tonight, thanks for the reminder.

karellodewijk

comment created time in 3 months

issue closeddooboolab/react-native-iap

[Android] Error while retrieving information from server [DF-AA-20]

Problem

After calling RNIap.buySubscription(), the payments modal pops up with a message saying: Error while retrieving information from server [DF-AA-20].

err

Solution

I just needed to set my subscription/product to Active instead of Inactive in the Google Play console.


I just wanted to open an issue here in case someone gets a similar problem and thinks it is a problem with the library. Thanks for the great module!

closed time in 3 months

saadq

issue openeddooboolab/react-native-iap

[Android] Error while retrieving information from server [DF-AA-20]

Problem

After calling RNIap.buySubscription(), the payments modal pops up with a message saying: Error while retrieving information from server [DF-AA-20].

err

Solution

I just needed to set my subscription/product to Active instead of Inactive in the Google Play console.


I just wanted to open an issue here in case someone gets a similar problem and thinks it is a problem with the library. Thanks for the great module!

created time in 3 months

issue commentaws-amplify/amplify-js

Unable to pass demographic to Analytics.updateEndpoint()

Sorry, so just to clarify – I have tried both lowercase and uppercase and mixed case. My original post shows some of the stuff I tried.

But I'm not sure if the docs are accurate because the lowercase wasn't working for me with userAttributes. I had to use UserAttributes to get it to work.

However, I'll try it again exactly like the docs when I get home and post an update here.

saadq

comment created time in 3 months

issue commentaws-amplify/amplify-js

Unable to pass demographic to Analytics.updateEndpoint()

Hey @powerful23,

So here is the entirety of my Amplify code.

Code called immediately:

Amplify.configure({
  Auth: {
    ...
  },
  API: {
    ...
  }
})

Analytics.configure({
  AWSPinpoint: {
    appId: '...',
    region: 'us-east-1',
    mandatorySignIn: false
  }
})

Analytics.autoTrack('session', {
  enable: true,
  provider: 'AWSPinpoint'
})

Analytics.record({ name: 'AppStarted' })

And then the updateAnalyticsEndpoint function is called upon successful sign in (or if the user is already signed in):

async function updateAnalyticsEndpoint() {
  try {
    const user = await Auth.currentAuthenticatedUser()

    const endpoint = {
      Address: user.attributes.email,
      UserAttributes: {
        email: [user.attributes.email],
        email_verified: [JSON.stringify(user.attributes.email_verified)],
        name: [user.attributes.name],
        sub: [user.attributes.sub]
      },
      Demographic: {
        AppVersion: '0.1.0'
      }
    }

    await Analytics.updateEndpoint(endpoint)
  } catch (error) {}
}
saadq

comment created time in 3 months

starteddooboolab/react-native-iap

started time in 3 months

issue openedaws-amplify/amplify-js

Unable to pass demographic to Analytics.updateEnpoint()

So as a preface to the issue I mentioned in the title, I wanted to first say that I think the docs for Analytics seem to be incorrect.

For example, the updateEndpoint() docs seem to say to pass in an object like so for user attributes:

Analytics.updateEndpoint({
  // User attributes
  userAttributes: {
    interests: ['football', 'basketball', 'AWS']
    // ...
  }
})

However this led to UserAttributes being undefined when inspecting the debug logs with Amplify.Logger.LOG_LEVEL = 'DEBUG'. I was only able to get it to work when using UserAttributes instead of userAttributes.


So the current issue I'm facing is that I can't seem to get the demographic passed no matter what I do. The docs mention to do something like:

Analytics.updateEndpoint({
  demographic: {
    appVersion: 'xxxxxxx', // The version of the application associated with the endpoint.
    locale: 'xxxxxx', // The endpoint locale in the following format: The ISO 639-1 alpha-2 code, followed by an underscore, followed by an ISO 3166-1 alpha-2 value
    make: 'xxxxxx', // The manufacturer of the endpoint device, such as Apple or Samsung.
    model: 'xxxxxx', // The model name or number of the endpoint device, such as iPhone.
    modelVersion: 'xxxxxx', // The model version of the endpoint device.
    platform: 'xxxxxx', // The platform of the endpoint device, such as iOS or Android.
    platformVersion: 'xxxxxx', // The platform version of the endpoint device.
    timezone: 'xxxxxx' // The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles.
  }
})

However, no matter what I pass to updateEndpoint, I can't seem to get it to work. As a simple example, let's say I just wanted to pass in an appVersion (though I tried several other things as well like make, model, etc). I have tried doing different variations with casing like:

Analytics.updateEndpoint({
  demographic: {
    appVersion: '0.1.0'
  }
})

and

Analytics.updateEndpoint({
  Demographic: {
    appVersion: '0.1.0'
  }
})

and

Analytics.updateEndpoint({
  Demographic: {
    AppVersion: '0.1.0'
  }
})

...etc

but none of them seemed to work. No matter what I pass to the demographic section, I always see something like this in the logs when testing on the iOS simulator:

[22:04:57]   "[DEBUG] 04:57.128 AWSPinpointProvider - updateEndpoint with params: ": Object {
[22:04:57]     "ApplicationId": "...",
[22:04:57]     "EndpointId": "...",
[22:04:57]     "EndpointRequest": Object {
[22:04:57]       "Address": "...",
[22:04:57]       "Attributes": undefined,
[22:04:57]       "ChannelType": "APNS",
[22:04:57]       "Demographic": Object {
[22:04:57]         "AppVersion": "ios/12.1",
[22:04:57]         "Make": "iPhone",
[22:04:57]         "Model": "iPhone 6/7/8 plus",
[22:04:57]         "ModelVersion": "12.1",
[22:04:57]         "Platform": "ios",
[22:04:57]       },
[22:04:57]       "EffectiveDate": "...",
[22:04:57]       "OptOut": undefined,
[22:04:57]       "RequestId": undefined,
[22:04:57]       "User": Object {
[22:04:57]         "UserAttributes": Object {
[22:04:57]           "email": Array [
[22:04:57]             "...",
[22:04:57]           ],
[22:04:57]           "email_verified": Array [
[22:04:57]             "...",
[22:04:57]           ],
[22:04:57]           "name": Array [
[22:04:57]             "...",
[22:04:57]           ],
[22:04:57]           "sub": Array [
[22:04:57]             "...",
[22:04:57]           ],
[22:04:57]         },
[22:04:57]         "UserId": "...",
[22:04:57]       },
[22:04:57]     },
[22:04:57]   },

Notice that the Demographic object in there ignores the app version I pass to it. Additionally, if I try to pass in other things like locale or whatever, it always sticks to this same Demographic object passed in to the request, so it seems like it just doesn't use my Demographic object I pass no matter what.

Any help would be appreciated, thanks!

created time in 3 months

push eventsaadq/misc

saadq

commit sha cac89496e1448e076ab4af64be42cdc8aeaa519f

Add node-latex example with adonisjs

view details

push time in 3 months

fork saadq/docs

AWS Amplify Documentation

https://aws-amplify.github.io/docs

fork in 3 months

issue commentsaadq/node-latex

Is the LaTeX Call Asynchronous

Hey @richardtorres314,

You should be able to be able to just pipe the pdf stream to your http response. The way I do this in my Koa app is just by setting response.body to the stream: . My generatePDF() function just calls latex() on the tex file and returns it.

With AdonisJS, it looks like the proper way to do it would be to do pdf.pipe(response.response)

On the client side, I do a fetch to get the PDF blob. I then create a url from that blob via URL.createObjectURL. You can use that url however you wish, like passing it to an <embed> tag or using pdfjs.

jamesqquick

comment created time in 3 months

issue commentaws-amplify/amplify-js

React-Native Android build fails

I'm another person coming from an ejected react native app from Expo. I had the errors mentioned by @bernhardt1

All firebase libraries must be either above or below 14.0.0

and

Program type already present: com.google.android.gms.gcm.PendingCallback

Switching all the Google stuff from version 15.0.1 to 12.0.1 did indeed get rid of the first error although I can't seem to figure out how to resolve that second one, and I've tried most of the solutions provided above.

erez-guesty

comment created time in 3 months

more