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",
"version": "1.0.262",
"version": "1.0.263",
"source": {
"type": "svn",
"url": "https://plugins.svn.wordpress.org/seo-by-rank-math/",
"reference": "tags/1.0.262"
"reference": "tags/1.0.263"
},
"dist": {
"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": {
"composer/installers": "^1.0 || ^2.0"

View File

@@ -1,24 +1,2 @@
<?php
return array(
'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 ',
),
);
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']];

View File

@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: Moonshine\n"
"Report-Msgid-Bugs-To: \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"
"Language-Team: Français du Canada\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-Domain: moonshine"
#: includes/vendors/tinymce.php:54
msgid "Heading styles"
msgstr "Styles de titres"
#. Description of the theme
msgid "Headless WordPress theme based on 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/"
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
msgid "Main menu"
msgstr "Menu principal"
@@ -31,6 +43,14 @@ msgstr "Menu principal"
msgid "Moonshine"
msgstr "Moonshine"
#: includes/vendors/tinymce.php:44
msgid "Paragraph styles"
msgstr "Styles de paragraphes"
#. Author of the theme
msgid "Pascal Martineau "
msgstr "Pascal Martineau "
#: includes/vendors/tinymce.php:37
msgid "Semi-bold"
msgstr "Semi-gras"

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Moonshine\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: \n"
@@ -16,6 +16,10 @@ msgstr ""
"X-Loco-Version: 2.8.1; wp-6.9; php-8.3.27\n"
"X-Domain: moonshine"
#: includes/vendors/tinymce.php:54
msgid "Heading styles"
msgstr ""
#. Description of the theme
msgid "Headless WordPress theme based on Nuxt."
msgstr ""
@@ -24,6 +28,14 @@ msgstr ""
msgid "https://websimple.com/"
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
msgid "Main menu"
msgstr ""
@@ -32,6 +44,14 @@ msgstr ""
msgid "Moonshine"
msgstr ""
#: includes/vendors/tinymce.php:44
msgid "Paragraph styles"
msgstr ""
#. Author of the theme
msgid "Pascal Martineau "
msgstr ""
#: includes/vendors/tinymce.php:37
msgid "Semi-bold"
msgstr ""

View File

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

View File

@@ -16,8 +16,8 @@ importers:
specifier: ^1.2.87
version: 1.2.87
'@lewebsimple/nuxt-graphql':
specifier: ^0.6.6
version: 0.6.6(db0@0.3.4)(ioredis@5.9.2)(magicast@0.5.1)
specifier: ^0.6.7
version: 0.6.7(db0@0.3.4)(ioredis@5.9.2)(magicast@0.5.1)
'@nuxt/ui':
specifier: 4.3.0
version: 4.3.0(591bb4b8e9462081241725e97ecb3569)
@@ -1261,8 +1261,8 @@ packages:
'@kwsites/promise-deferred@1.1.1':
resolution: {integrity: sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==}
'@lewebsimple/nuxt-graphql@0.6.6':
resolution: {integrity: sha512-a6PjgG3Xs2iDx0NxlI7bFeHbCsRh235ej6Jszh+zDBN6PD80HKSYwTaLuct19r5HZ+Uyy4qPmVo4HmizNKzo/A==}
'@lewebsimple/nuxt-graphql@0.6.7':
resolution: {integrity: sha512-/7jol50YtpKdUlVIliDI0IH9z9D8Gk0pm6Jc1q7CL6TTOKlJKnCmLw0KsjmmmniUgtBQjyh/G+VqXu60iRgRYg==}
'@mapbox/node-pre-gyp@2.0.3':
resolution: {integrity: sha512-uwPAhccfFJlsfCxMYTwOdVfOz3xqyj8xYL3zJj8f0pb30tLohnnFPhLuqp4/qoEz8sNxe4SESZedcBojRefIzg==}
@@ -7351,7 +7351,7 @@ snapshots:
'@whatwg-node/promise-helpers': 1.3.2
cross-inspect: 1.0.1
graphql: 16.12.0
tslib: 2.8.1
tslib: 2.6.3
'@graphql-tools/utils@11.0.0(graphql@16.12.0)':
dependencies:
@@ -7584,7 +7584,7 @@ snapshots:
'@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:
'@graphql-codegen/core': 5.0.0(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:
dependencies:
lower-case: 2.0.2
tslib: 2.8.1
tslib: 2.6.3
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
export async function refreshAuthToken(refreshToken: string): Promise<string | undefined> {
const { public: { wpUrl } } = useRuntimeConfig();
const endpoint = `${wpUrl}/graphql`;
const { data } = await executeGraphQLHTTP<ResultOf<"AuthRefreshToken">>({
query: AuthRefreshTokenDocument,
variables: { refreshToken },
}, { endpoint });
return data?.refreshToken?.authToken || undefined;
// Return existing in-flight promise if available
const inFlight = refreshTokenPromises.get(refreshToken);
if (inFlight) {
return inFlight;
}
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)