1212 Commits
Author SHA1 Message Date
Ian Denhardt ae62d09e37 Drop .js/.ts suffixes in imports.
...with the singular exception of intro.js, where it's part of the
package name, not a file extension.

This is mostly to fix an issue where typescript doesn't want you to
import files with a .ts extension (it will accept .js, but that's super
weird if the file doesn't actually have that extension, and when I tried
it it broke the build for Kenton). Changing the import of .js files is
mainly for consistency.

This also changes some imports to use double quotes (") instead of
single quotes ('); I noticed these while searching for import sites to
replace.
2022-06-11 20:31:47 -04:00
Robert Schmid 94e115dd19 Move oidc implementation to shell/imports/oidc 2020-11-20 19:24:00 +01:00
Robert Schmid f877d6edb4 Move oidc package into shell/client, shell/server 2020-11-18 20:18:34 +01:00
Kenton Varda cd12bd2c22 Implement basic ACME support.
I successfully received a certificate from Let's Encrypt with this, on a Cloudflare-DNS-backed domain.

Currently, there's no configuration UI. You have to poke the database manually. UI will come next.

Integration with Sandcats will require a couple extra steps as well.
2020-05-02 12:52:56 -05:00
Ian Denhardt 63ac218d42 Split shared/testing into separate client/server modules.
This also gets rid of a conditional import.
2020-04-26 01:00:13 -04:00
Drew Fisher cf15fdfcb9 Hoist the only other side-effect-ful imports up into main.js
Looks like we'd previously extracted db-deprecated.js.  Let's keep things
simple during this migration and have main.js be the only file that does
imports purely for side-effects.
2020-03-23 00:53:26 -07:00
Drew Fisher c318a8a8de Move Capnp to explicit imports
Also modernize a couple things while we're in that file.
2020-03-23 00:53:26 -07:00
Drew Fisher 786c2f34df Move sandstorm-identicons to full import/export structure 2020-03-23 00:21:43 -07:00
Ian Denhardt 1e6409c6aa Convert shell/server/main.js to typescript.
Mostly to make sure the meteor package actually works (it does). This is
just a pile of imports, so it's an easy case, as there's no code to
update.
2020-02-22 21:44:09 -05:00
Drew Fisher 7c98c5ff16 Rename client and server entry points to main.js 2020-02-18 23:26:29 -08:00
Drew Fisher a6fc320ae8 Lift sandstorm-identicons out of packages into imports/ 2020-02-18 23:24:33 -08:00
Drew Fisher 31c582d2ca Lift sandstorm-capnp out into imports/ 2020-02-18 23:18:29 -08:00
Drew Fisher faa36d878c Lift sandstorm-db out from packages into imports/
This appeared to have a dependency on a particular version of the
content-type package from npm.  We can sort that out separately.

Additionally, this has a Meteor package dependency on
fongandrew:find-and-modify.  I pinned the version because I vaguely recall this
particular library breaking in the past when we tried to update it and don't
want to deal with that right now either.
2020-02-18 23:13:14 -08:00
Drew Fisher 21bdf201db Lift sandstorm-permissions out of packages into imports/ 2020-02-18 23:00:51 -08:00
Drew Fisher c248391ab0 Lift sandstorm-autoupdate-apps out of packages into imports/ 2020-02-18 22:56:40 -08:00
Drew Fisher 8e09734c1b Lift sandstorm-accounts-packages from package to imports/
This is probably a good candidate for reworking later -- rethinking
how we expose loginServices on client and server seems pretty reasonable
given how little logic the two actually appear to share.
2020-02-18 22:46:53 -08:00
Drew Fisher c10f917963 Lift sandstorm-ui-powerbox Meteor package into imports 2020-02-18 00:48:56 -08:00
Drew Fisher d378649185 Lift blackrock-payments Meteor package into imports
To get the remaining packages into imports, we need to hoist them up in the
reverse order they are loaded.  `blackrock-payments` is a leaf in that
dependency tree; let's lift that one first.

We move Blackrock's Stripe dependency into sandstorm's top-level package.json.
We should be able to swap out Npm.require() for plain old imports.

The two asset files are placed in private/, per the Meteor Guide.
2020-02-18 00:36:00 -08:00
Drew Fisher 85419c9e8e Move shared/ into imports/ 2020-02-18 00:15:51 -08:00
Drew Fisher b80b5ed800 Move all of server/ into imports/server/ 2020-02-18 00:03:57 -08:00
Kenton Varda 745c67fdc1 Don't allow demo upgrades on private servers. 2020-02-01 12:51:22 -06:00
Kenton Varda 596742ed5c Merge pull request #3172 from zenhack/zenhack-cron
Cron API
2020-01-19 15:17:10 -06:00
Ian Denhardt 4bc215265c (mostly) get tests working for scheduling APIs.
The one hitch is that the test for one-shot jobs only works if
the server has been restarted since the last time
advanceTimeMillis() was called. Otherwise, sandstorm rejects the app's
requested date because it is in the past relative to the mocked time,
since the C++ test app isn't using our mock. That still needs fixing.

Maybe we should just be more lenient? Without the check if an app picks
a time slightly in the past, it will just get run as soon as possible,
which seems like reasonable behavior.
2020-01-17 03:31:42 -05:00
Ian Denhardt fba9d91661 Add some hooks for testing the cron api, and some actual tests.
The first test is hanging when trying to install the test app, which
is odd since I haven't touched that part. Need to investigate more, but
I should get off the computer and wind down for bed.
2020-01-15 02:53:35 -05:00
Ian Denhardt abd61706a2 Merge remote-tracking branch 'origin/master' into zenhack-cron 2020-01-15 01:04:55 -05:00
Ian Denhardt d6f986ecbb getOAuthServiceInfo: match urls with no trailing slash.
Per discussion at:

https://github.com/sandstorm-io/sandstorm/pull/3181#issuecomment-574460186

This superseeds #3181
2020-01-14 23:50:13 -05:00
Ian Denhardt 63cbd96641 external-ui-view: Don't restrict GitHub to /users
I don't understand why this was previously restricted to the /users
path on the GitHub api; this ought to match for the entire API.
2020-01-13 14:53:12 -05:00
Ian Denhardt 8832e391fe Fix a bug that was causing periodic jobs to always be canceled.
Truthiness is such a poor language design decision...
2020-01-10 20:37:40 -05:00
Ian Denhardt e1439451e4 Remove unused variables.
These were a holdover from @dwrensha's original pr where we were giving
the app a sturdyref; they're no longer needed.
2019-12-26 11:52:58 -05:00
Ian Denhardt d80a5d0650 Check for scheduled jobs more frequently.
Matching this to the minimum scheduling slack means the delay won't be
incredibly long.
2019-12-26 03:23:28 -05:00
Ian Denhardt 26d21269da Mostly implement schedule = oneShot.
This mostly works, except that sandstorm doesn't actually check for jobs
often enough to meet the slack requirements it advertises.
2019-12-26 03:14:13 -05:00
Ian Denhardt d968a80249 Set kjType = unimplemented on unrecognized schedule types. 2019-12-26 00:00:51 -05:00
Ian Denhardt bc88047ad0 Remove obsolete FIXME/TODO
We decided this was not the correct behavior.
2019-12-17 16:31:07 -05:00
Ian Denhardt 2c0f5bb1f4 Fix a couple more mistakes.
Stuff I failed to update after making api changes.
2019-12-15 01:25:01 -05:00
Ian Denhardt 3d67dc8c88 Fix a few things.
Mismatched names/arguments and such.

I have a test app that is successfully injecting a job into the db. Need
to test actually restoring and running still.
2019-12-15 00:33:58 -05:00
Ian Denhardt dc686be110 Work on getting the JS side of things going.
There are a few TODOs/FIXMEs, but also this needs to be tested.
2019-12-14 22:50:13 -05:00
Ian Denhardt cdae2a294f Get rid of broken require.
This seems to be unnecessary, and was failing, see discussion starting
at:

    https://github.com/sandstorm-io/sandstorm/issues/3171#issuecomment-562907329
2019-12-07 23:37:14 -05:00
Ian Denhardt 327d2f701f Merge remote-tracking branch 'origin/master' into zenhack-cron 2019-12-03 20:36:50 -05:00
Kenton Varda be1e8888eb Fix spk dev resulting in "This grain's app package is not installed".
This error was introduced in the Mass Transfers PR from last weekend. I was trying to improve the UI when a grain's package was not installed, but the new checks I added didn't consider when the app is registered via `spk dev`.
2019-09-08 13:23:37 -07:00
Kenton Varda 079b0bcfc1 Fix bug applying only to Blackrock, ugh. 2019-09-02 13:26:29 -07:00
Kenton Varda 979a99fc11 Implement Mass Transfers.
This makes it easy to mass-transfer grains to another Sandstorm server. A UI lets you choose which grains to transfer, watch the transfer happen, and check and retry any errors.
2019-09-02 12:13:00 -07:00
Kenton Varda baec5fdeee Remember identities through grain backup/restore.
Previously, when a grain was backed up and then restored, if the restored grain was shared with the same users as the original, the app would not know that they were the same users, as they would be assigned new, different identity IDs. After this change, identities will be remembered as long as the new user shares at least one of the original user's login credentials.
2019-08-10 20:18:51 -07:00
Kenton Varda 5b51291cc1 Remember identity IDs for forgotten grains.
Before this change, if someone shared a grain with you, you opened it, then you deleted it from your grain list, and then later on they shared it with you again, you would get a different identity ID the second time, and so would appear to be a different user within the grain.

After this change, you will regain your original identity ID.
2019-08-10 19:54:24 -07:00
Kenton Varda 880c1fea9e Introduce schemas to be able to restore user identities after grain transfer. 2019-08-10 19:06:37 -07:00
Kenton Varda 32008d5c9e Try to fix intrinsicNames issue. 2019-01-19 11:39:38 -08:00
Kenton Varda 33453052f7 Arrange for discontinuation of free plan.
After this change:
- If the free plan allows non-zero grains, then various warnings are shown that the free plan is going away soon.
- If the free plan is set to allow zero grains, then the warnings disappear but the new free plan rules are properly enforced.
2018-09-01 14:25:19 -07:00
Kenton Varda dc5a0d56fd Work around Mongo changing the interface to aggregate().
WTF, you can't just change JavaScript interfaces like this. What are you doing, Mongo?
2018-06-09 16:13:59 -07:00
Kenton Varda 7f3ce58705 Update last-used time of grain on open, not only after a minute.
The Gateway changed the last-used updated logic, and introduced a bug: the last-used time was only updated after the grain had been open for a full minute (and every minute thereafter). This change fixes it to happen on first open as well.

Fixes #3059
2018-04-07 16:40:08 -07:00
Kenton Varda 431d87fcec Update Node. 2018-04-07 16:39:41 -07:00
Kenton Varda 675b822c51 Fix e-mail broken by Meteor update. 2018-03-10 14:31:04 -08:00