@blakearoberts/visage 0.0.5-rc.17 → 0.0.5-rc.19
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/dist/compose.d.ts.map +1 -1
- package/dist/index.js +25 -0
- package/dist/render/nginx.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/compose.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../src/compose.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../src/compose.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,CA6E7D"}
|
package/dist/index.js
CHANGED
|
@@ -594,6 +594,29 @@ function startCompose(config) {
|
|
|
594
594
|
[config.secrets.cookieSecret]: randomBytes(32).toString('base64url'),
|
|
595
595
|
};
|
|
596
596
|
const opts = { cwd: config.cache, env };
|
|
597
|
+
function validate() {
|
|
598
|
+
const args = [
|
|
599
|
+
...compose,
|
|
600
|
+
'run',
|
|
601
|
+
'--build',
|
|
602
|
+
'--quiet-build',
|
|
603
|
+
'--rm',
|
|
604
|
+
'--no-deps',
|
|
605
|
+
'nginx',
|
|
606
|
+
'nginx',
|
|
607
|
+
'-t',
|
|
608
|
+
'-q',
|
|
609
|
+
];
|
|
610
|
+
const result = spawnSync('docker', args, {
|
|
611
|
+
...opts,
|
|
612
|
+
stdio: ['ignore', 'ignore', 'inherit'],
|
|
613
|
+
});
|
|
614
|
+
if (result.error)
|
|
615
|
+
throw result.error;
|
|
616
|
+
if (result.status !== 0) {
|
|
617
|
+
throw new Error('Failed to validate NGINX configuration');
|
|
618
|
+
}
|
|
619
|
+
}
|
|
597
620
|
function up() {
|
|
598
621
|
const out = openSync(join(dir, 'compose.log'), 'w');
|
|
599
622
|
const args = [
|
|
@@ -616,6 +639,7 @@ function startCompose(config) {
|
|
|
616
639
|
return spawn('docker', args, { ...opts, stdio: ['ignore', out, out] });
|
|
617
640
|
}
|
|
618
641
|
down();
|
|
642
|
+
validate();
|
|
619
643
|
const result = up();
|
|
620
644
|
if (result.error)
|
|
621
645
|
throw result.error;
|
|
@@ -792,6 +816,7 @@ function renderDexConfig(config) {
|
|
|
792
816
|
|
|
793
817
|
const template = `
|
|
794
818
|
load_module modules/ngx_http_js_module.so;
|
|
819
|
+
include /etc/nginx/modules/*.conf;
|
|
795
820
|
|
|
796
821
|
events {}
|
|
797
822
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nginx.d.ts","sourceRoot":"","sources":["../../src/render/nginx.ts"],"names":[],"mappings":"AAKA,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"nginx.d.ts","sourceRoot":"","sources":["../../src/render/nginx.ts"],"names":[],"mappings":"AAKA,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AA6KnE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAQ3D"}
|
package/package.json
CHANGED