8000 Preview (1.4) by cadorn · Pull Request #59 · firephp/firephp-for-browser-devtools · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
fc95782
- settings logic consolidation
cadorn Aug 29, 2019
7adb719
preview build
cadorn Aug 29, 2019
8a6a12e
signed firefox build
cadorn Aug 29, 2019
6b7d1e6
docs & settings UI tweaks
cadorn Aug 31, 2019
2c08646
wip
cadorn Oct 5, 2019
8000 8b1a8cc
merge
cadorn Oct 6, 2019
bea0395
Merge branch 'refs/heads/preview' into preview-insight
cadorn Oct 6, 2019
ba4179d
wip
cadorn Feb 10, 2020
b8367a7
wip
cadorn May 11, 2020
4cc1207
build
cadorn May 15, 2020
de262cf
wip
cadorn May 15, 2020
c4d7fad
wip
cadorn May 21, 2020
eb7c778
wip
cadorn May 21, 2020
48599c8
wip
cadorn May 21, 2020
082236a
wip
cadorn May 21, 2020
bd45cdf
wip
cadorn May 21, 2020
6357eee
wip
cadorn May 21, 2020
9fbd366
wip
cadorn May 21, 2020
c43f8d4
wip
cadorn May 21, 2020
3ab9b39
signed build
cadorn May 21, 2020
995f480
updated dependencies
cadorn Jun 12, 2020
1884988
wip
cadorn Jun 28, 2020
00f89dc
wip
cadorn Jun 28, 2020
9cde512
wip
cadorn Jun 28, 2020
20526ee
wip
cadorn Jun 28, 2020
214f112
wip
cadorn Jun 28, 2020
97e26ef
wip
cadorn Jun 29, 2020
523dc57
wip
cadorn Jun 29, 2020
7f73de8
wip
cadorn Jun 29, 2020
fea591d
wip
cadorn Jun 29, 2020
f1c8a88
wip
cadorn Jul 1, 2020
139c332
wip
cadorn Jul 1, 2020
882724d
remove run config
cadorn Jul 1, 2020
c6e79f1
wip
cadorn Jul 1, 2020
758f019
remove build
cadorn Jul 1, 2020
50ae083
wip
cadorn Jul 1, 2020
aef5f00
build
cadorn Jul 1, 2020
bb42a48
wip
cadorn Jul 1, 2020
976bc39
wip
cadorn Jul 1, 2020
7254c9d
wip
cadorn Jul 1, 2020
61578c2
wip
cadorn Jul 1, 2020
446374d
wip
cadorn Jul 1, 2020
6d920e7
deps
cadorn Jul 1, 2020
5200c94
build
cadorn Jul 1, 2020
e072b3a
Merge branch 'pre-verify' into pre
cadorn Jul 1, 2020
d8f75d6
deps
cadorn Jul 1, 2020
d464a39
shrink
cadorn Jul 1, 2020
67f402c
build
cadorn Jul 1, 2020
684f45c
workflow
cadorn Jul 1, 2020
ac11f60
deps
cadorn Jul 1, 2020
f4dd0e5
build via workflow & upload artifact
cadorn Jul 1, 2020
99378a9
fix
cadorn Jul 1, 2020
32b122c
fix
cadorn Jul 1, 2020
736b766
release
cadorn Jul 1, 2020
35ae159
tag
cadorn Jul 1, 2020
944c9b2
tweaks
cadorn Jul 1, 2020
50a678c
updated review notes
cadorn Jul 3, 2020
adbdfbd
remove dist
cadorn Jul 3, 2020
832fa93
titles
cadorn Jul 3, 2020
5b585a4
verbose setting, silence all logging unless verbose, misc fixes
cadorn Jul 3, 2020
540abc7
remove build
cadorn Jul 3, 2020
fd01125
bump
cadorn Jul 3, 2020
c083af5
readme
cadorn Jul 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
238 changes: 238 additions & 0 deletions #!inf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
#!/usr/bin/env inf
{
"#": "gi0.PINF.it/core/v0",

"#": {
"/dist/firephp.build": "to.pinf.org.mozilla.web-ext",
"runner": "it.pinf.org.mozilla.web-ext"
},
":builder:": "/dist/firephp.build @ builder/v1",
":runner:": "runner @ runner/v1",

"gi0.PINF.it/build/v0 @ # /dist/firephp.build": (inf () >>>
{
"gi0.PINF.it/build/v0 @ # :builder: build() /": {
"port": 9000,
"manifest": {
"name": "FirePHP (Official)",
"version": "${version}",
"description": "Log from PHP to a devtools panel.",
"applications": {
"gecko": {
"id": "FirePHPExtension-Build@firephp.org",
"strict_min_version": "56.0"
}
},
"icons": {
"48": "./src/skin/Logo.png"
},
"permissions": [
"activeTab",
"storage",
"webRequest",
"webNavigation",
"webRequestBlocking",
"<all_urls>"
],
"content_security_policy": "script-src 'self'; style-src 'self'; object-src 'self'; img-src 'self'",
"background": {
"scripts": [
{
"background.js": {
"gi0.PINF.it/build/v0 # /scripts # /background.js": {
"@it.pinf.org.browserify # router/v1": {
"src": "./src/background.js",
"format": "pinf",
"babel": {
"presets": {
"@babel/preset-env": {
"targets": "last 1 Firefox versions"
}
}
}
}
}
}
}
]
},
"devtools": {
"panels": [
{
"devtools/dist/index.js": {
"label": "FirePHP",
"icon": "./src/skin/Logo.png",
"include": {
"codemirror.js": "codemirror/lib/codemirror.js",
"codemirror.css": "codemirror/lib/codemirror.css",
"codemirror/addon/selection/active-line.js": "codemirror/addon/se BD9E lection/active-line.js",
"codemirror/mode/xml/xml.js": "codemirror/mode/xml/xml.js",
"codemirror/mode/javascript/javascript.js": "codemirror/mode/javascript/javascript.js",
"codemirror/mode/css/css.js": "codemirror/mode/css/css.js",
"codemirror/mode/htmlmixed/htmlmixed.js": "codemirror/mode/htmlmixed/htmlmixed.js",
"codemirror/mode/clike/clike.js": "codemirror/mode/clike/clike.js",
"codemirror/mode/php/php.js": "codemirror/mode/php/php.js"
},
"code": {
"gi0.PINF.it/build/v0 # /scripts/devtools # /": {
"@fireconsole.rep.js # builder/v1": {
"externalizeCss": true,
"indexFilename": "index",
"indexFormat": "js",
"include": {
"jquery": false,
"regenerator-runtime": false,
"riot.csp.js": true,
"riot.js": false,
"riot.min.js": false
},
"page": {
"@layout": {
"console": {
"@console": {
"@fireconsole": {
}
}
},
"menu": {
"@menu": {}
},
"settings": {
"@enabler": {}
},
"inspector": {
"@inspector": {}
},
"editor": {
"@editor": {}
},
"manage": {
"@manage": {
"settings": {
"@settings": {}
}
}
}
}
},
"reps": {
"layout": "./src/layout.rep.js",
"menu": "./src/menu.rep.js",
"summary": "./src/summary.rep.js",
"settings": "./src/settings.rep.js",
"manage": "./src/manage.rep.js",
"inspector": "./src/inspector.rep.js",
"editor": "./src/editor.rep.js",
"console": "./src/console.rep.js",
"enabler": "./src/enabler.rep.js"
},
"babel": {
"presets": {
"@babel/preset-env": {
"targets": "last 1 Firefox versions"
}
}
}
}
}
}
}
}
]
}
},
"routes": {
"^/$": (javascript (API) >>>

return function (req, res, next) {

if (
req.headers["x-firephp-version"] ||
/\sFirePHP\/([\.|\d]*)\s?/.test(req.headers["user-agent"])
) {

function wrap (message) {
return message.length + '|' + message + '|';
}

res.writeHead(200, {
'X-Wf-Protocol-1': 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2',
'X-Wf-1-Plugin-1': 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.0.0master1106021548',
'X-Wf-1-Structure-1': 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1',

// @see https://github.com/firephp/firephp/issues/16
'X-Wf-1-1-1-1': wrap('[{"Type":"LOG","File":"/path/to/file","Line":10},"Hello World"]'),
'X-Wf-1-1-1-2': wrap('[{"Type":"INFO","File":"\/christoph\/projects\/gi0.FireConsole.org\/rep.js\/examples\/03-FirePHPCore\/index.php","Line":75},"\\u0427\\u0442\\u043e-\\u0442\\u043e"]'),
'X-Wf-1-1-1-3': wrap('[{"Type":"INFO","File":"\/christoph\/projects\/gi0.FireConsole.org\/rep.js\/examples\/03-FirePHPCore\/index.php","Line":76},"Od\\u00f3metro"]'),

'X-Wf-1-Index': '3'
});


res.end("FirePHP Core formatted messages sent in HTTP response headers.");
} else {

res.end([
"<p>No FirePHP HTTP request headers found.</p>",
"<p><a href=\"http://127.0.0.1:8080/FirePHP.php\">http://127.0.0.1:8080/FirePHP.php</a></p>"
].join("\\n"));
}
};
<<<)
}
}
}
<<<),

"gi0.PINF.it/build/v0 @ # onCommand() test": (inf () >>>
{
"# run": (run.bash.origin.method.progress () >>>

BO_cecho "DEPRECATED: Tests are out of date. They were used to build up the extension." RED BOLD
BO_cecho "TODO: Build new tests that run on top of build.\n" MAGENTA BOLD

# bash.origin.test tests
<<<)
}
<<<),
"gi0.PINF.it/build/v0 @ # onCommand() dev": (inf () >>>
{
"gi0.PINF.it/build/v0 @ # :runner: run() /dist/firephp.build": ""
}
<<<),
"gi0.PINF.it/build/v0 @ # onCommand() build": (inf () >>>
{
"gi0.PINF.it/build/v0 @ # :runner: build() /dist/firephp.build": ""
}
<<<),
"gi0.PINF.it/build/v0 @ # onCommand() publish": (inf () >>>
{
"# run": (run.bash.origin.script.method.progress () >>>

depend {
"webext": "it.pinf.org.mozilla.web-ext # runner/v0"
}

npm run build

if [ $(git rev-parse --abbrev-ref HEAD) == "master" ] ; then
export MOZILLA_ADDONS_CHANNEL="listed"
fi

pushd "dist/firephp.build" > /dev/null
CALL_webext sign {
"dist": "$(pwd)/../firephp.xpi",
"manifest": {
}
}
popd > /dev/null

if [ $(git rev-parse --abbrev-ref HEAD) == "master" ] ; then
BO_cecho "Built extension (signed for addons listing) has been published for review by mozilla and can also be found at: dist/firephp.xpi" YELLOW BOLD
else
BO_cecho "Built extension (signed as self-hosted) can be found at: dist/firephp.xpi" YELLOW BOLD
fi
<<<)
}
<<<)
}
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
4E22
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build
on:
- push
jobs:
Build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 13.x
steps:
- uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package.json') }}-${{ hashFiles('npm-shrinkwrap.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Install Dependencies
run: npm install

- name: Build
run: npm run build

- name: Upload extension as build artifact
uses: actions/upload-artifact@v1
with:
name: firephp
path: dist/firephp.zip

- name: Upload Release if tagging
uses: fnkr/github-action-ghr@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GHR_PATH: dist/firephp.zip
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*~.compiled.bash
.actual.*
node_modules/
/package-lock.json
.rt/
~.rt_*
/dist/firephp.zip
/dist/firephp.build/.web-extension-id
/dist/
.~*
/dist/firephp.build.zip
/tests/*/.extension.built
38 changes: 38 additions & 0 deletions .postbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash.origin.script

# TODO: Move to '#!inf.json' once pinf.it/build/v0 executes instructions in sequence.

pushd "dist/firephp.build" > /dev/null

# Remove files that we do not need
# TODO: Do this in a better way and coordinate with .gitignore
rm -Rf scripts/devtools/dist/dist/riot.min.js
rm -Rf scripts/devtools/dist/dist/riot.js
rm -Rf scripts/devtools/dist/dist/babel-regenerator-runtime.js
rm -Rf scripts/devtools/dist/dist/reps/insight.domplate.reps/dist/reps/dist/domplate.browser.js
rm -Rf scripts/devtools/dist/dist/reps/insight.domplate.reps/dist/reps/dist/domplate-eval.browser.js
rm -Rf lib/github.com~pinf~pinf-for-mozilla-web-ext/scripts/lib/pinf-loader-core.browser.js
rm -Rf lib/github.com~pinf~pinf-for-mozilla-web-ext/scripts/lib/babel-regenerator-runtime.js
rm -Rf scripts/devtools/dist/dist/reps/insight.domplate.reps/dist/reps/*/*.preview.htm
rm -Rf scripts/devtools/dist/dist/reps/insight.domplate.reps/dist/reps/reps.json
rm -Rf scripts/devtools/dist/dist/reps/io.shields.img.rep.js
rm -Rf scripts/devtools/dist/dist/reps/div.rep.js
rm -Rf scripts/devtools/dist/dist/reps/golden-layout.rep.js
rm -Rf skin/box.png
rm -Rf run.config.json

# Remove signed archive as it needs to be re-signed
rm -f ../firephp.build.xpi 2> /dev/null || true

popd > /dev/null

pushd "dist" > /dev/null

mv firephp.build firephp
zip -r firephp.zip firephp/
mv firephp firephp.build

popd > /dev/null

BO_cecho "\nBuilt extension source can be found at: dist/firephp.build/" YELLOW BOLD
BO_cecho "This source can be loaded into a browser when running in extension development mode.\n" YELLOW BOLD
8 changes: 8 additions & 0 deletions .prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

# TODO: Get rid of this file once issues are fixed in underlying libraries.

[ ! -e '.~/gi0.PINF.it~build~v0' ] || rm -Rf '.~/gi0.PINF.it~build~v0'
[ ! -e 'dist/firephp.build' ] || rm -Rf 'dist/firephp.build'

[ -e '.~lib.json' ] || node_modules/.bin/lib.json from node_modules > '.~lib.json'
Loading
0