4 Commits

8 changed files with 81 additions and 43 deletions

6
composer.lock generated
View File

@@ -420,15 +420,15 @@
}, },
{ {
"name": "wpackagist-plugin/seo-by-rank-math", "name": "wpackagist-plugin/seo-by-rank-math",
"version": "1.0.262", "version": "1.0.263",
"source": { "source": {
"type": "svn", "type": "svn",
"url": "https://plugins.svn.wordpress.org/seo-by-rank-math/", "url": "https://plugins.svn.wordpress.org/seo-by-rank-math/",
"reference": "tags/1.0.262" "reference": "tags/1.0.263"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://downloads.wordpress.org/plugin/seo-by-rank-math.1.0.262.zip" "url": "https://downloads.wordpress.org/plugin/seo-by-rank-math.1.0.263.zip"
}, },
"require": { "require": {
"composer/installers": "^1.0 || ^2.0" "composer/installers": "^1.0 || ^2.0"

View File

@@ -1,24 +1,2 @@
<?php <?php
return array( return ['project-id-version'=>'Moonshine','report-msgid-bugs-to'=>'','pot-creation-date'=>'2026-01-13 15:52+0000','po-revision-date'=>'2026-01-29 02:55+0000','last-translator'=>'','language-team'=>'Français du Canada','language'=>'fr_CA','plural-forms'=>'nplurals=2; plural=n > 1;','mime-version'=>'1.0','content-type'=>'text/plain; charset=UTF-8','content-transfer-encoding'=>'8bit','x-generator'=>'Loco https://localise.biz/','x-loco-version'=>'2.8.1; wp-6.9; php-8.3.27','x-domain'=>'moonshine','messages'=>['Heading styles'=>'Styles de titres','Headless WordPress theme based on Nuxt.'=>'Thème Wordpress headless basé sur Nuxt.','https://websimple.com/'=>'https://websimple.com/','Inline styles'=>'Styles de caractères','Link styles'=>'Styles de liens','Main menu'=>'Menu principal','Moonshine'=>'Moonshine','Paragraph styles'=>'Styles de paragraphes','Pascal Martineau '=>'Pascal Martineau ','Semi-bold'=>'Semi-gras']];
'project-id-version' => 'Moonshine',
'report-msgid-bugs-to' => '',
'pot-creation-date' => '2026-01-13 15:52+0000',
'po-revision-date' => '2026-01-13 15:53+0000',
'last-translator' => '',
'language-team' => 'Français du Canada',
'language' => 'fr_CA',
'plural-forms' => 'nplurals=2; plural=n > 1;',
'mime-version' => '1.0',
'content-type' => 'text/plain; charset=UTF-8',
'content-transfer-encoding' => '8bit',
'x-generator' => 'Loco https://localise.biz/',
'x-loco-version' => '2.8.1; wp-6.9; php-8.3.27',
'x-domain' => 'moonshine',
'messages' => array(
'Headless WordPress theme based on Nuxt.' => 'Thème Wordpress headless basé sur Nuxt.',
'https://websimple.com/' => 'https://websimple.com/',
'Main menu' => 'Menu principal',
'Moonshine' => 'Moonshine',
'Pascal Martineau ' => 'Pascal Martineau ',
),
);

View File

@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: Moonshine\n" "Project-Id-Version: Moonshine\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-01-13 15:52+0000\n" "POT-Creation-Date: 2026-01-13 15:52+0000\n"
"PO-Revision-Date: 2026-01-13 15:53+0000\n" "PO-Revision-Date: 2026-01-29 02:55+0000\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: Français du Canada\n" "Language-Team: Français du Canada\n"
"Language: fr_CA\n" "Language: fr_CA\n"
@@ -15,6 +15,10 @@ msgstr ""
"X-Loco-Version: 2.8.1; wp-6.9; php-8.3.27\n" "X-Loco-Version: 2.8.1; wp-6.9; php-8.3.27\n"
"X-Domain: moonshine" "X-Domain: moonshine"
#: includes/vendors/tinymce.php:54
msgid "Heading styles"
msgstr "Styles de titres"
#. Description of the theme #. Description of the theme
msgid "Headless WordPress theme based on Nuxt." msgid "Headless WordPress theme based on Nuxt."
msgstr "Thème Wordpress headless basé sur Nuxt." msgstr "Thème Wordpress headless basé sur Nuxt."
@@ -23,6 +27,14 @@ msgstr "Thème Wordpress headless basé sur Nuxt."
msgid "https://websimple.com/" msgid "https://websimple.com/"
msgstr "https://websimple.com/" msgstr "https://websimple.com/"
#: includes/vendors/tinymce.php:34
msgid "Inline styles"
msgstr "Styles de caractères"
#: includes/vendors/tinymce.php:24
msgid "Link styles"
msgstr "Styles de liens"
#: includes/core/theme-setup.php:15 #: includes/core/theme-setup.php:15
msgid "Main menu" msgid "Main menu"
msgstr "Menu principal" msgstr "Menu principal"
@@ -31,6 +43,14 @@ msgstr "Menu principal"
msgid "Moonshine" msgid "Moonshine"
msgstr "Moonshine" msgstr "Moonshine"
#: includes/vendors/tinymce.php:44
msgid "Paragraph styles"
msgstr "Styles de paragraphes"
#. Author of the theme #. Author of the theme
msgid "Pascal Martineau " msgid "Pascal Martineau "
msgstr "Pascal Martineau " msgstr "Pascal Martineau "
#: includes/vendors/tinymce.php:37
msgid "Semi-bold"
msgstr "Semi-gras"

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Moonshine\n" "Project-Id-Version: Moonshine\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-01-13 15:52+0000\n" "POT-Creation-Date: 2026-01-29 02:55+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: \n" "Language-Team: \n"
@@ -16,6 +16,10 @@ msgstr ""
"X-Loco-Version: 2.8.1; wp-6.9; php-8.3.27\n" "X-Loco-Version: 2.8.1; wp-6.9; php-8.3.27\n"
"X-Domain: moonshine" "X-Domain: moonshine"
#: includes/vendors/tinymce.php:54
msgid "Heading styles"
msgstr ""
#. Description of the theme #. Description of the theme
msgid "Headless WordPress theme based on Nuxt." msgid "Headless WordPress theme based on Nuxt."
msgstr "" msgstr ""
@@ -24,6 +28,14 @@ msgstr ""
msgid "https://websimple.com/" msgid "https://websimple.com/"
msgstr "" msgstr ""
#: includes/vendors/tinymce.php:34
msgid "Inline styles"
msgstr ""
#: includes/vendors/tinymce.php:24
msgid "Link styles"
msgstr ""
#: includes/core/theme-setup.php:15 #: includes/core/theme-setup.php:15
msgid "Main menu" msgid "Main menu"
msgstr "" msgstr ""
@@ -32,6 +44,14 @@ msgstr ""
msgid "Moonshine" msgid "Moonshine"
msgstr "" msgstr ""
#: includes/vendors/tinymce.php:44
msgid "Paragraph styles"
msgstr ""
#. Author of the theme #. Author of the theme
msgid "Pascal Martineau " msgid "Pascal Martineau "
msgstr "" msgstr ""
#: includes/vendors/tinymce.php:37
msgid "Semi-bold"
msgstr ""

View File

@@ -16,7 +16,7 @@
}, },
"dependencies": { "dependencies": {
"@iconify-json/lucide": "^1.2.87", "@iconify-json/lucide": "^1.2.87",
"@lewebsimple/nuxt-graphql": "^0.6.6", "@lewebsimple/nuxt-graphql": "^0.6.7",
"@nuxt/ui": "4.3.0", "@nuxt/ui": "4.3.0",
"@nuxtjs/device": "4.0.0", "@nuxtjs/device": "4.0.0",
"@nuxtjs/seo": "^3.4.0", "@nuxtjs/seo": "^3.4.0",

View File

@@ -16,8 +16,8 @@ importers:
specifier: ^1.2.87 specifier: ^1.2.87
version: 1.2.87 version: 1.2.87
'@lewebsimple/nuxt-graphql': '@lewebsimple/nuxt-graphql':
specifier: ^0.6.6 specifier: ^0.6.7
version: 0.6.6(db0@0.3.4)(ioredis@5.9.2)(magicast@0.5.1) version: 0.6.7(db0@0.3.4)(ioredis@5.9.2)(magicast@0.5.1)
'@nuxt/ui': '@nuxt/ui':
specifier: 4.3.0 specifier: 4.3.0
version: 4.3.0(591bb4b8e9462081241725e97ecb3569) version: 4.3.0(591bb4b8e9462081241725e97ecb3569)
@@ -1261,8 +1261,8 @@ packages:
'@kwsites/promise-deferred@1.1.1': '@kwsites/promise-deferred@1.1.1':
resolution: {integrity: sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==} resolution: {integrity: sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==}
'@lewebsimple/nuxt-graphql@0.6.6': '@lewebsimple/nuxt-graphql@0.6.7':
resolution: {integrity: sha512-a6PjgG3Xs2iDx0NxlI7bFeHbCsRh235ej6Jszh+zDBN6PD80HKSYwTaLuct19r5HZ+Uyy4qPmVo4HmizNKzo/A==} resolution: {integrity: sha512-/7jol50YtpKdUlVIliDI0IH9z9D8Gk0pm6Jc1q7CL6TTOKlJKnCmLw0KsjmmmniUgtBQjyh/G+VqXu60iRgRYg==}
'@mapbox/node-pre-gyp@2.0.3': '@mapbox/node-pre-gyp@2.0.3':
resolution: {integrity: sha512-uwPAhccfFJlsfCxMYTwOdVfOz3xqyj8xYL3zJj8f0pb30tLohnnFPhLuqp4/qoEz8sNxe4SESZedcBojRefIzg==} resolution: {integrity: sha512-uwPAhccfFJlsfCxMYTwOdVfOz3xqyj8xYL3zJj8f0pb30tLohnnFPhLuqp4/qoEz8sNxe4SESZedcBojRefIzg==}
@@ -7351,7 +7351,7 @@ snapshots:
'@whatwg-node/promise-helpers': 1.3.2 '@whatwg-node/promise-helpers': 1.3.2
cross-inspect: 1.0.1 cross-inspect: 1.0.1
graphql: 16.12.0 graphql: 16.12.0
tslib: 2.8.1 tslib: 2.6.3
'@graphql-tools/utils@11.0.0(graphql@16.12.0)': '@graphql-tools/utils@11.0.0(graphql@16.12.0)':
dependencies: dependencies:
@@ -7584,7 +7584,7 @@ snapshots:
'@kwsites/promise-deferred@1.1.1': {} '@kwsites/promise-deferred@1.1.1': {}
'@lewebsimple/nuxt-graphql@0.6.6(db0@0.3.4)(ioredis@5.9.2)(magicast@0.5.1)': '@lewebsimple/nuxt-graphql@0.6.7(db0@0.3.4)(ioredis@5.9.2)(magicast@0.5.1)':
dependencies: dependencies:
'@graphql-codegen/core': 5.0.0(graphql@16.12.0) '@graphql-codegen/core': 5.0.0(graphql@16.12.0)
'@graphql-codegen/typed-document-node': 6.1.5(graphql@16.12.0) '@graphql-codegen/typed-document-node': 6.1.5(graphql@16.12.0)
@@ -11674,7 +11674,7 @@ snapshots:
no-case@3.0.4: no-case@3.0.4:
dependencies: dependencies:
lower-case: 2.0.2 lower-case: 2.0.2
tslib: 2.8.1 tslib: 2.6.3
node-addon-api@7.1.1: {} node-addon-api@7.1.1: {}

View File

@@ -40,15 +40,35 @@ function getAuthUser(user: AuthUserFragment): User {
}; };
} }
// Track in-flight refreshAuthToken calls to prevent duplicate requests
const refreshTokenPromises = new Map<string, Promise<string | undefined>>();
// Refresh auth token by calling remote GraphQL endpoint directly // Refresh auth token by calling remote GraphQL endpoint directly
export async function refreshAuthToken(refreshToken: string): Promise<string | undefined> { export async function refreshAuthToken(refreshToken: string): Promise<string | undefined> {
const { public: { wpUrl } } = useRuntimeConfig(); // Return existing in-flight promise if available
const endpoint = `${wpUrl}/graphql`; const inFlight = refreshTokenPromises.get(refreshToken);
const { data } = await executeGraphQLHTTP<ResultOf<"AuthRefreshToken">>({ if (inFlight) {
query: AuthRefreshTokenDocument, return inFlight;
variables: { refreshToken }, }
}, { endpoint });
return data?.refreshToken?.authToken || undefined; const refreshPromise = (async () => {
const { wpUrl } = useRuntimeConfig();
const endpoint = `${wpUrl}/graphql`;
const { data } = await executeGraphQLHTTP<ResultOf<"AuthRefreshToken">>({
query: AuthRefreshTokenDocument,
variables: { refreshToken },
}, { endpoint });
return data?.refreshToken?.authToken || undefined;
})();
refreshTokenPromises.set(refreshToken, refreshPromise);
return refreshPromise.finally(() => {
const current = refreshTokenPromises.get(refreshToken);
if (current === refreshPromise) {
refreshTokenPromises.delete(refreshToken);
}
});
} }
// Get auth token from user session (refresh if needed) // Get auth token from user session (refresh if needed)