oc 0.49.26 → 0.49.28
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 +10 -0
- 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 -24
- package/dist/cli/domain/get-components-by-dir.d.ts +1 -1
- package/dist/cli/domain/get-components-by-dir.js +41 -41
- package/dist/cli/domain/get-mocked-plugins.d.ts +10 -10
- package/dist/cli/domain/get-mocked-plugins.js +88 -88
- 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 +15 -15
- 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 -10
- package/dist/cli/domain/handle-dependencies/index.js +70 -70
- package/dist/cli/domain/handle-dependencies/install-compiler.d.ts +8 -8
- package/dist/cli/domain/handle-dependencies/install-compiler.js +58 -58
- package/dist/cli/domain/handle-dependencies/install-missing-dependencies.d.ts +5 -5
- package/dist/cli/domain/handle-dependencies/install-missing-dependencies.js +63 -63
- package/dist/cli/domain/handle-dependencies/link-missing-dependencies.d.ts +6 -6
- package/dist/cli/domain/handle-dependencies/link-missing-dependencies.js +32 -32
- 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 +44 -44
- package/dist/cli/domain/init-template/install-template.d.ts +11 -11
- package/dist/cli/domain/init-template/install-template.js +58 -58
- package/dist/cli/domain/init-template/scaffold.d.ts +11 -11
- package/dist/cli/domain/init-template/scaffold.js +34 -34
- package/dist/cli/domain/local.d.ts +21 -21
- package/dist/cli/domain/local.js +86 -86
- 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 +71 -71
- package/dist/cli/domain/registry.d.ts +20 -20
- package/dist/cli/domain/registry.js +143 -143
- 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 -16
- package/dist/cli/facade/clean.js +58 -58
- package/dist/cli/facade/dev.d.ts +146 -114
- package/dist/cli/facade/dev.js +177 -177
- package/dist/cli/facade/init.d.ts +18 -18
- package/dist/cli/facade/init.js +39 -39
- package/dist/cli/facade/mock.d.ts +18 -18
- package/dist/cli/facade/mock.js +12 -12
- package/dist/cli/facade/package.d.ts +19 -19
- package/dist/cli/facade/package.js +49 -49
- package/dist/cli/facade/preview.d.ts +14 -14
- package/dist/cli/facade/preview.js +20 -20
- package/dist/cli/facade/publish.d.ts +24 -24
- package/dist/cli/facade/publish.js +145 -145
- package/dist/cli/facade/registry-add.d.ts +14 -14
- package/dist/cli/facade/registry-add.js +18 -18
- package/dist/cli/facade/registry-ls.d.ts +10 -10
- package/dist/cli/facade/registry-ls.js +27 -27
- package/dist/cli/facade/registry-remove.d.ts +14 -14
- package/dist/cli/facade/registry-remove.js +18 -18
- package/dist/cli/facade/registry.d.ts +5 -5
- package/dist/cli/facade/registry.js +9 -9
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +91 -91
- 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/server.js +1 -1
- package/dist/components/oc-client/_package/src/oc-client.min.js +2 -2
- package/dist/components/oc-client/_package/src/oc-client.min.map +1 -1
- package/dist/components/oc-client/_package/template.js +11 -1
- package/dist/components/oc-client/package.json +1 -1
- package/dist/components/oc-client/src/oc-client.min.js +2 -2
- package/dist/components/oc-client/src/oc-client.min.map +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 +3 -3
- package/dist/registry/app-start.js +44 -44
- package/dist/registry/domain/authentication.d.ts +7 -7
- package/dist/registry/domain/authentication.js +53 -53
- package/dist/registry/domain/components-cache/components-list.d.ts +8 -8
- package/dist/registry/domain/components-cache/components-list.js +73 -73
- package/dist/registry/domain/components-cache/index.d.ts +7 -7
- package/dist/registry/domain/components-cache/index.js +81 -81
- package/dist/registry/domain/components-details.d.ts +6 -6
- package/dist/registry/domain/components-details.js +63 -63
- package/dist/registry/domain/events-handler.d.ts +48 -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 +30 -30
- 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 -14
- package/dist/registry/domain/nested-renderer.js +59 -59
- package/dist/registry/domain/options-sanitiser.d.ts +6 -6
- package/dist/registry/domain/options-sanitiser.js +113 -113
- package/dist/registry/domain/plugins-initialiser.d.ts +3 -3
- package/dist/registry/domain/plugins-initialiser.js +95 -95
- package/dist/registry/domain/register-templates.d.ts +5 -5
- package/dist/registry/domain/register-templates.js +37 -37
- package/dist/registry/domain/repository.d.ts +26 -26
- package/dist/registry/domain/repository.js +255 -255
- package/dist/registry/domain/require-wrapper.d.ts +2 -2
- package/dist/registry/domain/require-wrapper.js +33 -33
- 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 -10
- package/dist/registry/domain/storage-adapter.js +55 -55
- 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 +117 -117
- 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 +64 -48
- package/dist/registry/index.js +109 -109
- 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 +3 -3
- package/dist/registry/middleware/index.js +48 -48
- 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 +4 -4
- package/dist/registry/router.js +56 -56
- package/dist/registry/routes/component-info.d.ts +4 -4
- package/dist/registry/routes/component-info.js +95 -94
- package/dist/registry/routes/component-preview.d.ts +4 -4
- package/dist/registry/routes/component-preview.js +72 -72
- package/dist/registry/routes/component.d.ts +4 -4
- package/dist/registry/routes/component.js +43 -43
- package/dist/registry/routes/components.d.ts +4 -4
- 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 +23 -23
- package/dist/registry/routes/helpers/get-component-fallback.d.ts +17 -17
- package/dist/registry/routes/helpers/get-component-fallback.js +95 -95
- 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 +34 -34
- package/dist/registry/routes/helpers/get-component.js +445 -435
- 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 +21 -21
- package/dist/registry/routes/index.d.ts +3 -3
- package/dist/registry/routes/index.js +93 -93
- 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 +101 -101
- package/dist/registry/routes/static-redirector.d.ts +3 -3
- package/dist/registry/routes/static-redirector.js +86 -86
- 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 +39 -39
- 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 +3 -3
- 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 +231 -231
- 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 -20
- package/dist/utils/npm-utils.js +74 -74
- package/dist/utils/put.d.ts +2 -2
- package/dist/utils/put.js +29 -29
- 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 +20 -20
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const safe_1 = __importDefault(require("colors/safe"));
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
9
|
-
const packageInfo = fs_extra_1.default.readJsonSync(path_1.default.join(__dirname, '..', 'components', 'oc-client', '_package', 'package.json'));
|
|
10
|
-
async function appStart(repository, options) {
|
|
11
|
-
if (options.local) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
15
|
-
const logger = options.verbosity ? console : { log: () => { } };
|
|
16
|
-
logger.log(safe_1.default.yellow(`Connecting to library: ${options.storage.options['bucket']}/${options.storage.options.componentsDir}`));
|
|
17
|
-
try {
|
|
18
|
-
const componentInfo = await repository.getComponentVersions('oc-client');
|
|
19
|
-
logger.log(safe_1.default.yellow(`Ensuring oc-client@${packageInfo.version} is available on library...`));
|
|
20
|
-
if (!componentInfo.includes(packageInfo.version)) {
|
|
21
|
-
logger.log(safe_1.default.yellow('Component not found. Publishing it...'));
|
|
22
|
-
const pkgInfo = {
|
|
23
|
-
outputFolder: path_1.default.resolve(__dirname, '../components/oc-client/_package'),
|
|
24
|
-
packageJson: packageInfo
|
|
25
|
-
};
|
|
26
|
-
try {
|
|
27
|
-
await repository.publishComponent(pkgInfo, 'oc-client', packageInfo.version);
|
|
28
|
-
logger.log(safe_1.default.green('Component published.'));
|
|
29
|
-
}
|
|
30
|
-
catch (err) {
|
|
31
|
-
logger.log(safe_1.default.red(`Component not published: ${err.message}`));
|
|
32
|
-
throw err;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
logger.log(safe_1.default.green('Component is available on library.'));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
catch (err) {
|
|
40
|
-
logger.log(safe_1.default.red(String(err)));
|
|
41
|
-
throw err;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.default = appStart;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const safe_1 = __importDefault(require("colors/safe"));
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
9
|
+
const packageInfo = fs_extra_1.default.readJsonSync(path_1.default.join(__dirname, '..', 'components', 'oc-client', '_package', 'package.json'));
|
|
10
|
+
async function appStart(repository, options) {
|
|
11
|
+
if (options.local) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
15
|
+
const logger = options.verbosity ? console : { log: () => { } };
|
|
16
|
+
logger.log(safe_1.default.yellow(`Connecting to library: ${options.storage.options['bucket']}/${options.storage.options.componentsDir}`));
|
|
17
|
+
try {
|
|
18
|
+
const componentInfo = await repository.getComponentVersions('oc-client');
|
|
19
|
+
logger.log(safe_1.default.yellow(`Ensuring oc-client@${packageInfo.version} is available on library...`));
|
|
20
|
+
if (!componentInfo.includes(packageInfo.version)) {
|
|
21
|
+
logger.log(safe_1.default.yellow('Component not found. Publishing it...'));
|
|
22
|
+
const pkgInfo = {
|
|
23
|
+
outputFolder: path_1.default.resolve(__dirname, '../components/oc-client/_package'),
|
|
24
|
+
packageJson: packageInfo
|
|
25
|
+
};
|
|
26
|
+
try {
|
|
27
|
+
await repository.publishComponent(pkgInfo, 'oc-client', packageInfo.version);
|
|
28
|
+
logger.log(safe_1.default.green('Component published.'));
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
logger.log(safe_1.default.red(`Component not published: ${err.message}`));
|
|
32
|
+
throw err;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
logger.log(safe_1.default.green('Component is available on library.'));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
logger.log(safe_1.default.red(String(err)));
|
|
41
|
+
throw err;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.default = appStart;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RequestHandler } from 'express';
|
|
2
|
-
import { PublishAuthConfig } from '../../types';
|
|
3
|
-
export declare function validate(authConfig: PublishAuthConfig): {
|
|
4
|
-
isValid: boolean;
|
|
5
|
-
message: string;
|
|
6
|
-
};
|
|
7
|
-
export declare function middleware(authConfig: unknown): RequestHandler;
|
|
1
|
+
import { RequestHandler } from 'express';
|
|
2
|
+
import { PublishAuthConfig } from '../../types';
|
|
3
|
+
export declare function validate(authConfig: PublishAuthConfig): {
|
|
4
|
+
isValid: boolean;
|
|
5
|
+
message: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function middleware(authConfig: unknown): RequestHandler;
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.middleware = exports.validate = void 0;
|
|
7
|
-
const basic_auth_connect_1 = __importDefault(require("basic-auth-connect"));
|
|
8
|
-
const resources_1 = __importDefault(require("../../resources/"));
|
|
9
|
-
const basicAuthentication = {
|
|
10
|
-
validate(authConfig) {
|
|
11
|
-
const isValid = !!authConfig.username && !!authConfig.password;
|
|
12
|
-
return {
|
|
13
|
-
isValid,
|
|
14
|
-
message: isValid
|
|
15
|
-
? ''
|
|
16
|
-
: resources_1.default.errors.registry
|
|
17
|
-
.CONFIGURATION_PUBLISH_BASIC_AUTH_CREDENTIALS_MISSING
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
middleware(authConfig) {
|
|
21
|
-
return (0, basic_auth_connect_1.default)(authConfig.username, authConfig.password);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
const builtin = {
|
|
25
|
-
basic: basicAuthentication
|
|
26
|
-
};
|
|
27
|
-
let scheme;
|
|
28
|
-
function validate(authConfig) {
|
|
29
|
-
if (typeof authConfig.type !== 'string') {
|
|
30
|
-
scheme = authConfig.type;
|
|
31
|
-
}
|
|
32
|
-
else if (builtin[authConfig.type]) {
|
|
33
|
-
scheme = builtin[authConfig.type];
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
const moduleName = `oc-auth-${authConfig.type}`;
|
|
37
|
-
try {
|
|
38
|
-
scheme = require(moduleName);
|
|
39
|
-
}
|
|
40
|
-
catch (err) {
|
|
41
|
-
return {
|
|
42
|
-
isValid: false,
|
|
43
|
-
message: resources_1.default.errors.registry.CONFIGURATION_PUBLISH_AUTH_MODULE_NOT_FOUND(moduleName)
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return scheme.validate(authConfig);
|
|
48
|
-
}
|
|
49
|
-
exports.validate = validate;
|
|
50
|
-
function middleware(authConfig) {
|
|
51
|
-
return scheme.middleware(authConfig);
|
|
52
|
-
}
|
|
53
|
-
exports.middleware = middleware;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.middleware = exports.validate = void 0;
|
|
7
|
+
const basic_auth_connect_1 = __importDefault(require("basic-auth-connect"));
|
|
8
|
+
const resources_1 = __importDefault(require("../../resources/"));
|
|
9
|
+
const basicAuthentication = {
|
|
10
|
+
validate(authConfig) {
|
|
11
|
+
const isValid = !!authConfig.username && !!authConfig.password;
|
|
12
|
+
return {
|
|
13
|
+
isValid,
|
|
14
|
+
message: isValid
|
|
15
|
+
? ''
|
|
16
|
+
: resources_1.default.errors.registry
|
|
17
|
+
.CONFIGURATION_PUBLISH_BASIC_AUTH_CREDENTIALS_MISSING
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
middleware(authConfig) {
|
|
21
|
+
return (0, basic_auth_connect_1.default)(authConfig.username, authConfig.password);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const builtin = {
|
|
25
|
+
basic: basicAuthentication
|
|
26
|
+
};
|
|
27
|
+
let scheme;
|
|
28
|
+
function validate(authConfig) {
|
|
29
|
+
if (typeof authConfig.type !== 'string') {
|
|
30
|
+
scheme = authConfig.type;
|
|
31
|
+
}
|
|
32
|
+
else if (builtin[authConfig.type]) {
|
|
33
|
+
scheme = builtin[authConfig.type];
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const moduleName = `oc-auth-${authConfig.type}`;
|
|
37
|
+
try {
|
|
38
|
+
scheme = require(moduleName);
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
return {
|
|
42
|
+
isValid: false,
|
|
43
|
+
message: resources_1.default.errors.registry.CONFIGURATION_PUBLISH_AUTH_MODULE_NOT_FOUND(moduleName)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return scheme.validate(authConfig);
|
|
48
|
+
}
|
|
49
|
+
exports.validate = validate;
|
|
50
|
+
function middleware(authConfig) {
|
|
51
|
+
return scheme.middleware(authConfig);
|
|
52
|
+
}
|
|
53
|
+
exports.middleware = middleware;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { StorageAdapter } from 'oc-storage-adapters-utils';
|
|
2
|
-
import { ComponentsList, Config } from '../../../types';
|
|
3
|
-
export default function componentsList(conf: Config, cdn: StorageAdapter): {
|
|
4
|
-
getFromJson: () => Promise<ComponentsList>;
|
|
5
|
-
getFromDirectories: (jsonList: ComponentsList | null) => Promise<ComponentsList>;
|
|
6
|
-
refresh(cachedList: ComponentsList): Promise<ComponentsList>;
|
|
7
|
-
save: (data: ComponentsList) => Promise<unknown>;
|
|
8
|
-
};
|
|
1
|
+
import { StorageAdapter } from 'oc-storage-adapters-utils';
|
|
2
|
+
import { ComponentsList, Config } from '../../../types';
|
|
3
|
+
export default function componentsList(conf: Config, cdn: StorageAdapter): {
|
|
4
|
+
getFromJson: () => Promise<ComponentsList>;
|
|
5
|
+
getFromDirectories: (jsonList: ComponentsList | null) => Promise<ComponentsList>;
|
|
6
|
+
refresh(cachedList: ComponentsList): Promise<ComponentsList>;
|
|
7
|
+
save: (data: ComponentsList) => Promise<unknown>;
|
|
8
|
+
};
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const semver_1 = __importDefault(require("semver"));
|
|
7
|
-
const p_limit_1 = __importDefault(require("p-limit"));
|
|
8
|
-
const oc_get_unix_utc_timestamp_1 = __importDefault(require("oc-get-unix-utc-timestamp"));
|
|
9
|
-
const events_handler_1 = __importDefault(require("../events-handler"));
|
|
10
|
-
function componentsList(conf, cdn) {
|
|
11
|
-
const filePath = () => `${conf.storage.options.componentsDir}/components.json`;
|
|
12
|
-
const componentsList = {
|
|
13
|
-
getFromJson: () => cdn.getJson(filePath(), true),
|
|
14
|
-
getFromDirectories: async (jsonList) => {
|
|
15
|
-
const componentsInfo = {};
|
|
16
|
-
const validateComponentVersion = (componentName, componentVersion) => {
|
|
17
|
-
return cdn
|
|
18
|
-
.getJson(
|
|
19
|
-
// Check integrity of the package by checking existence of package.json
|
|
20
|
-
// OC will upload always the package.json last when publishing
|
|
21
|
-
`${conf.storage.options.componentsDir}/${componentName}/${componentVersion}/package.json`)
|
|
22
|
-
.then(() => true)
|
|
23
|
-
.catch(() => false);
|
|
24
|
-
};
|
|
25
|
-
const getVersionsForComponent = async (componentName) => {
|
|
26
|
-
const allVersions = await cdn.listSubDirectories(`${conf.storage.options.componentsDir}/${componentName}`);
|
|
27
|
-
const unCheckedVersions = allVersions.filter(version => !jsonList?.components[componentName]?.includes(version));
|
|
28
|
-
const limit = (0, p_limit_1.default)(cdn.maxConcurrentRequests);
|
|
29
|
-
const invalidVersions = (await Promise.all(unCheckedVersions.map(unCheckedVersion => limit(async () => {
|
|
30
|
-
const isValid = await validateComponentVersion(componentName, unCheckedVersion);
|
|
31
|
-
return isValid ? null : unCheckedVersion;
|
|
32
|
-
})))).filter((x) => typeof x === 'string');
|
|
33
|
-
if (invalidVersions.length > 0) {
|
|
34
|
-
events_handler_1.default.fire('error', {
|
|
35
|
-
code: 'corrupted_version',
|
|
36
|
-
message: `Couldn't validate the integrity of the component ${componentName} on the following versions: ${invalidVersions.join(', ')}.`
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
const validVersions = allVersions.filter(version => !invalidVersions.includes(version));
|
|
40
|
-
return validVersions.sort(semver_1.default.compare);
|
|
41
|
-
};
|
|
42
|
-
try {
|
|
43
|
-
const components = await cdn.listSubDirectories(conf.storage.options.componentsDir);
|
|
44
|
-
const limit = (0, p_limit_1.default)(cdn.maxConcurrentRequests);
|
|
45
|
-
const versions = await Promise.all(components.map(component => limit(() => getVersionsForComponent(component))));
|
|
46
|
-
components.forEach((component, i) => {
|
|
47
|
-
componentsInfo[component] = versions[i];
|
|
48
|
-
});
|
|
49
|
-
return {
|
|
50
|
-
lastEdit: (0, oc_get_unix_utc_timestamp_1.default)(),
|
|
51
|
-
components: componentsInfo
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
catch (err) {
|
|
55
|
-
if (err.code === 'dir_not_found') {
|
|
56
|
-
return {
|
|
57
|
-
lastEdit: (0, oc_get_unix_utc_timestamp_1.default)(),
|
|
58
|
-
components: {}
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
throw err;
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
async refresh(cachedList) {
|
|
65
|
-
const components = await componentsList.getFromDirectories(cachedList);
|
|
66
|
-
await componentsList.save(components);
|
|
67
|
-
return components;
|
|
68
|
-
},
|
|
69
|
-
save: (data) => cdn.putFileContent(JSON.stringify(data), filePath(), true)
|
|
70
|
-
};
|
|
71
|
-
return componentsList;
|
|
72
|
-
}
|
|
73
|
-
exports.default = componentsList;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const semver_1 = __importDefault(require("semver"));
|
|
7
|
+
const p_limit_1 = __importDefault(require("p-limit"));
|
|
8
|
+
const oc_get_unix_utc_timestamp_1 = __importDefault(require("oc-get-unix-utc-timestamp"));
|
|
9
|
+
const events_handler_1 = __importDefault(require("../events-handler"));
|
|
10
|
+
function componentsList(conf, cdn) {
|
|
11
|
+
const filePath = () => `${conf.storage.options.componentsDir}/components.json`;
|
|
12
|
+
const componentsList = {
|
|
13
|
+
getFromJson: () => cdn.getJson(filePath(), true),
|
|
14
|
+
getFromDirectories: async (jsonList) => {
|
|
15
|
+
const componentsInfo = {};
|
|
16
|
+
const validateComponentVersion = (componentName, componentVersion) => {
|
|
17
|
+
return cdn
|
|
18
|
+
.getJson(
|
|
19
|
+
// Check integrity of the package by checking existence of package.json
|
|
20
|
+
// OC will upload always the package.json last when publishing
|
|
21
|
+
`${conf.storage.options.componentsDir}/${componentName}/${componentVersion}/package.json`)
|
|
22
|
+
.then(() => true)
|
|
23
|
+
.catch(() => false);
|
|
24
|
+
};
|
|
25
|
+
const getVersionsForComponent = async (componentName) => {
|
|
26
|
+
const allVersions = await cdn.listSubDirectories(`${conf.storage.options.componentsDir}/${componentName}`);
|
|
27
|
+
const unCheckedVersions = allVersions.filter(version => !jsonList?.components[componentName]?.includes(version));
|
|
28
|
+
const limit = (0, p_limit_1.default)(cdn.maxConcurrentRequests);
|
|
29
|
+
const invalidVersions = (await Promise.all(unCheckedVersions.map(unCheckedVersion => limit(async () => {
|
|
30
|
+
const isValid = await validateComponentVersion(componentName, unCheckedVersion);
|
|
31
|
+
return isValid ? null : unCheckedVersion;
|
|
32
|
+
})))).filter((x) => typeof x === 'string');
|
|
33
|
+
if (invalidVersions.length > 0) {
|
|
34
|
+
events_handler_1.default.fire('error', {
|
|
35
|
+
code: 'corrupted_version',
|
|
36
|
+
message: `Couldn't validate the integrity of the component ${componentName} on the following versions: ${invalidVersions.join(', ')}.`
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
const validVersions = allVersions.filter(version => !invalidVersions.includes(version));
|
|
40
|
+
return validVersions.sort(semver_1.default.compare);
|
|
41
|
+
};
|
|
42
|
+
try {
|
|
43
|
+
const components = await cdn.listSubDirectories(conf.storage.options.componentsDir);
|
|
44
|
+
const limit = (0, p_limit_1.default)(cdn.maxConcurrentRequests);
|
|
45
|
+
const versions = await Promise.all(components.map(component => limit(() => getVersionsForComponent(component))));
|
|
46
|
+
components.forEach((component, i) => {
|
|
47
|
+
componentsInfo[component] = versions[i];
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
lastEdit: (0, oc_get_unix_utc_timestamp_1.default)(),
|
|
51
|
+
components: componentsInfo
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
if (err.code === 'dir_not_found') {
|
|
56
|
+
return {
|
|
57
|
+
lastEdit: (0, oc_get_unix_utc_timestamp_1.default)(),
|
|
58
|
+
components: {}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
throw err;
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
async refresh(cachedList) {
|
|
65
|
+
const components = await componentsList.getFromDirectories(cachedList);
|
|
66
|
+
await componentsList.save(components);
|
|
67
|
+
return components;
|
|
68
|
+
},
|
|
69
|
+
save: (data) => cdn.putFileContent(JSON.stringify(data), filePath(), true)
|
|
70
|
+
};
|
|
71
|
+
return componentsList;
|
|
72
|
+
}
|
|
73
|
+
exports.default = componentsList;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ComponentsList, Config } from '../../../types';
|
|
2
|
-
import { StorageAdapter } from 'oc-storage-adapters-utils';
|
|
3
|
-
export default function componentsCache(conf: Config, cdn: StorageAdapter): {
|
|
4
|
-
get(): ComponentsList;
|
|
5
|
-
load(): Promise<ComponentsList>;
|
|
6
|
-
refresh(): Promise<ComponentsList>;
|
|
7
|
-
};
|
|
1
|
+
import { ComponentsList, Config } from '../../../types';
|
|
2
|
+
import { StorageAdapter } from 'oc-storage-adapters-utils';
|
|
3
|
+
export default function componentsCache(conf: Config, cdn: StorageAdapter): {
|
|
4
|
+
get(): ComponentsList;
|
|
5
|
+
load(): Promise<ComponentsList>;
|
|
6
|
+
refresh(): Promise<ComponentsList>;
|
|
7
|
+
};
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
7
|
-
const components_list_1 = __importDefault(require("./components-list"));
|
|
8
|
-
const events_handler_1 = __importDefault(require("../events-handler"));
|
|
9
|
-
const oc_get_unix_utc_timestamp_1 = __importDefault(require("oc-get-unix-utc-timestamp"));
|
|
10
|
-
const oc_storage_adapters_utils_1 = require("oc-storage-adapters-utils");
|
|
11
|
-
function componentsCache(conf, cdn) {
|
|
12
|
-
let cachedComponentsList;
|
|
13
|
-
let refreshLoop;
|
|
14
|
-
const componentsList = (0, components_list_1.default)(conf, cdn);
|
|
15
|
-
const poll = () => {
|
|
16
|
-
return setTimeout(async () => {
|
|
17
|
-
try {
|
|
18
|
-
const data = await componentsList.getFromJson();
|
|
19
|
-
events_handler_1.default.fire('cache-poll', (0, oc_get_unix_utc_timestamp_1.default)());
|
|
20
|
-
if (data.lastEdit > cachedComponentsList.lastEdit) {
|
|
21
|
-
cachedComponentsList = data;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
catch (err) {
|
|
25
|
-
events_handler_1.default.fire('error', {
|
|
26
|
-
code: 'components_list_get',
|
|
27
|
-
message: err?.message || String(err)
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
refreshLoop = poll();
|
|
31
|
-
}, conf.pollingInterval * 1000);
|
|
32
|
-
};
|
|
33
|
-
const cacheDataAndStartPolling = (data) => {
|
|
34
|
-
cachedComponentsList = data;
|
|
35
|
-
refreshLoop = poll();
|
|
36
|
-
return data;
|
|
37
|
-
};
|
|
38
|
-
const throwError = (code, message) => {
|
|
39
|
-
events_handler_1.default.fire('error', { code, message: message?.message ?? message });
|
|
40
|
-
throw code;
|
|
41
|
-
};
|
|
42
|
-
return {
|
|
43
|
-
get() {
|
|
44
|
-
if (!cachedComponentsList) {
|
|
45
|
-
return throwError('components_cache_empty', `The component's cache was empty`);
|
|
46
|
-
}
|
|
47
|
-
return cachedComponentsList;
|
|
48
|
-
},
|
|
49
|
-
async load() {
|
|
50
|
-
const jsonComponents = await componentsList.getFromJson().catch(err => {
|
|
51
|
-
if (err?.code === oc_storage_adapters_utils_1.strings.errors.STORAGE.FILE_NOT_FOUND_CODE)
|
|
52
|
-
return null;
|
|
53
|
-
return Promise.reject(err);
|
|
54
|
-
});
|
|
55
|
-
const dirComponents = await componentsList
|
|
56
|
-
.getFromDirectories(jsonComponents)
|
|
57
|
-
.catch(err => throwError('components_list_get', err));
|
|
58
|
-
if (!jsonComponents ||
|
|
59
|
-
!lodash_1.default.isEqual(dirComponents.components, jsonComponents.components)) {
|
|
60
|
-
await componentsList
|
|
61
|
-
.save(dirComponents)
|
|
62
|
-
.catch(err => throwError('components_list_save', err));
|
|
63
|
-
}
|
|
64
|
-
cacheDataAndStartPolling(dirComponents);
|
|
65
|
-
return dirComponents;
|
|
66
|
-
},
|
|
67
|
-
async refresh() {
|
|
68
|
-
clearTimeout(refreshLoop);
|
|
69
|
-
try {
|
|
70
|
-
// Passing components that we know are fine, so it doesn't refresh invalid components
|
|
71
|
-
const components = await componentsList.refresh(cachedComponentsList);
|
|
72
|
-
cacheDataAndStartPolling(components);
|
|
73
|
-
return components;
|
|
74
|
-
}
|
|
75
|
-
catch (err) {
|
|
76
|
-
return throwError('components_cache_refresh', err);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
exports.default = componentsCache;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
7
|
+
const components_list_1 = __importDefault(require("./components-list"));
|
|
8
|
+
const events_handler_1 = __importDefault(require("../events-handler"));
|
|
9
|
+
const oc_get_unix_utc_timestamp_1 = __importDefault(require("oc-get-unix-utc-timestamp"));
|
|
10
|
+
const oc_storage_adapters_utils_1 = require("oc-storage-adapters-utils");
|
|
11
|
+
function componentsCache(conf, cdn) {
|
|
12
|
+
let cachedComponentsList;
|
|
13
|
+
let refreshLoop;
|
|
14
|
+
const componentsList = (0, components_list_1.default)(conf, cdn);
|
|
15
|
+
const poll = () => {
|
|
16
|
+
return setTimeout(async () => {
|
|
17
|
+
try {
|
|
18
|
+
const data = await componentsList.getFromJson();
|
|
19
|
+
events_handler_1.default.fire('cache-poll', (0, oc_get_unix_utc_timestamp_1.default)());
|
|
20
|
+
if (data.lastEdit > cachedComponentsList.lastEdit) {
|
|
21
|
+
cachedComponentsList = data;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
catch (err) {
|
|
25
|
+
events_handler_1.default.fire('error', {
|
|
26
|
+
code: 'components_list_get',
|
|
27
|
+
message: err?.message || String(err)
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
refreshLoop = poll();
|
|
31
|
+
}, conf.pollingInterval * 1000);
|
|
32
|
+
};
|
|
33
|
+
const cacheDataAndStartPolling = (data) => {
|
|
34
|
+
cachedComponentsList = data;
|
|
35
|
+
refreshLoop = poll();
|
|
36
|
+
return data;
|
|
37
|
+
};
|
|
38
|
+
const throwError = (code, message) => {
|
|
39
|
+
events_handler_1.default.fire('error', { code, message: message?.message ?? message });
|
|
40
|
+
throw code;
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
get() {
|
|
44
|
+
if (!cachedComponentsList) {
|
|
45
|
+
return throwError('components_cache_empty', `The component's cache was empty`);
|
|
46
|
+
}
|
|
47
|
+
return cachedComponentsList;
|
|
48
|
+
},
|
|
49
|
+
async load() {
|
|
50
|
+
const jsonComponents = await componentsList.getFromJson().catch(err => {
|
|
51
|
+
if (err?.code === oc_storage_adapters_utils_1.strings.errors.STORAGE.FILE_NOT_FOUND_CODE)
|
|
52
|
+
return null;
|
|
53
|
+
return Promise.reject(err);
|
|
54
|
+
});
|
|
55
|
+
const dirComponents = await componentsList
|
|
56
|
+
.getFromDirectories(jsonComponents)
|
|
57
|
+
.catch(err => throwError('components_list_get', err));
|
|
58
|
+
if (!jsonComponents ||
|
|
59
|
+
!lodash_1.default.isEqual(dirComponents.components, jsonComponents.components)) {
|
|
60
|
+
await componentsList
|
|
61
|
+
.save(dirComponents)
|
|
62
|
+
.catch(err => throwError('components_list_save', err));
|
|
63
|
+
}
|
|
64
|
+
cacheDataAndStartPolling(dirComponents);
|
|
65
|
+
return dirComponents;
|
|
66
|
+
},
|
|
67
|
+
async refresh() {
|
|
68
|
+
clearTimeout(refreshLoop);
|
|
69
|
+
try {
|
|
70
|
+
// Passing components that we know are fine, so it doesn't refresh invalid components
|
|
71
|
+
const components = await componentsList.refresh(cachedComponentsList);
|
|
72
|
+
cacheDataAndStartPolling(components);
|
|
73
|
+
return components;
|
|
74
|
+
}
|
|
75
|
+
catch (err) {
|
|
76
|
+
return throwError('components_cache_refresh', err);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
exports.default = componentsCache;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentsDetails, ComponentsList, Config } from '../../types';
|
|
2
|
-
import { StorageAdapter } from 'oc-storage-adapters-utils';
|
|
3
|
-
export default function componentsDetails(conf: Config, cdn: StorageAdapter): {
|
|
4
|
-
get: () => Promise<ComponentsDetails>;
|
|
5
|
-
refresh: (componentsList: ComponentsList) => Promise<ComponentsDetails>;
|
|
6
|
-
};
|
|
1
|
+
import { ComponentsDetails, ComponentsList, Config } from '../../types';
|
|
2
|
+
import { StorageAdapter } from 'oc-storage-adapters-utils';
|
|
3
|
+
export default function componentsDetails(conf: Config, cdn: StorageAdapter): {
|
|
4
|
+
get: () => Promise<ComponentsDetails>;
|
|
5
|
+
refresh: (componentsList: ComponentsList) => Promise<ComponentsDetails>;
|
|
6
|
+
};
|