paperclip-github-plugin 0.15.6 → 0.15.7
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/manifest.js +1 -1
- package/dist/worker.js +9 -4
- package/package.json +1 -1
package/dist/manifest.js
CHANGED
|
@@ -675,7 +675,7 @@ var COMPANY_METRIC_API_ROUTE_URL_PATH = `/api/plugins/${GITHUB_SYNC_PLUGIN_ID}/a
|
|
|
675
675
|
var require2 = createRequire(import.meta.url);
|
|
676
676
|
var packageJson = require2("../package.json");
|
|
677
677
|
var SCHEDULE_TICK_CRON = "* * * * *";
|
|
678
|
-
var MANIFEST_VERSION = "0.15.
|
|
678
|
+
var MANIFEST_VERSION = "0.15.7"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
|
|
679
679
|
var manifest = {
|
|
680
680
|
id: GITHUB_SYNC_PLUGIN_ID,
|
|
681
681
|
apiVersion: 1,
|
package/dist/worker.js
CHANGED
|
@@ -17275,11 +17275,14 @@ var plugin = definePlugin({
|
|
|
17275
17275
|
const saved = await ctx.state.get(SETTINGS_SCOPE);
|
|
17276
17276
|
const importRegistry = normalizeImportRegistry(await ctx.state.get(IMPORT_REGISTRY_SCOPE));
|
|
17277
17277
|
const normalizedSettings = normalizeSettings(saved);
|
|
17278
|
-
const config = await
|
|
17278
|
+
const [config, trustedConfig] = await Promise.all([
|
|
17279
|
+
getResolvedConfig(ctx),
|
|
17280
|
+
ctx.config.get().then((value) => normalizeConfig(value))
|
|
17281
|
+
]);
|
|
17279
17282
|
const githubTokenConfigured = hasConfiguredGithubToken(normalizedSettings, config, requestedCompanyId);
|
|
17280
|
-
const configuredGitHubTokenRef = getConfiguredGitHubTokenRef(
|
|
17283
|
+
const configuredGitHubTokenRef = getConfiguredGitHubTokenRef(trustedConfig, requestedCompanyId);
|
|
17281
17284
|
const savedGitHubTokenRef = getSavedGitHubTokenRef(normalizedSettings, requestedCompanyId);
|
|
17282
|
-
const configuredBoardTokenRef = getConfiguredPaperclipBoardApiTokenRef(
|
|
17285
|
+
const configuredBoardTokenRef = getConfiguredPaperclipBoardApiTokenRef(trustedConfig, requestedCompanyId);
|
|
17283
17286
|
const savedBoardTokenRef = getSavedPaperclipBoardApiTokenRef(normalizedSettings, requestedCompanyId);
|
|
17284
17287
|
const settingsForResponse = sanitizeSettingsForCurrentSetup(
|
|
17285
17288
|
materializeScopedSettings(normalizedSettings, config, requestedCompanyId),
|
|
@@ -17303,7 +17306,9 @@ var plugin = definePlugin({
|
|
|
17303
17306
|
...savedGitHubTokenRef ? { githubTokenConfigSyncRef: savedGitHubTokenRef } : {},
|
|
17304
17307
|
githubTokenNeedsConfigSync: Boolean(savedGitHubTokenRef && configuredGitHubTokenRef !== savedGitHubTokenRef),
|
|
17305
17308
|
...savedBoardTokenRef ? { paperclipBoardAccessConfigSyncRef: savedBoardTokenRef } : {},
|
|
17306
|
-
paperclipBoardAccessNeedsConfigSync: Boolean(
|
|
17309
|
+
paperclipBoardAccessNeedsConfigSync: Boolean(
|
|
17310
|
+
savedBoardTokenRef && configuredBoardTokenRef !== savedBoardTokenRef
|
|
17311
|
+
)
|
|
17307
17312
|
};
|
|
17308
17313
|
});
|
|
17309
17314
|
ctx.data.register("dashboard.metrics", async (input) => {
|