Skip to content

Commit

Permalink
Merge v6.1.0 (#125)
Browse files Browse the repository at this point in the history
* Fixed image fetching in search

* Better update system

* Removed fresh partials
Since Fresh partials are doing funny stuff to the theme color changing, they have been removed. Will have to revisit a new way of thinking how theme colors should be changed so that it doesn't interfere with fresh partials.

* Version bump

* YOLO

* Updated home

* More fixes

* Updated database

* Added navbar text

* Added update apps github workflow
Updated authorLink to authorUrl
Update apps in preview mode only executes when CHECK_APPS is set

* Fixed workflow

* Add workflow_dispatch event to update workflow

* Hook up update script to workflow

* Updated life counter

* Updated workflow file

* Update backgammon

* Updated apps

* Updated workflow

* Added author link

* Updated Permissions

* Removed author link

* Added update script

* Removed author url

* Updated check updates

* Removed author url

* Updated check updates

* Updated life counter

* Updated check updates again

* Fixed typo

* Updated docs and more

* Updated branch

* Version bump

* Removed RecNet

* Test app deletion

* Another Test app deletion and creation

* Updated script to actually delete remove apps

* Updated check update script

* Check update script

* Updated script to check for updates in all files

* Test updates

* Deleted an app

* Testing app creation

* Testing app update

* App update

* Updated preview to update less often
  • Loading branch information
notangelmario committed Mar 29, 2024
1 parent e805982 commit 347253f
Show file tree
Hide file tree
Showing 34 changed files with 180 additions and 454 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/update-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Update Apps in Preview

on:
schedule:
- cron: '0 0 1 * *'
push:
paths:
- 'apps/**'
branches:
- preview
workflow_dispatch:

jobs:
update_apps:
runs-on: ubuntu-latest
environment: Preview
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Get changed files
id: get_changed_files
run: echo "files=$(git diff --name-only HEAD^ | awk -F '/' '{print $NF}' | sed 's/\.json$//' | tr '\n' ' ')" >> $GITHUB_OUTPUT
if: ${{ github.event_name == 'push' }}

- name: Update Apps
run: deno task update:apps ${{ steps.get_changed_files.outputs.files }}
env:
DENO_KV_ACCESS_TOKEN: ${{ secrets.DENO_KV_ACCESS_TOKEN }}
DENO_KV_PATH: ${{ secrets.DENO_KV_PATH }}
37 changes: 37 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Update Apps

on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- 'apps/**'
branches:
- main
workflow_dispatch:

jobs:
update_apps:
runs-on: ubuntu-latest
environment: Production
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Get changed files
id: get_changed_files
run: echo "files=$(git diff --name-only HEAD^ | awk -F '/' '{print $NF}' | sed 's/\.json$//' | tr '\n' ' ')" >> $GITHUB_OUTPUT
if: ${{ github.event_name == 'push' }}

- name: Update Apps
run: deno task update:apps ${{ steps.get_changed_files.outputs.files }}
env:
DENO_KV_ACCESS_TOKEN: ${{ secrets.DENO_KV_ACCESS_TOKEN }}
DENO_KV_PATH: ${{ secrets.DENO_KV_PATH }}
2 changes: 1 addition & 1 deletion apps/chrome.apps.canvas.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"entertainment"
],
"author": "Google",
"authorLink": "https://about.google",
"authorUrl": "https://about.google",
"accentColor": "#ec4434",
"version": 2
}
2 changes: 1 addition & 1 deletion apps/com.bundlejs.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"development"
],
"author": "@okikio",
"authorLink": "https://okikio.dev/",
"authorUrl": "https://okikio.dev/",
"accentColor": "#3c84f4",
"version": 2
}
2 changes: 1 addition & 1 deletion apps/com.spotify.open.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"music"
],
"author": "Spotify",
"authorLink": "https://spotify.com",
"authorUrl": "https://spotify.com",
"accentColor": "#1cd363",
"version": 2
}
2 changes: 1 addition & 1 deletion apps/dev.jull.sudoku.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"games"
],
"author": "jull.dev",
"authorLink": "https://jull.dev",
"authorUrl": "https://jull.dev",
"accentColor": "#7f7f7f",
"version": 2
}
2 changes: 1 addition & 1 deletion apps/dev.vscode.insiders.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"development"
],
"author": "Microsoft",
"authorLink": "https://microsoft.com/",
"authorUrl": "https://microsoft.com/",
"accentColor": "#0eb49c",
"version": 2
}
2 changes: 1 addition & 1 deletion apps/dev.vscode.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"development"
],
"author": "Microsoft",
"authorLink": "https://microsoft.com/",
"authorUrl": "https://microsoft.com/",
"accentColor": "#24adf4",
"version": 2
}
1 change: 1 addition & 0 deletions apps/io.github.nenadalm.backgammon.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"id": "io.github.nenadalm.backgammon",
"url": "https://nenadalm.github.io/backgammon/",
"author": "Miloslav Nenadál",
"manifestUrl": "https://nenadalm.github.io/backgammon/manifest.json",
"features": [
"openSource",
Expand Down
1 change: 1 addition & 0 deletions apps/io.github.nenadalm.life-counter.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"id": "io.github.nenadalm.life-counter",
"url": "https://nenadalm.github.io/life-counter/",
"author": "Miloslav Nenadál",
"manifestUrl": "https://nenadalm.github.io/life-counter/manifest.json",
"features": [
"openSource",
Expand Down
1 change: 1 addition & 0 deletions apps/io.github.nenadalm.player-order-selector.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"id": "io.github.nenadalm.player-order-selector",
"url": "https://nenadalm.github.io/player-order-selector/",
"author": "Miloslav Nenadál",
"manifestUrl": "https://nenadalm.github.io/player-order-selector/manifest.json",
"features": [
"openSource",
Expand Down
17 changes: 0 additions & 17 deletions apps/net.rec.json

This file was deleted.

2 changes: 1 addition & 1 deletion apps/org.eu.ciorogarla.431.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"url": "https://431.ciorogarla.eu.org",
"manifestUrl": "https://431.ciorogarla.eu.org/static/site.webmanifest",
"author": "Roseto",
"authorLink": "https://roseto.co",
"authorUrl": "https://roseto.co",
"categories": ["tools"],
"features": ["openSource", "mobile", "desktop"],
"version": 5
Expand Down
2 changes: 1 addition & 1 deletion apps/org.eu.ciorogarla.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"social"
],
"author": "Roseto",
"authorLink": "https://roseto.co",
"authorUrl": "https://roseto.co",
"certificateUrl": "https://ciorogarla.eu.org/.well-known/certificate.json",
"accentColor": "#36c836",
"version": 5
Expand Down
1 change: 1 addition & 0 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dev": "deno run --unstable-kv -A --watch=src/static/,src/routes/ src/dev.ts",
"cache": "deno cache --reload src/main.ts",
"check": "deno lint && deno fmt && deno check src/main.ts",
"update:apps": "deno run --unstable-kv --allow-net --allow-read --allow-env scripts/update.ts",
"build": "deno run --unstable-kv --unstable-cron -A src/dev.ts build",
"preview": "deno run --unstable-kv --unstable-cron -A src/main.ts"
},
Expand Down
22 changes: 11 additions & 11 deletions docs/app-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ This is a sample specification:

## Keys

### `id`
### `id` (required)

This is required. This must be the domain of your app reversed.
If your app is hosted at a subdomain, append the pathname at the end.

Example 1: `https://paquet.app -> app.paquet` \
Example 2: `https://roseto.github.io/paquet -> io.github.roseto.paquet`

### `url`
### `url` (required)

This is the URL to your app. This can point to your app's landing page or the app itself.

### `manifestUrl`
### `manifestUrl` (optional)

This is the url pointing to your app's manifest. If your app generates
different manifest files with a different pathname on every deployment,
Expand All @@ -36,7 +36,7 @@ file in your app.

It is typically recommended to include this in your app specification.

### `features`
### `features` (required)

This represents the features that your app offers.
The available features are:
Expand All @@ -48,7 +48,7 @@ The available features are:
- `offline`: Works offline


### `version`
### `version` (deprecated)

This is used to keep track of the changes to your app specification
You can use your app's version as a string (`"version": "1.0.0"`) or
Expand All @@ -57,22 +57,22 @@ use a number and increment it on each app specification update (`"version": 1`)

## Additional keys

### `githubUrl` & `gitlabUrl`
### `githubUrl` & `gitlabUrl` (optional)

This URL points to the public repository of your app.

### `categories`
### `categories` (optional)

This will include the categories that your app is included in.
It is preferable to use the `categories` key in your app's manifest.

### `author` & `authorLink`
### `author` (required) & `authorUrl` (optional)

If you want to have a different author text from the one in your app's manifest,
you can add an `author` key. You can also add `authorLink` to link to your
website or GitHub profile.
you can add an `author` key. You can also add `authorUrl` to link to your
website or GitHub profile. (`authorUrl` has been previously known as `authorLink`)

### `accentColor`
### `accentColor` (optional)

This is if you want a separate theme color from the one in your app's manifest.

Expand Down
23 changes: 12 additions & 11 deletions docs/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,24 @@ Here is a `manifest.json` example:
The values Paquet uses in your app listing are:

- `name`
- `short_name`
- `author`
- `description`
- `categories`
- `icons`
- `screenshots`
- `theme_color`

### `name`
### `name` (required)

This is the name that is going to be used when showing your app.

### `author`
### `short_name` (optional)

This is the short name that is going to be used when showing your app.
This is used as the name of the app in the app listing if `name` is not present.

### `author` (required)

This is the name of the author. It is prefered to use the same
names across multiple apps published to Paquet to share
Expand All @@ -68,14 +74,14 @@ verification status
> This property is not used often, so when not present,
> Paquet will look for an `author` meta tag in the web page.
### `description`
### `description` (optional)

This is the description that will be shown on your app listing.

> Most apps do not have a `description` property, so Paquet
> will look for one in the web page if not present.
### `categories`
### `categories` (required)

This is usually an array of categories.
Paquet fetches this manifest property and reflects it to your app.
Expand All @@ -85,24 +91,19 @@ Paquet also uses aliases so apps are better categorised.

[Here is a list of available categories.](https://paquet.app/category)

### `icons`
### `icons` (required)

Paquet will fetch the first maskable icon that is 96x96 pixels.

If this icon is not found, Paquet will search for 128x128, 192x192, 256x256, 512x512.
The first found will be set as icon.

### `screenshots`

We fetch for all screenshots no matter the size. We recomend
you to add screenshots for all suported devices. Screenshots
will also improve your visibility on Paquet.

> Since 3.2.0, Paquet does not store the app's screenshots anymore.
> Please make sure your screenshots do not have a cross origin restriction.
>
> `icons` no longer have this issue since 5.0.1, but this change will also
> come to `screenshots`
### `theme_color`

We use the this variable to display the accent in the page listing.
Expand Down
13 changes: 5 additions & 8 deletions docs/updating.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# How updates work

Paquet fetches your app's details every 12 hours at 00:00 UTC.
This is called a **update cycle**. To save on resources,
we check for changes to your app's specification and app's manifest.
This is called an **update cycle**.

## When does it update?
During an update cycle, Paquet will fetch your app's manifest file and compare it with the existing data.
If there are any changes, Paquet will update your app's details in the database.

Your app listing will update whenever the manifest's content changes
or when the **version number** has been increased in the [app specification](/docs/app-spec.md).
Other changes from the app specification will not trigger the update cycle to update your app.

> In the future we will also check if the filename has changed
Apps are forcefully updated whenever there are changes to the app specification.
This means that if you update your app's specification, Paquet will update your app's details in the database immediately.

0 comments on commit 347253f

Please sign in to comment.