abmaonline / aemfed Goto Github PK
View Code? Open in Web Editor NEWSpeed up your AEM front-end development using aemsync, BrowserSync and this.
Home Page: https://aemfed.io
License: MIT License
Speed up your AEM front-end development using aemsync, BrowserSync and this.
Home Page: https://aemfed.io
License: MIT License
Either by a file specified via aemfed --config ./aemfed.config.js
, or a new entry in package.json
(ie: "aemfed": { ... }
)
I'm currently having issues with some URL requests to Web Fonts returning HTTP 200 with headers containing "connection: close", resulting blank Font files for some reason.
It would be nice to have greater control over the underlying options of aemfed & especially browsersync to inspect the requests / troubleshoot the proxy.
I'm not even sure, but maybe browsersync already looks for such a config if present in the root project directory?
package.json
npm run aemfed
this is the output:➜ aem-guides-wknd git:(main) ✗ npm run aemfed
> aemfed
> aemfed -t "http://admin:admin@localhost:4502" -w "ui.apps/src/main/content/jcr_root/"
---------------------------------------
Working dirs: [
'/Users/▯▯▯/Documents/GitHub/aem-guides-wknd/ui.apps/src/main/content/jcr_root'
]
Targets: http://admin:admin@localhost:4502
Proxy port: 3000
Interval: 100
Exclude:
---------------------------------------
Something missing or not working as expected, open an issue on GitHub: https://github.com/abmaonline/aemfed/issues
---------------------------------------
Scanning: /Users/▯▯▯/Documents/GitHub/aem-guides-wknd/ui.apps/src/main/content/jcr_root ...
Awaiting changes ...
---------------------------------------
[localhost:4502] [ERROR] Something went wrong: RequestError: Error: connect ECONNREFUSED 127.0.0.1:4502
at new RequestError (/Users/▯▯▯/Documents/GitHub/aem-guides-wknd/node_modules/request-promise-core/lib/errors.js:14:15)
at Request.plumbing.callback (/Users/▯▯▯/Documents/GitHub/aem-guides-wknd/node_modules/request-promise-core/lib/plumbing.js:87:29)
at Request.RP$callback [as _callback] (/Users/▯▯▯/Documents/GitHub/aem-guides-wknd/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/Users/▯▯▯/Documents/GitHub/aem-guides-wknd/node_modules/request/request.js:185:22)
at Request.emit (node:events:526:28)
at Request.onRequestError (/Users/▯▯▯/Documents/GitHub/aem-guides-wknd/node_modules/request/request.js:877:8)
at ClientRequest.emit (node:events:526:28)
at Socket.socketErrorListener (node:_http_client:442:9)
at Socket.emit (node:events:526:28)
at emitErrorNT (node:internal/streams/destroy:157:8) {
cause: Error: connect ECONNREFUSED 127.0.0.1:4502
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 4502
},
error: Error: connect ECONNREFUSED 127.0.0.1:4502
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 4502
},
options: {
json: true,
uri: 'http://admin:admin@localhost:4502/system/console/bundles/org.apache.sling.tracer.json',
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
response: undefined
}
Get state for all instances: 16 ms
Read file tree: 2 ms
Build style tree: 4 ms
Init rejected: RequestError: Error: connect ECONNREFUSED 127.0.0.1:4502
I also tried with node 6.17 LTS as noted in the README but ran into an error that seemed to say I needed to update node.
Any help would be much appreciated! Thank you!
I´m getting the error below when trying to open a component content dialog. If I try without the proxy, everything works fine, but when I access through the proxy, the dialog only opens the first time the page is loaded, after closing the dialog, it will not open the next time I try to.
Here the console output of the browser:
GET http://localhost:3000/content/my-project/home/test/jcr:content/guideContainer.infinity.json?_=1604609768621 404 (Not Found) granite.js?browsersync=1604609768424:266
Error: DuplicateDefinitionError: a type with name 'coral-icon' is already registered
at HTMLDocument.t (coralui3.js?browsersync=1604609768424:3803)
at Object.Coral.register (coralui3.js:6463)
at coralui3.js:12478 coralui3.js?browsersync=1604609768424:3803
Software versions
Apache Sling Log Tracer: 1.0.6
aemfed: 0.1.1
AEM: 6.5
I first setup webpack to my project. Then I installed aemfed. After I run the command for aemfed I got the following errors: TRYREADFILE WARN COULD NOT READ FILE for all of the less files. Has someone experienced this before and how to resolve it. Thanks.
any way you can make a video of this?
I'd love to promote it.
Hello, I'm getting this error when I start up aemfed on my project. If I make a change it will just crash and won't update on my AEM instance.
16:15$ npx aemfed -t "<http://admin:admin@localhost:4502>" -w "overlays/src/main/content/jcr_root/"
---------------------------------------
Working dirs: [
'xxxx/overlays/src/main/content/jcr_root'
]
Targets: <http://admin:admin@localhost:4502>
Proxy port: 3000
Interval: 100
Exclude:
---------------------------------------
Something missing or not working as expected, open an issue on GitHub: https://github.com/abmaonline/aemfed/issues
---------------------------------------
Scanning: xxxx/overlays/src/main/content/jcr_root ...
Awaiting changes ...
---------------------------------------
[localhost:4502>] [ERROR] Something went wrong: RequestError: Error: Invalid URI "%3Chttp://admin:admin@localhost:4502%3E/system/console/bundles/org.apache.sling.tracer.json"
at new RequestError (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request-promise-core/lib/errors.js:14:15)
at Request.plumbing.callback (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request-promise-core/lib/plumbing.js:87:29)
at Request.RP$callback [as _callback] (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/request.js:185:22)
at Request.emit (node:events:527:28)
at Request.init (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/request.js:273:17)
at Request.RP$initInterceptor [as init] (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request-promise-core/configure/request2.js:45:29)
... 2 lines matching cause stack trace ...
at setSlingTracerBundleInfo (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:372:44) {
cause: Error: Invalid URI "%3Chttp://admin:admin@localhost:4502%3E/system/console/bundles/org.apache.sling.tracer.json"
at Request.init (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/request.js:273:31)
at Request.RP$initInterceptor [as init] (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request-promise-core/configure/request2.js:45:29)
at new Request (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/request.js:127:8)
at Object.request [as default] (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/index.js:53:10)
at setSlingTracerBundleInfo (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:372:44)
at /home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:447:28
at Array.forEach (<anonymous>)
at Object.create (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:445:11)
at Object.init (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/index.js:130:15)
at Object.<anonymous> (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/bin/aemfed.js:3:8),
error: Error: Invalid URI "%3Chttp://admin:admin@localhost:4502%3E/system/console/bundles/org.apache.sling.tracer.json"
at Request.init (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/request.js:273:31)
at Request.RP$initInterceptor [as init] (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request-promise-core/configure/request2.js:45:29)
at new Request (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/request.js:127:8)
at Object.request [as default] (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/index.js:53:10)
at setSlingTracerBundleInfo (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:372:44)
at /home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:447:28
at Array.forEach (<anonymous>)
at Object.create (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:445:11)
at Object.init (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/index.js:130:15)
at Object.<anonymous> (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/bin/aemfed.js:3:8),
options: {
json: true,
uri: '<http://admin:admin@localhost:4502>/system/console/bundles/org.apache.sling.tracer.json',
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
response: undefined
}
Get state for all instances: 13 ms
Init rejected: RequestError: Error: Invalid URI "%3Chttp://admin:admin@localhost:4502%3E/libs/granite/ui/content/dumplibs.html"
Read file tree: 11 ms
When making a crash I get this crash error:
ADD jcr_root/apps/cq/core/content/nav
node:buffer:323
throw new ERR_INVALID_ARG_TYPE(
^
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received null
at new NodeError (node:internal/errors:372:5)
at Function.from (node:buffer:323:9)
at Sender.sendFormToTarget (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemsync/src/sender.js:28:25)
at Sender.send (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemsync/src/sender.js:22:12)
at /home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemsync/src/pipeline.js:93:21
at WriteStream.<anonymous> (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemsync/src/zip.js:100:7)
at WriteStream.emit (node:events:527:28)
at emitCloseNT (node:internal/streams/destroy:145:10)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ERR_INVALID_ARG_TYPE'
}
Node.js v17.7.1
I am using Node.js v17.7.1.
Thanks, Jack
$ npm run dev
[email protected] dev C:\Repos***-landing-page-migration\nonbrand.ui.apps
run-p scss:watch transpile:watch aemfed
[email protected] scss:watch C:\Repos***-landing-page-migration\nonbrand.ui.apps
run-p scss:ams:watch scss:amsg:watch
[email protected] aemfed C:\Repos***-landing-page-migration\nonbrand.ui.apps
aemfed -t "http://admin:admin@localhost:4502" -w "src/main/content/jcr_root/"
[email protected] transpile:watch C:\Repos*-landing-page-migration\nonbrand.ui.apps
babel src/main/content/jcr_root/apps//nonbrand/clientlibs/main/src/js --out-dir src/main/content/jcr_root/apps/**/nonbrand/clientlibs/main/js --source-maps -w
[email protected] scss:amsg:watch C:\Repos*-landing-page-migration\nonbrand.ui.apps
node-sass -o src/main/content/jcr_root/apps/mnrdlm/nonbrand/clientlibs//main/css src/main/content/jcr_root/apps/mnrdlm/nonbrand/clientlibs/**/main/src/scss -w
[email protected] scss:ams:watch C:\Repos*-landing-page-migration\nonbrand.ui.apps
node-sass -o src/main/content/jcr_root/apps//nonbrand/clientlibs/main/css/ src/main/content/jcr_root/apps/**/nonbrand/clientlibs/main/src/scss -w
Working dirs: [ 'C:\Repos***-landing-page-migration\nonbrand.ui.apps\src\main\content\jcr_root' ]
Targets: http://admin:admin@localhost:4502
Proxy port: 3000
Interval: 100
Exclude:
Something missing or not working as expected, open an issue on GitHub: https://github.com/abmaonline/aemfed/issues
Scanning: C:\Repos*-landing-page-migration\nonbrand.ui.apps\src\main\content\jcr_root ...
Awaiting changes ...
Failed to check for updates: SyntaxError: Unexpected end of JSON input
Get state for all instances: 425 ms
Read file tree: 101 ms
Build style tree: 123 ms
Successfully compiled 11 files with Babel.
ADD jcr_root/apps//nonbrand/clientlibs/main/js/main.js
ADD jcr_root/apps//nonbrand/clientlibs/main/js/formfunctions/utility-functions.js
ADD jcr_root/apps//nonbrand/clientlibs/main/js/formfunctions/user-form-data.js
ADD jcr_root/apps//nonbrand/clientlibs/main/js/formfunctions/modal-functions.js
Deploying to [localhost:4502] in 71 ms at 2019-05-24T10:51:41.443Z: OK
C:\Repos*-landing-page-migration\nonbrand.ui.apps\node_modules\browser-sync\dist\index.js:39
throw new Error("An instance with the name %s was not found.".replace("%s", name));
^
Error: An instance with the name localhost:4502 was not found.
at Function.module.exports.get (C:\Repos*-landing-page-migration\nonbrand.ui.apps\node_modules\browser-sync\dist\index.js:39:11)
at Object.reload (C:\Repos*-landing-page-migration\nonbrand.ui.apps\node_modules\aemfed\lib\bs-wrapper.js:541:39)
at Pipeline.reloadBrowser [as onPushEnd] (C:\Repos*-landing-page-migration\nonbrand.ui.apps\node_modules\aemfed\lib\index.js:43:19)
at sender.send (C:\Repos*-landing-page-migration\nonbrand.ui.apps\node_modules\aemsync\src\pipeline.js:96:16)
at IncomingMessage.res.on (C:\Repos***-landing-page-migration\nonbrand.ui.apps\node_modules\aemsync\src\sender.js:93:7)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] aemfed: aemfed -t "http://admin:admin@localhost:4502" -w "src/main/content/jcr_root/"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] aemfed script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
This tool is awesome. But I got a minor issue with .less and .css file (for example: demo.less & demo.css)
The scenario is when I test on debug mode (?debugClientLibs=true), the change in demo.css is effected immediately on server but the change in demo.less is NOT.
Could you help to review this issue? Thanks.
Is it possible to exclude everything but js,css,txt and html files?
Such as this aemfed -t "http://admin:admin@localhost:4502" -w "./src/main/content/jcr_root" -e "^.*.(?!css$|less$|js$|jsp$|html$|txt$)$"
❯ npm install aemfed --save-dev
npm ERR! code E401
npm ERR! 401 Unauthorized: less-tree@https://github.com/abmaonline/less-tree/tarball/58baecb
Most of our development team use different passwords, ports etc for their AEM instances. It would be incredibly useful to pass the -t (targets) option by an environment variable so that every developer does not have to manage their own credentials in package.json file where these usually end up being stored.
Can I propose to introduce that the targets option is set to the passed -t option, AEMFED_TARGETS environment var otherwise the current default of http://admin:admin@localhost:4502
Developers should probably not be using the default admin:admin credentials and leave AEM open to the world on *:4502. You potentially opening yourself up to an attack.
Aemsync and less-tree dependencies are pulled in the package.json from github.
"aemsync": "https://github.com/abmaonline/aemsync/tarball/a2bed54",
"less-tree": "https://github.com/abmaonline/less-tree/tarball/58baecb",
This causes authentication issues when trying to install aemfed package.
npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="GitHub"
Please could you update the dependencies to be pulled from NPM instead?
Hi
Is there a way to workaround JS rewriting?https://github.com/abmaonline/aemfed/blob/master/src/index.ts#L189
This rule is making me imposible to debug JS. Everytime I refresh the page browsersync change JS names and devtools (chrome/FF) are not able to keep the breakpoints.
Thanks!
Hello,
Could you please suggest if its possible:
Also, can I use this in my gulp task?
Thanks,
$ npm run dev
[email protected] dev C:\Repos***-landing-page-migration\nonbrand.ui.apps
run-p scss:watch transpile:watch aemfed
[email protected] scss:watch C:\Repos***-landing-page-migration\nonbrand.ui.apps
run-p scss:ams:watch scss:amsg:watch
[email protected] aemfed C:\Repos***-landing-page-migration\nonbrand.ui.apps
aemfed -t "http://admin:admin@localhost:4502" -w "src/main/content/jcr_root/"
[email protected] transpile:watch C:\Repos*-landing-page-migration\nonbrand.ui.apps
babel src/main/content/jcr_root/apps//nonbrand/clientlibs/main/src/js --out-dir src/main/content/jcr_root/apps/**/nonbrand/clientlibs/main/js --source-maps -w
[email protected] scss:amsg:watch C:\Repos*-landing-page-migration\nonbrand.ui.apps
node-sass -o src/main/content/jcr_root/apps/mnrdlm/nonbrand/clientlibs//main/css src/main/content/jcr_root/apps/mnrdlm/nonbrand/clientlibs/**/main/src/scss -w
[email protected] scss:ams:watch C:\Repos*-landing-page-migration\nonbrand.ui.apps
node-sass -o src/main/content/jcr_root/apps//nonbrand/clientlibs/main/css/ src/main/content/jcr_root/apps/**/nonbrand/clientlibs/main/src/scss -w
Working dirs: [ 'C:\Repos\***-landing-page-migration\nonbrand.ui.apps\src\main\content\jcr_root' ]
Targets: http://admin:admin@localhost:4502
Proxy port: 3000
Interval: 100
Exclude:
Something missing or not working as expected, open an issue on GitHub: https://github.com/abmaonline/aemfed/issues
Scanning: C:\Repos*-landing-page-migration\nonbrand.ui.apps\src\main\content\jcr_root ...
Awaiting changes ...
Failed to check for updates: SyntaxError: Unexpected end of JSON input
Get state for all instances: 425 ms
Read file tree: 101 ms
Build style tree: 123 ms
Successfully compiled 11 files with Babel.
ADD jcr_root/apps//nonbrand/clientlibs/main/js/main.js
ADD jcr_root/apps//nonbrand/clientlibs/main/js/formfunctions/utility-functions.js
ADD jcr_root/apps//nonbrand/clientlibs/main/js/formfunctions/user-form-data.js
ADD jcr_root/apps//nonbrand/clientlibs/main/js/formfunctions/modal-functions.js
Deploying to [localhost:4502] in 71 ms at 2019-05-24T10:51:41.443Z: OK
C:\Repos*-landing-page-migration\nonbrand.ui.apps\node_modules\browser-sync\dist\index.js:39
throw new Error("An instance with the name %s
was not found.".replace("%s", name));
^
Error: An instance with the name localhost:4502
was not found.
at Function.module.exports.get (C:\Repos*-landing-page-migration\nonbrand.ui.apps\node_modules\browser-sync\dist\index.js:39:11)
at Object.reload (C:\Repos*-landing-page-migration\nonbrand.ui.apps\node_modules\aemfed\lib\bs-wrapper.js:541:39)
at Pipeline.reloadBrowser [as onPushEnd] (C:\Repos*-landing-page-migration\nonbrand.ui.apps\node_modules\aemfed\lib\index.js:43:19)
at sender.send (C:\Repos*-landing-page-migration\nonbrand.ui.apps\node_modules\aemsync\src\pipeline.js:96:16)
at IncomingMessage.res.on (C:\Repos***-landing-page-migration\nonbrand.ui.apps\node_modules\aemsync\src\sender.js:93:7)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] aemfed: aemfed -t "http://admin:admin@localhost:4502" -w "src/main/content/jcr_root/"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] aemfed script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Thank you for the hard work on this project.
Can you please update the node module dependencies of this project? I tried forking and doing it on my own but am running into troubles.
Dear,
I am very new to AEM and trying to install AEMFED returns me the following error:
In the console:
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
`npm ERR! request to https://github.com/abmaonline/aemsync/tarball/a2bed54 failed, reason: self signed certificate in certificate chain``
In the logs:
certificate chain
69 verbose stack at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
69 verbose stack at ClientRequest.emit (events.js:315:20)
69 verbose stack at TLSSocket.socketErrorListener (_http_client.js:426:9)
69 verbose stack at TLSSocket.emit (events.js:315:20)
69 verbose stack at emitErrorNT (internal/streams/destroy.js:92:8)
69 verbose stack at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
69 verbose stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
70 verbose cwd /Users/mnaqi/Documents/git-repos/aem-wknd/aem-guides-wknd
71 verbose Darwin 19.6.0
72 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "aemfed" "--global"
73 verbose node v12.18.3
74 verbose npm v6.14.8
75 error code SELF_SIGNED_CERT_IN_CHAIN
76 error errno SELF_SIGNED_CERT_IN_CHAIN
`77 error request to https://github.com/abmaonline/aemsync/tarball/a2bed54 failed, reason: self signed certificate in certificate chain``
Any ideas on what is causing this?
I have no clue if I have to signed in somewhere specifically in oder to install AEMFED.
Thank you in advance
It might be a whole lot easier for you to make this change than me looking at the source code, so here goes:
If you look at the Apache Felix REST API Docs you'll see that you can update OSGI configs over HTTP. Here is a simple code that uses request-promise-native
(which I saw you do use).
The code below will send a post request with the properties to update enabled
and servletEnabled
with both set to true
which in turn enables the tracer and the recording servlet. You can integrate below code with your code and maybe add a flag to auto-enable the Tracer!
Please note that the POST request below returns a 302 which redirects back to the console but it also means that the change did happen. This is the reason for using the
simple
option. See request-promise
If you don't get to it, I'll dig in to the source code and make a PR, but I cannot promise it will be soon ;)
const rpn = require("request-promise-native");
const HOST = 'localhost',
PORT = 4502,
PATH = '/system/console/configMgr/org.apache.sling.tracer.internal.LogTracer'
USER = 'admin',
PASS = 'admin';
var options = {
simple: false,
method: 'POST',
uri: `http://${HOST}:${PORT}${PATH}`,
form: {
apply: true,
propertylist: "enabled,servletEnabled",
enabled: true,
servletEnabled:true
},
headers: {
'Authorization': 'Basic ' + Buffer.from(USER + ':' + PASS).toString('base64'),
}
};
rpn(options)
.then(function (body) {
console.log("Updated the OSGI config!")
})
.catch(function (err) {
console.error("Failed to update the OSGI Config", err)
});
When using a self-signed cert for development, AEM Front/AEMSync/node-fetch returns an error:
Error when pushing package to https://admin:admin@localhost:6503 { FetchError: request to https://admin:admin@localhost:6503/crx/packmgr/service.jsp failed, reason: self signed certificate
Node-fetch is used by AEMSync. See discussion at node-fetch/node-fetch#19
Is there a way in AEMFed to pass an options object to node-fetch? I realize this is not AEM Front, but I'd like to replace AEM Front with AEMFed.
Aemfed has 2 dependencies (aemsync, and less-tree) that point to github urls of tarball files for a specific commit. Since these are compiled commits and not a specific version, our corporate NPM registry intake has no way of scanning the dependency for vulnerabilities and therefore cannot know for certain if they are safe to use.
When running aemfed on Windows, not all less/css is monitored and injecting new css into the page is not working. Probably has something to do with Windows paths starting with x:\ instead of /, which breaks some of the logic to convert from fs absolute to relative to jcr absolute and relative.
working with local AEMaaCS SDK, aemfed is not able to reload the minified css (sdk minifies by default). The only option the team has is to disable clientlib minification in HTML Library.
Is it the only option? it could be nice to have aemfed able to work with minified clientlibs also.
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.