Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Antoine Cordelois
    @Billybobbonnet
    Hello*
    Is there testimonies or examples of large app using astronomy out there?
    I am about to migrate a quite large app to a package based architecture
    I consider the whole code refactoring in the process
    and maybe including astronomy
    but I can't find any clues of how it behaves when scaling up
    vs simpleschemas + collectionhooks
    for instance
    Rafal Lesniak
    @rlesniak
    Hello. I've got one question, how to implement astronomy functionality with Meteor Accounts? for now using const user = Accounts.createUser(data);
    does not ping Astro
    Michael Bauer
    @mbabauer
    Can the object type hold any type of value? I am looking to implement a properties object, where the value can be a string, number, object, or even an array. What are the restrictions put on the validation of an object type?
    Tsegaselassie Tadesse
    @tsega

    @rlesniak, here’s what I’ve done.

    User = Astro.Class({
        name: 'User',
        collection: Meteor.users,
        fields: {
            username: 'string',
            password: 'string',
            profile: 'object',
            "profile.roleId": 'string',
            services: 'object',
            createdAt: {
                type: 'date',
                default: function() {
                    return new Date();
                }
            }
        },
        validators: {
            username: [
                Validators.required(null, "Please provide a username"),
                Validators.string(),
                Validators.minLength(5)
            ],
            password: [
                Validators.required(null, "Please provide a password"),
                Validators.string(),
               // Several other validators here
            ],
            profile: Validators.required(),
            "profile.roleId": [
                Validators.required(null, "Please select the Role for the user"),
                Validators.string()
            ],
            createdAt: [
                Validators.required(),
                Validators.date()
            ]
        },
        methods: {
            role: function() {
              return Roles.findOne({_id: this.profile.roleId});
            }
        }
    });

    Let me know if you need more help.

    Anwain
    @Anwain
    Hey everyone, I get this error popping up when I start meteor. Anyone have a similar issue?
    jagi_astronomy.js?90a6a2e…:1601 Uncaught TypeError: schema.eventManager.on is not a function
    Sam Hulick
    @ffxsam
    @jagi Is there a helper function available to clean an object of all Astronomy properties? It's kind of tedious to have to always use lodash _.pick to just choose the fields relevant to my object when using in other contexts such as Redux
    some of the Astronomy properties are causing problems w/ Meteor's validated methods
    Antoine Cordelois
    @Billybobbonnet
    @jagi fyi the documentation website is down
    Adam Heller
    @HellerCommaA
    @maco144 re: spacebars showing true/false values (scroll up a bit for my last comments, i always forget to check gitter). I believe i did resolve this.
    Sergio Tapia
    @sergiotapia
    Hi guys, since the documentation website is down, does anyone have example of Astronomy v2?
    Sam Hulick
    @ffxsam
    @sergiotapia I didn't even realize it was out
    Kerem Sevencan
    @keremciu
    hi guys, do you have any update method example for v2?
    I'd like to update my record on server-side with an update method but I've failed with v2 update :(
    Kerem Sevencan
    @keremciu
    oh very bad :)
    doc.save({ environment: 'server' }) is fix my problem
    v2 is really good, so thanks for that @jagi
    jagi
    @jagi
    @sergiotapia You can check this out https://github.com/jagi/meteor-astronomy-examples/tree/v2
    @keremciu no problem :)
    Kerem Sevencan
    @keremciu
    hello :)
    I created a package for userstamp with astronomy v2
    I'd like to share with you :)
    Sam Hulick
    @ffxsam
    hey @jagi (or anyone else): having a lot of trouble with pull. I have an object that contains an array of track objects.. which has a uid property. and I'm doing r.pull('tracks', { uid: '7KSTSX2iLxhdbyqru' }) but it's not pulling the item
    even this example doesn't work: http://jagi.github.io/meteor-astronomy/v1#pull
    Sam Hulick
    @ffxsam
    however, with the phone number example, if I do this: ph = _.find(user.phones, { number: 12345 }) and then do user.pull('phones', ph), that works.
    I have to pass the actual Astro object in for it to work as expected
    jagi
    @jagi
    @ffxsam show the schema
    Sam Hulick
    @ffxsam
    
    
    Oops
    jagi
    @jagi
    @ffxsam you can't pull partial object. You have to pass entire document to the pull method.
    Sam Hulick
    @ffxsam
    @jagi Ahh ok, I was under the impression I could pull by matching a single field. thanks!
    Tsegaselassie Tadesse
    @tsega

    In my validation message I’m using TAPi18n strings as follows but all I’m getting is the default english version:

    username: [
                Validators.required(null, TAPi18n.__('provideUsernameMessage', null, 'am')),
                Validators.string(),
                Validators.minLength(5, TAPi18n.__('usernameShortMessage', null, "am"))
            ],

    It should be giving out the error message in Amharic, i.e. “የተጠቃሚ ስሙን ያስገብ” and “የተጠቃሚ ስሙ ፊደሎች ከ5 ወይም ከ5 በላይ መሆን አለባቸው”. I’ve tried elsewhere on the server side these messages do appear. How can I fix this?

    Sam Hulick
    @ffxsam
    does anyone know if there's a way to retrieve the class that an item belongs to?
    for example:
    t = Things.findOne();
    // t.getClass() === 'Thing'
    Sam Hulick
    @ffxsam
    the closest I can do is t instanceof Thing which is decent.. though it means I'd have to manually check all my Astro classes.
    @jagi any suggestions would be greatly appreciated! (whenever you have time of course) :)
    Jay Cheroske
    @jcheroske
    Anyone know if there's a setting that causes Astronomy to keep properties that are missing from the schema, instead of discarding them?
    Tsegaselassie Tadesse
    @tsega
    @jagi don't know if you've notice it but http://astronomy.jagi.io/ is down. Any hope of getting the docs up?
    jagi
    @jagi
    @ffxsam You can do t.constructor.getName()
    @tsega Documentation can be temporarily found under this address http://jagi.github.io/meteor-astronomy/v1
    @jcheroske no it's not possible not to discard non schema fields. It's how schemas work
    Sam Hulick
    @ffxsam
    @jagi awesome, thanks!