This is under Percolate Studios, so that is managed by Meteor Software as well.
inject-data
only has a subset of functionality found in inject-initial
, which is injecting data into the HTML sent to the client.
inject-initial
on the other hand gives you access to the raw html
, head
, and body
of the page, before being sent to the client, so one can modify the HTML, inject conditional CSS, scripts, and do all kinds of voodoo.
Here is a stripped down overview of the API:
Inject = {
// stores in a script type=application/ejson tag, accessed with Injected.obj('id')
obj: function(id, data, res) {
this._checkForObjOrFunction(data,
'Inject.obj(id, data [,res]) expects `data` to be an Object or Function');
// ..
},
// Inserts a META called `id`, whose `content` can be accessed with Injected.meta()
meta: function(id, data, res) {
this._checkForTextOrFunction(data,
'Inject.meta(id, data [,res]) expects `data` to be an String or Function');
// ..
},
rawHead: function(id, textOrFunc, res) {
this._checkForTextOrFunction(textOrFunc,
'Inject.rawHead(id, content [,res]) expects `content` to be an String or Function');
},
rawBody: function(id, textOrFunc, res) {
this._checkForTextOrFunction(textOrFunc,
'Inject.rawBody(id, content [,res]) expects `content` to be an String or Function');
// ..
},
// The callback receives the entire HTML page and must return a modified version
rawModHtml: function(id, func) {
// ..
},
};
I think you should publish those packages one way or another. Iām most interested in useraccounts:*
& kadira:blaze-layout
. useraccounts is one of the reasons that made Meteor click for me and it was a joy to spin up application with full blown authentication. How different is your blaze-layout
fork to GitHub - trychlos/pwix-blaze-layout: Layout Manager for Blaze (works well with Meteor FlowRouter) ?
Iām glad to hear that you are still using useraccounts:*
. I thought Iām the only archaeologist digging up these old packages. I agree, they are pretty capable, and so easy to extend, via config or directly in the code. I will send pull requests for three of them that I forked to the Meteor Compat organisation.
blaze-layout
is actually a fork of pwix-blaze-layout
, but I prefer to keep it under the kadira
namespace, as I assume more users will have that included in their packages. But I could send the pull request to pwix-blaze-layout
instead, if thatās what people are using nowadays.
Iām glad to hear that you are still using useraccounts:*. I thought Iām the only archaeologist digging up these old packages. I agree, they are pretty capable, and so easy to extend, via config or directly in the code. I will send pull requests for three of them that I forked to the Meteor Compat organisation.
These packages are what ignited my love for Meteor and I believe theyāre also the key to the future. If developers try out these packages they too shall develop the same appetite for Meteor.
Canāt wait to see your pull requests not just for useraccounts:*
but for the packages youāve migrated
Moar updates
- Collection2 is
4.0.0
is released - @bratelefant is mostly done, awaiting the release of another beta. If things go as planned weāre gonna wind up with a new a full release soon.
- @storyteller published aldeed:schema-index@4.0.0-beta.0 and aldeed:schema-deny@4.0.0-beta.0
- @jkuester published dburles:mongo-collection-instances@1.0.0-beta.1 & lai:collection-extensions@1.0.0-beta300.1
- @radekmie added async attributes to Blaze
Things are moving pretty fast on the community packages, hopefully all lose ends are tied by the end February as promised.
Weād appreciate if someone can step up and work on Migration 3.0 by klablink Ā· Pull Request #13 Ā· Meteor-Community-Packages/redis-oplog Ā· GitHub
as @storyteller has his hands full now
Hi @storyteller, just a clarification, in the latest release of meteor-collection-hooks it is listed as compatible with Meteor 3 even though the tests do not work, as indicated, and async logic is not implemented, what does it mean to have included in the supported versions 3.0-beta.0?
A quick update from us.
As of now, the following have pull requests submitted:
reywood:publish-composite # Awaiting review from MCP maintainers
tmeasday:publish-counts # Awaiting review from MCP maintainers
deanius:promise # Pull request merged, but current maintainer says it won't publish anymore
useraccounts:core # Pull request sent to Meteor Compat Packages
useraccounts:bootstrap # Pull request sent to Meteor Compat Packages
Update 2:
coagmano:stylus@v1.1.3 # Pull request submitted to MCP
coagmano:stylus@v2.0.3 # Pull request submitted to MCP
Update 3:
(Discussion: Feedback needed: simple:rest compat - #8 by illustreets)
json-routes@v3.0.0 # Pull request submitted to Meteor Compat Packages
rest-json-error-handler@v1.1.3 # Pull request submitted to Meteor Compat Packages
Update 4:
pwix:blaze-layout@v2.3.2 # Pull request submitted to current maintainer
Okay, so far I submitted pull requests for the bulk of packages that we migrated to, or otherwise made compatible with, Meteor 3.0.
I am confident that the ones under the Meteor Compat Packages and MCP umbrellas will be merged sooner or later. I hope pwix:blaze-layout
is still maintained, so they merge the pull request, which is quite tiny actually.
However, we have a few upgraded packages that Iām not entirely sure what to do about:
-
deanius:promise
- Pull request was merged by the current maintainer, but he will not be publishing or maintaining it anymore. Read our brief exchange at the pull request link posted earlier in the thread. -
meteorhacks:ssr
- This one looks like is still being used by people who are rendering email templates on the server, to be used withAccounts
email methods. Would be good if Meteor Compat Packages took this one under their org. -
meteorhacks:inject-initial
- Useful in a multitude of situations. See the discussion above. -
meteorhacks:sikka
- I am surprised to see that there is little interest in what is to this date the only firewall built specifically for Meteor. The officialddp-rate-limiter
is not sufficient to protect against abusive requests. Also, not everyone can, or want, to proxy via Cloudflare.Maybe Meteor has become so niche that no one is attempting DDP scraping. Well, nevermind ā¦
Looks like
akarda:sikka
is the most recent fork (and the only one in 5 years); if nothing else works, I may try and submit it there. -
useraccounts:flow-routing
- This one has dependencies onkadira:flow-router
andkadira:blaze-layout
. We have an internal fork ofkadira:flow-router
which diverges from the upstream, and also fromostrio:flow-router-extra
. I am not even sure there are many (any?) users of this package to benefit from this effort, so weāll put the breaks on this one for now.
Speaking of the useraccounts.*
namespace, now that the core package has been upgraded and the OAuth support fixed, it may become useful to a wider audience. Maybe someone can pick up useraccounts-unstyled
, useraccounts-iron-routing
, and useraccounts-flow-routing-extra
.
We would have spared the effort, but 1) none of these packages has tests and 2) we do not use any of them, so we are not familiar with their codebase and usage. Iām happy to assist / contribute if someone else can work with us to test the changes, as we wonāt touch the code without knowing how it is supposed to work
Given your comment. Iām now led to believe that the 3.0 might have a good upside with so many packages being updated and revived.
useraccounts:flow-routing
- This one has dependencies onkadira:flow-router
andkadira:blaze-layout
. We have an internal fork ofkadira:flow-router
which diverges from the upstream, and also fromostrio:flow-router-extra
. I am not even sure there are many (any?) users of this package to benefit from this effort, so weāll put the breaks on this one for now.
Speaking of the
useraccounts.*
namespace, now that the core package has been upgraded and the OAuth support fixed, it may become useful to a wider audience. Maybe someone can pick upuseraccounts-unstyled
,useraccounts-iron-routing
, anduseraccounts-flow-routing-extra
.
If you think the changes youāve have are too awkward for mainstream audience of the package you may publish it under your own namespace. Monti APM published its own version of GitHub - monti-apm/flow-router: Carefully Designed Client Side Router for Meteor and bee-queue.
I believe that too. Meteor is not only shedding a good chunk of the legacy, but also indirectly overhauls the packages ecosystem.
The ones that make it past this stage must be really important, so thereās that, itās almost like a community survey
Thatās great, I had no idea it exists. Our fork has stuff that, to be honest, can be monkey-patched on the FlowRouter object, if itās still implied
, so I will check that for our internal use - itās mostly for base64 encoding parameters and other exotic functionality, some pull requests that Kadira never merged, nothing unusual.
But on the subject of useraccounts:flow-routing
, its dependencies should then be updated to maintained forks, irrespective of what illustreets needs in-house. I can easily update the forkās dependencies to montiapm:flow-router
and pwix:blaze-layout
and send a pull request. The latter, only if they merge my pull request. If not, maybe I can coax @storyteller or @filipenevola to accept our kadira:blaze-layout
, updated an compatible, under Meteor Compat.
I donāt have anything to do with that, so the only thing I could do is annoy other people about it. I think Meteor Software manages those repositories and has the option to publish those packages.
I understand, thanks! I will first attempt to find an active maintainer outside Meteor Compat.
Time for some new updates
- Instead of migrating xolvio:cleaner, I opted to pull out the resetDatabase function and asyncify it. Hereās the code for it, in case someone needs it:
export const resetDatabase = async function (options = {}) {
if (process.env.NODE_ENV !== "development") {
throw new Error(
"resetDatabase is not allowed outside of a development mode. " +
"Aborting."
);
}
let excludedCollections = ["system.indexes"];
if (options.excludedCollections) {
excludedCollections = excludedCollections.concat(
options.excludedCollections
);
}
const db =
options.db || MongoInternals.defaultRemoteCollectionDriver().mongo.db;
const collections = await db.collections();
const appCollections = _.reject(collections, function (col) {
return (
col.collectionName.indexOf("velocity") === 0 ||
excludedCollections.indexOf(col.collectionName) !== -1
);
});
for await (const col of appCollections) {
await col.deleteMany({});
}
};
- Work for async version of GitHub - activitree/meteor-push at v3.0.0-beta.0 is already started, thanks to @paulishca. Iāll be helping him out.
- @jkuester pushed a new RC of simple schema
- @bratelefant is doing amazing work and finalizing his efforts on ostrio:files update
Please start out trying the beta packages and report any problems you find.
@harry97 Thanks for mentioning Got a local copy of an async version of meteor-push running on 2.14 with no async warnings.
BTW @harry97 I even forgot the Beta code of meteor-push was already updated with async functions a couple of months back
Yeah, that saves us a great chunk of time already couldnāt you say that earlier.
EDIT: Can you start a PR with that branch and release a beta version to atmosphere so we can test things out?
I wrote a blogpost about my latest OSS endeavors regarding Meteor 3.0 packages migration.
Thanks to Daniel & Trusted Care I was able to migrate many packages to async that we use in our application:
- Building upon Quaveās PR to update the original synced-cron
- Asyncify meteor-keyvaluestore
- Modernize meteor-simple-schema-mixin
- Asyncify reactive-table
- Modernize template-controller
- Modernize anti:methods
Hello guys, long time no see. There has not been much going on lately but thereāre few things Iād like to draw your attention to:
- Async migration by harryadel Ā· Pull Request #112 Ā· msavin/SteveJobs Ā· GitHub - Iāve been working on updating this package, please give it a go and let me know if you run into any issues.
- Add Meteor 3.0 Compatibility by harryadel Ā· Pull Request #1 Ā· itgenio/meteor-persistent-session Ā· GitHub - If youāve been using any of Cult of Coders Persistent Session, then Iād recommend that you switch over to @afrokick fork, theyāve already solved most of the conflicts and only needed a little push.
- Simple Schema Async Compatibility - As it currently stands, simple schema isnāt async friendly as nearly all the computed fields/values canāt run async operations. Iāve tried to get my hands dirty with it but any simple async change bubbles up and forces you to modify the entire package. Itās not a simple task and requires time which Iām unable to dedicate right now. @jkuester will be able to dedicate time for it in the near future so please if anyone has sometime let us know so we can coordinate it. Sames goes for Autoform, it also needs some serious work. Simple Schema / Autoform / Collection 2 - the trifecta, all work in harmony and currently only collection2 has been migrated to async.