obsidian-dev-utils
Version:
This is the collection of useful functions that you can use for your Obsidian plugin development
50 lines (47 loc) • 3.94 kB
JavaScript
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
(function initCjs(){const globalThisRecord=globalThis;globalThisRecord["__name"]??=name;const originalRequire=require;if(originalRequire&&!originalRequire.__isPatched){require=Object.assign(id=>requirePatched(id),originalRequire,{__isPatched:true})}const newFuncs={__extractDefault:__name(()=>extractDefault,"__extractDefault"),process:__name(()=>{const browserProcess={browser:true,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};return browserProcess},"process")};for(const key of Object.keys(newFuncs)){globalThisRecord[key]??=newFuncs[key]?.()}function name(obj){return obj}__name(name,"name");function extractDefault(module){return module&&module.__esModule&&"default"in module?module.default:module}__name(extractDefault,"extractDefault");function requirePatched(id){const module=originalRequire?.(id);if(module){return extractDefault(module)}if(id==="process"||id==="node:process"){console.error(`Module not found: ${id}. Fake process object is returned instead.`);return globalThis.process}console.error(`Module not found: ${id}. Empty object is returned instead.`);return{}}__name(requirePatched,"requirePatched")})();
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var PluginId_exports = {};
__export(PluginId_exports, {
NO_PLUGIN_ID_INITIALIZED: () => NO_PLUGIN_ID_INITIALIZED,
getPluginId: () => getPluginId,
setPluginId: () => setPluginId
});
module.exports = __toCommonJS(PluginId_exports);
const NO_PLUGIN_ID_INITIALIZED = "__no-plugin-id-initialized__";
let pluginId = NO_PLUGIN_ID_INITIALIZED;
function getPluginId() {
return pluginId;
}
function setPluginId(newPluginId) {
if (newPluginId) {
pluginId = newPluginId;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
NO_PLUGIN_ID_INITIALIZED,
getPluginId,
setPluginId
});
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vLi4vc3JjL29ic2lkaWFuL1BsdWdpbi9QbHVnaW5JZC50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiLyoqXG4gKiBAcGFja2FnZURvY3VtZW50YXRpb25cbiAqXG4gKiBIb2xkZXIgZm9yIHRoZSBwbHVnaW4gSUQuXG4gKi9cblxuLyoqXG4gKiBUaGUgcGx1Z2luIElEIGZvciBubyBwbHVnaW4uXG4gKi9cbmV4cG9ydCBjb25zdCBOT19QTFVHSU5fSURfSU5JVElBTElaRUQgPSAnX19uby1wbHVnaW4taWQtaW5pdGlhbGl6ZWRfXyc7XG5cbmxldCBwbHVnaW5JZCA9IE5PX1BMVUdJTl9JRF9JTklUSUFMSVpFRDtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBwbHVnaW4gSUQuXG4gKlxuICogQHJldHVybnMgVGhlIHBsdWdpbiBJRC5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldFBsdWdpbklkKCk6IHN0cmluZyB7XG4gIHJldHVybiBwbHVnaW5JZDtcbn1cblxuLyoqXG4gKiBTZXRzIHRoZSBwbHVnaW4gSUQuXG4gKlxuICogQHBhcmFtIG5ld1BsdWdpbklkIC0gVGhlIG5ldyBwbHVnaW4gSUQuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBzZXRQbHVnaW5JZChuZXdQbHVnaW5JZDogc3RyaW5nKTogdm9pZCB7XG4gIGlmIChuZXdQbHVnaW5JZCkge1xuIC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