1+ #!/usr/bin/env inf
2+ {
3+ "#" : " gi0.PINF.it/core/v0" ,
4+
5+ "#" : {
6+ "/dist/firephp.build" : " to.pinf.org.mozilla.web-ext" ,
7+ "runner" : " it.pinf.org.mozilla.web-ext"
8+ },
9+ ":builder:" : " /dist/firephp.build @ builder/v1" ,
10+ ":runner:" : " runner @ runner/v1" ,
11+
12+ "gi0.PINF.it/build/v0 @ # /dist/firephp.build" : (inf () >>>
13+ {
14+ "gi0.PINF.it/build/v0 @ # :builder: build() /" : {
15+ "port" : 9000 ,
16+ "manifest" : {
17+ "name" : " FirePHP (Official)" ,
18+ "version" : " ${version}" ,
19+ "description" : " Log from PHP to a devtools panel." ,
20+ "applications" : {
21+ "gecko" : {
22+ 23+ "strict_min_version" : " 56.0"
24+ }
25+ },
26+ "icons" : {
27+ "48" : " ./src/skin/Logo.png"
28+ },
29+ "permissions" : [
30+ " activeTab" ,
31+ " storage" ,
32+ " webRequest" ,
33+ " webNavigation" ,
34+ " webRequestBlocking" ,
35+ " <all_urls>"
36+ ],
37+ "content_security_policy" : " script-src 'self'; style-src 'self'; object-src 'self'; img-src 'self'" ,
38+ "background" : {
39+ "scripts" : [
40+ {
41+ "background.js" : {
42+ "gi0.PINF.it/build/v0 # /scripts # /background.js" : {
43+ "@it.pinf.org.browserify # router/v1" : {
44+ "src" : " ./src/background.js" ,
45+ "format" : " pinf" ,
46+ "babel" : {
47+ "presets" : {
48+ "@babel/preset-env" : {
49+ "targets" : " last 1 Firefox versions"
50+ }
51+ }
52+ }
53+ }
54+ }
55+ }
56+ }
57+ ]
58+ },
59+ "devtools" : {
60+ "panels" : [
61+ {
62+ "devtools/dist/index.js" : {
63+ "label" : " FirePHP" ,
64+ "icon" : " ./src/skin/Logo.png" ,
65+ "include" : {
66+ "codemirror.js" : " codemirror/lib/codemirror.js" ,
67+ "codemirror.css" : " codemirror/lib/codemirror.css" ,
68+ "codemirror/addon/selection/active-line.js" : " codemirror/addon/selection/active-line.js" ,
69+ "codemirror/mode/xml/xml.js" : " codemirror/mode/xml/xml.js" ,
70+ "codemirror/mode/javascript/javascript.js" : " codemirror/mode/javascript/javascript.js" ,
71+ "codemirror/mode/css/css.js" : " codemirror/mode/css/css.js" ,
72+ "codemirror/mode/htmlmixed/htmlmixed.js" : " codemirror/mode/htmlmixed/htmlmixed.js" ,
73+ "codemirror/mode/clike/clike.js" : " codemirror/mode/clike/clike.js" ,
74+ "codemirror/mode/php/php.js" : " codemirror/mode/php/php.js"
75+ },
76+ "code" : {
77+ "gi0.PINF.it/build/v0 # /scripts/devtools # /" : {
78+ "@fireconsole.rep.js # builder/v1" : {
79+ "externalizeCss" : true ,
80+ "indexFilename" : " index" ,
81+ "indexFormat" : " js" ,
82+ "include" : {
83+ "jquery" : false ,
84+ "regenerator-runtime" : false ,
85+ "riot.csp.js" : true ,
86+ "riot.js" : false ,
87+ "riot.min.js" : false
88+ },
89+ "page" : {
90+ "@layout" : {
91+ "console" : {
92+ "@console" : {
93+ "@fireconsole" : {
94+ }
95+ }
96+ },
97+ "menu" : {
98+ "@menu" : {}
99+ },
100+ "settings" : {
101+ "@enabler" : {}
102+ },
103+ "inspector" : {
104+ "@inspector" : {}
105+ },
106+ "editor" : {
107+ "@editor" : {}
108+ },
109+ "manage" : {
110+ "@manage" : {
111+ "settings" : {
112+ "@settings" : {}
113+ }
114+ }
115+ }
116+ }
117+ },
118+ "reps" : {
119+ "layout" : " ./src/layout.rep.js" ,
120+ "menu" : " ./src/menu.rep.js" ,
121+ "summary" : " ./src/summary.rep.js" ,
122+ "settings" : " ./src/settings.rep.js" ,
123+ "manage" : " ./src/manage.rep.js" ,
124+ "inspector" : " ./src/inspector.rep.js" ,
125+ "editor" : " ./src/editor.rep.js" ,
126+ "console" : " ./src/console.rep.js" ,
127+ "enabler" : " ./src/enabler.rep.js"
128+ },
129+ "babel" : {
130+ "presets" : {
131+ "@babel/preset-env" : {
132+ "targets" : " last 1 Firefox versions"
133+ }
134+ }
135+ }
136+ }
137+ }
138+ }
139+ }
140+ }
141+ ]
142+ }
143+ },
144+ "routes" : {
145+ "^/$" : (javascript (API) >>>
146+
147+ return function (req, res, next) {
148+
149+ if (
150+ req.headers["x-firephp-version"] ||
151+ /\sFirePHP\/([\.|\d]*)\s?/.test(req.headers["user-agent"])
152+ ) {
153+
154+ function wrap (message) {
155+ return message.length + '|' + message + '|';
156+ }
157+
158+ res.writeHead(200, {
159+ 'X-Wf-Protocol-1': 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2',
160+ 'X-Wf-1-Plugin-1': 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.0.0master1106021548',
161+ 'X-Wf-1-Structure-1': 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1',
162+
163+ // @see https://github.com/firephp/firephp/issues/16
164+ 'X-Wf-1-1-1-1': wrap('[{"Type":"LOG","File":"/path/to/file","Line":10 }," Hello World" ]'),
165+ '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" ]'),
166+ '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" ]'),
167+
168+ 'X-Wf-1-Index': '3'
169+ });
170+
171+
172+ res.end("FirePHP Core formatted messages sent in HTTP response headers.");
173+ } else {
174+
175+ res.end([
176+ " <p>No FirePHP HTTP request headers found.</p>" ,
177+ " <p><a href=\" http://127.0.0.1:8080/FirePHP.php\" >http://127.0.0.1:8080/FirePHP.php</a></p>"
178+ ].join("\\n"));
179+ }
180+ };
181+ <<<)
182+ }
183+ }
184+ }
185+ <<<),
186+
187+ "gi0.PINF.it/build/v0 @ # onCommand() test" : (inf () >>>
188+ {
189+ "# run" : (run.bash.origin.method.progress () >>>
190+
191+ BO_cecho "DEPRECATED: Tests are out of date. They were used to build up the extension." RED BOLD
192+ BO_cecho "TODO: Build new tests that run on top of build.\n" MAGENTA BOLD
193+
194+ # bash.origin.test tests
195+ <<<)
196+ }
197+ <<<),
198+ "gi0.PINF.it/build/v0 @ # onCommand() dev" : (inf () >>>
199+ {
200+ "gi0.PINF.it/build/v0 @ # :runner: run() /dist/firephp.build" : " "
201+ }
202+ <<<),
203+ "gi0.PINF.it/build/v0 @ # onCommand() build" : (inf () >>>
204+ {
205+ "gi0.PINF.it/build/v0 @ # :runner: build() /dist/firephp.build" : " "
206+ }
207+ <<<),
208+ "gi0.PINF.it/build/v0 @ # onCommand() publish" : (inf () >>>
209+ {
210+ "# run" : (run.bash.origin.script.method.progress () >>>
211+
212+ depend {
213+ "webext" : " it.pinf.org.mozilla.web-ext # runner/v0"
214+ }
215+
216+ npm run build
217+
218+ if [ $(git rev-parse --abbrev-ref HEAD) == "master" ] ; then
219+ export MOZILLA_ADDONS_CHANNEL="listed"
220+ fi
221+
222+ pushd "dist/firephp.build" > /dev/null
223+ CALL_webext sign {
224+ "dist" : " $(pwd)/../firephp.xpi" ,
225+ "manifest" : {
226+ }
227+ }
228+ popd > /dev/null
229+
230+ if [ $(git rev-parse --abbrev-ref HEAD) == "master" ] ; then
231+ 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
232+ else
233+ BO_cecho "Built extension (signed as self-hosted) can be found at: dist/firephp.xpi" YELLOW BOLD
234+ fi
235+ <<<)
236+ }
237+ <<<)
238+ }
0 commit comments