13 |
14 |
15 |
--------------------------------------------------------------------------------
/packages/common-server/src/__tests__/file.spec.ts:
--------------------------------------------------------------------------------
1 | import { cleanFileName } from "../files";
2 |
3 | describe("cleanFileName", () => {
4 | test("cleanFileName", () => {
5 | expect(cleanFileName("foo")).toEqual("foo");
6 | });
7 |
8 | // TODO: doesn't work on windows
9 | test.skip("cleanFileName", () => {
10 | expect(cleanFileName("Data/1 foo.md")).toEqual("data.1-foo");
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/packages/plugin-core/src/external/memo/types.ts:
--------------------------------------------------------------------------------
1 | import { Uri } from 'vscode';
2 |
3 | export type WorkspaceCache = {
4 | imageUris: Uri[];
5 | markdownUris: Uri[];
6 | otherUris: Uri[];
7 | allUris: Uri[];
8 | danglingRefs: string[];
9 | danglingRefsByFsPath: { [key: string]: string[] };
10 | };
11 |
12 | export type RefT = {
13 | label: string;
14 | ref: string;
15 | };
16 |
--------------------------------------------------------------------------------
/packages/engine-server/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./enginev2";
2 | export * from "./config";
3 | export * from "./drivers/file/storev2";
4 | export * from "./utils";
5 | export * from "./topics/markdown";
6 | export * from "./topics/connector";
7 | export * from "./topics/git";
8 | export * from "./fuseEngine";
9 | export * from "./engineClient";
10 | export * from "./workspace";
11 | export * from "./types";
12 |
--------------------------------------------------------------------------------
/packages/plugin-core/scripts/publish.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | export OVSX_PAT=`cat /Users/kevinlin/projects/dendronv2/dendron-playbooks/secrets/OVSX_PAT`
4 |
5 | # echo "upgrade version..."
6 | # yarn version --patch
7 |
8 | # echo "publish..."
9 | # vsce package
10 |
11 | echo "publish to vscode..."
12 | vsce publish
13 |
14 | echo "publish to ovsx..."
15 | ovsx publish
16 |
17 | # echo "push..."
18 | # git push
--------------------------------------------------------------------------------
/packages/common-all/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./types";
2 | export * from "./typesv2";
3 | export * from "./nodev2";
4 | export * from "./helpers";
5 | export * from "./env";
6 | export * from "./logger";
7 | export * from "./assert";
8 | export * from "./uuid";
9 | export * from "./constants";
10 | export * from "./error";
11 | export * from "./time";
12 | export * from "./utils";
13 | export * from "./vault";
14 |
--------------------------------------------------------------------------------
/packages/dendron-next-server/lib/env.ts:
--------------------------------------------------------------------------------
1 | import _ from "lodash"
2 | import { ENV } from "./config"
3 | import { StageEnv } from "./types";
4 |
5 | export function getStage() {
6 | return process.env.STAGE
7 | }
8 |
9 | export function env(key: keyof StageEnv): any {
10 | const stage = getStage();
11 | return ENV[stage][key]
12 | }
13 |
14 | export function dump(): StageEnv {
15 | return ENV[getStage()];
16 | }
17 |
--------------------------------------------------------------------------------
/dev/dev.t.changelog.md:
--------------------------------------------------------------------------------
1 | # Cook
2 |
3 | ### Updating the changelog
4 |
5 | - make edits in {root}/CHANGELOG.md
6 |
7 | ```sh
8 | cp CHANGELOG.md packages/plugin-core/CHANGELOG.md
9 | git add .
10 | git commit -m "chore: update changelog"
11 | git push
12 | ```
13 |
14 | ### Updating git tags
15 |
16 | GIT_TAG="v0.4.3"
17 | git tag $GIT_TAG --delete
18 | git push --delete origin $GIT_TAG
19 | git tag \$GIT_TAG
20 | git push --tags
21 |
--------------------------------------------------------------------------------
/packages/lsp-server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2019",
4 | "lib": ["ES2019"],
5 | "module": "commonjs",
6 | "moduleResolution": "node",
7 | "esModuleInterop": true,
8 | "skipLibCheck": true,
9 | "sourceMap": true,
10 | "strict": true,
11 | "outDir": "out",
12 | "rootDir": "src"
13 | },
14 | "include": ["src"],
15 | "exclude": ["node_modules", ".vscode-test"]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/api-server/src/store/__tests__/memoryStore.spec.ts:
--------------------------------------------------------------------------------
1 | import { MemoryStore } from "../memoryStore";
2 |
3 | describe("memory store", () => {
4 | let store: MemoryStore;
5 |
6 | beforeEach(() => {
7 | store = MemoryStore.instance(true);
8 | });
9 |
10 | test("basic", async () => {
11 | await store.put("foo", 1);
12 | const resp = await store.list("foo");
13 | expect(resp).toMatchSnapshot();
14 | });
15 | });
16 |
--------------------------------------------------------------------------------
/packages/lsp-client/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es2019",
5 | "lib": ["ES2019"],
6 | "outDir": "out",
7 | "rootDir": "src",
8 | "sourceMap": true
9 | },
10 | "include": [
11 | "src"
12 | ],
13 | "exclude": [
14 | "node_modules",
15 | ".vscode-test"
16 | ],
17 | "references": [
18 | { "path": "./client" },
19 | { "path": "./server" }
20 | ]
21 | }
--------------------------------------------------------------------------------
/packages/plugin-core/src/extension.ts:
--------------------------------------------------------------------------------
1 | import * as vscode from "vscode";
2 | import { Logger } from "./logger";
3 | import { DWorkspace } from "./workspacev2";
4 |
5 | export function activate(context: vscode.ExtensionContext) {
6 | Logger.configure(context, "debug");
7 | require("./_extension").activate(context);
8 | return { DWorkspace };
9 | }
10 |
11 | export function deactivate() {
12 | require("./_extension").deactivate();
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/dendron-remark-math/types/test.ts:
--------------------------------------------------------------------------------
1 | import unified from 'unified' // eslint-disable-line import/no-extraneous-dependencies
2 | import math from 'remark-math'
3 |
4 | // $ExpectType Processor
26 | {JSON.stringify(data)}
27 |
28 |
29 |