@u1f992/pdfdiff 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/gh-pages.yml +60 -0
- package/.github/workflows/publish.yml +34 -0
- package/.vscode/extensions.json +3 -0
- package/.vscode/settings.json +20 -0
- package/LICENSE +674 -0
- package/README.md +24 -45
- package/dist/browser.d.ts +2 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +3621 -0
- package/dist/browser.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +39804 -0
- package/dist/cli.js.map +1 -0
- package/dist/diff.d.ts +15 -0
- package/dist/diff.d.ts.map +1 -0
- package/dist/image.d.ts +13 -0
- package/dist/image.d.ts.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.html +67 -0
- package/dist/index.js +3493 -0
- package/dist/index.js.map +1 -0
- package/dist/iterable.d.ts +2 -0
- package/dist/iterable.d.ts.map +1 -0
- package/dist/iterable.test.d.ts +2 -0
- package/dist/iterable.test.d.ts.map +1 -0
- package/dist/jimp.d.ts +6 -0
- package/dist/jimp.d.ts.map +1 -0
- package/dist/mupdf-wasm.wasm +0 -0
- package/dist/pdf.d.ts +377 -0
- package/dist/pdf.d.ts.map +1 -0
- package/dist/rgba-color.d.ts +4 -0
- package/dist/rgba-color.d.ts.map +1 -0
- package/dist/rgba-color.test.d.ts +2 -0
- package/dist/rgba-color.test.d.ts.map +1 -0
- package/dist/style.css +19 -0
- package/dist/worker.d.ts +2 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +380 -0
- package/dist/worker.js.map +1 -0
- package/package.json +44 -7
- package/prettier.config.js +3 -0
- package/prototyping/README.md +1 -0
- package/prototyping/flat-map-concurrency.js +218 -0
- package/prototyping/worker.js +10 -0
- package/rollup.config.js +121 -0
- package/src/browser.ts +184 -0
- package/src/cli.ts +175 -0
- package/src/diff.ts +70 -0
- package/src/image.ts +128 -0
- package/src/index.html +67 -0
- package/src/index.ts +186 -0
- package/src/iterable.test.ts +40 -0
- package/src/iterable.ts +24 -0
- package/src/jimp.ts +14 -0
- package/src/pdf.ts +42 -0
- package/src/rgba-color.test.ts +43 -0
- package/src/rgba-color.ts +63 -0
- package/src/style.css +19 -0
- package/src/worker.ts +62 -0
- package/test/a.pdf +0 -0
- package/test/b.pdf +0 -0
- package/test/base.xcf +0 -0
- package/test/expected.png +0 -0
- package/test/mask.pdf +0 -0
- package/tsconfig.json +50 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: GitHub Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Runs on pushes targeting the default branch
|
|
5
|
+
push:
|
|
6
|
+
branches: ["main"]
|
|
7
|
+
|
|
8
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
pages: write
|
|
15
|
+
id-token: write
|
|
16
|
+
|
|
17
|
+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
|
18
|
+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
|
19
|
+
concurrency:
|
|
20
|
+
group: "pages"
|
|
21
|
+
cancel-in-progress: false
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
# Build job
|
|
25
|
+
build:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout
|
|
29
|
+
uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- name: Setup Node.js
|
|
32
|
+
uses: actions/setup-node@v4
|
|
33
|
+
with:
|
|
34
|
+
node-version: '22'
|
|
35
|
+
cache: 'npm'
|
|
36
|
+
|
|
37
|
+
- name: Install dependencies and build
|
|
38
|
+
run: |
|
|
39
|
+
npm ci
|
|
40
|
+
npm run build
|
|
41
|
+
|
|
42
|
+
- name: Setup Pages
|
|
43
|
+
uses: actions/configure-pages@v5
|
|
44
|
+
|
|
45
|
+
- name: Upload artifact
|
|
46
|
+
uses: actions/upload-pages-artifact@v3
|
|
47
|
+
with:
|
|
48
|
+
path: './dist'
|
|
49
|
+
|
|
50
|
+
# Deployment job
|
|
51
|
+
deploy:
|
|
52
|
+
environment:
|
|
53
|
+
name: github-pages
|
|
54
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
needs: build
|
|
57
|
+
steps:
|
|
58
|
+
- name: Deploy to GitHub Pages
|
|
59
|
+
id: deployment
|
|
60
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v[0-9]+.[0-9]+.[0-9]+"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write # Required for npm OIDC
|
|
10
|
+
contents: write # to generate release note
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
env:
|
|
16
|
+
VERSION: ${{ github.ref_name }}
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: "24"
|
|
22
|
+
registry-url: "https://registry.npmjs.org"
|
|
23
|
+
cache: "npm"
|
|
24
|
+
- run: |
|
|
25
|
+
npm ci
|
|
26
|
+
npm run build
|
|
27
|
+
npm pack
|
|
28
|
+
npm publish --dry-run
|
|
29
|
+
- run: |
|
|
30
|
+
gh release create "${VERSION}" --title "${VERSION}" --generate-notes
|
|
31
|
+
gh release upload "${VERSION}" *.tgz
|
|
32
|
+
env:
|
|
33
|
+
GH_TOKEN: ${{ github.token }}
|
|
34
|
+
- run: npm publish --access public
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"prettier.configPath": "prettier.config.js",
|
|
3
|
+
"prettier.prettierPath": "node_modules/prettier",
|
|
4
|
+
"[javascript]": {
|
|
5
|
+
"editor.formatOnSave": true,
|
|
6
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
7
|
+
},
|
|
8
|
+
"[css]": {
|
|
9
|
+
"editor.formatOnSave": true,
|
|
10
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
11
|
+
},
|
|
12
|
+
"[json]": {
|
|
13
|
+
"editor.formatOnSave": true,
|
|
14
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
15
|
+
},
|
|
16
|
+
"[markdown]": {
|
|
17
|
+
"editor.formatOnSave": true,
|
|
18
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
19
|
+
}
|
|
20
|
+
}
|