chore: payment auto capture + remove enum from utils (#7513)
What: - handles payments session that are auto captured - removes all the enums from `@medusajs/types` - move all `@medusajs/types` to devDependencies
This commit is contained in:
committed by
GitHub
parent
2c5ba408d4
commit
f1ced57d5f
@@ -1,11 +1,8 @@
|
||||
import {
|
||||
InternalModuleDeclaration,
|
||||
MODULE_RESOURCE_TYPE,
|
||||
MODULE_SCOPE,
|
||||
} from "@medusajs/types"
|
||||
import { InternalModuleDeclaration } from "@medusajs/types"
|
||||
import { MODULE_RESOURCE_TYPE, MODULE_SCOPE } from "../../types"
|
||||
|
||||
import { MedusaModule } from "../../medusa-module"
|
||||
import { asValue } from "awilix"
|
||||
import { MedusaModule } from "../../medusa-module"
|
||||
|
||||
const mockRegisterMedusaModule = jest.fn().mockImplementation(() => {
|
||||
return {
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import {
|
||||
MODULE_RESOURCE_TYPE,
|
||||
MODULE_SCOPE,
|
||||
ModuleResolution,
|
||||
} from "@medusajs/types"
|
||||
import { ModuleResolution } from "@medusajs/types"
|
||||
import { createMedusaContainer } from "@medusajs/utils"
|
||||
import { MODULE_RESOURCE_TYPE, MODULE_SCOPE } from "../../types"
|
||||
import { moduleLoader } from "../module-loader"
|
||||
|
||||
const logger = {
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import {
|
||||
InternalModuleDeclaration,
|
||||
MODULE_RESOURCE_TYPE,
|
||||
MODULE_SCOPE,
|
||||
ModuleDefinition,
|
||||
} from "@medusajs/types"
|
||||
import { InternalModuleDeclaration, ModuleDefinition } from "@medusajs/types"
|
||||
import { ModulesDefinition } from "../../definitions"
|
||||
import { MODULE_RESOURCE_TYPE, MODULE_SCOPE } from "../../types"
|
||||
import { registerMedusaModule } from "../register-modules"
|
||||
|
||||
const RESOLVED_PACKAGE = "@medusajs/test-service-resolved"
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
import {
|
||||
Logger,
|
||||
MedusaContainer,
|
||||
MODULE_SCOPE,
|
||||
ModuleResolution,
|
||||
} from "@medusajs/types"
|
||||
|
||||
import { Logger, MedusaContainer, ModuleResolution } from "@medusajs/types"
|
||||
import { asValue } from "awilix"
|
||||
import { EOL } from "os"
|
||||
import { MODULE_SCOPE } from "../types"
|
||||
import { loadInternalModule } from "./utils"
|
||||
|
||||
export const moduleLoader = async ({
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
import {
|
||||
ExternalModuleDeclaration,
|
||||
InternalModuleDeclaration,
|
||||
MODULE_RESOURCE_TYPE,
|
||||
MODULE_SCOPE,
|
||||
ModuleDefinition,
|
||||
ModuleExports,
|
||||
ModuleResolution,
|
||||
} from "@medusajs/types"
|
||||
|
||||
import { isObject, isString } from "@medusajs/utils"
|
||||
import resolveCwd from "resolve-cwd"
|
||||
import { ModulesDefinition } from "../definitions"
|
||||
import { MODULE_RESOURCE_TYPE, MODULE_SCOPE } from "../types"
|
||||
|
||||
export const registerMedusaModule = (
|
||||
moduleKey: string,
|
||||
|
||||
@@ -3,21 +3,21 @@ import {
|
||||
InternalModuleDeclaration,
|
||||
Logger,
|
||||
MedusaContainer,
|
||||
MODULE_RESOURCE_TYPE,
|
||||
ModuleExports,
|
||||
ModuleLoaderFunction,
|
||||
ModuleResolution,
|
||||
} from "@medusajs/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
createMedusaContainer,
|
||||
MedusaModuleType,
|
||||
ModulesSdkUtils,
|
||||
createMedusaContainer,
|
||||
} from "@medusajs/utils"
|
||||
import { asFunction, asValue } from "awilix"
|
||||
import { statSync } from "fs"
|
||||
import { readdir } from "fs/promises"
|
||||
import { join, resolve } from "path"
|
||||
import { MODULE_RESOURCE_TYPE } from "../../types"
|
||||
|
||||
type ModuleResource = {
|
||||
services: Function[]
|
||||
|
||||
Reference in New Issue
Block a user