@mnaoumov/obsidian-dev-toolkit 0.0.0 → 1.0.0
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/LICENSE +21 -0
- package/README.md +7 -1
- package/bundlers/esbuild/package.json +6 -0
- package/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin/package.json +6 -0
- package/bundlers/esbuild-impl/dependency/package.json +6 -0
- package/bundlers/esbuild-impl/fix-source-maps-plugin/package.json +6 -0
- package/bundlers/esbuild-impl/index/package.json +6 -0
- package/bundlers/esbuild-impl/obsidian-plugin-builder/package.json +6 -0
- package/bundlers/esbuild-impl/package.json +6 -0
- package/bundlers/esbuild-impl/preprocess-plugin/package.json +6 -0
- package/bundlers/esbuild-impl/rename-css-plugin/package.json +6 -0
- package/bundlers/index/package.json +6 -0
- package/bundlers/package.json +6 -0
- package/dist/demo-vault-helper/main.js +782 -0
- package/dist/demo-vault-helper/manifest.json +9 -0
- package/dist/integration-test-plugin/main.js +45388 -0
- package/dist/integration-test-plugin/manifest.json +8 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.cjs +335 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.d.cts +38 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/dependency.cjs +253 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/dependency.d.cts +20 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/fix-source-maps-plugin.cjs +226 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/fix-source-maps-plugin.d.cts +34 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/index.cjs +192 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/index.d.cts +7 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/obsidian-plugin-builder.cjs +375 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/obsidian-plugin-builder.d.cts +98 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/preprocess-plugin.cjs +247 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/preprocess-plugin.d.cts +30 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/rename-css-plugin.cjs +184 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/rename-css-plugin.d.cts +14 -0
- package/dist/lib/cjs/bundlers/esbuild.cjs +177 -0
- package/dist/lib/cjs/bundlers/esbuild.d.cts +11 -0
- package/dist/lib/cjs/bundlers/index.cjs +180 -0
- package/dist/lib/cjs/bundlers/index.d.cts +3 -0
- package/dist/lib/cjs/demo-vault-app-json.cjs +199 -0
- package/dist/lib/cjs/demo-vault-app-json.d.cts +93 -0
- package/dist/lib/cjs/demo-vault-buttons.cjs +580 -0
- package/dist/lib/cjs/demo-vault-buttons.d.cts +259 -0
- package/dist/lib/cjs/demo-vault-coverage.cjs +725 -0
- package/dist/lib/cjs/demo-vault-coverage.d.cts +533 -0
- package/dist/lib/cjs/demo-vault.cjs +309 -0
- package/dist/lib/cjs/demo-vault.d.cts +33 -0
- package/dist/lib/cjs/formatters/dprint.cjs +173 -0
- package/dist/lib/cjs/formatters/dprint.d.cts +15 -0
- package/dist/lib/cjs/formatters/index.cjs +177 -0
- package/dist/lib/cjs/formatters/index.d.cts +2 -0
- package/dist/lib/cjs/index.cjs +207 -0
- package/dist/lib/cjs/index.d.cts +16 -0
- package/dist/lib/cjs/integration-test-setup.cjs +142 -0
- package/dist/lib/cjs/integration-test-setup.d.cts +33 -0
- package/dist/lib/cjs/integration-test-vitest-global-setup.cjs +176 -0
- package/dist/lib/cjs/integration-test-vitest-global-setup.d.cts +39 -0
- package/dist/lib/cjs/jest-setup.cjs +147 -0
- package/dist/lib/cjs/jest-setup.d.cts +13 -0
- package/dist/lib/cjs/linters/eslint-config.cjs +365 -0
- package/dist/lib/cjs/linters/eslint-config.d.cts +25 -0
- package/dist/lib/cjs/linters/eslint-rules/index.cjs +201 -0
- package/dist/lib/cjs/linters/eslint-rules/index.d.cts +10 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-description.cjs +268 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-description.d.cts +54 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-helpers.cjs +231 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-helpers.d.cts +141 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-id.cjs +228 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-id.d.cts +32 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-name.cjs +229 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-name.d.cts +30 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-schema.cjs +329 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-schema.d.cts +45 -0
- package/dist/lib/cjs/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian.cjs +670 -0
- package/dist/lib/cjs/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian.d.cts +10 -0
- package/dist/lib/cjs/linters/eslint-rules/no-untrusted-input-events.cjs +260 -0
- package/dist/lib/cjs/linters/eslint-rules/no-untrusted-input-events.d.cts +10 -0
- package/dist/lib/cjs/linters/eslint-rules/obsidian-dev-utils-plugin.cjs +186 -0
- package/dist/lib/cjs/linters/eslint-rules/obsidian-dev-utils-plugin.d.cts +13 -0
- package/dist/lib/cjs/linters/eslint-rules/require-component-suffix.cjs +291 -0
- package/dist/lib/cjs/linters/eslint-rules/require-component-suffix.d.cts +18 -0
- package/dist/lib/cjs/linters/eslint.cjs +173 -0
- package/dist/lib/cjs/linters/eslint.d.cts +15 -0
- package/dist/lib/cjs/linters/index.cjs +189 -0
- package/dist/lib/cjs/linters/index.d.cts +6 -0
- package/dist/lib/cjs/linters/markdownlint.cjs +173 -0
- package/dist/lib/cjs/linters/markdownlint.d.cts +15 -0
- package/dist/lib/cjs/linters/obsidianmd-rule-custom-message.cjs +189 -0
- package/dist/lib/cjs/linters/obsidianmd-rule-custom-message.d.cts +40 -0
- package/dist/lib/cjs/obsidian-plugin-repo-paths.cjs +229 -0
- package/dist/lib/cjs/obsidian-plugin-repo-paths.d.cts +253 -0
- package/dist/lib/cjs/setup.cjs +176 -0
- package/dist/lib/cjs/setup.d.cts +21 -0
- package/dist/lib/cjs/templates.cjs +185 -0
- package/dist/lib/cjs/templates.d.cts +13 -0
- package/dist/lib/cjs/test-runners/index.cjs +183 -0
- package/dist/lib/cjs/test-runners/index.d.cts +4 -0
- package/dist/lib/cjs/test-runners/integration-test-plugin.cjs +224 -0
- package/dist/lib/cjs/test-runners/integration-test-plugin.d.cts +44 -0
- package/dist/lib/cjs/test-runners/performance-eval-cap.cjs +170 -0
- package/dist/lib/cjs/test-runners/performance-eval-cap.d.cts +27 -0
- package/dist/lib/cjs/test-runners/stale-build-global-setup.cjs +230 -0
- package/dist/lib/cjs/test-runners/stale-build-global-setup.d.cts +86 -0
- package/dist/lib/cjs/test-runners/vitest-config.cjs +497 -0
- package/dist/lib/cjs/test-runners/vitest-config.d.cts +200 -0
- package/dist/lib/cjs/version.cjs +275 -0
- package/dist/lib/cjs/version.d.cts +92 -0
- package/dist/lib/cjs/vitest-setup.cjs +147 -0
- package/dist/lib/cjs/vitest-setup.d.cts +11 -0
- package/dist/lib/esm/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.d.mts +38 -0
- package/dist/lib/esm/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.mjs +226 -0
- package/dist/lib/esm/bundlers/esbuild-impl/dependency.d.mts +20 -0
- package/dist/lib/esm/bundlers/esbuild-impl/dependency.mjs +138 -0
- package/dist/lib/esm/bundlers/esbuild-impl/fix-source-maps-plugin.d.mts +34 -0
- package/dist/lib/esm/bundlers/esbuild-impl/fix-source-maps-plugin.mjs +116 -0
- package/dist/lib/esm/bundlers/esbuild-impl/index.d.mts +7 -0
- package/dist/lib/esm/bundlers/esbuild-impl/index.mjs +64 -0
- package/dist/lib/esm/bundlers/esbuild-impl/obsidian-plugin-builder.d.mts +98 -0
- package/dist/lib/esm/bundlers/esbuild-impl/obsidian-plugin-builder.mjs +255 -0
- package/dist/lib/esm/bundlers/esbuild-impl/preprocess-plugin.d.mts +30 -0
- package/dist/lib/esm/bundlers/esbuild-impl/preprocess-plugin.mjs +134 -0
- package/dist/lib/esm/bundlers/esbuild-impl/rename-css-plugin.d.mts +14 -0
- package/dist/lib/esm/bundlers/esbuild-impl/rename-css-plugin.mjs +71 -0
- package/dist/lib/esm/bundlers/esbuild.d.mts +11 -0
- package/dist/lib/esm/bundlers/esbuild.mjs +66 -0
- package/dist/lib/esm/bundlers/index.d.mts +3 -0
- package/dist/lib/esm/bundlers/index.mjs +56 -0
- package/dist/lib/esm/demo-vault-app-json.d.mts +93 -0
- package/dist/lib/esm/demo-vault-app-json.mjs +83 -0
- package/dist/lib/esm/demo-vault-buttons.d.mts +259 -0
- package/dist/lib/esm/demo-vault-buttons.mjs +460 -0
- package/dist/lib/esm/demo-vault-coverage.d.mts +533 -0
- package/dist/lib/esm/demo-vault-coverage.mjs +626 -0
- package/dist/lib/esm/demo-vault.d.mts +33 -0
- package/dist/lib/esm/demo-vault.mjs +205 -0
- package/dist/lib/esm/formatters/dprint.d.mts +15 -0
- package/dist/lib/esm/formatters/dprint.mjs +60 -0
- package/dist/lib/esm/formatters/index.d.mts +2 -0
- package/dist/lib/esm/formatters/index.mjs +54 -0
- package/dist/lib/esm/index.d.mts +16 -0
- package/dist/lib/esm/index.mjs +74 -0
- package/dist/lib/esm/integration-test-setup.d.mts +33 -0
- package/dist/lib/esm/integration-test-setup.mjs +52 -0
- package/dist/lib/esm/integration-test-vitest-global-setup.d.mts +39 -0
- package/dist/lib/esm/integration-test-vitest-global-setup.mjs +65 -0
- package/dist/lib/esm/jest-setup.d.mts +13 -0
- package/dist/lib/esm/jest-setup.mjs +61 -0
- package/dist/lib/esm/linters/eslint-config.d.mts +25 -0
- package/dist/lib/esm/linters/eslint-config.mjs +247 -0
- package/dist/lib/esm/linters/eslint-rules/index.d.mts +10 -0
- package/dist/lib/esm/linters/eslint-rules/index.mjs +70 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-description.d.mts +54 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-description.mjs +154 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-helpers.d.mts +141 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-helpers.mjs +98 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-id.d.mts +32 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-id.mjs +117 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-name.d.mts +30 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-name.mjs +118 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-schema.d.mts +45 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-schema.mjs +220 -0
- package/dist/lib/esm/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian.d.mts +10 -0
- package/dist/lib/esm/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian.mjs +559 -0
- package/dist/lib/esm/linters/eslint-rules/no-untrusted-input-events.d.mts +10 -0
- package/dist/lib/esm/linters/eslint-rules/no-untrusted-input-events.mjs +146 -0
- package/dist/lib/esm/linters/eslint-rules/obsidian-dev-utils-plugin.d.mts +13 -0
- package/dist/lib/esm/linters/eslint-rules/obsidian-dev-utils-plugin.mjs +73 -0
- package/dist/lib/esm/linters/eslint-rules/require-component-suffix.d.mts +18 -0
- package/dist/lib/esm/linters/eslint-rules/require-component-suffix.mjs +175 -0
- package/dist/lib/esm/linters/eslint.d.mts +15 -0
- package/dist/lib/esm/linters/eslint.mjs +60 -0
- package/dist/lib/esm/linters/index.d.mts +6 -0
- package/dist/lib/esm/linters/index.mjs +62 -0
- package/dist/lib/esm/linters/markdownlint.d.mts +15 -0
- package/dist/lib/esm/linters/markdownlint.mjs +60 -0
- package/dist/lib/esm/linters/obsidianmd-rule-custom-message.d.mts +40 -0
- package/dist/lib/esm/linters/obsidianmd-rule-custom-message.mjs +75 -0
- package/dist/lib/esm/obsidian-plugin-repo-paths.d.mts +253 -0
- package/dist/lib/esm/obsidian-plugin-repo-paths.mjs +116 -0
- package/dist/lib/esm/setup.d.mts +21 -0
- package/dist/lib/esm/setup.mjs +63 -0
- package/dist/lib/esm/templates.d.mts +13 -0
- package/dist/lib/esm/templates.mjs +65 -0
- package/dist/lib/esm/test-runners/index.d.mts +4 -0
- package/dist/lib/esm/test-runners/index.mjs +58 -0
- package/dist/lib/esm/test-runners/integration-test-plugin.d.mts +44 -0
- package/dist/lib/esm/test-runners/integration-test-plugin.mjs +102 -0
- package/dist/lib/esm/test-runners/performance-eval-cap.d.mts +27 -0
- package/dist/lib/esm/test-runners/performance-eval-cap.mjs +56 -0
- package/dist/lib/esm/test-runners/stale-build-global-setup.d.mts +86 -0
- package/dist/lib/esm/test-runners/stale-build-global-setup.mjs +123 -0
- package/dist/lib/esm/test-runners/vitest-config.d.mts +200 -0
- package/dist/lib/esm/test-runners/vitest-config.mjs +377 -0
- package/dist/lib/esm/version.d.mts +92 -0
- package/dist/lib/esm/version.mjs +168 -0
- package/dist/lib/esm/vitest-setup.d.mts +11 -0
- package/dist/lib/esm/vitest-setup.mjs +61 -0
- package/dist/templates/.markdownlint-cli2.mjs +4 -0
- package/dist/templates/.nano-staged.mjs +4 -0
- package/dist/templates/commitlint.config.ts +3 -0
- package/dist/templates/dprint.json +26 -0
- package/dist/templates/eslint.config.mts +3 -0
- package/dist/templates/scripts/build/build-clean.ts +4 -0
- package/dist/templates/scripts/build/build-compile-svelte.ts +4 -0
- package/dist/templates/scripts/build/build-compile-typescript.ts +4 -0
- package/dist/templates/scripts/build/build-compile.ts +4 -0
- package/dist/templates/scripts/build/build-templates.ts +4 -0
- package/dist/templates/scripts/bundlers/esbuild/build.ts +4 -0
- package/dist/templates/scripts/bundlers/esbuild/dev.ts +4 -0
- package/dist/templates/scripts/commitlint-config.ts +3 -0
- package/dist/templates/scripts/eslint-config.ts +10 -0
- package/dist/templates/scripts/formatters/dprint/format-check.ts +8 -0
- package/dist/templates/scripts/formatters/dprint/format.ts +8 -0
- package/dist/templates/scripts/gate/gate.ts +10 -0
- package/dist/templates/scripts/linters/cspell/spellcheck.ts +8 -0
- package/dist/templates/scripts/linters/eslint/lint-fix.ts +8 -0
- package/dist/templates/scripts/linters/eslint/lint.ts +8 -0
- package/dist/templates/scripts/linters/markdownlint/lint-md-fix.ts +8 -0
- package/dist/templates/scripts/linters/markdownlint/lint-md.ts +8 -0
- package/dist/templates/scripts/linters/over-exposure/find-overexposed-fix.ts +25 -0
- package/dist/templates/scripts/linters/over-exposure/find-overexposed.ts +15 -0
- package/dist/templates/scripts/markdownlint-cli2-config.ts +3 -0
- package/dist/templates/scripts/nano-staged-config.ts +3 -0
- package/dist/templates/scripts/test-runners/vitest/test-coverage.ts +4 -0
- package/dist/templates/scripts/test-runners/vitest/test-watch.ts +4 -0
- package/dist/templates/scripts/test-runners/vitest/test.ts +4 -0
- package/dist/templates/scripts/version/version.ts +10 -0
- package/dist/templates/scripts/vitest-config.ts +3 -0
- package/dist/templates/vitest.config.ts +3 -0
- package/formatters/dprint/package.json +6 -0
- package/formatters/index/package.json +6 -0
- package/formatters/package.json +6 -0
- package/linters/eslint/package.json +6 -0
- package/linters/eslint-config/package.json +6 -0
- package/linters/eslint-rules/index/package.json +6 -0
- package/linters/eslint-rules/manifest-description/package.json +6 -0
- package/linters/eslint-rules/manifest-helpers/package.json +6 -0
- package/linters/eslint-rules/manifest-id/package.json +6 -0
- package/linters/eslint-rules/manifest-name/package.json +6 -0
- package/linters/eslint-rules/manifest-schema/package.json +6 -0
- package/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian/package.json +6 -0
- package/linters/eslint-rules/no-untrusted-input-events/package.json +6 -0
- package/linters/eslint-rules/obsidian-dev-utils-plugin/package.json +6 -0
- package/linters/eslint-rules/package.json +6 -0
- package/linters/eslint-rules/require-component-suffix/package.json +6 -0
- package/linters/index/package.json +6 -0
- package/linters/markdownlint/package.json +6 -0
- package/linters/obsidianmd-rule-custom-message/package.json +6 -0
- package/linters/package.json +6 -0
- package/package.json +241 -13
- package/test-runners/index/package.json +6 -0
- package/test-runners/integration-test-plugin/package.json +6 -0
- package/test-runners/package.json +6 -0
- package/test-runners/performance-eval-cap/package.json +6 -0
- package/test-runners/stale-build-global-setup/package.json +6 -0
- package/test-runners/vitest-config/package.json +6 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/*
|
|
2
|
+
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
3
|
+
if you want to view the source, please visit the github repository of this plugin
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
(function () {
|
|
7
|
+
function ensureDisposeSymbols(symbolConstructor = Symbol) {
|
|
8
|
+
symbolConstructor.asyncDispose ??= symbolConstructor.for('Symbol.asyncDispose');
|
|
9
|
+
symbolConstructor.dispose ??= symbolConstructor.for('Symbol.dispose');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function ensureBrowserProcess() {
|
|
13
|
+
const browserProcess = {
|
|
14
|
+
browser: true,
|
|
15
|
+
cwd() {
|
|
16
|
+
return '/';
|
|
17
|
+
},
|
|
18
|
+
env: {},
|
|
19
|
+
platform: 'android'
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line obsidianmd/no-global-this, unicorn/no-unnecessary-global-this -- Must stay `globalThis`-qualified: in the emitted banner a bare `process` is a free identifier, so reading it where the host has none throws a ReferenceError instead of yielding `undefined`. That is the very case this function exists to handle.
|
|
23
|
+
const existingProcess = globalThis.process;
|
|
24
|
+
|
|
25
|
+
if (!existingProcess) {
|
|
26
|
+
// eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
|
|
27
|
+
globalThis.process = browserProcess;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (existingProcess.versions?.node) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const existingProcessRecord = existingProcess;
|
|
36
|
+
|
|
37
|
+
for (const [key, value] of Object.entries(browserProcess)) {
|
|
38
|
+
existingProcessRecord[key] ??= value;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
existingProcessRecord['browser'] = true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function keepName($unknown) {
|
|
45
|
+
return $unknown;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
(function initCjs() {
|
|
49
|
+
// eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
|
|
50
|
+
const globalThisRecord = globalThis;
|
|
51
|
+
ensureDisposeSymbols();
|
|
52
|
+
globalThisRecord['__name'] ??= keepName;
|
|
53
|
+
globalThisRecord['__extractDefault'] ??= extractDefault;
|
|
54
|
+
|
|
55
|
+
ensureBrowserProcess();
|
|
56
|
+
|
|
57
|
+
// eslint-disable-next-line unicorn/consistent-function-scoping -- Serialized with initCjs into the banner; at module scope it would be left out of it.
|
|
58
|
+
function extractDefault(module) {
|
|
59
|
+
return module && module.__esModule && 'default' in module ? module.default : module;
|
|
60
|
+
}
|
|
61
|
+
})();
|
|
62
|
+
})();
|
|
63
|
+
(function patchObsidianRequire() {
|
|
64
|
+
const originalRequire = require;
|
|
65
|
+
if (!originalRequire || originalRequire.__isPatched) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// eslint-disable-next-line no-global-assign, no-implicit-globals -- We need to patch the `require()` function.
|
|
70
|
+
require = Object.assign(
|
|
71
|
+
(id) => requirePatched(id),
|
|
72
|
+
originalRequire,
|
|
73
|
+
{
|
|
74
|
+
__isPatched: true
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
function extractDefault(module) {
|
|
79
|
+
return module && module.__esModule && 'default' in module ? module.default : module;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const OBSIDIAN_BUILT_IN_MODULE_NAMES = new Set([
|
|
83
|
+
'@codemirror/autocomplete',
|
|
84
|
+
'@codemirror/collab',
|
|
85
|
+
'@codemirror/commands',
|
|
86
|
+
'@codemirror/language',
|
|
87
|
+
'@codemirror/lint',
|
|
88
|
+
'@codemirror/search',
|
|
89
|
+
'@codemirror/state',
|
|
90
|
+
'@codemirror/text',
|
|
91
|
+
'@codemirror/view',
|
|
92
|
+
'@lezer/common',
|
|
93
|
+
'@lezer/highlight',
|
|
94
|
+
'@lezer/lr',
|
|
95
|
+
'obsidian']
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
const DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES = new Set([
|
|
99
|
+
'@codemirror/closebrackets',
|
|
100
|
+
'@codemirror/comment',
|
|
101
|
+
'@codemirror/fold',
|
|
102
|
+
'@codemirror/gutter',
|
|
103
|
+
'@codemirror/highlight',
|
|
104
|
+
'@codemirror/history',
|
|
105
|
+
'@codemirror/matchbrackets',
|
|
106
|
+
'@codemirror/panel',
|
|
107
|
+
'@codemirror/rangeset',
|
|
108
|
+
'@codemirror/rectangular-selection',
|
|
109
|
+
'@codemirror/stream-parser',
|
|
110
|
+
'@codemirror/tooltip']
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
function requirePatched(id) {
|
|
114
|
+
if (OBSIDIAN_BUILT_IN_MODULE_NAMES.has(id) || DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES.has(id)) {
|
|
115
|
+
return originalRequire?.(id);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated, obsidianmd/no-global-this -- Need access to app. Actively use globalThis.
|
|
119
|
+
if (globalThis.app.isMobile) {
|
|
120
|
+
if (id === 'process' || id === 'node:process') {
|
|
121
|
+
// eslint-disable-next-line no-console -- Valid usage.
|
|
122
|
+
console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Fake process object is returned instead.`);
|
|
123
|
+
|
|
124
|
+
return process;
|
|
125
|
+
}
|
|
126
|
+
} else {
|
|
127
|
+
const module = originalRequire?.(id);
|
|
128
|
+
if (module) {
|
|
129
|
+
return extractDefault(module);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// eslint-disable-next-line no-console -- Valid usage.
|
|
134
|
+
console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Empty object is returned instead.`);
|
|
135
|
+
return {};
|
|
136
|
+
}
|
|
137
|
+
})();
|
|
138
|
+
|
|
139
|
+
"use strict";
|
|
140
|
+
var __create = Object.create;
|
|
141
|
+
var __defProp = Object.defineProperty;
|
|
142
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
143
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
144
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
145
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
146
|
+
var __export = (target, all) => {
|
|
147
|
+
for (var name in all)
|
|
148
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
149
|
+
};
|
|
150
|
+
var __copyProps = (to, from, except, desc) => {
|
|
151
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
152
|
+
for (let key of __getOwnPropNames(from))
|
|
153
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
154
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
155
|
+
}
|
|
156
|
+
return to;
|
|
157
|
+
};
|
|
158
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
159
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
160
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
161
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
162
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
163
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
164
|
+
mod
|
|
165
|
+
));
|
|
166
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
167
|
+
var formatters_exports = {};
|
|
168
|
+
__export(formatters_exports, {
|
|
169
|
+
dprint: () => dprint
|
|
170
|
+
});
|
|
171
|
+
module.exports = __toCommonJS(formatters_exports);
|
|
172
|
+
var dprint = __toESM(__extractDefault(require('./dprint.cjs')), 1);
|
|
173
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
174
|
+
0 && (module.exports = {
|
|
175
|
+
dprint
|
|
176
|
+
});
|
|
177
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vc3JjL2Zvcm1hdHRlcnMvaW5kZXgudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8qIFRISVMgSVMgQSBHRU5FUkFURUQvQlVORExFRCBGSUxFIEJZIEJVSUxEIFNDUklQVCAqL1xuXG5leHBvcnQgKiBhcyAnZHByaW50JyBmcm9tICcuL2RwcmludC50cyc7XG4iXSwKICAibWFwcGluZ3MiOiAiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUVBLGFBQTBCOyIsCiAgIm5hbWVzIjogW10KfQo=
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/*
|
|
2
|
+
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
3
|
+
if you want to view the source, please visit the github repository of this plugin
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
(function () {
|
|
7
|
+
function ensureDisposeSymbols(symbolConstructor = Symbol) {
|
|
8
|
+
symbolConstructor.asyncDispose ??= symbolConstructor.for('Symbol.asyncDispose');
|
|
9
|
+
symbolConstructor.dispose ??= symbolConstructor.for('Symbol.dispose');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function ensureBrowserProcess() {
|
|
13
|
+
const browserProcess = {
|
|
14
|
+
browser: true,
|
|
15
|
+
cwd() {
|
|
16
|
+
return '/';
|
|
17
|
+
},
|
|
18
|
+
env: {},
|
|
19
|
+
platform: 'android'
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line obsidianmd/no-global-this, unicorn/no-unnecessary-global-this -- Must stay `globalThis`-qualified: in the emitted banner a bare `process` is a free identifier, so reading it where the host has none throws a ReferenceError instead of yielding `undefined`. That is the very case this function exists to handle.
|
|
23
|
+
const existingProcess = globalThis.process;
|
|
24
|
+
|
|
25
|
+
if (!existingProcess) {
|
|
26
|
+
// eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
|
|
27
|
+
globalThis.process = browserProcess;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (existingProcess.versions?.node) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const existingProcessRecord = existingProcess;
|
|
36
|
+
|
|
37
|
+
for (const [key, value] of Object.entries(browserProcess)) {
|
|
38
|
+
existingProcessRecord[key] ??= value;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
existingProcessRecord['browser'] = true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function keepName($unknown) {
|
|
45
|
+
return $unknown;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
(function initCjs() {
|
|
49
|
+
// eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
|
|
50
|
+
const globalThisRecord = globalThis;
|
|
51
|
+
ensureDisposeSymbols();
|
|
52
|
+
globalThisRecord['__name'] ??= keepName;
|
|
53
|
+
globalThisRecord['__extractDefault'] ??= extractDefault;
|
|
54
|
+
|
|
55
|
+
ensureBrowserProcess();
|
|
56
|
+
|
|
57
|
+
// eslint-disable-next-line unicorn/consistent-function-scoping -- Serialized with initCjs into the banner; at module scope it would be left out of it.
|
|
58
|
+
function extractDefault(module) {
|
|
59
|
+
return module && module.__esModule && 'default' in module ? module.default : module;
|
|
60
|
+
}
|
|
61
|
+
})();
|
|
62
|
+
})();
|
|
63
|
+
(function patchObsidianRequire() {
|
|
64
|
+
const originalRequire = require;
|
|
65
|
+
if (!originalRequire || originalRequire.__isPatched) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// eslint-disable-next-line no-global-assign, no-implicit-globals -- We need to patch the `require()` function.
|
|
70
|
+
require = Object.assign(
|
|
71
|
+
(id) => requirePatched(id),
|
|
72
|
+
originalRequire,
|
|
73
|
+
{
|
|
74
|
+
__isPatched: true
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
function extractDefault(module) {
|
|
79
|
+
return module && module.__esModule && 'default' in module ? module.default : module;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const OBSIDIAN_BUILT_IN_MODULE_NAMES = new Set([
|
|
83
|
+
'@codemirror/autocomplete',
|
|
84
|
+
'@codemirror/collab',
|
|
85
|
+
'@codemirror/commands',
|
|
86
|
+
'@codemirror/language',
|
|
87
|
+
'@codemirror/lint',
|
|
88
|
+
'@codemirror/search',
|
|
89
|
+
'@codemirror/state',
|
|
90
|
+
'@codemirror/text',
|
|
91
|
+
'@codemirror/view',
|
|
92
|
+
'@lezer/common',
|
|
93
|
+
'@lezer/highlight',
|
|
94
|
+
'@lezer/lr',
|
|
95
|
+
'obsidian']
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
const DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES = new Set([
|
|
99
|
+
'@codemirror/closebrackets',
|
|
100
|
+
'@codemirror/comment',
|
|
101
|
+
'@codemirror/fold',
|
|
102
|
+
'@codemirror/gutter',
|
|
103
|
+
'@codemirror/highlight',
|
|
104
|
+
'@codemirror/history',
|
|
105
|
+
'@codemirror/matchbrackets',
|
|
106
|
+
'@codemirror/panel',
|
|
107
|
+
'@codemirror/rangeset',
|
|
108
|
+
'@codemirror/rectangular-selection',
|
|
109
|
+
'@codemirror/stream-parser',
|
|
110
|
+
'@codemirror/tooltip']
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
function requirePatched(id) {
|
|
114
|
+
if (OBSIDIAN_BUILT_IN_MODULE_NAMES.has(id) || DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES.has(id)) {
|
|
115
|
+
return originalRequire?.(id);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated, obsidianmd/no-global-this -- Need access to app. Actively use globalThis.
|
|
119
|
+
if (globalThis.app.isMobile) {
|
|
120
|
+
if (id === 'process' || id === 'node:process') {
|
|
121
|
+
// eslint-disable-next-line no-console -- Valid usage.
|
|
122
|
+
console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Fake process object is returned instead.`);
|
|
123
|
+
|
|
124
|
+
return process;
|
|
125
|
+
}
|
|
126
|
+
} else {
|
|
127
|
+
const module = originalRequire?.(id);
|
|
128
|
+
if (module) {
|
|
129
|
+
return extractDefault(module);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// eslint-disable-next-line no-console -- Valid usage.
|
|
134
|
+
console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Empty object is returned instead.`);
|
|
135
|
+
return {};
|
|
136
|
+
}
|
|
137
|
+
})();
|
|
138
|
+
|
|
139
|
+
"use strict";
|
|
140
|
+
var __create = Object.create;
|
|
141
|
+
var __defProp = Object.defineProperty;
|
|
142
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
143
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
144
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
145
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
146
|
+
var __export = (target, all) => {
|
|
147
|
+
for (var name in all)
|
|
148
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
149
|
+
};
|
|
150
|
+
var __copyProps = (to, from, except, desc) => {
|
|
151
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
152
|
+
for (let key of __getOwnPropNames(from))
|
|
153
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
154
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
155
|
+
}
|
|
156
|
+
return to;
|
|
157
|
+
};
|
|
158
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
159
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
160
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
161
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
162
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
163
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
164
|
+
mod
|
|
165
|
+
));
|
|
166
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
167
|
+
var index_exports = {};
|
|
168
|
+
__export(index_exports, {
|
|
169
|
+
bundlers: () => bundlers,
|
|
170
|
+
"demo-vault": () => demo_vault,
|
|
171
|
+
"demo-vault-app-json": () => demo_vault_app_json,
|
|
172
|
+
"demo-vault-buttons": () => demo_vault_buttons,
|
|
173
|
+
"demo-vault-coverage": () => demo_vault_coverage,
|
|
174
|
+
formatters: () => formatters,
|
|
175
|
+
linters: () => linters,
|
|
176
|
+
"obsidian-plugin-repo-paths": () => obsidian_plugin_repo_paths,
|
|
177
|
+
templates: () => templates,
|
|
178
|
+
"test-runners": () => test_runners,
|
|
179
|
+
version: () => version
|
|
180
|
+
});
|
|
181
|
+
module.exports = __toCommonJS(index_exports);
|
|
182
|
+
var bundlers = __toESM(__extractDefault(require('./bundlers/index.cjs')), 1);
|
|
183
|
+
var demo_vault_app_json = __toESM(__extractDefault(require('./demo-vault-app-json.cjs')), 1);
|
|
184
|
+
var demo_vault_buttons = __toESM(__extractDefault(require('./demo-vault-buttons.cjs')), 1);
|
|
185
|
+
var demo_vault_coverage = __toESM(__extractDefault(require('./demo-vault-coverage.cjs')), 1);
|
|
186
|
+
var demo_vault = __toESM(__extractDefault(require('./demo-vault.cjs')), 1);
|
|
187
|
+
var formatters = __toESM(__extractDefault(require('./formatters/index.cjs')), 1);
|
|
188
|
+
var linters = __toESM(__extractDefault(require('./linters/index.cjs')), 1);
|
|
189
|
+
var obsidian_plugin_repo_paths = __toESM(__extractDefault(require('./obsidian-plugin-repo-paths.cjs')), 1);
|
|
190
|
+
var templates = __toESM(__extractDefault(require('./templates.cjs')), 1);
|
|
191
|
+
var test_runners = __toESM(__extractDefault(require('./test-runners/index.cjs')), 1);
|
|
192
|
+
var version = __toESM(__extractDefault(require('./version.cjs')), 1);
|
|
193
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
194
|
+
0 && (module.exports = {
|
|
195
|
+
bundlers,
|
|
196
|
+
"demo-vault": null,
|
|
197
|
+
"demo-vault-app-json": null,
|
|
198
|
+
"demo-vault-buttons": null,
|
|
199
|
+
"demo-vault-coverage": null,
|
|
200
|
+
formatters,
|
|
201
|
+
linters,
|
|
202
|
+
"obsidian-plugin-repo-paths": null,
|
|
203
|
+
templates,
|
|
204
|
+
"test-runners": null,
|
|
205
|
+
version
|
|
206
|
+
});
|
|
207
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4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7
|
+
export * as 'demo-vault-app-json' from './demo-vault-app-json.cjs';
|
|
8
|
+
export * as 'demo-vault-buttons' from './demo-vault-buttons.cjs';
|
|
9
|
+
export * as 'demo-vault-coverage' from './demo-vault-coverage.cjs';
|
|
10
|
+
export * as 'demo-vault' from './demo-vault.cjs';
|
|
11
|
+
export * as 'formatters' from './formatters/index.cjs';
|
|
12
|
+
export * as 'linters' from './linters/index.cjs';
|
|
13
|
+
export * as 'obsidian-plugin-repo-paths' from './obsidian-plugin-repo-paths.cjs';
|
|
14
|
+
export * as 'templates' from './templates.cjs';
|
|
15
|
+
export * as 'test-runners' from './test-runners/index.cjs';
|
|
16
|
+
export * as 'version' from './version.cjs';
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/*
|
|
2
|
+
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
3
|
+
if you want to view the source, please visit the github repository of this plugin
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
(function () {
|
|
7
|
+
function ensureDisposeSymbols(symbolConstructor = Symbol) {
|
|
8
|
+
symbolConstructor.asyncDispose ??= symbolConstructor.for('Symbol.asyncDispose');
|
|
9
|
+
symbolConstructor.dispose ??= symbolConstructor.for('Symbol.dispose');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function ensureBrowserProcess() {
|
|
13
|
+
const browserProcess = {
|
|
14
|
+
browser: true,
|
|
15
|
+
cwd() {
|
|
16
|
+
return '/';
|
|
17
|
+
},
|
|
18
|
+
env: {},
|
|
19
|
+
platform: 'android'
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line obsidianmd/no-global-this, unicorn/no-unnecessary-global-this -- Must stay `globalThis`-qualified: in the emitted banner a bare `process` is a free identifier, so reading it where the host has none throws a ReferenceError instead of yielding `undefined`. That is the very case this function exists to handle.
|
|
23
|
+
const existingProcess = globalThis.process;
|
|
24
|
+
|
|
25
|
+
if (!existingProcess) {
|
|
26
|
+
// eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
|
|
27
|
+
globalThis.process = browserProcess;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (existingProcess.versions?.node) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const existingProcessRecord = existingProcess;
|
|
36
|
+
|
|
37
|
+
for (const [key, value] of Object.entries(browserProcess)) {
|
|
38
|
+
existingProcessRecord[key] ??= value;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
existingProcessRecord['browser'] = true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function keepName($unknown) {
|
|
45
|
+
return $unknown;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
(function initCjs() {
|
|
49
|
+
// eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
|
|
50
|
+
const globalThisRecord = globalThis;
|
|
51
|
+
ensureDisposeSymbols();
|
|
52
|
+
globalThisRecord['__name'] ??= keepName;
|
|
53
|
+
globalThisRecord['__extractDefault'] ??= extractDefault;
|
|
54
|
+
|
|
55
|
+
ensureBrowserProcess();
|
|
56
|
+
|
|
57
|
+
// eslint-disable-next-line unicorn/consistent-function-scoping -- Serialized with initCjs into the banner; at module scope it would be left out of it.
|
|
58
|
+
function extractDefault(module) {
|
|
59
|
+
return module && module.__esModule && 'default' in module ? module.default : module;
|
|
60
|
+
}
|
|
61
|
+
})();
|
|
62
|
+
})();
|
|
63
|
+
(function patchObsidianRequire() {
|
|
64
|
+
const originalRequire = require;
|
|
65
|
+
if (!originalRequire || originalRequire.__isPatched) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// eslint-disable-next-line no-global-assign, no-implicit-globals -- We need to patch the `require()` function.
|
|
70
|
+
require = Object.assign(
|
|
71
|
+
(id) => requirePatched(id),
|
|
72
|
+
originalRequire,
|
|
73
|
+
{
|
|
74
|
+
__isPatched: true
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
function extractDefault(module) {
|
|
79
|
+
return module && module.__esModule && 'default' in module ? module.default : module;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const OBSIDIAN_BUILT_IN_MODULE_NAMES = new Set([
|
|
83
|
+
'@codemirror/autocomplete',
|
|
84
|
+
'@codemirror/collab',
|
|
85
|
+
'@codemirror/commands',
|
|
86
|
+
'@codemirror/language',
|
|
87
|
+
'@codemirror/lint',
|
|
88
|
+
'@codemirror/search',
|
|
89
|
+
'@codemirror/state',
|
|
90
|
+
'@codemirror/text',
|
|
91
|
+
'@codemirror/view',
|
|
92
|
+
'@lezer/common',
|
|
93
|
+
'@lezer/highlight',
|
|
94
|
+
'@lezer/lr',
|
|
95
|
+
'obsidian']
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
const DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES = new Set([
|
|
99
|
+
'@codemirror/closebrackets',
|
|
100
|
+
'@codemirror/comment',
|
|
101
|
+
'@codemirror/fold',
|
|
102
|
+
'@codemirror/gutter',
|
|
103
|
+
'@codemirror/highlight',
|
|
104
|
+
'@codemirror/history',
|
|
105
|
+
'@codemirror/matchbrackets',
|
|
106
|
+
'@codemirror/panel',
|
|
107
|
+
'@codemirror/rangeset',
|
|
108
|
+
'@codemirror/rectangular-selection',
|
|
109
|
+
'@codemirror/stream-parser',
|
|
110
|
+
'@codemirror/tooltip']
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
function requirePatched(id) {
|
|
114
|
+
if (OBSIDIAN_BUILT_IN_MODULE_NAMES.has(id) || DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES.has(id)) {
|
|
115
|
+
return originalRequire?.(id);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated, obsidianmd/no-global-this -- Need access to app. Actively use globalThis.
|
|
119
|
+
if (globalThis.app.isMobile) {
|
|
120
|
+
if (id === 'process' || id === 'node:process') {
|
|
121
|
+
// eslint-disable-next-line no-console -- Valid usage.
|
|
122
|
+
console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Fake process object is returned instead.`);
|
|
123
|
+
|
|
124
|
+
return process;
|
|
125
|
+
}
|
|
126
|
+
} else {
|
|
127
|
+
const module = originalRequire?.(id);
|
|
128
|
+
if (module) {
|
|
129
|
+
return extractDefault(module);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// eslint-disable-next-line no-console -- Valid usage.
|
|
134
|
+
console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Empty object is returned instead.`);
|
|
135
|
+
return {};
|
|
136
|
+
}
|
|
137
|
+
})();
|
|
138
|
+
|
|
139
|
+
"use strict";
|
|
140
|
+
var import_integration_test_plugin = require('./test-runners/integration-test-plugin.cjs');
|
|
141
|
+
(0, import_integration_test_plugin.registerIntegrationTestLibResolver)();
|
|
142
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vc3JjL2ludGVncmF0aW9uLXRlc3Qtc2V0dXAudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8qKlxuICogQGZpbGVcbiAqXG4gKiBQZXItd29ya2VyIGludGVncmF0aW9uLXRlc3Qgc2V0dXAgZW5kcG9pbnQ6IG1ha2VzIGV2ZXJ5IGxpYnJhcnkgaGVscGVyIHJlYWNoYWJsZSBhcyBgbGliLjxoZWxwZXI+YCBpbnNpZGVcbiAqIGFuIGBldmFsSW5PYnNpZGlhbmAgY2xvc3VyZS5cbiAqXG4gKiBBZGQgaXQgdG8gdGhlIGBzZXR1cEZpbGVzYCBvZiBlYWNoIGludGVncmF0aW9uLXRlc3QgcHJvamVjdCwgYWZ0ZXIgYG9ic2lkaWFuLWludGVncmF0aW9uLXRlc3RpbmdgJ3Mgb3duXG4gKiBzZXR1cDpcbiAqXG4gKiBgYGB0c1xuICogc2V0dXBG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Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBaUNBLHFDQUFtRDtBQUFBLElBRW5ELG1FQUFtQzsiLAogICJuYW1lcyI6IFtdCn0K
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference path="./index.d.cts" />
|
|
2
|
+
/**
|
|
3
|
+
* @file
|
|
4
|
+
*
|
|
5
|
+
* Per-worker integration-test setup endpoint: makes every library helper reachable as `lib.<helper>` inside
|
|
6
|
+
* an `evalInObsidian` closure.
|
|
7
|
+
*
|
|
8
|
+
* Add it to the `setupFiles` of each integration-test project, after `obsidian-integration-testing`'s own
|
|
9
|
+
* setup:
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* setupFiles: [
|
|
13
|
+
* 'obsidian-integration-testing/vitest-setup',
|
|
14
|
+
* 'obsidian-dev-utils/integration-test-setup'
|
|
15
|
+
* ]
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* Importing this module registers a renderer-side resolver whose result the harness merges into the `lib`
|
|
19
|
+
* argument of every `evalInObsidian` callback. Two more pieces are needed for `lib.<helper>` to work:
|
|
20
|
+
*
|
|
21
|
+
* - The **harness plugin** must be loaded in the test vault, because it is what publishes the library on
|
|
22
|
+
* `window.__obsidianDevUtilsModule`. Seed and enable it via
|
|
23
|
+
* `obsidian-dev-utils/integration-test-vitest-global-setup` (or, when composing with your own vault
|
|
24
|
+
* fixtures, {@link getIntegrationTestPluginPopulate} +
|
|
25
|
+
* `createSetup({ enableCommunityPlugins: [OBSIDIAN_DEV_UTILS_INTEGRATION_TEST_PLUGIN_ID] })`).
|
|
26
|
+
* - The **types** must be activated, or `lib.<helper>` will not compile. Put
|
|
27
|
+
* `/// <reference types="obsidian-dev-utils/@types/obsidian-integration-testing" />` in a `.d.ts` your
|
|
28
|
+
* `tsconfig.json` already includes. A `compilerOptions.types` entry does NOT work for this.
|
|
29
|
+
*
|
|
30
|
+
* Registration is idempotent (the harness dedupes resolvers by source text), so importing this module from
|
|
31
|
+
* more than one setup file is safe.
|
|
32
|
+
*/
|
|
33
|
+
export {};
|