@etohq/utils 1.5.1-alpha.7 → 1.5.1-alpha.8
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/common/container.d.ts +7 -98
- package/dist/common/container.d.ts.map +1 -1
- package/dist/common/container.js +7 -94
- package/dist/common/container.js.map +1 -1
- package/dist/common/create-container-like.d.ts.map +1 -1
- package/dist/common/create-container-like.js +9 -1
- package/dist/common/create-container-like.js.map +1 -1
- package/dist/common/create-psql-index-helper.d.ts.map +1 -1
- package/dist/common/create-psql-index-helper.js +3 -1
- package/dist/common/create-psql-index-helper.js.map +1 -1
- package/dist/common/deep-copy.js +3 -3
- package/dist/common/deep-copy.js.map +1 -1
- package/dist/common/define-file-config.d.ts +1 -2
- package/dist/common/define-file-config.d.ts.map +1 -1
- package/dist/common/define-file-config.js +9 -12
- package/dist/common/define-file-config.js.map +1 -1
- package/dist/common/dynamic-import.d.ts.map +1 -1
- package/dist/common/dynamic-import.js +6 -24
- package/dist/common/dynamic-import.js.map +1 -1
- package/dist/common/errors.d.ts +8 -10
- package/dist/common/errors.d.ts.map +1 -1
- package/dist/common/errors.js +12 -33
- package/dist/common/errors.js.map +1 -1
- package/dist/common/execute-with-concurrency.d.ts +3 -1
- package/dist/common/execute-with-concurrency.d.ts.map +1 -1
- package/dist/common/execute-with-concurrency.js +3 -1
- package/dist/common/execute-with-concurrency.js.map +1 -1
- package/dist/common/get-resolved-plugins.d.ts +1 -1
- package/dist/common/get-resolved-plugins.d.ts.map +1 -1
- package/dist/common/get-resolved-plugins.js +2 -2
- package/dist/common/get-resolved-plugins.js.map +1 -1
- package/dist/common/index.d.ts +4 -11
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/index.js +4 -11
- package/dist/common/index.js.map +1 -1
- package/dist/common/merge-plugin-modules.d.ts.map +1 -1
- package/dist/common/merge-plugin-modules.js +23 -8
- package/dist/common/merge-plugin-modules.js.map +1 -1
- package/dist/common/normalize-import-path-with-source.d.ts +1 -1
- package/dist/common/normalize-import-path-with-source.d.ts.map +1 -1
- package/dist/common/normalize-import-path-with-source.js +2 -2
- package/dist/common/normalize-import-path-with-source.js.map +1 -1
- package/dist/common/normalize-locale.d.ts +19 -0
- package/dist/common/normalize-locale.d.ts.map +1 -0
- package/dist/common/normalize-locale.js +37 -0
- package/dist/common/normalize-locale.js.map +1 -0
- package/dist/common/parse-stringify-if-necessary.d.ts +7 -1
- package/dist/common/parse-stringify-if-necessary.d.ts.map +1 -1
- package/dist/common/parse-stringify-if-necessary.js +8 -2
- package/dist/common/parse-stringify-if-necessary.js.map +1 -1
- package/dist/common/read-dir-recursive.d.ts +1 -0
- package/dist/common/read-dir-recursive.d.ts.map +1 -1
- package/dist/common/read-dir-recursive.js +4 -3
- package/dist/common/read-dir-recursive.js.map +1 -1
- package/dist/common/wrap-handler.d.ts +17 -0
- package/dist/common/wrap-handler.d.ts.map +1 -1
- package/dist/common/wrap-handler.js +33 -37
- package/dist/common/wrap-handler.js.map +1 -1
- package/dist/dal/index.d.ts +4 -4
- package/dist/dal/index.d.ts.map +1 -1
- package/dist/dal/index.js +4 -4
- package/dist/dal/index.js.map +1 -1
- package/dist/dal/mikro-orm/big-number-field.d.ts.map +1 -1
- package/dist/dal/mikro-orm/big-number-field.js +37 -1
- package/dist/dal/mikro-orm/big-number-field.js.map +1 -1
- package/dist/dal/mikro-orm/custom-db-migrator.d.ts +8 -0
- package/dist/dal/mikro-orm/custom-db-migrator.d.ts.map +1 -0
- package/dist/dal/mikro-orm/custom-db-migrator.js +60 -0
- package/dist/dal/mikro-orm/custom-db-migrator.js.map +1 -0
- package/dist/dal/mikro-orm/mikro-orm-create-connection.d.ts +1 -1
- package/dist/dal/mikro-orm/mikro-orm-create-connection.d.ts.map +1 -1
- package/dist/dal/mikro-orm/mikro-orm-create-connection.js +16 -1
- package/dist/dal/mikro-orm/mikro-orm-create-connection.js.map +1 -1
- package/dist/dal/mikro-orm/mikro-orm-free-text-search-filter.d.ts.map +1 -1
- package/dist/dal/mikro-orm/mikro-orm-free-text-search-filter.js +3 -3
- package/dist/dal/mikro-orm/mikro-orm-free-text-search-filter.js.map +1 -1
- package/dist/dal/mikro-orm/mikro-orm-repository.d.ts +1 -0
- package/dist/dal/mikro-orm/mikro-orm-repository.d.ts.map +1 -1
- package/dist/dal/mikro-orm/mikro-orm-repository.js +276 -68
- package/dist/dal/mikro-orm/mikro-orm-repository.js.map +1 -1
- package/dist/dal/mikro-orm/mikro-orm-serializer-old.d.ts +29 -0
- package/dist/dal/mikro-orm/mikro-orm-serializer-old.d.ts.map +1 -0
- package/dist/dal/mikro-orm/mikro-orm-serializer-old.js +443 -0
- package/dist/dal/mikro-orm/mikro-orm-serializer-old.js.map +1 -0
- package/dist/dal/mikro-orm/mikro-orm-serializer.d.ts +25 -10
- package/dist/dal/mikro-orm/mikro-orm-serializer.d.ts.map +1 -1
- package/dist/dal/mikro-orm/mikro-orm-serializer.js +383 -174
- package/dist/dal/mikro-orm/mikro-orm-serializer.js.map +1 -1
- package/dist/dml/helpers/entity-builder/create-big-number-properties.d.ts.map +1 -1
- package/dist/dml/helpers/entity-builder/create-big-number-properties.js +16 -4
- package/dist/dml/helpers/entity-builder/create-big-number-properties.js.map +1 -1
- package/dist/dml/helpers/graphql-builder/get-attribute.d.ts.map +1 -1
- package/dist/dml/helpers/graphql-builder/get-attribute.js +1 -0
- package/dist/dml/helpers/graphql-builder/get-attribute.js.map +1 -1
- package/dist/dml/integration-tests/utils.d.ts.map +1 -1
- package/dist/dml/integration-tests/utils.js +2 -1
- package/dist/dml/integration-tests/utils.js.map +1 -1
- package/dist/dml/properties/text.d.ts +6 -0
- package/dist/dml/properties/text.d.ts.map +1 -1
- package/dist/dml/properties/text.js +8 -0
- package/dist/dml/properties/text.js.map +1 -1
- package/dist/event-bus/index.d.ts +19 -0
- package/dist/event-bus/index.d.ts.map +1 -1
- package/dist/event-bus/index.js +20 -3
- package/dist/event-bus/index.js.map +1 -1
- package/dist/event-bus/message-aggregator.d.ts +1 -1
- package/dist/event-bus/message-aggregator.d.ts.map +1 -1
- package/dist/event-bus/message-aggregator.js +29 -7
- package/dist/event-bus/message-aggregator.js.map +1 -1
- package/dist/event-bus/utils.d.ts +19 -8
- package/dist/event-bus/utils.d.ts.map +1 -1
- package/dist/event-bus/utils.js +12 -0
- package/dist/event-bus/utils.js.map +1 -1
- package/dist/feature-flags/index.d.ts +5 -3
- package/dist/feature-flags/index.d.ts.map +1 -1
- package/dist/feature-flags/index.js +5 -4
- package/dist/feature-flags/index.js.map +1 -1
- package/dist/modules-sdk/create-eto-mikro-orm-event-subscriber.d.ts +11 -0
- package/dist/modules-sdk/create-eto-mikro-orm-event-subscriber.d.ts.map +1 -0
- package/dist/modules-sdk/create-eto-mikro-orm-event-subscriber.js +45 -0
- package/dist/modules-sdk/create-eto-mikro-orm-event-subscriber.js.map +1 -0
- package/dist/modules-sdk/create-pg-connection.d.ts.map +1 -1
- package/dist/modules-sdk/create-pg-connection.js +12 -1
- package/dist/modules-sdk/create-pg-connection.js.map +1 -1
- package/dist/modules-sdk/decorators/inject-manager.js +3 -3
- package/dist/modules-sdk/decorators/inject-manager.js.map +1 -1
- package/dist/modules-sdk/decorators/inject-transaction-manager.d.ts.map +1 -1
- package/dist/modules-sdk/decorators/inject-transaction-manager.js +2 -4
- package/dist/modules-sdk/decorators/inject-transaction-manager.js.map +1 -1
- package/dist/modules-sdk/define-link.d.ts.map +1 -1
- package/dist/modules-sdk/define-link.js +37 -15
- package/dist/modules-sdk/define-link.js.map +1 -1
- package/dist/modules-sdk/define-policies.d.ts +29 -0
- package/dist/modules-sdk/define-policies.d.ts.map +1 -0
- package/dist/modules-sdk/define-policies.js +47 -0
- package/dist/modules-sdk/define-policies.js.map +1 -0
- package/dist/modules-sdk/eto-internal-service.d.ts +14 -3
- package/dist/modules-sdk/eto-internal-service.d.ts.map +1 -1
- package/dist/modules-sdk/eto-internal-service.js +116 -1
- package/dist/modules-sdk/eto-internal-service.js.map +1 -1
- package/dist/modules-sdk/eto-service.d.ts.map +1 -1
- package/dist/modules-sdk/eto-service.js +57 -1
- package/dist/modules-sdk/eto-service.js.map +1 -1
- package/dist/modules-sdk/index.d.ts +3 -0
- package/dist/modules-sdk/index.d.ts.map +1 -1
- package/dist/modules-sdk/index.js +3 -0
- package/dist/modules-sdk/index.js.map +1 -1
- package/dist/modules-sdk/joiner-config-builder.d.ts +7 -1
- package/dist/modules-sdk/joiner-config-builder.d.ts.map +1 -1
- package/dist/modules-sdk/joiner-config-builder.js +32 -1
- package/dist/modules-sdk/joiner-config-builder.js.map +1 -1
- package/dist/modules-sdk/load-module-database-config.d.ts.map +1 -1
- package/dist/modules-sdk/load-module-database-config.js +15 -1
- package/dist/modules-sdk/load-module-database-config.js.map +1 -1
- package/dist/modules-sdk/migration-scripts/migration-down.d.ts +3 -1
- package/dist/modules-sdk/migration-scripts/migration-down.d.ts.map +1 -1
- package/dist/modules-sdk/migration-scripts/migration-down.js +7 -2
- package/dist/modules-sdk/migration-scripts/migration-down.js.map +1 -1
- package/dist/modules-sdk/migration-scripts/migration-up.d.ts +1 -1
- package/dist/modules-sdk/migration-scripts/migration-up.d.ts.map +1 -1
- package/dist/modules-sdk/migration-scripts/migration-up.js +3 -0
- package/dist/modules-sdk/migration-scripts/migration-up.js.map +1 -1
- package/dist/modules-sdk/migration-scripts/seed.d.ts.map +1 -1
- package/dist/modules-sdk/migration-scripts/seed.js +3 -0
- package/dist/modules-sdk/migration-scripts/seed.js.map +1 -1
- package/dist/modules-sdk/mikro-orm-cli-config-builder.d.ts.map +1 -1
- package/dist/modules-sdk/mikro-orm-cli-config-builder.js +1 -0
- package/dist/modules-sdk/mikro-orm-cli-config-builder.js.map +1 -1
- package/dist/modules-sdk/module.d.ts.map +1 -1
- package/dist/modules-sdk/module.js +2 -0
- package/dist/modules-sdk/module.js.map +1 -1
- package/dist/modules-sdk/policy-to-types.d.ts +4 -0
- package/dist/modules-sdk/policy-to-types.d.ts.map +1 -0
- package/dist/modules-sdk/policy-to-types.js +62 -0
- package/dist/modules-sdk/policy-to-types.js.map +1 -0
- package/dist/notification/events.d.ts +6 -6
- package/dist/totals/big-number.d.ts +3 -0
- package/dist/totals/big-number.d.ts.map +1 -1
- package/dist/totals/big-number.js +26 -6
- package/dist/totals/big-number.js.map +1 -1
- package/dist/totals/index.d.ts +0 -1
- package/dist/totals/index.d.ts.map +1 -1
- package/dist/totals/index.js +0 -1
- package/dist/totals/index.js.map +1 -1
- package/dist/totals/math.d.ts +3 -1
- package/dist/totals/math.d.ts.map +1 -1
- package/dist/totals/math.js +8 -7
- package/dist/totals/math.js.map +1 -1
- package/dist/translations/apply-translations.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/user/events.d.ts +12 -12
- package/package.json +3 -2
|
@@ -5,105 +5,14 @@ export declare const ContainerRegistrationKeys: {
|
|
|
5
5
|
readonly LOGGER: "logger";
|
|
6
6
|
readonly REMOTE_QUERY: "remoteQuery";
|
|
7
7
|
readonly QUERY: "query";
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated use {@link ContainerRegistrationKeys.LINK} instead.
|
|
10
|
+
*/
|
|
11
|
+
readonly REMOTE_LINK: "remoteLink";
|
|
12
|
+
/**
|
|
13
|
+
* @since 2.2.0
|
|
14
|
+
*/
|
|
8
15
|
readonly LINK: "link";
|
|
9
16
|
readonly FEATURE_FLAG_ROUTER: "featureFlagRouter";
|
|
10
17
|
};
|
|
11
|
-
export declare function getCoreModulesDefinitionInput(): ({
|
|
12
|
-
key: "cache";
|
|
13
|
-
defaultPackage: string;
|
|
14
|
-
dependencies: "event_bus"[];
|
|
15
|
-
options?: undefined;
|
|
16
|
-
isRequired?: undefined;
|
|
17
|
-
isQueryable?: undefined;
|
|
18
|
-
__passSharedContainer?: undefined;
|
|
19
|
-
} | {
|
|
20
|
-
key: "user";
|
|
21
|
-
defaultPackage: string;
|
|
22
|
-
dependencies: "event_bus"[];
|
|
23
|
-
options: {
|
|
24
|
-
jwt_secret: string;
|
|
25
|
-
providers?: undefined;
|
|
26
|
-
};
|
|
27
|
-
isRequired?: undefined;
|
|
28
|
-
isQueryable?: undefined;
|
|
29
|
-
__passSharedContainer?: undefined;
|
|
30
|
-
} | {
|
|
31
|
-
key: "event_bus";
|
|
32
|
-
defaultPackage: string;
|
|
33
|
-
isRequired: boolean;
|
|
34
|
-
isQueryable: boolean;
|
|
35
|
-
dependencies: "logger"[];
|
|
36
|
-
options?: undefined;
|
|
37
|
-
__passSharedContainer?: undefined;
|
|
38
|
-
} | {
|
|
39
|
-
key: "auth";
|
|
40
|
-
defaultPackage: string;
|
|
41
|
-
dependencies: ("logger" | "cache")[];
|
|
42
|
-
options: {
|
|
43
|
-
providers: {
|
|
44
|
-
resolve: string;
|
|
45
|
-
id: string;
|
|
46
|
-
}[];
|
|
47
|
-
jwt_secret?: undefined;
|
|
48
|
-
};
|
|
49
|
-
isRequired?: undefined;
|
|
50
|
-
isQueryable?: undefined;
|
|
51
|
-
__passSharedContainer?: undefined;
|
|
52
|
-
} | {
|
|
53
|
-
key: "workflows";
|
|
54
|
-
defaultPackage: string;
|
|
55
|
-
dependencies: "logger"[];
|
|
56
|
-
__passSharedContainer: boolean;
|
|
57
|
-
options?: undefined;
|
|
58
|
-
isRequired?: undefined;
|
|
59
|
-
isQueryable?: undefined;
|
|
60
|
-
} | {
|
|
61
|
-
key: "api_key";
|
|
62
|
-
defaultPackage: string;
|
|
63
|
-
dependencies: "logger"[];
|
|
64
|
-
options?: undefined;
|
|
65
|
-
isRequired?: undefined;
|
|
66
|
-
isQueryable?: undefined;
|
|
67
|
-
__passSharedContainer?: undefined;
|
|
68
|
-
} | {
|
|
69
|
-
key: "locking";
|
|
70
|
-
defaultPackage: string;
|
|
71
|
-
dependencies: "logger"[];
|
|
72
|
-
options?: undefined;
|
|
73
|
-
isRequired?: undefined;
|
|
74
|
-
isQueryable?: undefined;
|
|
75
|
-
__passSharedContainer?: undefined;
|
|
76
|
-
} | {
|
|
77
|
-
key: "file";
|
|
78
|
-
defaultPackage: string;
|
|
79
|
-
dependencies: "logger"[];
|
|
80
|
-
options: {
|
|
81
|
-
providers: {
|
|
82
|
-
resolve: string;
|
|
83
|
-
id: string;
|
|
84
|
-
}[];
|
|
85
|
-
jwt_secret?: undefined;
|
|
86
|
-
};
|
|
87
|
-
isRequired?: undefined;
|
|
88
|
-
isQueryable?: undefined;
|
|
89
|
-
__passSharedContainer?: undefined;
|
|
90
|
-
} | {
|
|
91
|
-
key: "notification";
|
|
92
|
-
defaultPackage: string;
|
|
93
|
-
options: {
|
|
94
|
-
providers: {
|
|
95
|
-
resolve: string;
|
|
96
|
-
id: string;
|
|
97
|
-
options: {
|
|
98
|
-
name: string;
|
|
99
|
-
channels: string[];
|
|
100
|
-
};
|
|
101
|
-
}[];
|
|
102
|
-
jwt_secret?: undefined;
|
|
103
|
-
};
|
|
104
|
-
dependencies?: undefined;
|
|
105
|
-
isRequired?: undefined;
|
|
106
|
-
isQueryable?: undefined;
|
|
107
|
-
__passSharedContainer?: undefined;
|
|
108
|
-
})[];
|
|
109
18
|
//# sourceMappingURL=container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/common/container.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/common/container.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;;;;IAOpC;;OAEG;;IAEH;;OAEG;;;CAGK,CAAA"}
|
package/dist/common/container.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ContainerRegistrationKeys = void 0;
|
|
4
|
-
exports.getCoreModulesDefinitionInput = getCoreModulesDefinitionInput;
|
|
5
|
-
const modules_sdk_1 = require("../modules-sdk");
|
|
6
4
|
exports.ContainerRegistrationKeys = {
|
|
7
5
|
PG_CONNECTION: "__pg_connection__",
|
|
8
6
|
MANAGER: "manager",
|
|
@@ -10,99 +8,14 @@ exports.ContainerRegistrationKeys = {
|
|
|
10
8
|
LOGGER: "logger",
|
|
11
9
|
REMOTE_QUERY: "remoteQuery",
|
|
12
10
|
QUERY: "query",
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated use {@link ContainerRegistrationKeys.LINK} instead.
|
|
13
|
+
*/
|
|
14
|
+
REMOTE_LINK: "remoteLink",
|
|
15
|
+
/**
|
|
16
|
+
* @since 2.2.0
|
|
17
|
+
*/
|
|
13
18
|
LINK: "link",
|
|
14
19
|
FEATURE_FLAG_ROUTER: "featureFlagRouter",
|
|
15
20
|
};
|
|
16
|
-
function getCoreModulesDefinitionInput() {
|
|
17
|
-
return [
|
|
18
|
-
{
|
|
19
|
-
key: modules_sdk_1.Modules.CACHE,
|
|
20
|
-
defaultPackage: "@etohq/eto/cache-inmemory", // todo switch to redis in prod. (all local/inmemory)
|
|
21
|
-
dependencies: [modules_sdk_1.Modules.EVENT_BUS],
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
key: modules_sdk_1.Modules.USER,
|
|
25
|
-
defaultPackage: "@etohq/eto/user",
|
|
26
|
-
dependencies: [modules_sdk_1.Modules.EVENT_BUS],
|
|
27
|
-
options: {
|
|
28
|
-
jwt_secret: "239293923923923923sdjjfdfasfjasjdkjas",
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
key: modules_sdk_1.Modules.EVENT_BUS,
|
|
33
|
-
defaultPackage: "@etohq/eto/event-bus-local",
|
|
34
|
-
isRequired: true,
|
|
35
|
-
isQueryable: false,
|
|
36
|
-
dependencies: [exports.ContainerRegistrationKeys.LOGGER],
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
key: modules_sdk_1.Modules.AUTH,
|
|
40
|
-
defaultPackage: "@etohq/eto/auth",
|
|
41
|
-
dependencies: [modules_sdk_1.Modules.CACHE, exports.ContainerRegistrationKeys.LOGGER],
|
|
42
|
-
options: {
|
|
43
|
-
providers: [
|
|
44
|
-
{
|
|
45
|
-
resolve: "@etohq/eto/auth-emailpass",
|
|
46
|
-
id: "emailpass",
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
key: modules_sdk_1.Modules.WORKFLOW_ENGINE,
|
|
53
|
-
defaultPackage: "@etohq/eto/workflow-engine-inmemory",
|
|
54
|
-
dependencies: [exports.ContainerRegistrationKeys.LOGGER],
|
|
55
|
-
__passSharedContainer: true,
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
key: modules_sdk_1.Modules.API_KEY,
|
|
59
|
-
defaultPackage: "@etohq/eto/api-key",
|
|
60
|
-
dependencies: [exports.ContainerRegistrationKeys.LOGGER],
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
key: modules_sdk_1.Modules.LOCKING,
|
|
64
|
-
defaultPackage: "@etohq/eto/locking",
|
|
65
|
-
dependencies: [exports.ContainerRegistrationKeys.LOGGER],
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
key: modules_sdk_1.Modules.FILE,
|
|
69
|
-
defaultPackage: "@etohq/eto/file",
|
|
70
|
-
dependencies: [exports.ContainerRegistrationKeys.LOGGER],
|
|
71
|
-
options: {
|
|
72
|
-
providers: [
|
|
73
|
-
{
|
|
74
|
-
resolve: "@etohq/eto/file-local",
|
|
75
|
-
id: "local",
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
key: modules_sdk_1.Modules.NOTIFICATION,
|
|
82
|
-
defaultPackage: "@etohq/eto/notification",
|
|
83
|
-
options: {
|
|
84
|
-
providers: [
|
|
85
|
-
{
|
|
86
|
-
resolve: "@etohq/eto/notification-local",
|
|
87
|
-
id: "local",
|
|
88
|
-
options: {
|
|
89
|
-
name: "Local Notification Provider",
|
|
90
|
-
channels: ["feed"],
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
// {
|
|
97
|
-
// key: Modules.INDEX,
|
|
98
|
-
// defaultPackage: modules.IndexModule,
|
|
99
|
-
// dependencies: [
|
|
100
|
-
// Modules.EVENT_BUS,
|
|
101
|
-
// ContainerRegistrationKeys.LOGGER,
|
|
102
|
-
// ContainerRegistrationKeys.REMOTE_QUERY,
|
|
103
|
-
// ContainerRegistrationKeys.QUERY,
|
|
104
|
-
// ],
|
|
105
|
-
// },
|
|
106
|
-
];
|
|
107
|
-
}
|
|
108
21
|
//# sourceMappingURL=container.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../src/common/container.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../src/common/container.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG;IACvC,aAAa,EAAE,mBAAmB;IAClC,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,cAAc;IAC7B,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,aAAa;IAC3B,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,WAAW,EAAE,YAAY;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ,mBAAmB,EAAE,mBAAmB;CAChC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-container-like.d.ts","sourceRoot":"","sources":["../../src/common/create-container-like.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5C,wBAAgB,mBAAmB,CAAC,GAAG,KAAA,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"create-container-like.d.ts","sourceRoot":"","sources":["../../src/common/create-container-like.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5C,wBAAgB,mBAAmB,CAAC,GAAG,KAAA,GAAG,aAAa,CAqBtD"}
|
|
@@ -3,7 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createContainerLike = createContainerLike;
|
|
4
4
|
function createContainerLike(obj) {
|
|
5
5
|
return {
|
|
6
|
-
resolve(key) {
|
|
6
|
+
resolve(key, { allowUnregistered = false, } = {}) {
|
|
7
|
+
if (allowUnregistered) {
|
|
8
|
+
try {
|
|
9
|
+
return obj[key];
|
|
10
|
+
}
|
|
11
|
+
catch (error) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
7
15
|
return obj[key];
|
|
8
16
|
},
|
|
9
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-container-like.js","sourceRoot":"","sources":["../../src/common/create-container-like.ts"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"create-container-like.js","sourceRoot":"","sources":["../../src/common/create-container-like.ts"],"names":[],"mappings":";;AAEA,kDAqBC;AArBD,SAAgB,mBAAmB,CAAC,GAAG;IACrC,OAAO;QACL,OAAO,CACL,GAAW,EACX,EACE,iBAAiB,GAAG,KAAK,MAGvB,EAAE;YAEN,IAAI,iBAAiB,EAAE,CAAC;gBACtB,IAAI,CAAC;oBACH,OAAO,GAAG,CAAC,GAAG,CAAC,CAAA;gBACjB,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO,SAAS,CAAA;gBAClB,CAAC;YACH,CAAC;YAED,OAAO,GAAG,CAAC,GAAG,CAAC,CAAA;QACjB,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-psql-index-helper.d.ts","sourceRoot":"","sources":["../../src/common/create-psql-index-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,8BAA8B,CAAC,EAC7C,IAAI,EACJ,SAAS,EAAE,aAAa,EACxB,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,GACP,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;;;;;
|
|
1
|
+
{"version":3,"file":"create-psql-index-helper.d.ts","sourceRoot":"","sources":["../../src/common/create-psql-index-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,8BAA8B,CAAC,EAC7C,IAAI,EACJ,SAAS,EAAE,aAAa,EACxB,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,GACP,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;;;;;8BAoC6B,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;EAQxD"}
|
|
@@ -46,7 +46,9 @@ function createPsqlIndexStatementHelper({ name, tableName: qualifiedName, column
|
|
|
46
46
|
tableName = qualifiedName;
|
|
47
47
|
tableReference = `"${tableName}"`;
|
|
48
48
|
}
|
|
49
|
-
columns = Array.isArray(columns)
|
|
49
|
+
columns = Array.isArray(columns)
|
|
50
|
+
? columns.map((column) => `"${column}"`).join(", ")
|
|
51
|
+
: columns;
|
|
50
52
|
name = name || `IDX_${tableName}_${columnsName}${unique ? "_unique" : ""}`;
|
|
51
53
|
const typeStr = type ? ` USING ${type}` : "";
|
|
52
54
|
const optionsStr = where ? ` WHERE ${where}` : "";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-psql-index-helper.js","sourceRoot":"","sources":["../../src/common/create-psql-index-helper.ts"],"names":[],"mappings":";;AA+BA,
|
|
1
|
+
{"version":3,"file":"create-psql-index-helper.js","sourceRoot":"","sources":["../../src/common/create-psql-index-helper.ts"],"names":[],"mappings":";;AA+BA,wEA0DC;AAzFD,0CAAuC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,SAAgB,8BAA8B,CAAC,EAC7C,IAAI,EACJ,SAAS,EAAE,aAAa,EACxB,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,GAQP;IACC,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;IACxE,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAEzD,IAAI,YAAgC,CAAA;IACpC,IAAI,SAAiB,CAAA;IACrB,IAAI,cAAsB,CAAA;IAE1B,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,YAAY,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;QAC7B,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAC5B,cAAc,GAAG,IAAI,YAAY,MAAM,SAAS,GAAG,CAAA;IACrD,CAAC;SAAM,CAAC;QACN,SAAS,GAAG,aAAa,CAAA;QACzB,cAAc,GAAG,IAAI,SAAS,GAAG,CAAA;IACnC,CAAC;IAED,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAC9B,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QACnD,CAAC,CAAC,OAAO,CAAA;IACX,IAAI,GAAG,IAAI,IAAI,OAAO,SAAS,IAAI,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;IAE1E,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IACjD,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAA;IAEzC,MAAM,UAAU,GAAG,UAAU,SAAS,wBAAwB,IAAI,QAAQ,cAAc,GAAG,OAAO,KAAK,OAAO,IAAI,UAAU,EAAE,CAAA;IAC9H,OAAO;QACL,QAAQ,EAAE,GAAG,EAAE;YACb,OAAO,UAAU,CAAA;QACnB,CAAC;QACD,OAAO,EAAE,GAAG,EAAE;YACZ,OAAO,UAAU,CAAA;QACnB,CAAC;QACD,IAAI;QACJ,UAAU;QACV,aAAa,EAAE,CAAC,OAAqC,EAAE,EAAE;YACvD,OAAO,IAAA,YAAK,EAAC;gBACX,IAAI;gBACJ,UAAU;gBACV,GAAG,OAAO;aACX,CAAC,CAAA;QACJ,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/common/deep-copy.js
CHANGED
|
@@ -63,11 +63,11 @@ function deepCopy(obj, cache = new WeakMap()) {
|
|
|
63
63
|
});
|
|
64
64
|
return copy;
|
|
65
65
|
}
|
|
66
|
+
if (util.types.isProxy(obj)) {
|
|
67
|
+
return obj;
|
|
68
|
+
}
|
|
66
69
|
// Handle objects
|
|
67
70
|
if ((0, is_object_1.isObject)(obj)) {
|
|
68
|
-
if (util.types.isProxy(obj)) {
|
|
69
|
-
return obj;
|
|
70
|
-
}
|
|
71
71
|
copy = {};
|
|
72
72
|
cache.set(obj, copy); // Add to cache before recursing
|
|
73
73
|
Object.keys(obj).forEach((key) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deep-copy.js","sourceRoot":"","sources":["../../src/common/deep-copy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,4BA6CC;AAvDD,2CAAsC;AACtC,gDAAiC;AAEjC;;;;;;GAMG;AACH,SAAgB,QAAQ,CAGtB,GAAM,EAAE,KAAK,GAAG,IAAI,OAAO,EAAE;IAC7B,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5C,OAAO,GAAc,CAAA;IACvB,CAAC;IAED,wCAAwC;IACxC,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QACnB,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAY,CAAA;IAClC,CAAC;IAED,IAAI,IAAa,CAAA;IAEjB,gBAAgB;IAChB,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,IAAI,GAAG,EAAwB,CAAA;QAC/B,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,gCAAgC;SACpD;QAAC,GAAkB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YAC3C,CAAC;YAAC,IAAmB,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACtD,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,
|
|
1
|
+
{"version":3,"file":"deep-copy.js","sourceRoot":"","sources":["../../src/common/deep-copy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,4BA6CC;AAvDD,2CAAsC;AACtC,gDAAiC;AAEjC;;;;;;GAMG;AACH,SAAgB,QAAQ,CAGtB,GAAM,EAAE,KAAK,GAAG,IAAI,OAAO,EAAE;IAC7B,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5C,OAAO,GAAc,CAAA;IACvB,CAAC;IAED,wCAAwC;IACxC,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QACnB,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAY,CAAA;IAClC,CAAC;IAED,IAAI,IAAa,CAAA;IAEjB,gBAAgB;IAChB,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,IAAI,GAAG,EAAwB,CAAA;QAC/B,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,gCAAgC;SACpD;QAAC,GAAkB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YAC3C,CAAC;YAAC,IAAmB,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACtD,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC5B,OAAO,GAAyB,CAAA;IAClC,CAAC;IAED,iBAAiB;IACjB,IAAI,IAAA,oBAAQ,EAAC,GAAG,CAAC,EAAE,CAAC;QAClB,IAAI,GAAG,EAAa,CAAA;QACpB,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA,CAAC,gCAAgC;QAErD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC/B,CAAC;YAAC,IAAyB,CAAC,GAAG,CAAC,GAAG,QAAQ,CACxC,GAAwB,CAAC,GAAG,CAAC,EAC9B,KAAK,CACN,CAAA;QACH,CAAC,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,GAAc,CAAA;AACvB,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { InputFileConfig } from "@etohq/types";
|
|
2
2
|
export declare const ETO_SKIP_FILE: unique symbol;
|
|
3
|
-
export declare const MEDUSA_SKIP_FILE: symbol;
|
|
4
3
|
export declare function defineFileConfig(config?: InputFileConfig): void;
|
|
5
|
-
export declare function getDefinedFileConfig(path?: string):
|
|
4
|
+
export declare function getDefinedFileConfig(path?: string): any;
|
|
6
5
|
export declare function isFileDisabled(path?: string): boolean;
|
|
7
6
|
export declare function isFileSkipped(exported: unknown): boolean;
|
|
8
7
|
//# sourceMappingURL=define-file-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-file-config.d.ts","sourceRoot":"","sources":["../../src/common/define-file-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAG9C,eAAO,MAAM,aAAa,eAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"define-file-config.d.ts","sourceRoot":"","sources":["../../src/common/define-file-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAG9C,eAAO,MAAM,aAAa,eAAkC,CAAA;AAS5D,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,eAAe,QAGxD;AAED,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,MAAM,OAEjD;AAED,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,WAE3C;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,WAE9C"}
|
|
@@ -1,34 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ETO_SKIP_FILE = void 0;
|
|
4
4
|
exports.defineFileConfig = defineFileConfig;
|
|
5
5
|
exports.getDefinedFileConfig = getDefinedFileConfig;
|
|
6
6
|
exports.isFileDisabled = isFileDisabled;
|
|
7
7
|
exports.isFileSkipped = isFileSkipped;
|
|
8
8
|
const get_caller_file_path_1 = require("./get-caller-file-path");
|
|
9
9
|
exports.ETO_SKIP_FILE = Symbol.for("__ETO_SKIP_FILE__");
|
|
10
|
-
// Kept as alias for compatibility with upstream naming.
|
|
11
|
-
exports.MEDUSA_SKIP_FILE = exports.ETO_SKIP_FILE;
|
|
12
10
|
/**
|
|
13
|
-
* The
|
|
14
|
-
*
|
|
11
|
+
* The "defineFileConfig" helper can be used to define the configuration
|
|
12
|
+
* of any file auto-loaded by Eto.
|
|
13
|
+
*
|
|
14
|
+
* It is used to avoid loading files that are not required. Like a feature flag
|
|
15
|
+
* that is disabled.
|
|
15
16
|
*/
|
|
16
17
|
const FILE_CONFIGS = new Map();
|
|
17
18
|
function defineFileConfig(config) {
|
|
18
|
-
const filePath = config?.path ?? (0, get_caller_file_path_1.getCallerFilePath)()
|
|
19
|
-
if (!filePath) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
19
|
+
const filePath = config?.path ?? (0, get_caller_file_path_1.getCallerFilePath)();
|
|
22
20
|
FILE_CONFIGS.set(filePath, config);
|
|
23
21
|
}
|
|
24
22
|
function getDefinedFileConfig(path) {
|
|
25
|
-
return
|
|
23
|
+
return FILE_CONFIGS.get(path);
|
|
26
24
|
}
|
|
27
25
|
function isFileDisabled(path) {
|
|
28
26
|
return !!getDefinedFileConfig(path)?.isDisabled?.();
|
|
29
27
|
}
|
|
30
28
|
function isFileSkipped(exported) {
|
|
31
|
-
|
|
32
|
-
return !!maybeObj?.[exports.ETO_SKIP_FILE];
|
|
29
|
+
return !!exported?.[exports.ETO_SKIP_FILE];
|
|
33
30
|
}
|
|
34
31
|
//# sourceMappingURL=define-file-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-file-config.js","sourceRoot":"","sources":["../../src/common/define-file-config.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"define-file-config.js","sourceRoot":"","sources":["../../src/common/define-file-config.ts"],"names":[],"mappings":";;;AAYA,4CAGC;AAED,oDAEC;AAED,wCAEC;AAED,sCAEC;AA1BD,iEAA0D;AAE7C,QAAA,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;AAC5D;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,IAAI,GAAG,EAAE,CAAA;AAC9B,SAAgB,gBAAgB,CAAC,MAAwB;IACvD,MAAM,QAAQ,GAAG,MAAM,EAAE,IAAI,IAAI,IAAA,wCAAiB,GAAE,CAAA;IACpD,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;AACpC,CAAC;AAED,SAAgB,oBAAoB,CAAC,IAAa;IAChD,OAAO,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAC/B,CAAC;AAED,SAAgB,cAAc,CAAC,IAAa;IAC1C,OAAO,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,EAAE,CAAA;AACrD,CAAC;AAED,SAAgB,aAAa,CAAC,QAAiB;IAC7C,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,qBAAa,CAAC,CAAA;AACpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-import.d.ts","sourceRoot":"","sources":["../../src/common/dynamic-import.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dynamic-import.d.ts","sourceRoot":"","sources":["../../src/common/dynamic-import.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAU9D"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.dynamicImport = dynamicImport;
|
|
4
|
+
const define_file_config_1 = require("./define-file-config");
|
|
4
5
|
const resolve_exports_1 = require("./resolve-exports");
|
|
5
|
-
const fs_1 = require("fs");
|
|
6
|
-
const path_1 = require("path");
|
|
7
6
|
/**
|
|
8
7
|
* Utility that should be used instead of either await import() or require()
|
|
9
8
|
* to avoid bundling issues. That way we have a single place
|
|
@@ -16,28 +15,11 @@ const path_1 = require("path");
|
|
|
16
15
|
* @param path
|
|
17
16
|
*/
|
|
18
17
|
async function dynamicImport(path) {
|
|
19
|
-
const module = require(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if ((0, path_1.extname)(path)) {
|
|
24
|
-
return path;
|
|
18
|
+
const module = require(path);
|
|
19
|
+
const exported = (0, resolve_exports_1.resolveExports)(module);
|
|
20
|
+
if ((0, define_file_config_1.isFileDisabled)(path)) {
|
|
21
|
+
exported[define_file_config_1.ETO_SKIP_FILE] = true;
|
|
25
22
|
}
|
|
26
|
-
|
|
27
|
-
path,
|
|
28
|
-
`${path}.js`,
|
|
29
|
-
`${path}.cjs`,
|
|
30
|
-
`${path}.mjs`,
|
|
31
|
-
`${path}.ts`,
|
|
32
|
-
`${path}.cts`,
|
|
33
|
-
`${path}.mts`,
|
|
34
|
-
(0, path_1.join)(path, "index.js"),
|
|
35
|
-
(0, path_1.join)(path, "index.cjs"),
|
|
36
|
-
(0, path_1.join)(path, "index.mjs"),
|
|
37
|
-
(0, path_1.join)(path, "index.ts"),
|
|
38
|
-
(0, path_1.join)(path, "index.cts"),
|
|
39
|
-
(0, path_1.join)(path, "index.mts"),
|
|
40
|
-
];
|
|
41
|
-
return candidates.find((candidate) => (0, fs_1.existsSync)(candidate)) ?? path;
|
|
23
|
+
return exported;
|
|
42
24
|
}
|
|
43
25
|
//# sourceMappingURL=dynamic-import.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-import.js","sourceRoot":"","sources":["../../src/common/dynamic-import.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"dynamic-import.js","sourceRoot":"","sources":["../../src/common/dynamic-import.ts"],"names":[],"mappings":";;AAcA,sCAUC;AAxBD,6DAAoE;AACpE,uDAAkD;AAElD;;;;;;;;;;GAUG;AACI,KAAK,UAAU,aAAa,CAAC,IAAY;IAC9C,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAE5B,MAAM,QAAQ,GAAG,IAAA,gCAAc,EAAC,MAAM,CAAC,CAAA;IAEvC,IAAI,IAAA,mCAAc,EAAC,IAAI,CAAC,EAAE,CAAC;QACzB,QAAQ,CAAC,kCAAa,CAAC,GAAG,IAAI,CAAA;IAChC,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC"}
|
package/dist/common/errors.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ErrCode, APIError } from "./api-error";
|
|
2
1
|
/**
|
|
3
|
-
* @typedef
|
|
2
|
+
* @typedef MedusaErrorType
|
|
4
3
|
*
|
|
5
4
|
*/
|
|
6
|
-
export declare const
|
|
5
|
+
export declare const MedusaErrorTypes: {
|
|
7
6
|
/** Errors stemming from the database */
|
|
8
7
|
DB_ERROR: string;
|
|
9
8
|
DUPLICATE_ERROR: string;
|
|
@@ -19,7 +18,7 @@ export declare const EtoErrorTypes: {
|
|
|
19
18
|
PAYMENT_AUTHORIZATION_ERROR: string;
|
|
20
19
|
PAYMENT_REQUIRES_MORE_ERROR: string;
|
|
21
20
|
};
|
|
22
|
-
export declare const
|
|
21
|
+
export declare const MedusaErrorCodes: {
|
|
23
22
|
INSUFFICIENT_INVENTORY: string;
|
|
24
23
|
CART_INCOMPATIBLE_STATE: string;
|
|
25
24
|
UNKNOWN_MODULES: string;
|
|
@@ -28,11 +27,11 @@ export declare const EtoErrorCodes: {
|
|
|
28
27
|
* Standardized error to be used across Eto project.
|
|
29
28
|
* @extends Error
|
|
30
29
|
*/
|
|
31
|
-
export declare class EtoError extends
|
|
32
|
-
|
|
30
|
+
export declare class EtoError extends Error {
|
|
31
|
+
__isMedusaError: boolean;
|
|
33
32
|
type: string;
|
|
34
33
|
message: string;
|
|
35
|
-
code
|
|
34
|
+
code?: string;
|
|
36
35
|
date: Date;
|
|
37
36
|
static Types: {
|
|
38
37
|
/** Errors stemming from the database */
|
|
@@ -62,11 +61,10 @@ export declare class EtoError extends APIError {
|
|
|
62
61
|
* @param {string} code - code of error
|
|
63
62
|
* @param {Array} params - params
|
|
64
63
|
*/
|
|
65
|
-
constructor(type: string, message: string, code?: string, ...params: any
|
|
64
|
+
constructor(type: string, message: string, code?: string, ...params: any);
|
|
66
65
|
/**
|
|
67
|
-
static isEtoError(err: unknown): err is EtoError {
|
|
68
66
|
* Checks the object for the EtoError type.
|
|
69
67
|
*/
|
|
70
|
-
static
|
|
68
|
+
static isMedusaError(error: any): error is EtoError;
|
|
71
69
|
}
|
|
72
70
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/common/errors.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/common/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;IAC3B,wCAAwC;;;;;;;;;;;;;;CAczC,CAAA;AAED,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAA;AAED;;;GAGG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACjC,eAAe,UAAO;IAEf,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;IACjB,OAAc,KAAK;QAjCnB,wCAAwC;;;;;;;;;;;;;;MAiCF;IACtC,OAAc,KAAK;;;;MAAmB;IAEtC;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG;IAaxE;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,QAAQ;CAGpD"}
|
package/dist/common/errors.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EtoError = exports.
|
|
4
|
-
const api_error_1 = require("./api-error");
|
|
3
|
+
exports.EtoError = exports.MedusaErrorCodes = exports.MedusaErrorTypes = void 0;
|
|
5
4
|
/**
|
|
6
|
-
* @typedef
|
|
5
|
+
* @typedef MedusaErrorType
|
|
7
6
|
*
|
|
8
7
|
*/
|
|
9
|
-
exports.
|
|
8
|
+
exports.MedusaErrorTypes = {
|
|
10
9
|
/** Errors stemming from the database */
|
|
11
10
|
DB_ERROR: "database_error",
|
|
12
11
|
DUPLICATE_ERROR: "duplicate_error",
|
|
@@ -22,32 +21,16 @@ exports.EtoErrorTypes = {
|
|
|
22
21
|
PAYMENT_AUTHORIZATION_ERROR: "payment_authorization_error",
|
|
23
22
|
PAYMENT_REQUIRES_MORE_ERROR: "payment_requires_more_error",
|
|
24
23
|
};
|
|
25
|
-
exports.
|
|
24
|
+
exports.MedusaErrorCodes = {
|
|
26
25
|
INSUFFICIENT_INVENTORY: "insufficient_inventory",
|
|
27
26
|
CART_INCOMPATIBLE_STATE: "cart_incompatible_state",
|
|
28
27
|
UNKNOWN_MODULES: "unknown_modules",
|
|
29
28
|
};
|
|
30
|
-
const EtoTypeToErrCode = {
|
|
31
|
-
[exports.EtoErrorTypes.INVALID_ARGUMENT]: api_error_1.ErrCode.InvalidArgument,
|
|
32
|
-
[exports.EtoErrorTypes.NOT_FOUND]: api_error_1.ErrCode.NotFound,
|
|
33
|
-
[exports.EtoErrorTypes.UNAUTHORIZED]: api_error_1.ErrCode.PermissionDenied,
|
|
34
|
-
[exports.EtoErrorTypes.FORBIDDEN]: api_error_1.ErrCode.PermissionDenied,
|
|
35
|
-
[exports.EtoErrorTypes.DUPLICATE_ERROR]: api_error_1.ErrCode.AlreadyExists,
|
|
36
|
-
[exports.EtoErrorTypes.UNEXPECTED_STATE]: api_error_1.ErrCode.FailedPrecondition,
|
|
37
|
-
[exports.EtoErrorTypes.CONFLICT]: api_error_1.ErrCode.Aborted,
|
|
38
|
-
[exports.EtoErrorTypes.DB_ERROR]: api_error_1.ErrCode.Internal,
|
|
39
|
-
[exports.EtoErrorTypes.INVALID_DATA]: api_error_1.ErrCode.OutOfRange,
|
|
40
|
-
[exports.EtoErrorTypes.UNKNOWN_MODULES]: api_error_1.ErrCode.Unknown,
|
|
41
|
-
// Defaults
|
|
42
|
-
[exports.EtoErrorTypes.NOT_ALLOWED]: api_error_1.ErrCode.PermissionDenied,
|
|
43
|
-
[exports.EtoErrorTypes.PAYMENT_AUTHORIZATION_ERROR]: api_error_1.ErrCode.FailedPrecondition,
|
|
44
|
-
[exports.EtoErrorTypes.PAYMENT_REQUIRES_MORE_ERROR]: api_error_1.ErrCode.ResourceExhausted,
|
|
45
|
-
};
|
|
46
29
|
/**
|
|
47
30
|
* Standardized error to be used across Eto project.
|
|
48
31
|
* @extends Error
|
|
49
32
|
*/
|
|
50
|
-
class EtoError extends
|
|
33
|
+
class EtoError extends Error {
|
|
51
34
|
/**
|
|
52
35
|
* Creates a standardized error to be used across Eto project.
|
|
53
36
|
* @param {string} type - type of error
|
|
@@ -56,28 +39,24 @@ class EtoError extends api_error_1.APIError {
|
|
|
56
39
|
* @param {Array} params - params
|
|
57
40
|
*/
|
|
58
41
|
constructor(type, message, code, ...params) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
// APIError constructor: (code: ErrCode, msg: string, cause?: Error, details?: ErrDetails)
|
|
62
|
-
super(errCode, message, undefined, details);
|
|
63
|
-
this.__isEtoError = true;
|
|
42
|
+
super(...params);
|
|
43
|
+
this.__isMedusaError = true;
|
|
64
44
|
if (Error.captureStackTrace) {
|
|
65
45
|
Error.captureStackTrace(this, EtoError);
|
|
66
46
|
}
|
|
67
47
|
this.type = type;
|
|
68
|
-
this.code =
|
|
48
|
+
this.code = code;
|
|
69
49
|
this.message = message;
|
|
70
50
|
this.date = new Date();
|
|
71
51
|
}
|
|
72
52
|
/**
|
|
73
|
-
static isEtoError(err: unknown): err is EtoError {
|
|
74
53
|
* Checks the object for the EtoError type.
|
|
75
54
|
*/
|
|
76
|
-
static
|
|
77
|
-
return !!
|
|
55
|
+
static isMedusaError(error) {
|
|
56
|
+
return !!error.__isMedusaError;
|
|
78
57
|
}
|
|
79
58
|
}
|
|
80
59
|
exports.EtoError = EtoError;
|
|
81
|
-
EtoError.Types = exports.
|
|
82
|
-
EtoError.Codes = exports.
|
|
60
|
+
EtoError.Types = exports.MedusaErrorTypes;
|
|
61
|
+
EtoError.Codes = exports.MedusaErrorCodes;
|
|
83
62
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/common/errors.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/common/errors.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,gBAAgB,GAAG;IAC9B,wCAAwC;IACxC,QAAQ,EAAE,gBAAgB;IAC1B,eAAe,EAAE,iBAAiB;IAClC,gBAAgB,EAAE,kBAAkB;IACpC,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;IAC1B,gBAAgB,EAAE,kBAAkB;IACpC,QAAQ,EAAE,UAAU;IACpB,eAAe,EAAE,iBAAiB;IAClC,2BAA2B,EAAE,6BAA6B;IAC1D,2BAA2B,EAAE,6BAA6B;CAC3D,CAAA;AAEY,QAAA,gBAAgB,GAAG;IAC9B,sBAAsB,EAAE,wBAAwB;IAChD,uBAAuB,EAAE,yBAAyB;IAClD,eAAe,EAAE,iBAAiB;CACnC,CAAA;AAED;;;GAGG;AACH,MAAa,QAAS,SAAQ,KAAK;IAUjC;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,OAAe,EAAE,IAAa,EAAE,GAAG,MAAW;QACtE,KAAK,CAAC,GAAG,MAAM,CAAC,CAAA;QAjBlB,oBAAe,GAAG,IAAI,CAAA;QAmBpB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QACzC,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAA;IACxB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,KAAU;QAC7B,OAAO,CAAC,CAAC,KAAK,CAAC,eAAe,CAAA;IAChC,CAAC;;AAnCH,4BAoCC;AA7Be,cAAK,GAAG,wBAAgB,AAAnB,CAAmB;AACxB,cAAK,GAAG,wBAAgB,AAAnB,CAAmB"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Execute
|
|
2
|
+
* Execute functions with a concurrency limit
|
|
3
|
+
* @param functions Array of functions to execute in parallel
|
|
4
|
+
* @param concurrency Maximum number of concurrent executions
|
|
3
5
|
*/
|
|
4
6
|
export declare function executeWithConcurrency<T>(functions: (() => Promise<T>)[], concurrency: number): Promise<PromiseSettledResult<Awaited<T>>[]>;
|
|
5
7
|
//# sourceMappingURL=execute-with-concurrency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-with-concurrency.d.ts","sourceRoot":"","sources":["../../src/common/execute-with-concurrency.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"execute-with-concurrency.d.ts","sourceRoot":"","sources":["../../src/common/execute-with-concurrency.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,CAAC,EAC5C,SAAS,EAAE,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAC/B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAqB7C"}
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.executeWithConcurrency = executeWithConcurrency;
|
|
4
4
|
const promise_all_1 = require("./promise-all");
|
|
5
5
|
/**
|
|
6
|
-
* Execute
|
|
6
|
+
* Execute functions with a concurrency limit
|
|
7
|
+
* @param functions Array of functions to execute in parallel
|
|
8
|
+
* @param concurrency Maximum number of concurrent executions
|
|
7
9
|
*/
|
|
8
10
|
async function executeWithConcurrency(functions, concurrency) {
|
|
9
11
|
const functionsLength = functions.length;
|