oc 0.49.6 → 0.49.9
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/CHANGELOG.md +26 -0
- package/README.md +2 -15
- package/dist/cli/commands.d.ts +163 -163
- package/dist/cli/commands.js +162 -162
- package/dist/cli/domain/clean.d.ts +2 -2
- package/dist/cli/domain/clean.js +24 -27
- package/dist/cli/domain/get-components-by-dir.d.ts +1 -1
- package/dist/cli/domain/get-components-by-dir.js +41 -48
- package/dist/cli/domain/get-mocked-plugins.d.ts +10 -10
- package/dist/cli/domain/get-mocked-plugins.js +89 -87
- package/dist/cli/domain/handle-dependencies/ensure-compiler-is-declared-as-devDependency.d.ts +6 -6
- package/dist/cli/domain/handle-dependencies/ensure-compiler-is-declared-as-devDependency.js +16 -17
- package/dist/cli/domain/handle-dependencies/get-compiler.d.ts +10 -10
- package/dist/cli/domain/handle-dependencies/get-compiler.js +28 -28
- package/dist/cli/domain/handle-dependencies/get-missing-dependencies.d.ts +1 -1
- package/dist/cli/domain/handle-dependencies/get-missing-dependencies.js +18 -18
- package/dist/cli/domain/handle-dependencies/index.d.ts +10 -9
- package/dist/cli/domain/handle-dependencies/index.js +70 -64
- package/dist/cli/domain/handle-dependencies/install-compiler.d.ts +8 -8
- package/dist/cli/domain/handle-dependencies/install-compiler.js +54 -47
- package/dist/cli/domain/handle-dependencies/install-missing-dependencies.d.ts +5 -5
- package/dist/cli/domain/handle-dependencies/install-missing-dependencies.js +59 -55
- package/dist/cli/domain/handle-dependencies/link-missing-dependencies.d.ts +6 -6
- package/dist/cli/domain/handle-dependencies/link-missing-dependencies.js +32 -36
- package/dist/cli/domain/handle-dependencies/require-template.d.ts +17 -17
- package/dist/cli/domain/handle-dependencies/require-template.js +34 -34
- package/dist/cli/domain/init-template/index.d.ts +10 -10
- package/dist/cli/domain/init-template/index.js +40 -42
- package/dist/cli/domain/init-template/install-template.d.ts +11 -11
- package/dist/cli/domain/init-template/install-template.js +54 -53
- package/dist/cli/domain/init-template/scaffold.d.ts +11 -11
- package/dist/cli/domain/init-template/scaffold.js +30 -30
- package/dist/cli/domain/local.d.ts +2 -2
- package/dist/cli/domain/local.js +82 -81
- package/dist/cli/domain/mock.d.ts +5 -5
- package/dist/cli/domain/mock.js +33 -33
- package/dist/cli/domain/package-components.d.ts +9 -9
- package/dist/cli/domain/package-components.js +67 -70
- package/dist/cli/domain/registry.d.ts +6 -6
- package/dist/cli/domain/registry.js +136 -149
- package/dist/cli/domain/url-parser.d.ts +14 -14
- package/dist/cli/domain/url-parser.js +31 -31
- package/dist/cli/domain/watch.d.ts +1 -1
- package/dist/cli/domain/watch.js +29 -29
- package/dist/cli/facade/clean.d.ts +16 -10
- package/dist/cli/facade/clean.js +58 -48
- package/dist/cli/facade/dev.d.ts +114 -21
- package/dist/cli/facade/dev.js +176 -190
- package/dist/cli/facade/init.d.ts +18 -11
- package/dist/cli/facade/init.js +39 -37
- package/dist/cli/facade/mock.d.ts +18 -11
- package/dist/cli/facade/mock.js +12 -13
- package/dist/cli/facade/package.d.ts +18 -11
- package/dist/cli/facade/package.js +49 -51
- package/dist/cli/facade/preview.d.ts +14 -9
- package/dist/cli/facade/preview.js +20 -18
- package/dist/cli/facade/publish.d.ts +23 -14
- package/dist/cli/facade/publish.js +145 -165
- package/dist/cli/facade/registry-add.d.ts +14 -9
- package/dist/cli/facade/registry-add.js +18 -17
- package/dist/cli/facade/registry-ls.d.ts +10 -7
- package/dist/cli/facade/registry-ls.js +27 -25
- package/dist/cli/facade/registry-remove.d.ts +14 -9
- package/dist/cli/facade/registry-remove.js +18 -17
- package/dist/cli/facade/registry.d.ts +5 -2
- package/dist/cli/facade/registry.js +9 -6
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +91 -93
- package/dist/cli/logger.d.ts +8 -8
- package/dist/cli/logger.js +19 -19
- package/dist/cli/programmatic-api.d.ts +84 -84
- package/dist/cli/programmatic-api.js +66 -66
- package/dist/cli/validate-command.d.ts +2 -2
- package/dist/cli/validate-command.js +18 -18
- package/dist/components/oc-client/_package/package.json +1 -1
- package/dist/components/oc-client/package.json +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +12 -12
- package/dist/oc-cli.d.ts +2 -2
- package/dist/oc-cli.js +3 -3
- package/dist/registry/app-start.d.ts +2 -2
- package/dist/registry/app-start.js +44 -44
- package/dist/registry/domain/authentication.d.ts +7 -8
- package/dist/registry/domain/authentication.js +53 -50
- package/dist/registry/domain/components-cache/components-list.d.ts +8 -7
- package/dist/registry/domain/components-cache/components-list.js +50 -64
- package/dist/registry/domain/components-cache/index.d.ts +7 -6
- package/dist/registry/domain/components-cache/index.js +76 -79
- package/dist/registry/domain/components-details.d.ts +6 -5
- package/dist/registry/domain/components-details.js +64 -75
- package/dist/registry/domain/events-handler.d.ts +40 -40
- package/dist/registry/domain/events-handler.js +37 -37
- package/dist/registry/domain/extract-package.d.ts +8 -8
- package/dist/registry/domain/extract-package.js +26 -29
- package/dist/registry/domain/get-package-json-from-temp-dir.d.ts +2 -2
- package/dist/registry/domain/get-package-json-from-temp-dir.js +11 -11
- package/dist/registry/domain/nested-renderer.d.ts +14 -13
- package/dist/registry/domain/nested-renderer.js +59 -95
- package/dist/registry/domain/options-sanitiser.d.ts +6 -6
- package/dist/registry/domain/options-sanitiser.js +106 -104
- package/dist/registry/domain/plugins-initialiser.d.ts +3 -1
- package/dist/registry/domain/plugins-initialiser.js +95 -99
- package/dist/registry/domain/register-templates.d.ts +5 -5
- package/dist/registry/domain/register-templates.js +30 -30
- package/dist/registry/domain/repository.d.ts +2 -2
- package/dist/registry/domain/repository.js +237 -259
- package/dist/registry/domain/require-wrapper.d.ts +2 -2
- package/dist/registry/domain/require-wrapper.js +33 -34
- package/dist/registry/domain/sanitiser.d.ts +2 -2
- package/dist/registry/domain/sanitiser.js +52 -52
- package/dist/registry/domain/storage-adapter.d.ts +10 -0
- package/dist/registry/domain/storage-adapter.js +55 -0
- package/dist/registry/domain/url-builder.d.ts +10 -10
- package/dist/registry/domain/url-builder.js +60 -60
- package/dist/registry/domain/validators/component-parameters.d.ts +11 -11
- package/dist/registry/domain/validators/component-parameters.js +79 -79
- package/dist/registry/domain/validators/index.d.ts +16 -16
- package/dist/registry/domain/validators/index.js +29 -29
- package/dist/registry/domain/validators/node-version.d.ts +15 -15
- package/dist/registry/domain/validators/node-version.js +40 -40
- package/dist/registry/domain/validators/oc-cli-version.d.ts +15 -15
- package/dist/registry/domain/validators/oc-cli-version.js +34 -34
- package/dist/registry/domain/validators/package-json-validator.d.ts +13 -13
- package/dist/registry/domain/validators/package-json-validator.js +23 -23
- package/dist/registry/domain/validators/plugins-requirements.d.ts +9 -9
- package/dist/registry/domain/validators/plugins-requirements.js +22 -22
- package/dist/registry/domain/validators/registry-configuration.d.ts +9 -9
- package/dist/registry/domain/validators/registry-configuration.js +113 -113
- package/dist/registry/domain/validators/uploaded-package.d.ts +14 -14
- package/dist/registry/domain/validators/uploaded-package.js +25 -25
- package/dist/registry/domain/version-handler.d.ts +2 -2
- package/dist/registry/domain/version-handler.js +22 -22
- package/dist/registry/index.d.ts +48 -48
- package/dist/registry/index.js +107 -120
- package/dist/registry/middleware/base-url-handler.d.ts +2 -2
- package/dist/registry/middleware/base-url-handler.js +12 -12
- package/dist/registry/middleware/cors.d.ts +2 -2
- package/dist/registry/middleware/cors.js +11 -11
- package/dist/registry/middleware/discovery-handler.d.ts +2 -2
- package/dist/registry/middleware/discovery-handler.js +15 -15
- package/dist/registry/middleware/file-uploads.d.ts +2 -2
- package/dist/registry/middleware/file-uploads.js +23 -23
- package/dist/registry/middleware/index.d.ts +7 -3
- package/dist/registry/middleware/index.js +51 -47
- package/dist/registry/middleware/request-handler.d.ts +2 -2
- package/dist/registry/middleware/request-handler.js +30 -30
- package/dist/registry/router.d.ts +3 -3
- package/dist/registry/router.js +56 -58
- package/dist/registry/routes/component-info.d.ts +3 -3
- package/dist/registry/routes/component-info.js +90 -89
- package/dist/registry/routes/component-preview.d.ts +3 -3
- package/dist/registry/routes/component-preview.js +68 -67
- package/dist/registry/routes/component.d.ts +3 -3
- package/dist/registry/routes/component.js +43 -43
- package/dist/registry/routes/components.d.ts +3 -3
- package/dist/registry/routes/components.js +78 -78
- package/dist/registry/routes/dependencies.d.ts +3 -3
- package/dist/registry/routes/dependencies.js +28 -28
- package/dist/registry/routes/helpers/apply-default-values.d.ts +2 -2
- package/dist/registry/routes/helpers/apply-default-values.js +13 -13
- package/dist/registry/routes/helpers/get-available-dependencies.d.ts +8 -8
- package/dist/registry/routes/helpers/get-available-dependencies.js +24 -24
- package/dist/registry/routes/helpers/get-component-fallback.d.ts +17 -22
- package/dist/registry/routes/helpers/get-component-fallback.js +91 -91
- package/dist/registry/routes/helpers/get-component-retrieving-info.d.ts +20 -20
- package/dist/registry/routes/helpers/get-component-retrieving-info.js +24 -24
- package/dist/registry/routes/helpers/get-component.d.ts +33 -33
- package/dist/registry/routes/helpers/get-component.js +406 -405
- package/dist/registry/routes/helpers/get-components-history.d.ts +8 -8
- package/dist/registry/routes/helpers/get-components-history.js +28 -28
- package/dist/registry/routes/helpers/is-url-discoverable.d.ts +3 -3
- package/dist/registry/routes/helpers/is-url-discoverable.js +22 -16
- package/dist/registry/routes/index.d.ts +3 -3
- package/dist/registry/routes/index.js +93 -92
- package/dist/registry/routes/plugins.d.ts +3 -3
- package/dist/registry/routes/plugins.js +17 -17
- package/dist/registry/routes/publish.d.ts +3 -3
- package/dist/registry/routes/publish.js +97 -96
- package/dist/registry/routes/static-redirector.d.ts +3 -3
- package/dist/registry/routes/static-redirector.js +63 -63
- package/dist/registry/views/index.d.ts +2 -2
- package/dist/registry/views/index.js +39 -39
- package/dist/registry/views/info.d.ts +16 -16
- package/dist/registry/views/info.js +44 -41
- package/dist/registry/views/partials/component-author.d.ts +8 -8
- package/dist/registry/views/partials/component-author.js +20 -20
- package/dist/registry/views/partials/component-parameters.d.ts +5 -5
- package/dist/registry/views/partials/component-parameters.js +24 -24
- package/dist/registry/views/partials/component-state.d.ts +5 -5
- package/dist/registry/views/partials/component-state.js +6 -6
- package/dist/registry/views/partials/component-versions.d.ts +5 -5
- package/dist/registry/views/partials/component-versions.js +9 -9
- package/dist/registry/views/partials/components-dependencies.d.ts +2 -2
- package/dist/registry/views/partials/components-dependencies.js +12 -12
- package/dist/registry/views/partials/components-history.d.ts +2 -2
- package/dist/registry/views/partials/components-history.js +10 -10
- package/dist/registry/views/partials/components-list.d.ts +2 -2
- package/dist/registry/views/partials/components-list.js +26 -26
- package/dist/registry/views/partials/components-plugins.d.ts +2 -2
- package/dist/registry/views/partials/components-plugins.js +8 -8
- package/dist/registry/views/partials/components-templates.d.ts +2 -2
- package/dist/registry/views/partials/components-templates.js +14 -14
- package/dist/registry/views/partials/layout.d.ts +8 -8
- package/dist/registry/views/partials/layout.js +11 -11
- package/dist/registry/views/partials/property.d.ts +2 -2
- package/dist/registry/views/partials/property.js +11 -11
- package/dist/registry/views/partials/selected-checkbox.d.ts +4 -4
- package/dist/registry/views/partials/selected-checkbox.js +7 -7
- package/dist/registry/views/preview.d.ts +8 -8
- package/dist/registry/views/preview.js +9 -9
- package/dist/registry/views/static/index.d.ts +2 -2
- package/dist/registry/views/static/index.js +3 -3
- package/dist/registry/views/static/info.d.ts +2 -2
- package/dist/registry/views/static/info.js +15 -4
- package/dist/registry/views/static/style.d.ts +2 -2
- package/dist/registry/views/static/style.js +3 -3
- package/dist/resources/index.d.ts +134 -134
- package/dist/resources/index.js +145 -145
- package/dist/resources/settings.d.ts +17 -17
- package/dist/resources/settings.js +18 -18
- package/dist/types.d.ts +287 -285
- package/dist/types.js +2 -2
- package/dist/utils/clean-require.d.ts +16 -16
- package/dist/utils/clean-require.js +18 -18
- package/dist/utils/date-stringify.d.ts +1 -1
- package/dist/utils/date-stringify.js +22 -22
- package/dist/utils/error-to-string.d.ts +1 -1
- package/dist/utils/error-to-string.js +15 -15
- package/dist/utils/is-template-legacy.d.ts +3 -3
- package/dist/utils/is-template-legacy.js +6 -6
- package/dist/utils/is-template-valid.d.ts +4 -4
- package/dist/utils/is-template-valid.js +12 -12
- package/dist/utils/module-exists.d.ts +1 -1
- package/dist/utils/module-exists.js +15 -15
- package/dist/utils/npm-utils.d.ts +20 -22
- package/dist/utils/npm-utils.js +74 -63
- package/dist/utils/put.d.ts +2 -1
- package/dist/utils/put.js +29 -48
- package/dist/utils/strip-version.d.ts +1 -1
- package/dist/utils/strip-version.js +11 -11
- package/logintervals.md +1 -1
- package/package.json +6 -1
- package/src/cli/domain/clean.ts +10 -20
- package/src/cli/domain/get-components-by-dir.ts +12 -26
- package/src/cli/domain/get-mocked-plugins.ts +32 -26
- package/src/cli/domain/handle-dependencies/ensure-compiler-is-declared-as-devDependency.ts +8 -12
- package/src/cli/domain/handle-dependencies/get-compiler.ts +8 -11
- package/src/cli/domain/handle-dependencies/index.ts +55 -109
- package/src/cli/domain/handle-dependencies/install-compiler.ts +22 -15
- package/src/cli/domain/handle-dependencies/install-missing-dependencies.ts +19 -13
- package/src/cli/domain/handle-dependencies/link-missing-dependencies.ts +8 -16
- package/src/cli/domain/init-template/index.ts +13 -20
- package/src/cli/domain/init-template/install-template.ts +11 -12
- package/src/cli/domain/init-template/scaffold.ts +9 -12
- package/src/cli/domain/local.ts +19 -22
- package/src/cli/domain/mock.ts +32 -36
- package/src/cli/domain/package-components.ts +14 -25
- package/src/cli/domain/registry.ts +80 -116
- package/src/cli/domain/watch.ts +1 -1
- package/src/cli/facade/clean.ts +37 -37
- package/src/cli/facade/dev.ts +159 -182
- package/src/cli/facade/init.ts +36 -38
- package/src/cli/facade/mock.ts +11 -10
- package/src/cli/facade/package.ts +44 -49
- package/src/cli/facade/preview.ts +20 -18
- package/src/cli/facade/publish.ts +134 -172
- package/src/cli/facade/registry-add.ts +16 -15
- package/src/cli/facade/registry-ls.ts +27 -22
- package/src/cli/facade/registry-remove.ts +16 -15
- package/src/cli/facade/registry.ts +7 -5
- package/src/cli/index.ts +3 -5
- package/src/components/oc-client/_package/package.json +1 -1
- package/src/components/oc-client/package.json +1 -1
- package/src/globals.d.ts +38 -0
- package/src/oc-cli.js +0 -0
- package/src/registry/app-start.ts +27 -31
- package/src/registry/domain/authentication.ts +5 -13
- package/src/registry/domain/components-cache/components-list.ts +45 -67
- package/src/registry/domain/components-cache/index.ts +55 -60
- package/src/registry/domain/components-details.ts +49 -75
- package/src/registry/domain/extract-package.ts +19 -27
- package/src/registry/domain/get-package-json-from-temp-dir.ts +3 -4
- package/src/registry/domain/nested-renderer.ts +64 -122
- package/src/registry/domain/options-sanitiser.ts +6 -3
- package/src/registry/domain/plugins-initialiser.ts +45 -49
- package/src/registry/domain/repository.ts +129 -235
- package/src/registry/domain/require-wrapper.ts +1 -2
- package/src/registry/domain/storage-adapter.ts +85 -0
- package/src/registry/index.ts +48 -79
- package/src/registry/middleware/index.ts +10 -2
- package/src/registry/router.ts +2 -10
- package/src/registry/routes/component-info.ts +4 -3
- package/src/registry/routes/component-preview.ts +3 -2
- package/src/registry/routes/components.ts +1 -1
- package/src/registry/routes/helpers/get-component-fallback.ts +3 -9
- package/src/registry/routes/helpers/get-component.ts +11 -9
- package/src/registry/routes/helpers/is-url-discoverable.ts +14 -15
- package/src/registry/routes/index.ts +18 -13
- package/src/registry/routes/publish.ts +31 -34
- package/src/registry/views/info.ts +5 -2
- package/src/registry/views/static/info.ts +12 -1
- package/src/resources/settings.ts +1 -1
- package/src/types.ts +80 -141
- package/src/utils/npm-utils.ts +38 -37
- package/src/utils/put.ts +15 -37
package/src/registry/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import async from 'async';
|
|
2
1
|
import colors from 'colors/safe';
|
|
3
2
|
import express from 'express';
|
|
4
3
|
import http from 'http';
|
|
@@ -9,10 +8,10 @@ import eventsHandler from './domain/events-handler';
|
|
|
9
8
|
import * as middleware from './middleware';
|
|
10
9
|
import * as pluginsInitialiser from './domain/plugins-initialiser';
|
|
11
10
|
import Repository from './domain/repository';
|
|
12
|
-
import
|
|
11
|
+
import { create as createRouter } from './router';
|
|
13
12
|
import sanitiseOptions from './domain/options-sanitiser';
|
|
14
13
|
import * as validator from './domain/validators';
|
|
15
|
-
import {
|
|
14
|
+
import { Config, Plugin } from '../types';
|
|
16
15
|
|
|
17
16
|
interface Input extends Partial<Omit<Config, 'beforePublish'>> {
|
|
18
17
|
baseUrl: string;
|
|
@@ -27,7 +26,7 @@ export default function registry(inputOptions: Input) {
|
|
|
27
26
|
const options = sanitiseOptions(inputOptions);
|
|
28
27
|
|
|
29
28
|
const plugins: Plugin[] = [];
|
|
30
|
-
const app = middleware.bind(express(), options);
|
|
29
|
+
const { app, router } = middleware.bind(express(), options);
|
|
31
30
|
let server: http.Server;
|
|
32
31
|
const repository = Repository(options);
|
|
33
32
|
|
|
@@ -45,94 +44,64 @@ export default function registry(inputOptions: Input) {
|
|
|
45
44
|
plugins.push(Object.assign(plugin, { callback }));
|
|
46
45
|
};
|
|
47
46
|
|
|
48
|
-
const start = (
|
|
47
|
+
const start = async (
|
|
49
48
|
callback: (
|
|
50
|
-
err:
|
|
49
|
+
err: unknown,
|
|
51
50
|
data: { app: express.Express; server: http.Server }
|
|
52
51
|
) => void
|
|
53
52
|
) => {
|
|
54
53
|
// eslint-disable-next-line no-console
|
|
55
54
|
const ok = (msg: string) => console.log(colors.green(msg));
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
cb: (err: Error | null, data: ComponentsList | string) => void
|
|
72
|
-
) => {
|
|
73
|
-
options.plugins = plugins;
|
|
74
|
-
repository.init(cb);
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
(
|
|
78
|
-
componentsInfo: ComponentsList,
|
|
79
|
-
cb: (err: string | null, data: ComponentsList) => void
|
|
80
|
-
) => {
|
|
81
|
-
appStart(repository, options, (err: any) =>
|
|
82
|
-
cb(err ? err.msg : null, componentsInfo)
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
],
|
|
86
|
-
(err, componentsInfo) => {
|
|
55
|
+
createRouter(router, options, repository);
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
options.plugins = await pluginsInitialiser.init(plugins);
|
|
59
|
+
const componentsInfo = await repository.init();
|
|
60
|
+
await appStart(repository, options);
|
|
61
|
+
|
|
62
|
+
server = http.createServer(app);
|
|
63
|
+
server.timeout = options.timeout;
|
|
64
|
+
if (options.keepAliveTimeout) {
|
|
65
|
+
server.keepAliveTimeout = options.keepAliveTimeout;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// @ts-ignore Type not taking error on callback (this can error, though)
|
|
69
|
+
server.listen(options.port, (err: any) => {
|
|
87
70
|
if (err) {
|
|
88
71
|
return callback(err, undefined as any);
|
|
89
72
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if (_.isObject(componentsInfo)) {
|
|
108
|
-
const componentsNumber = Object.keys(
|
|
109
|
-
// @ts-ignore
|
|
110
|
-
componentsInfo.components
|
|
111
|
-
).length;
|
|
112
|
-
const componentsReleases = _.reduce(
|
|
113
|
-
// @ts-ignore
|
|
114
|
-
componentsInfo.components,
|
|
115
|
-
(memo, component) => parseInt(memo, 10) + component.length
|
|
116
|
-
);
|
|
117
|
-
|
|
118
|
-
ok(
|
|
119
|
-
`Registry serving ${componentsNumber} components for a total of ${componentsReleases} releases.`
|
|
120
|
-
);
|
|
121
|
-
}
|
|
73
|
+
eventsHandler.fire('start', {});
|
|
74
|
+
|
|
75
|
+
if (options.verbosity) {
|
|
76
|
+
ok(`Registry started at port ${app.get('port')}`);
|
|
77
|
+
|
|
78
|
+
if (_.isObject(componentsInfo)) {
|
|
79
|
+
const componentsNumber = Object.keys(
|
|
80
|
+
componentsInfo.components
|
|
81
|
+
).length;
|
|
82
|
+
const componentsReleases = Object.values(
|
|
83
|
+
componentsInfo.components
|
|
84
|
+
).reduce((acc, component) => acc + component.length, 0);
|
|
85
|
+
|
|
86
|
+
ok(
|
|
87
|
+
`Registry serving ${componentsNumber} components for a total of ${componentsReleases} releases.`
|
|
88
|
+
);
|
|
122
89
|
}
|
|
90
|
+
}
|
|
123
91
|
|
|
124
|
-
|
|
125
|
-
|
|
92
|
+
callback(null, { app, server });
|
|
93
|
+
});
|
|
126
94
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
});
|
|
132
|
-
callback(error, undefined as any);
|
|
95
|
+
server.on('error', error => {
|
|
96
|
+
eventsHandler.fire('error', {
|
|
97
|
+
code: 'EXPRESS_ERROR',
|
|
98
|
+
message: error?.message ?? String(error)
|
|
133
99
|
});
|
|
134
|
-
|
|
135
|
-
|
|
100
|
+
callback(error, undefined as any);
|
|
101
|
+
});
|
|
102
|
+
} catch (err) {
|
|
103
|
+
callback((err as any)?.msg || err, undefined as any);
|
|
104
|
+
}
|
|
136
105
|
};
|
|
137
106
|
|
|
138
107
|
return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import express, { Express } from 'express';
|
|
2
2
|
import errorhandler from 'errorhandler';
|
|
3
3
|
import morgan from 'morgan';
|
|
4
|
+
import Router from 'express-promise-router';
|
|
4
5
|
|
|
5
6
|
import baseUrlHandler from './base-url-handler';
|
|
6
7
|
import cors from './cors';
|
|
@@ -16,9 +17,13 @@ const bodyParserUrlEncodedArgument: { extended: boolean; limit?: number } = {
|
|
|
16
17
|
extended: true
|
|
17
18
|
};
|
|
18
19
|
|
|
19
|
-
export const bind = (
|
|
20
|
+
export const bind = (
|
|
21
|
+
app: Express,
|
|
22
|
+
options: Config
|
|
23
|
+
): { app: Express; router: express.Router } => {
|
|
20
24
|
app.set('port', options.port);
|
|
21
25
|
app.set('json spaces', 0);
|
|
26
|
+
app.set('etag', 'strong');
|
|
22
27
|
|
|
23
28
|
app.use((_req, res, next) => {
|
|
24
29
|
res.conf = options;
|
|
@@ -48,5 +53,8 @@ export const bind = (app: Express, options: Config): Express => {
|
|
|
48
53
|
app.use(errorhandler());
|
|
49
54
|
}
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
const router = Router();
|
|
57
|
+
app.use(router);
|
|
58
|
+
|
|
59
|
+
return { app, router };
|
|
52
60
|
};
|
package/src/registry/router.ts
CHANGED
|
@@ -8,14 +8,10 @@ import StaticRedirectorRoute from './routes/static-redirector';
|
|
|
8
8
|
import PluginsRoute from './routes/plugins';
|
|
9
9
|
import DependenciesRoute from './routes/dependencies';
|
|
10
10
|
import settings from '../resources/settings';
|
|
11
|
-
import {
|
|
11
|
+
import { Router } from 'express';
|
|
12
12
|
import { Config, Repository } from '../types';
|
|
13
13
|
|
|
14
|
-
export function create(
|
|
15
|
-
app: Express,
|
|
16
|
-
conf: Config,
|
|
17
|
-
repository: Repository
|
|
18
|
-
): Express {
|
|
14
|
+
export function create(app: Router, conf: Config, repository: Repository) {
|
|
19
15
|
const routes = {
|
|
20
16
|
component: ComponentRoute(conf, repository),
|
|
21
17
|
components: ComponentsRoute(conf, repository),
|
|
@@ -85,8 +81,4 @@ export function create(
|
|
|
85
81
|
](route.route, route.handler)
|
|
86
82
|
);
|
|
87
83
|
}
|
|
88
|
-
|
|
89
|
-
app.set('etag', 'strong');
|
|
90
|
-
|
|
91
|
-
return app;
|
|
92
84
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import parseAuthor from 'parse-author';
|
|
2
2
|
import _ from 'lodash';
|
|
3
|
+
import { fromPromise } from 'universalify';
|
|
3
4
|
|
|
4
5
|
import * as getComponentFallback from './helpers/get-component-fallback';
|
|
5
6
|
import infoView from '../views/info';
|
|
@@ -64,7 +65,7 @@ function componentInfo(
|
|
|
64
65
|
typeof component.repository === 'string' ? component.repository : null
|
|
65
66
|
);
|
|
66
67
|
|
|
67
|
-
isUrlDiscoverable(href, (_err, result) => {
|
|
68
|
+
fromPromise(isUrlDiscoverable)(href, (_err, result) => {
|
|
68
69
|
if (!result.isDiscoverable) {
|
|
69
70
|
href = `//${req.headers.host}${res.conf.prefix}`;
|
|
70
71
|
}
|
|
@@ -95,10 +96,10 @@ export default function componentInfoRoute(
|
|
|
95
96
|
repository: Repository
|
|
96
97
|
) {
|
|
97
98
|
return function (req: Request, res: Response): void {
|
|
98
|
-
repository.getComponent(
|
|
99
|
+
fromPromise(repository.getComponent)(
|
|
99
100
|
req.params['componentName'],
|
|
100
101
|
req.params['componentVersion'],
|
|
101
|
-
(registryError, component) => {
|
|
102
|
+
(registryError: any, component) => {
|
|
102
103
|
if (registryError && conf.fallbackRegistryUrl) {
|
|
103
104
|
return getComponentFallback.getComponentInfo(
|
|
104
105
|
conf,
|
|
@@ -3,6 +3,7 @@ import previewView from '../views/preview';
|
|
|
3
3
|
import * as urlBuilder from '../domain/url-builder';
|
|
4
4
|
import { Request, Response } from 'express';
|
|
5
5
|
import { Component, Config, TemplateInfo, Repository } from '../../types';
|
|
6
|
+
import { fromPromise } from 'universalify';
|
|
6
7
|
|
|
7
8
|
function componentPreview(
|
|
8
9
|
err: any,
|
|
@@ -50,10 +51,10 @@ export default function componentPreviewRoute(
|
|
|
50
51
|
repository: Repository
|
|
51
52
|
) {
|
|
52
53
|
return (req: Request, res: Response): void => {
|
|
53
|
-
repository.getComponent(
|
|
54
|
+
fromPromise(repository.getComponent)(
|
|
54
55
|
req.params['componentName'],
|
|
55
56
|
req.params['componentVersion'],
|
|
56
|
-
(registryError, component) => {
|
|
57
|
+
(registryError: any, component) => {
|
|
57
58
|
if (registryError && conf.fallbackRegistryUrl) {
|
|
58
59
|
return getComponentFallback.getComponentPreview(
|
|
59
60
|
conf,
|
|
@@ -50,7 +50,7 @@ export default function components(
|
|
|
50
50
|
|
|
51
51
|
if (!_.isEmpty(components)) {
|
|
52
52
|
const errors = _.compact(
|
|
53
|
-
|
|
53
|
+
components.map((component, index) => {
|
|
54
54
|
return !component.name
|
|
55
55
|
? registryErrors.BATCH_ROUTE_COMPONENT_NAME_MISSING(index)
|
|
56
56
|
: '';
|
|
@@ -4,6 +4,7 @@ import request from 'minimal-request';
|
|
|
4
4
|
import url from 'url';
|
|
5
5
|
import { Component, Config } from '../../../types';
|
|
6
6
|
import * as urlBuilder from '../../domain/url-builder';
|
|
7
|
+
import { GetComponentResult } from './get-component';
|
|
7
8
|
|
|
8
9
|
type ComponentCallback = (
|
|
9
10
|
err: { registryError: any; fallbackError: any } | null,
|
|
@@ -77,14 +78,7 @@ export function getComponent(
|
|
|
77
78
|
fallbackRegistryUrl: string,
|
|
78
79
|
headers: IncomingHttpHeaders,
|
|
79
80
|
component: { name: string; version: string; parameters: IncomingHttpHeaders },
|
|
80
|
-
callback: (
|
|
81
|
-
result:
|
|
82
|
-
| {
|
|
83
|
-
status: number;
|
|
84
|
-
response: { code: string; error: Error };
|
|
85
|
-
}
|
|
86
|
-
| Component
|
|
87
|
-
) => void
|
|
81
|
+
callback: (result: GetComponentResult) => void
|
|
88
82
|
): void {
|
|
89
83
|
return request(
|
|
90
84
|
{
|
|
@@ -94,7 +88,7 @@ export function getComponent(
|
|
|
94
88
|
json: true,
|
|
95
89
|
body: { components: [component] }
|
|
96
90
|
},
|
|
97
|
-
(err, res:
|
|
91
|
+
(err, res: GetComponentResult[]) => {
|
|
98
92
|
if (err || !res || res.length === 0) {
|
|
99
93
|
return callback({
|
|
100
94
|
status: 404,
|
|
@@ -20,8 +20,9 @@ import * as urlBuilder from '../../domain/url-builder';
|
|
|
20
20
|
import * as validator from '../../domain/validators';
|
|
21
21
|
import { Config, Repository } from '../../../types';
|
|
22
22
|
import { IncomingHttpHeaders } from 'http';
|
|
23
|
+
import { fromPromise } from 'universalify';
|
|
23
24
|
|
|
24
|
-
interface
|
|
25
|
+
export interface RendererOptions {
|
|
25
26
|
conf: Config;
|
|
26
27
|
headers: IncomingHttpHeaders;
|
|
27
28
|
ip: string;
|
|
@@ -31,7 +32,7 @@ interface Options {
|
|
|
31
32
|
omitHref?: boolean;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
export
|
|
35
|
+
export interface GetComponentResult {
|
|
35
36
|
status: number;
|
|
36
37
|
headers?: Record<string, string>;
|
|
37
38
|
response: {
|
|
@@ -39,6 +40,7 @@ export type GetComponentResult = {
|
|
|
39
40
|
code?: string;
|
|
40
41
|
error?: unknown;
|
|
41
42
|
version?: string;
|
|
43
|
+
html?: string;
|
|
42
44
|
requestVersion?: string;
|
|
43
45
|
name?: string;
|
|
44
46
|
details?: {
|
|
@@ -49,7 +51,7 @@ export type GetComponentResult = {
|
|
|
49
51
|
missingPlugins?: string[];
|
|
50
52
|
missingDependencies?: string[];
|
|
51
53
|
};
|
|
52
|
-
}
|
|
54
|
+
}
|
|
53
55
|
|
|
54
56
|
export default function getComponent(conf: Config, repository: Repository) {
|
|
55
57
|
const client = Client({ templates: conf.templates });
|
|
@@ -59,7 +61,7 @@ export default function getComponent(conf: Config, repository: Repository) {
|
|
|
59
61
|
});
|
|
60
62
|
|
|
61
63
|
const renderer = function (
|
|
62
|
-
options:
|
|
64
|
+
options: RendererOptions,
|
|
63
65
|
cb: (result: GetComponentResult) => void
|
|
64
66
|
) {
|
|
65
67
|
const nestedRenderer = NestedRenderer(renderer, options.conf);
|
|
@@ -97,7 +99,7 @@ export default function getComponent(conf: Config, repository: Repository) {
|
|
|
97
99
|
parameters: options.parameters
|
|
98
100
|
};
|
|
99
101
|
|
|
100
|
-
repository.getComponent(
|
|
102
|
+
fromPromise(repository.getComponent)(
|
|
101
103
|
requestedComponent.name,
|
|
102
104
|
requestedComponent.version,
|
|
103
105
|
(err, component) => {
|
|
@@ -372,7 +374,7 @@ export default function getComponent(conf: Config, repository: Repository) {
|
|
|
372
374
|
if (!!cached && !conf.hotReloading) {
|
|
373
375
|
returnResult(cached);
|
|
374
376
|
} else {
|
|
375
|
-
repository.getCompiledView(
|
|
377
|
+
fromPromise(repository.getCompiledView)(
|
|
376
378
|
component.name,
|
|
377
379
|
component.version,
|
|
378
380
|
(_err, templateText) => {
|
|
@@ -419,8 +421,8 @@ export default function getComponent(conf: Config, repository: Repository) {
|
|
|
419
421
|
env: conf.env,
|
|
420
422
|
params,
|
|
421
423
|
plugins: conf.plugins,
|
|
422
|
-
renderComponent: nestedRenderer.renderComponent,
|
|
423
|
-
renderComponents: nestedRenderer.renderComponents,
|
|
424
|
+
renderComponent: fromPromise(nestedRenderer.renderComponent),
|
|
425
|
+
renderComponents: fromPromise(nestedRenderer.renderComponents),
|
|
424
426
|
requestHeaders: options.headers,
|
|
425
427
|
requestIp: options.ip,
|
|
426
428
|
setEmptyResponse,
|
|
@@ -464,7 +466,7 @@ export default function getComponent(conf: Config, repository: Repository) {
|
|
|
464
466
|
return returnComponent(e, undefined);
|
|
465
467
|
}
|
|
466
468
|
} else {
|
|
467
|
-
repository.getDataProvider(
|
|
469
|
+
fromPromise(repository.getDataProvider)(
|
|
468
470
|
component.name,
|
|
469
471
|
component.version,
|
|
470
472
|
(err, dataProvider) => {
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import got from 'got';
|
|
2
2
|
|
|
3
|
-
export default function isUrlDiscoverable(
|
|
4
|
-
url: string
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
url,
|
|
3
|
+
export default async function isUrlDiscoverable(
|
|
4
|
+
url: string
|
|
5
|
+
): Promise<{ isDiscoverable: boolean }> {
|
|
6
|
+
try {
|
|
7
|
+
const res = await got(url, {
|
|
10
8
|
headers: { accept: 'text/html' }
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const isHtml = () =>
|
|
14
|
-
details.response.headers['content-type'].indexOf('text/html') >= 0;
|
|
9
|
+
});
|
|
10
|
+
const isHtml = !!res.headers['content-type']?.includes('text/html');
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
return {
|
|
13
|
+
isDiscoverable: isHtml
|
|
14
|
+
};
|
|
15
|
+
} catch (err) {
|
|
16
|
+
return { isDiscoverable: false };
|
|
17
|
+
}
|
|
19
18
|
}
|
|
@@ -13,6 +13,7 @@ import { Author, Component, ParsedComponent, Repository } from '../../types';
|
|
|
13
13
|
import { NextFunction, Request, Response } from 'express';
|
|
14
14
|
import { IncomingHttpHeaders } from 'http';
|
|
15
15
|
import { PackageJson } from 'type-fest';
|
|
16
|
+
import { fromPromise } from 'universalify';
|
|
16
17
|
|
|
17
18
|
const packageInfo: PackageJson = fs.readJsonSync(
|
|
18
19
|
path.join(__dirname, '..', '..', '..', 'package.json')
|
|
@@ -31,7 +32,7 @@ const isHtmlRequest = (headers: IncomingHttpHeaders) =>
|
|
|
31
32
|
|
|
32
33
|
export default function (repository: Repository) {
|
|
33
34
|
return (req: Request, res: Response, next: NextFunction): void => {
|
|
34
|
-
repository.getComponents((err, components) => {
|
|
35
|
+
fromPromise(repository.getComponents)((err, components) => {
|
|
35
36
|
if (err) {
|
|
36
37
|
res.errorDetails = 'cdn not available';
|
|
37
38
|
res.status(404).json({ error: res.errorDetails });
|
|
@@ -52,24 +53,28 @@ export default function (repository: Repository) {
|
|
|
52
53
|
async.each(
|
|
53
54
|
components,
|
|
54
55
|
(component, callback) =>
|
|
55
|
-
repository.getComponent(
|
|
56
|
-
|
|
56
|
+
fromPromise(repository.getComponent)(
|
|
57
|
+
component,
|
|
58
|
+
undefined,
|
|
59
|
+
(err, result) => {
|
|
60
|
+
if (err) return callback(err as any);
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
if (result.oc && result.oc.date) {
|
|
63
|
+
result.oc.stringifiedDate = dateStringified(
|
|
64
|
+
new Date(result.oc.date)
|
|
65
|
+
);
|
|
66
|
+
}
|
|
63
67
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
componentsInfo.push(mapComponentDetails(result));
|
|
69
|
+
componentsReleases += result.allVersions.length;
|
|
70
|
+
callback();
|
|
71
|
+
}
|
|
72
|
+
),
|
|
68
73
|
err => {
|
|
69
74
|
if (err) return next(err);
|
|
70
75
|
|
|
71
76
|
componentsInfo = _.sortBy(componentsInfo, 'name');
|
|
72
|
-
repository.getComponentsDetails((err, details) => {
|
|
77
|
+
fromPromise(repository.getComponentsDetails)((err, details) => {
|
|
73
78
|
// eslint-disable-next-line no-console
|
|
74
79
|
if (err) console.log(err);
|
|
75
80
|
res.send(
|
|
@@ -5,7 +5,7 @@ import { Request, Response } from 'express';
|
|
|
5
5
|
import { Repository } from '../../types';
|
|
6
6
|
|
|
7
7
|
export default function publish(repository: Repository) {
|
|
8
|
-
return function (req: Request, res: Response): void {
|
|
8
|
+
return async function (req: Request, res: Response): Promise<void> {
|
|
9
9
|
if (!req.params['componentName'] || !req.params['componentVersion']) {
|
|
10
10
|
res.errorDetails = 'malformed request';
|
|
11
11
|
res.status(409).json({ error: res.errorDetails });
|
|
@@ -53,40 +53,37 @@ export default function publish(repository: Repository) {
|
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
res.errorDetails = `Package is not valid: ${err}`;
|
|
59
|
-
res.status(500).json({ error: 'package is not valid', details: err });
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
repository.publishComponent(
|
|
64
|
-
pkgDetails,
|
|
65
|
-
req.params['componentName'],
|
|
66
|
-
req.params['componentVersion'],
|
|
67
|
-
err => {
|
|
68
|
-
if (err) {
|
|
69
|
-
if (err.code === 'not_allowed') {
|
|
70
|
-
res.errorDetails = `Publish not allowed: ${err.msg}`;
|
|
71
|
-
return res.status(403).json({ error: err.msg });
|
|
72
|
-
} else if (err.code === 'already_exists') {
|
|
73
|
-
res.errorDetails = `Component already exists: ${err.msg}`;
|
|
74
|
-
return res.status(403).json({ error: err.msg });
|
|
75
|
-
} else if (err.code === 'name_not_valid') {
|
|
76
|
-
res.errorDetails = `Component name not valid: ${err.msg}`;
|
|
77
|
-
return res.status(409).json({ error: err.msg });
|
|
78
|
-
} else if (err.code === 'version_not_valid') {
|
|
79
|
-
res.errorDetails = `Component version not valid: ${err.msg}`;
|
|
80
|
-
return res.status(409).json({ error: err.msg });
|
|
81
|
-
} else {
|
|
82
|
-
res.errorDetails = `Publish failed: ${err.msg}`;
|
|
83
|
-
return res.status(500).json({ error: err.msg });
|
|
84
|
-
}
|
|
85
|
-
}
|
|
56
|
+
try {
|
|
57
|
+
const pkgDetails = await extractPackage(files);
|
|
86
58
|
|
|
87
|
-
|
|
59
|
+
try {
|
|
60
|
+
await repository.publishComponent(
|
|
61
|
+
pkgDetails,
|
|
62
|
+
req.params['componentName'],
|
|
63
|
+
req.params['componentVersion']
|
|
64
|
+
);
|
|
65
|
+
res.status(200).json({ ok: true });
|
|
66
|
+
} catch (err: any) {
|
|
67
|
+
if (err.code === 'not_allowed') {
|
|
68
|
+
res.errorDetails = `Publish not allowed: ${err.msg}`;
|
|
69
|
+
res.status(403).json({ error: err.msg });
|
|
70
|
+
} else if (err.code === 'already_exists') {
|
|
71
|
+
res.errorDetails = `Component already exists: ${err.msg}`;
|
|
72
|
+
res.status(403).json({ error: err.msg });
|
|
73
|
+
} else if (err.code === 'name_not_valid') {
|
|
74
|
+
res.errorDetails = `Component name not valid: ${err.msg}`;
|
|
75
|
+
res.status(409).json({ error: err.msg });
|
|
76
|
+
} else if (err.code === 'version_not_valid') {
|
|
77
|
+
res.errorDetails = `Component version not valid: ${err.msg}`;
|
|
78
|
+
res.status(409).json({ error: err.msg });
|
|
79
|
+
} else {
|
|
80
|
+
res.errorDetails = `Publish failed: ${err.msg}`;
|
|
81
|
+
res.status(500).json({ error: err.msg });
|
|
88
82
|
}
|
|
89
|
-
|
|
90
|
-
})
|
|
83
|
+
}
|
|
84
|
+
} catch (err) {
|
|
85
|
+
res.errorDetails = `Package is not valid: ${err}`;
|
|
86
|
+
res.status(500).json({ error: 'package is not valid', details: err });
|
|
87
|
+
}
|
|
91
88
|
};
|
|
92
89
|
}
|
|
@@ -73,8 +73,11 @@ export default function info(vm: Vm): string {
|
|
|
73
73
|
<div class="field"><p>Accept-Language header:</p></div>
|
|
74
74
|
<input class="w-100" id="lang" type="text" value="*" />
|
|
75
75
|
<h3>
|
|
76
|
-
Preview
|
|
77
|
-
<a class="refresh-preview" href="#refresh">
|
|
76
|
+
Preview (
|
|
77
|
+
<a class="refresh-preview" href="#refresh">Refresh</a>
|
|
78
|
+
|
|
|
79
|
+
<a class="open-preview" href="#open">Open</a>
|
|
80
|
+
)
|
|
78
81
|
</h3>
|
|
79
82
|
<iframe class="preview" src="~preview/${sandBoxDefaultQs}"></iframe>`;
|
|
80
83
|
|
|
@@ -7,7 +7,7 @@ oc.cmd.push(function() {
|
|
|
7
7
|
window.location = thisComponentHref + $(this).val() + '/~info';
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
var refreshPreview = function() {
|
|
11
11
|
var splitted = $('#href')
|
|
12
12
|
.val()
|
|
13
13
|
.split('?'),
|
|
@@ -27,6 +27,17 @@ oc.cmd.push(function() {
|
|
|
27
27
|
|
|
28
28
|
$('.preview').attr('src', url);
|
|
29
29
|
|
|
30
|
+
return false;
|
|
31
|
+
};
|
|
32
|
+
$('.refresh-preview').click(refreshPreview);
|
|
33
|
+
|
|
34
|
+
$('.open-preview').click(function() {
|
|
35
|
+
refreshPreview();
|
|
36
|
+
var url = $('.preview').attr('src');
|
|
37
|
+
|
|
38
|
+
window.open(url, '_blank');
|
|
30
39
|
return false;
|
|
31
40
|
});
|
|
41
|
+
|
|
42
|
+
|
|
32
43
|
});`;
|
|
@@ -3,7 +3,7 @@ export default {
|
|
|
3
3
|
src: './oc.json'
|
|
4
4
|
},
|
|
5
5
|
filesToIgnoreOnDevWatch:
|
|
6
|
-
/node_modules|package\.tar\.gz|_package|\.sw[op]|\.git\/|\.idea\/|\.DS_Store|oc\.json/,
|
|
6
|
+
/temp\/__oc|node_modules|package\.tar\.gz|_package|\.sw[op]|\.git\/|\.idea\/|\.DS_Store|oc\.json/,
|
|
7
7
|
maxLoopIterations: 1e9,
|
|
8
8
|
registry: {
|
|
9
9
|
acceptRenderedHeader: 'application/vnd.oc.rendered+json',
|