mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 19:00:00 +01:00
Compare commits
2 Commits
dependabot
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e07598a0d | ||
|
|
33be09f28e |
25
.github/ISSUE_TEMPLATE/enhancement template.md
vendored
25
.github/ISSUE_TEMPLATE/enhancement template.md
vendored
@@ -1,25 +0,0 @@
|
|||||||
# New Enhancement Request
|
|
||||||
|
|
||||||
Describe your enhancement
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
What does your enhancement do?
|
|
||||||
|
|
||||||
Upload Screenshot of your enhancement
|
|
||||||
|
|
||||||
### Please show us where to look
|
|
||||||
Paste in a full URL, starting with:
|
|
||||||
### Problem it can solve
|
|
||||||
|
|
||||||
what problem could this enhancement solve?
|
|
||||||
|
|
||||||
Your help makes Public Lab better! We *deeply* appreciate your helping refine and improve this site.
|
|
||||||
|
|
||||||
To learn how to write really great issues, which increases the chances they'll be resolved, see:
|
|
||||||
|
|
||||||
https://publiclab.org/wiki/developers#Contributing+for+non-coders
|
|
||||||
### Thank you :)
|
|
||||||
22
.github/ISSUE_TEMPLATE/feature request.md
vendored
22
.github/ISSUE_TEMPLATE/feature request.md
vendored
@@ -1,22 +0,0 @@
|
|||||||
# New Feature Request
|
|
||||||
|
|
||||||
Describe your feature
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
What does your feature do?
|
|
||||||
|
|
||||||
Upload Screenshot of your implementation/feature
|
|
||||||
|
|
||||||
### Please show us where to look
|
|
||||||
Paste in a full URL, starting with:
|
|
||||||
### Problem it can solve
|
|
||||||
Your help makes Public Lab better! We *deeply* appreciate your helping refine and improve this site.
|
|
||||||
|
|
||||||
To learn how to write really great issues, which increases the chances they'll be resolved, see:
|
|
||||||
|
|
||||||
https://publiclab.org/wiki/developers#Contributing+for+non-coders
|
|
||||||
### Thank you :)
|
|
||||||
29
.github/ISSUE_TEMPLATE/release_workflow.md
vendored
29
.github/ISSUE_TEMPLATE/release_workflow.md
vendored
@@ -13,32 +13,19 @@ Discuss with @publiclab/is-maintainers if anything is ambiguous!
|
|||||||
<!-- NOTE: Change v0.0.0 to the appropriate release version -->
|
<!-- NOTE: Change v0.0.0 to the appropriate release version -->
|
||||||
|
|
||||||
* [x] open an issue using the "release" template with this checklist with title `Checklist and coordination for v0.0.0 major/minor/patch release` (see [semantic versioning](https://docs.npmjs.com/about-semantic-versioning/))
|
* [x] open an issue using the "release" template with this checklist with title `Checklist and coordination for v0.0.0 major/minor/patch release` (see [semantic versioning](https://docs.npmjs.com/about-semantic-versioning/))
|
||||||
* [ ] create a release draft in https://github.com/publiclab/image-sequencer/releases
|
* [ ] create a release [project](https://github.com/publiclab/image-sequencer/projects) from [this template](https://github.com/publiclab/image-sequencer/projects/5). You can copy a project from its menu.
|
||||||
* [ ] auto-compile release notes and copy below from corresponding release draft
|
* [ ] compile release notes below from corresponding [release project](https://github.com/publiclab/image-sequencer/projects).
|
||||||
* [ ] open a pull request with updated version numbers
|
* [ ] update version number in `examples/sw.js` (ex #1734) and `package.json` (ex #1695)
|
||||||
* [ ] update version number in `package.json` (ex #1695)
|
|
||||||
* [ ] update version number in `examples/sw.js` (ex #1734)
|
|
||||||
* [ ] run `npm install` to update `package-lock.json` (from recent node version - 16 at time of writing, in GitPod should work)
|
|
||||||
* [ ] check in `package-lock.json`
|
|
||||||
* [ ] finalize and merge to `main` branch (freeze merges to `main` branch until next step)
|
* [ ] finalize and merge to `main` branch (freeze merges to `main` branch until next step)
|
||||||
|
* [ ] merge, build and publish `/dist/` files to `stable` (merges to `main` branch can resume for next release)
|
||||||
Now, move to `stable` branch:
|
* [ ] create a release on GitHub and use features description + release notes from below
|
||||||
|
* [ ] tag version number branch (i.e. `v0.0.0`)
|
||||||
* [ ] force push from `main` to `stable`
|
* [ ] publish tagged branch to `npm`
|
||||||
* [ ] then in `stable` branch, compile `dist/` files with `grunt build`
|
|
||||||
* [ ] add `dist/` files with `git add -f dist/*` and commit them to `stable` branch
|
|
||||||
* [ ] publish `stable` branch to `npm` with `npm publish` (logging in first as necessary)
|
|
||||||
* [ ] push local `stable` branch up to origin github.com/publiclab/image-sequencer.git with `git push`
|
|
||||||
|
|
||||||
Draft a release:
|
|
||||||
|
|
||||||
* [ ] [create a release on GitHub](https://github.com/publiclab/image-sequencer/releases) and reconcile with features description + release notes from below
|
|
||||||
* [ ] tag version number branch (i.e. `v0.0.0`) based on `stable` or choose `stable`
|
|
||||||
* [ ] publish to live Github pages [demo](https://sequencer.publiclab.org) (with [bash script](https://github.com/publiclab/image-sequencer/pull/1703) from `/scripts/update-demo`) (from within GitPod works well)
|
* [ ] publish to live Github pages [demo](https://sequencer.publiclab.org) (with [bash script](https://github.com/publiclab/image-sequencer/pull/1703) from `/scripts/update-demo`) (from within GitPod works well)
|
||||||
* [ ] move anything necessary to next release project, i.e. <!-- Update this link -->https://github.com/publiclab/image-sequencer/projects/[insert project number]
|
* [ ] move anything necessary to next release project, i.e. <!-- Update this link -->https://github.com/publiclab/image-sequencer/projects/[insert project number]
|
||||||
* [ ] close this issue!
|
* [ ] close this issue!
|
||||||
|
|
||||||
Noting we're now in this process in https://github.com/publiclab/image-sequencer/issues/1751 for `v3.7.0`.
|
Noting we're now in this process in https://github.com/publiclab/image-sequencer/pull/1695 for `v3.6.0`.
|
||||||
|
|
||||||
****
|
****
|
||||||
|
|
||||||
|
|||||||
17
.github/PULL_REQUEST_TEMPLATE.md
vendored
17
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,19 +1,16 @@
|
|||||||
<!--- (Replace `0000` with the Issue Number below) --->
|
Fixes #0000 (<=== Replace `0000` with the Issue Number)
|
||||||
Fixes #0000
|
|
||||||
|
|
||||||
|
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
|
||||||
<!---Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!--->
|
|
||||||
|
|
||||||
* [ ] tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with `npm run test-all`
|
* [ ] tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with `npm run test-all`
|
||||||
* [ ] code is in uniquely-named feature branch and has no merge conflicts
|
* [ ] code is in uniquely-named feature branch and has no merge conflicts
|
||||||
* [ ] PR is descriptively titled
|
* [ ] PR is descriptively titled
|
||||||
* [ ] ask `@publiclab/is-reviewers` for help, in a comment below
|
* [ ] ask `@publiclab/is-reviewers` for help, in a comment below
|
||||||
* [ ] at least 2 reviews required for getting pull request merged
|
|
||||||
* [ ] Insert-step functionality is working correct as expected.
|
* [ ] Insert-step functionality is working correct as expected.
|
||||||
<!--- We're happy to help you get this ready -- don't be afraid to ask for help, and **don't be discouraged** if your tests fail at first!--->
|
> We're happy to help you get this ready -- don't be afraid to ask for help, and **don't be discouraged** if your tests fail at first!
|
||||||
|
|
||||||
<!---If tests do fail, click on the red `X` to learn why by reading the logs.--->
|
If tests do fail, click on the red `X` to learn why by reading the logs.
|
||||||
|
|
||||||
<!---Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software--->
|
Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
|
||||||
<!---Please make sure to get at least two reviews before asking for merging the PR as that would make the PR more reliable on our part
|
Please make sure to get at least two reviews before asking for merging the PR as that would make the PR more reliable on our part
|
||||||
Thanks!--->
|
Thanks!
|
||||||
|
|||||||
21
.github/workflows/rebase.yml
vendored
21
.github/workflows/rebase.yml
vendored
@@ -1,21 +0,0 @@
|
|||||||
name: Automatic Rebase
|
|
||||||
# https://github.com/marketplace/actions/automatic-rebase
|
|
||||||
|
|
||||||
on:
|
|
||||||
issue_comment:
|
|
||||||
types: [created]
|
|
||||||
jobs:
|
|
||||||
rebase:
|
|
||||||
name: Rebase
|
|
||||||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout the latest code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
|
|
||||||
- name: Automatic Rebase
|
|
||||||
uses: cirrus-actions/rebase@1.4
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
16
.github/workflows/tests.yml
vendored
16
.github/workflows/tests.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '12'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '12'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '12'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@@ -83,7 +83,7 @@ jobs:
|
|||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '12'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@@ -109,7 +109,7 @@ jobs:
|
|||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '12'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@@ -134,7 +134,7 @@ jobs:
|
|||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '12'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@@ -159,7 +159,7 @@ jobs:
|
|||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '12'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@@ -184,7 +184,7 @@ jobs:
|
|||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '12'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
|
|||||||
@@ -30,24 +30,19 @@ RUN sudo apt-get update && apt-get install -y apt-transport-https \
|
|||||||
libatk1.0-0 \
|
libatk1.0-0 \
|
||||||
libc6 \
|
libc6 \
|
||||||
libcairo2 \
|
libcairo2 \
|
||||||
libcairo2-dev \
|
|
||||||
libcups2 \
|
libcups2 \
|
||||||
libdbus-1-3 \
|
libdbus-1-3 \
|
||||||
libexpat1 \
|
libexpat1 \
|
||||||
libfontconfig1 \
|
libfontconfig1 \
|
||||||
libgbm1 \
|
libgbm1 \
|
||||||
libgcc1 \
|
libgcc1 \
|
||||||
libgif-dev \
|
|
||||||
libglib2.0-0 \
|
libglib2.0-0 \
|
||||||
libgtk-3-0 \
|
libgtk-3-0 \
|
||||||
libjpeg-dev \
|
|
||||||
libnspr4 \
|
libnspr4 \
|
||||||
libnss3 \
|
libnss3 \
|
||||||
libpango-1.0-0 \
|
libpango-1.0-0 \
|
||||||
libpango1.0-dev \
|
|
||||||
libpangocairo-1.0-0 \
|
libpangocairo-1.0-0 \
|
||||||
libstdc++6 \
|
libstdc++6 \
|
||||||
librsvg2-dev \
|
|
||||||
libx11-6 \
|
libx11-6 \
|
||||||
libx11-xcb1 \
|
libx11-xcb1 \
|
||||||
libxcb1 \
|
libxcb1 \
|
||||||
|
|||||||
@@ -118,9 +118,9 @@ function ModuleName(options,UI) {
|
|||||||
];
|
];
|
||||||
```
|
```
|
||||||
### Running a browser-only module in node
|
### Running a browser-only module in node
|
||||||
If your module has browser specific code or you are consuming a dependency which does the `gl-context` API. We designed this api especially for web-based modules but since it runs the module in a headless browser, it supports all browser specific APIs.
|
If your module has browser specific code or you are consuming a dependency which does the `gl-context` api. We designed this api especially for webl based modules but since it runs the module in a headless browser, ti supports all browser specific APIs.
|
||||||
|
|
||||||
The API must be used in the following format
|
The api must be used in the following format
|
||||||
```js
|
```js
|
||||||
var step = this;
|
var step = this;
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ There are four events in all:
|
|||||||
* `UI.onComplete(options.step)` must be emitted whenever the output of a draw call
|
* `UI.onComplete(options.step)` must be emitted whenever the output of a draw call
|
||||||
is ready. An argument, that is the DataURL of the output image must be passed in.
|
is ready. An argument, that is the DataURL of the output image must be passed in.
|
||||||
* `UI.onRemove(options.step)` is emitted automatically and the module should not emit it.
|
* `UI.onRemove(options.step)` is emitted automatically and the module should not emit it.
|
||||||
* `UI.notify(msg,id)` must be emitted when a notification has to be produced.
|
* `UI.notify(msg,id)` must be emmited when a notification has to be produced.
|
||||||
|
|
||||||
### Name and description
|
### Name and description
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ Also, A module may have output values. These must be defined as shown above.
|
|||||||
|
|
||||||
### Progress reporting
|
### Progress reporting
|
||||||
|
|
||||||
The default "loading spinner" can be optionally overridden with a custom progress object to draw progress on the CLI, following is a basic module format for the same:
|
The default "loading spinner" can be optionally overriden with a custom progress object to draw progress on the CLI, following is a basic module format for the same:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
module.exports = function ModuleName(options,UI) {
|
module.exports = function ModuleName(options,UI) {
|
||||||
@@ -279,7 +279,7 @@ module.exports = function ModuleName(options,UI) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The `progressObj` parameter of `draw()` is not consumed unless a custom progress bar needs to be drawn, for which this default spinner should be stopped with `progressObj.stop()` and image-sequencer is informed about the custom progress bar with `progressObj.overrideFlag = true;` following which this object can be overridden with custom progress object.
|
The `progressObj` parameter of `draw()` is not consumed unless a custom progress bar needs to be drawn, for which this default spinner should be stopped with `progressObj.stop()` and image-sequencer is informed about the custom progress bar with `progressObj.overrideFlag = true;` following which this object can be overriden with custom progress object.
|
||||||
|
|
||||||
|
|
||||||
### Module example
|
### Module example
|
||||||
@@ -292,7 +292,7 @@ For help integrating, please open an issue.
|
|||||||
|
|
||||||
## Meta Module
|
## Meta Module
|
||||||
|
|
||||||
IMAGE SEQUENCER supports "meta modules" -- modules made of other modules. The syntax and structure of these meta modules is very similar to standard modules. Sequencer can also generate meta modules dynamically with the function `createMetaModule` which can be called in the following ways
|
IMAGE SEQUENCER supports "meta modules" -- modules made of other modules. The syntax and structure of these meta modules is very similar to standard modules. Sequencer can also genarate meta modules dynamically with the function `createMetaModule` which can be called in the following ways
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
||||||
@@ -387,7 +387,7 @@ npx eslint <file path> --fix
|
|||||||
```
|
```
|
||||||
Be sure to not include the angular brackets(<>).
|
Be sure to not include the angular brackets(<>).
|
||||||
|
|
||||||
Husky ensures automation of the above steps with git-hooks(eg. git add, git commit..). However we don't want to check and fix changes of the entire codebase with each commit and that the fixes made by eslint appear unstaged and require us to commit them again and that is where lint-staged helps.
|
Husky ensures automation of the above steps with git-hooks(eg. git add,git commit..). However we don't want to check and fix changes of the entire codebase with each commit and that the fixes made by eslint appear unstaged and require us to commit them again and that is where lint-staged helps.
|
||||||
|
|
||||||
If we want `husky` to not verify the commit and push it anyway, use `git commit -m "message" --no-verify.`
|
If we want `husky` to not verify the commit and push it anyway, use `git commit -m "message" --no-verify.`
|
||||||
|
|
||||||
@@ -479,13 +479,3 @@ The following shell scripts are present in the `scripts/` directory.
|
|||||||
This script is safe to use directly because it separately clones the repo in a temporary directory.
|
This script is safe to use directly because it separately clones the repo in a temporary directory.
|
||||||
|
|
||||||
Arguments: None since it is a an *interactive* script, ie it asks the user for input.
|
Arguments: None since it is a an *interactive* script, ie it asks the user for input.
|
||||||
|
|
||||||
****
|
|
||||||
|
|
||||||
# Comments
|
|
||||||
|
|
||||||
1. Methods must be described using [JSDoc comments](https://devdocs.io/jsdoc/)
|
|
||||||
2. Misc code comments should be inline unless it is a long sentence.
|
|
||||||
3. No use of continuous tenses, no pronouns.
|
|
||||||
4. No redundant comments.
|
|
||||||
5. Each comment should start with an uppercase letter and end with a full stop.
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ function DefaultHtmlSequencerUi(_sequencer, options) {
|
|||||||
// look up needed steps from Url Hash:
|
// look up needed steps from Url Hash:
|
||||||
function importStepsFromUrlHash() {
|
function importStepsFromUrlHash() {
|
||||||
var hash = urlHash.getUrlHashParameter('steps');
|
var hash = urlHash.getUrlHashParameter('steps');
|
||||||
|
|
||||||
if (hash) {
|
if (hash) {
|
||||||
_sequencer.importString(hash);
|
_sequencer.importString(hash);
|
||||||
_sequencer.run({ index: 0 });
|
_sequencer.run({ index: 0 });
|
||||||
@@ -26,7 +27,8 @@ function DefaultHtmlSequencerUi(_sequencer, options) {
|
|||||||
|
|
||||||
function selectNewStepUi() {
|
function selectNewStepUi() {
|
||||||
var m = $(addStepSel + ' select').val();
|
var m = $(addStepSel + ' select').val();
|
||||||
if(m) $(addStepSel + ' .info').html(_sequencer.modulesInfo(m).description);
|
if(!m) m = arguments[0];
|
||||||
|
else $(addStepSel + ' .info').html(_sequencer.modulesInfo(m).description);
|
||||||
$(addStepSel + ' #add-step-btn').prop('disabled', false);
|
$(addStepSel + ' #add-step-btn').prop('disabled', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -407,7 +407,7 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
|||||||
*/
|
*/
|
||||||
function updateDimensions(step){
|
function updateDimensions(step){
|
||||||
_sequencer.getImageDimensions(step.imgElement.src, function (dim) {
|
_sequencer.getImageDimensions(step.imgElement.src, function (dim) {
|
||||||
step.ui.querySelector('.' + step.name).attributes['data-original-title'].value = `<div style="text-align: center"><p>Image Width: ${dim.width} px<br>Image Height: ${dim.height} px</br>${isGIF(step.output) ? `Frames: ${dim.frames}` : ''}</div>`;
|
step.ui.querySelector('.' + step.name).attributes['data-original-title'].value = `<div style="text-align: center"><p>Image Width: ${dim.width}<br>Image Height: ${dim.height}</br>${isGIF(step.output) ? `Frames: ${dim.frames}` : ''}</div>`;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const staticCacheName = 'image-sequencer-static-v3.7.2';
|
const staticCacheName = 'image-sequencer-static-v3.6.0';
|
||||||
self.addEventListener('install', function(e) {
|
self.addEventListener('install', function(e) {
|
||||||
e.waitUntil(
|
e.waitUntil(
|
||||||
caches.open(staticCacheName).then(function(cache) {
|
caches.open(staticCacheName).then(function(cache) {
|
||||||
@@ -38,7 +38,7 @@ self.addEventListener('fetch', function(event) {
|
|||||||
cache.put(event.request.url, response.clone());
|
cache.put(event.request.url, response.clone());
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
.catch(function(err) {
|
.catch(function(err) {
|
||||||
// Now the request has been failed so show cached data.
|
// Now the request has been failed so show cached data.
|
||||||
@@ -49,8 +49,8 @@ self.addEventListener('fetch', function(event) {
|
|||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
);
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
// When the update modal sends a 'skipWaiting' message, call the skipWaiting method.
|
// When the update modal sends a 'skipWaiting' message, call the skipWaiting method.
|
||||||
|
|||||||
36219
package-lock.json
generated
36219
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
38
package.json
38
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "image-sequencer",
|
"name": "image-sequencer",
|
||||||
"version": "3.7.2",
|
"version": "3.6.0",
|
||||||
"description": "A modular JavaScript image manipulation library modeled on a storyboard.",
|
"description": "A modular JavaScript image manipulation library modeled on a storyboard.",
|
||||||
"main": "src/ImageSequencer.js",
|
"main": "src/ImageSequencer.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -41,29 +41,30 @@
|
|||||||
"bootstrap": "^3.4.1",
|
"bootstrap": "^3.4.1",
|
||||||
"bootstrap-colorpicker": "^2.5.3",
|
"bootstrap-colorpicker": "^2.5.3",
|
||||||
"buffer": "~6.0.2",
|
"buffer": "~6.0.2",
|
||||||
"commander": "^9.0.0",
|
"commander": "^7.0.0",
|
||||||
"compressorjs": "^1.0.5",
|
"compressorjs": "^1.0.5",
|
||||||
"data-uri-to-buffer": "^4.0.1",
|
"data-uri-to-buffer": "^3.0.0",
|
||||||
"downloadjs": "^1.4.7",
|
"downloadjs": "^1.4.7",
|
||||||
"eslint": "^8.0.0",
|
"eslint": "^6.1.0",
|
||||||
"expr-eval": "^2.0.2",
|
"expr-eval": "^2.0.2",
|
||||||
"fisheyegl": "^0.1.2",
|
"fisheyegl": "^0.1.2",
|
||||||
"font-awesome": "~4.7.0",
|
"font-awesome": "~4.7.0",
|
||||||
|
"geotiff": "^1.0.0-beta.6",
|
||||||
"get-pixels": "~3.3.0",
|
"get-pixels": "~3.3.0",
|
||||||
"gifshot": "^0.4.5",
|
"gifshot": "^0.4.5",
|
||||||
"glfx": "0.0.4",
|
"glfx": "0.0.4",
|
||||||
"gpu.js": "^2.3.1",
|
"gpu.js": "^2.3.1",
|
||||||
"imgareaselect": "git+https://git@github.com/jywarren/imgareaselect.git#v1.0.0-rc.2",
|
|
||||||
"image-sequencer-invert": "^1.0.0",
|
"image-sequencer-invert": "^1.0.0",
|
||||||
"imagejs": "git+https://git@github.com/glennjones/imagejs.git#1119a31e6eabc87563bc573cd62c11bd487ce8a9",
|
"imagejs": "0.0.9",
|
||||||
"imagemin": "^7.0.1",
|
"imagemin": "^7.0.1",
|
||||||
"imagemin-jpegtran": "^7.0.0",
|
"imagemin-jpegtran": "^7.0.0",
|
||||||
"imagemin-pngquant": "^9.0.1",
|
"imagemin-pngquant": "^9.0.1",
|
||||||
|
"imgareaselect": "git://github.com/jywarren/imgareaselect.git#v1.0.0-rc.2",
|
||||||
"istanbul": "^0.4.5",
|
"istanbul": "^0.4.5",
|
||||||
"jasmine": "^4.0.2",
|
"jasmine": "^3.4.0",
|
||||||
"jpegtran-bin": "^7.0.0",
|
"jpegtran-bin": "^5.0.2",
|
||||||
"jquery": "^3.3.1",
|
"jquery": "^3.3.1",
|
||||||
"jsdom": "^20.0.0",
|
"jsdom": "^16.3.0",
|
||||||
"jspdf": "^2.1.1",
|
"jspdf": "^2.1.1",
|
||||||
"jsqr": "^1.1.1",
|
"jsqr": "^1.1.1",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
@@ -87,30 +88,29 @@
|
|||||||
"@babel/plugin-syntax-object-rest-spread": "^7.2.0",
|
"@babel/plugin-syntax-object-rest-spread": "^7.2.0",
|
||||||
"babelify": "^10.0.0",
|
"babelify": "^10.0.0",
|
||||||
"browserify": "17.0.0",
|
"browserify": "17.0.0",
|
||||||
"canvas": "^2.8.0",
|
"eslint": "^6.1.0",
|
||||||
"eslint": "^8.0.0",
|
|
||||||
"grunt": "^1.0.3",
|
"grunt": "^1.0.3",
|
||||||
"grunt-browser-sync": "^2.2.0",
|
"grunt-browser-sync": "^2.2.0",
|
||||||
"grunt-browserify": "^5.0.0",
|
"grunt-browserify": "^5.0.0",
|
||||||
"grunt-contrib-concat": "^2.0.0",
|
"grunt-contrib-concat": "^1.0.1",
|
||||||
"grunt-contrib-uglify-es": "^3.3.0",
|
"grunt-contrib-uglify-es": "^3.3.0",
|
||||||
"grunt-contrib-watch": "^1.1.0",
|
"grunt-contrib-watch": "^1.1.0",
|
||||||
"grunt-text-replace": "^0.4.0",
|
"grunt-text-replace": "^0.4.0",
|
||||||
"husky": "^8.0.1",
|
"husky": "^3.0.5",
|
||||||
"image-filter-core": "~2.0.2",
|
"image-filter-core": "~2.0.2",
|
||||||
"image-filter-threshold": "~2.0.1",
|
"image-filter-threshold": "~2.0.1",
|
||||||
"jasmine-core": "^4.0.0",
|
"jasmine-core": "^3.3.0",
|
||||||
"jasmine-jquery": "^2.1.1",
|
"jasmine-jquery": "^2.1.1",
|
||||||
"jasmine-spec-reporter": "^7.0.0",
|
"jasmine-spec-reporter": "^7.0.0",
|
||||||
"jest": "^29.0.0",
|
"jest": "^26.1.0",
|
||||||
"jest-puppeteer": "^6.0.0",
|
"jest-puppeteer": "^5.0.3",
|
||||||
"lint-staged": "^13.0.0",
|
"lint-staged": "^11.0.0",
|
||||||
"looks-same": "^7.0.0",
|
"looks-same": "^7.0.0",
|
||||||
"matchdep": "^2.0.0",
|
"matchdep": "^2.0.0",
|
||||||
"resemblejs": "^4.0.1",
|
"resemblejs": "^3.2.5",
|
||||||
"tap-spec": "^5.0.0",
|
"tap-spec": "^5.0.0",
|
||||||
"tape": "^5.2.0",
|
"tape": "^5.2.0",
|
||||||
"tape-run": "^10.0.0",
|
"tape-run": "^9.0.0",
|
||||||
"uglify-es": "^3.3.7"
|
"uglify-es": "^3.3.7"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
|
|||||||
@@ -10,15 +10,9 @@ module.exports = function BlobAnalysis(options, UI){
|
|||||||
|
|
||||||
var step = this;
|
var step = this;
|
||||||
|
|
||||||
function extraManipulation(pixels, setRenderState, generateOutput){
|
function extraManipulation(pixels){
|
||||||
setRenderState(false);
|
|
||||||
if (!options.inBrowser) {
|
pixels = require('./BlobAnalysis')(pixels);
|
||||||
require('../_nomodule/gl-context')(input, callback, step, options);
|
|
||||||
} else{
|
|
||||||
pixels = require('./BlobAnalysis')(pixels);
|
|
||||||
setRenderState(true);
|
|
||||||
generateOutput();
|
|
||||||
}
|
|
||||||
return pixels;
|
return pixels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,22 +15,20 @@ module.exports = function runInBrowserContext(input, callback, step, options) {
|
|||||||
is not available otherwise */
|
is not available otherwise */
|
||||||
page.goto('https://google.com').then(() => {
|
page.goto('https://google.com').then(() => {
|
||||||
page.addScriptTag({ path: require('path').join(__dirname, '../../../dist/image-sequencer.js') }).then(() => {
|
page.addScriptTag({ path: require('path').join(__dirname, '../../../dist/image-sequencer.js') }).then(() => {
|
||||||
page.addScriptTag({path: require('path').join(__dirname, '../../../node_modules/opencv.js/opencv.js')}).then(() => {
|
page.evaluate((options) => {
|
||||||
page.evaluate((options) => {
|
return new Promise((resolve, reject) => {
|
||||||
return new Promise((resolve, reject) => {
|
var sequencer = ImageSequencer();
|
||||||
var sequencer = ImageSequencer();
|
sequencer.loadImage(options.input.src);
|
||||||
sequencer.loadImage(options.input.src);
|
sequencer.addSteps(options.modOptions.step, options.modOptions);
|
||||||
sequencer.addSteps(options.modOptions.step, options.modOptions);
|
sequencer.run(function cb(out) {
|
||||||
sequencer.run(function cb(out) {
|
resolve(sequencer.steps[1].output.src);
|
||||||
resolve(sequencer.steps[1].output.src);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}, obj).then(el => {
|
|
||||||
browser.close().then(() => {
|
|
||||||
step.output = { src: el, format: input.format };
|
|
||||||
callback();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}, obj).then(el => {
|
||||||
|
browser.close().then(() => {
|
||||||
|
step.output = { src: el, format: input.format };
|
||||||
|
callback();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user