Skip to content

Commit

Permalink
Merge branch 'develop' into feat/add-authentication-entities
Browse files Browse the repository at this point in the history
  • Loading branch information
pKorsholm authored Jan 8, 2024
2 parents 3d7357b + 6b0b3fe commit f6e62a9
Show file tree
Hide file tree
Showing 2,892 changed files with 224,458 additions and 444,646 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-timers-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"medusa-react": patch
---

fix(medusa-react): general type fixes related to generating reference documentation
5 changes: 5 additions & 0 deletions .changeset/forty-rules-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---

Fix typo in discounts error message
6 changes: 6 additions & 0 deletions .changeset/fresh-boxes-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@medusajs/orchestration": patch
"@medusajs/workflows-sdk": patch
---

feat(orchestration, workflows-sdk): Add events management and implementation to manage async workflows
5 changes: 5 additions & 0 deletions .changeset/great-cameras-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/types": patch
---

feat(types): promotion delete / update / retrieve
6 changes: 6 additions & 0 deletions .changeset/metal-pans-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@medusajs/medusa": patch
"medusa-payment-stripe": patch
---

feat(medusa-payment-stripe): Add delay to Stripe webhook
8 changes: 8 additions & 0 deletions .changeset/neat-suits-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@medusajs/medusa": patch
"@medusajs/admin-ui": patch
"@medusajs/admin": patch
"medusa-core-utils": patch
---

Add missing country in admin region and set Libya to formal name
7 changes: 7 additions & 0 deletions .changeset/rotten-lobsters-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@medusajs/link-modules": patch
"@medusajs/medusa": patch

---

feat: PubKey <> SC joiner config
5 changes: 5 additions & 0 deletions .changeset/sour-birds-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---

fix(medusa): Ordering management using joins and pagination
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ export default class TypedocManager {
const signature = mappedSignature.signatures[0]
// get the props of the component from the
// first parameter in the signature.
const props = getTypeChildren(
signature.parameters![0].type!,
this.project
)
const props = getTypeChildren({
reflectionType: signature.parameters![0].type!,
project: this.project,
})

// this stores props that should be removed from the
// spec
Expand Down Expand Up @@ -482,7 +482,10 @@ export default class TypedocManager {
childName
) as DeclarationReflection
} else if (reflection.type) {
getTypeChildren(reflection.type, this.project).some((child) => {
getTypeChildren({
reflectionType: reflection.type,
project: this.project,
}).some((child) => {
if (child.name === childName) {
childReflection = child
return true
Expand Down
2 changes: 1 addition & 1 deletion docs-util/packages/scripts/generate-reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export function generateReference(referenceName: string) {
formatColoredLog(colorLog, referenceName, chunk.trim())
})
typedocProcess.on("exit", (code) => {
formatColoredLog(colorLog, referenceName, "Finished Generating reference.")
generatedCount++
if (generatedCount >= totalCount && !ranMerger && code !== 1) {
runMerger()
Expand All @@ -81,7 +82,6 @@ export function generateReference(referenceName: string) {
)
})
})
formatColoredLog(colorLog, referenceName, "Finished Generating reference.")
}

function formatColoredLog(
Expand Down
126 changes: 108 additions & 18 deletions docs-util/packages/typedoc-config/_merger.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ module.exports = {
"stock-location",
"workflows",
],
allReflectionsHaveOwnDocumentInNamespace: ["Utilities"],
formatting: {
"*": {
showCommentsAsHeader: true,
Expand Down Expand Up @@ -131,7 +132,7 @@ module.exports = {
displayed_sidebar: "inventoryReference",
},
},
"^IInventoryService/methods": {
"^inventory/IInventoryService/methods": {
reflectionDescription:
"This documentation provides a reference to the `{{alias}}` {{kind}}. This belongs to the Inventory Module.",
frontmatterData: {
Expand Down Expand Up @@ -189,29 +190,118 @@ module.exports = {
"^js_client/.*LineItemsResource": {
maxLevel: 3,
},
"^(js_client/.*modules/.*internal|internal.*/modules)": {

// MEDUSA REACT CONFIG
"^medusa_react": {
frontmatterData: {
displayed_sidebar: "medusaReactSidebar",
},
parameterComponentExtraProps: {
expandUrl:
"https://docs.medusajs.com/medusa-react/overview#expanding-fields",
},
},
"^modules/medusa_react\\.mdx": {
frontmatterData: {
displayed_sidebar: "medusaReactSidebar",
},
reflectionGroups: {
Constructors: false,
"Type Aliases": false,
Enumerations: false,
"Enumeration Members": false,
Classes: false,
Variables: false,
Functions: false,
Interfaces: false,
References: false,
},
reflectionCategories: {
Mutations: false,
Queries: false,
Other: false,
},
},
"^internal.*/.*js_client.*": {
reflectionGroups: {
Constructors: false,
"^medusa_react/(medusa_react\\.Hooks\\.mdx|.*medusa_react\\.Hooks\\.Admin\\.mdx|.*medusa_react\\.Hooks\\.Store\\.mdx|medusa_react\\.Providers\\.mdx)":
{
reflectionGroups: {
Functions: false,
},
},
"^medusa_react/Providers/.*": {
expandMembers: true,
frontmatterData: {
displayed_sidebar: "jsClientSidebar",
displayed_sidebar: "medusaReactSidebar",
slug: "/references/medusa-react/providers/{{alias-lower}}",
sidebar_label: "{{alias}}",
},
reflectionTitle: {
suffix: " Provider Overview",
},
},
"^medusa_react/medusa_react\\.Utilities": {
expandMembers: true,
reflectionTitle: {
prefix: "Medusa React ",
},
},
"^medusa_react/Utilities/.*": {
expandMembers: true,
frontmatterData: {
displayed_sidebar: "medusaReactSidebar",
slug: "/references/medusa-react/utilities/{{alias}}",
},
},
"^medusa_react/medusa_react\\.Hooks\\.mdx": {
frontmatterData: {
displayed_sidebar: "medusaReactSidebar",
slug: "/references/medusa-react/hooks",
},
},
"^medusa_react/Hooks/Admin/.*Admin\\.mdx": {
frontmatterData: {
displayed_sidebar: "medusaReactSidebar",
slug: "/references/medusa-react/hooks/admin",
},
},
"^medusa_react/Hooks/Admin/.*": {
frontmatterData: {
displayed_sidebar: "medusaReactSidebar",
slug: "/references/medusa-react/hooks/admin/{{alias-lower}}",
},
},
"^medusa_react/Hooks/Store/.*Store\\.mdx": {
frontmatterData: {
displayed_sidebar: "medusaReactSidebar",
slug: "/references/medusa-react/hooks/store",
},
},
"^medusa_react/Hooks/Store/.*": {
frontmatterData: {
displayed_sidebar: "medusaReactSidebar",
slug: "/references/medusa-react/hooks/store/{{alias-lower}}",
},
},
"^medusa_react/medusa_react\\.Providers\\.mdx": {
frontmatterData: {
displayed_sidebar: "medusaReactSidebar",
slug: "/references/medusa-react/providers",
},
},
"^medusa_react/medusa_react\\.Utilities\\.mdx": {
frontmatterData: {
displayed_sidebar: "medusaReactSidebar",
slug: "/references/medusa-react/utilities",
},
},
"^medusa_react/Hooks/.*Admin\\.Inventory_Items": {
maxLevel: 4,
},
"^medusa_react/Hooks/.*Admin\\.Products": {
maxLevel: 4,
},
"^medusa_react/Hooks/.*Admin\\.Stock_Locations": {
maxLevel: 5,
},
"^medusa_react/Hooks/.*Admin\\.Users": {
maxLevel: 5,
},

// MEDUSA CONFIG
"^medusa": {
"^medusa/": {
frontmatterData: {
displayed_sidebar: "homepage",
},
Expand Down Expand Up @@ -249,13 +339,13 @@ module.exports = {
},

// PRICING CONFIG
"^(pricing|IPricingModuleService)": {
"^pricing": {
...modulesOptions,
frontmatterData: {
displayed_sidebar: "pricingReference",
},
},
"^IPricingModuleService/methods": {
"^pricing/IPricingModuleService/methods": {
reflectionDescription:
"This documentation provides a reference to the `{{alias}}` {{kind}}. This belongs to the Pricing Module.",
frontmatterData: {
Expand Down Expand Up @@ -298,7 +388,7 @@ module.exports = {
displayed_sidebar: "productReference",
},
},
"^IProductModuleService/methods": {
"^product/IProductModuleService/methods": {
reflectionDescription:
"This documentation provides a reference to the {{alias}} {{kind}}. This belongs to the Product Module.",
frontmatterData: {
Expand Down Expand Up @@ -349,7 +439,7 @@ module.exports = {
displayed_sidebar: "stockLocationReference",
},
},
"^IStockLocationService/methods": {
"^stock-location/IStockLocationService/methods": {
reflectionDescription:
"This documentation provides a reference to the `{{alias}}` {{kind}}. This belongs to the Stock Location Module.",
frontmatterData: {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": [
"../../../../packages/medusa-react/tsconfig.json"
],
"compilerOptions": {
"noImplicitReturns": false,
}
}
12 changes: 12 additions & 0 deletions docs-util/packages/typedoc-config/extended-tsconfig/tsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@
{
"tagName": "@excludeExternal",
"syntaxKind": "modifier"
},
{
"tagName": "@customNamespace",
"syntaxKind": "block"
},
{
"tagName": "@namespaceMember",
"syntaxKind": "modifier"
},
{
"tagName": "@typeParamDefinition",
"syntaxKind": "block"
}
]
}
10 changes: 10 additions & 0 deletions docs-util/packages/typedoc-config/medusa-react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const getConfig = require("./utils/get-config")

module.exports = getConfig({
entryPointPath: "packages/medusa-react/src/index.ts",
tsConfigName: "medusa-react.json",
name: "medusa-react",
generateNamespaces: true,
ignoreApi: true,
})
9 changes: 9 additions & 0 deletions docs-util/packages/typedoc-plugin-custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ The following options are useful for linting:
- `eslintPathName`: The path to the ESLint configuration file.
- `pluginsResolvePath`: The path to resolve plugins used in the ESLint configuration files.

### Generate Namespace Plugin

If the `generateNamespaces` option is enabled, Namespaces are created from reflections having the `@customNamespace` tag. It also attaches categories (using the `@category` tag) of the same reflection to its generated parent namespace.

It also accepts the following options:

- `parentNamespace`: The name of a parent namespace to make the generated namespaces as its children.
- `namePrefix`: A prefix to add to the name of the generated namespaces.

---

## Build the Plugin
Expand Down
Loading

0 comments on commit f6e62a9

Please sign in to comment.